((Literal)(this.LoginView_userinfo.FindControl("avatar"))).Text = "<img id=\"avatar\" src=\"/img/avatar/default.jpg\" height=\"80px\" />";
}
int[] posrep = PowerPlayUserProvider.getRatingPPL(Page.User.Identity.Name);
if (posrep != null)
{
((Literal)(this.LoginView_userinfo.FindControl("ratingppl"))).Text = "Рейтинг PPL: " + posrep[1].ToString() + " / ";
((Literal)(this.LoginView_userinfo.FindControl("positionppl"))).Text = posrep[0].ToString();
}
else
{
((Literal)(this.LoginView_userinfo.FindControl("ratingppl"))).Text = "Рейтинг PPL: 0 / ";
((Literal)(this.LoginView_userinfo.FindControl("positionppl"))).Text = "0";
}
float[] reputation = PowerPlayUserProvider.getReputation(Page.User.Identity.Name);
if (reputation != null)
{
((Literal)(this.LoginView_userinfo.FindControl("reputation"))).Text = "Репутация: " + reputation[1].ToString() + " / ";
((Literal)(this.LoginView_userinfo.FindControl("positionrep"))).Text = reputation[0].ToString();
}
else
{
((Literal)(this.LoginView_userinfo.FindControl("reputation"))).Text = "Репутация: 0 / ";
((Literal)(this.LoginView_userinfo.FindControl("positionrep"))).Text = "0";
}
}
year.Text = "POWERPLAY © " + DateTime.Now.Year;
}
}
}
namespace powerplay
{
public partial class _private : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
inity();
}
public void inity()
{
if (((Literal)this.LoginView_userinfo.FindControl("name_label")) != null)
{
((Literal)(this.LoginView_userinfo.FindControl("name_label"))).Text = Page.User.Identity.Name;
((Literal)(this.LoginView_userinfo.FindControl("role_label"))).Text = "(" + ((RolePrincipal)Page.User).GetRoles()[0] + ")";
MembershipUser user = Membership.GetUser();
string []team = PowerPlayUserProvider.getTeamByUsername(Page.User.Identity.Name);
if (team != null)
{
((Literal)(this.LoginView_userinfo.FindControl("team_label"))).Text = "КХЛ: " + team[0].ToString();
}
string avatar = PowerPlayUserProvider.getAvatar(Page.User.Identity.Name);
if (avatar != null && avatar != "")
{
((Literal)(this.LoginView_userinfo.FindControl("avatar"))).Text = "<img id=\"avatar\" src=\"" + avatar + "\" height=\"80px\" />";
}
else
{
((Literal)(this.LoginView_userinfo.FindControl("avatar"))).Text = "<img id=\"avatar\" src=\"/img/avatar/default.jpg\" height=\"80px\" />";
}
int[] posrep = PowerPlayUserProvider.getRatingPPL(Page.User.Identity.Name);
if (posrep != null)
{
((Literal)(this.LoginView_userinfo.FindControl("ratingppl"))).Text = "Рейтинг PPL: " + posrep[1].ToString() + " / ";
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.