protected void Page_Load(object sender, EventArgs e)
 {
     lblyazarSayisi.Text  = kullanicilar.YazarAdetDonder().ToString();
     lbluyeSayisi.Text    = kullanicilar.UyeAdetDonder().ToString();
     lblyorumSayisi.Text  = yorumlar.YorumSayisiDonder().ToString();
     lblGundemSayisi.Text = gundemler.GundemSayisiDonder().ToString();
     if (Request.Cookies["cerezDosyam"] != null)
     {
         HttpCookie cerezOku = Request.Cookies["cerezdosyam"];
         kullanicilar.mail      = cerezOku["mail"].ToString();
         AdministratorName.Text = kullanicilar.KullaniciAdGonder();
     }
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dtGundemler = new DataTable();

            if (Request.Cookies["cerezDosyam"] != null)
            {
                HttpCookie cerezOku = Request.Cookies["cerezdosyam"];
                kullanicilar.mail = cerezOku["mail"].ToString();
                gundemler.mail    = cerezOku["mail"].ToString();
                int k_paun = kullanicilar.KullaniciPuanDonder();
                if (k_paun > 249)
                {
                    imgYetkiDurum.ImageUrl = "img/YazarIcon.png";
                }
                else
                {
                    imgYetkiDurum.ImageUrl = "img/UyeIcon.png";
                }
                imgYetkiDurum.ToolTip       = "Yetki Durumunuz";
                lnkkullaniciadi.Text        = "Hoşgeldiniz " + kullanicilar.KullaniciAdGonder();
                lnkkullaniciadi.PostBackUrl = "KullaniciProfil.aspx";
                lnkGiris.Visible            = false;
                lnkKaydol.Visible           = false;
                int rolid = kullanicilar.RolidDonder();
                if (rolid == (int)Rolu.Yazar)
                {
                    lnkGundemEkle.Visible = true;
                }
                else if (rolid == (int)Rolu.Admin)
                {
                    HttpCookie cerezim = new HttpCookie("cerezdosyam");
                    cerezim.Expires = DateTime.Now.AddDays(-1);
                    Response.Cookies.Add(cerezim);
                    Response.Redirect("Default.aspx");
                }
                else
                {
                    lnkGundemEkle.Visible = false;
                }
            }
            else
            {
                imgYetkiDurum.Visible = false;
                lnkCikis.Visible      = false;
                lnkGundemEkle.Visible = false;
            }
        }