protected void Rt1_Changed(object sender, AjaxControlToolkit.RatingEventArgs e)
    {
        Snlg_DBParameter[] prms = new Snlg_DBParameter[4];
        prms[0] = new Snlg_DBParameter("@MakId", SqlDbType.Int, Request.QueryString["makid"]);
        prms[1] = new Snlg_DBParameter("@Puan", SqlDbType.TinyInt, e.Value);

        prms[2] = new Snlg_DBParameter("@YazanId", SqlDbType.Int);
        prms[3] = new Snlg_DBParameter("@IP", SqlDbType.VarChar, 15);
        if (string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId.ToString()))
        {//üye değilse
            prms[2].Deger = DBNull.Value;
            prms[3].Deger = Request.ServerVariables["REMOTE_ADDR"];
        }
        else
        {//üye ise
            prms[2].Deger = Snlg_MemberInfo.s_UserId;
            prms[3].Deger = DBNull.Value;
        }

        try
        {
            vt.SorguCalistir("snlg_V1.zsp_makale_PuanEkle", CommandType.StoredProcedure, prms);
            Snlg_Hata.ziyaretci.HataGosterBasarili(GetGlobalResourceObject("default", "makale_detay_ascx_hata04").ToString(), false);
        }
        catch (Exception exc) { Snlg_Hata.ziyaretci.ExceptionLogla(exc); }
    }
Example #2
0
 protected void BtnKaydet_Click(object sender, EventArgs e)
 {
     if (YetkiKontrol(pageName + "-Update"))
     {
         Snlg_DBConnect vt = new Snlg_DBConnect(true);
         try
         {
             foreach (GridViewRow satir in GV1.Rows)
             {
                 Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
                 DBPrms[0] = new Snlg_DBParameter("@Title", SqlDbType.NVarChar, ((TextBox)satir.FindControl("TB")).Text, 100);
                 DBPrms[1] = new Snlg_DBParameter("@ContainerId", SqlDbType.SmallInt, GV1.DataKeys[satir.RowIndex].Value.ToString());
                 if (string.IsNullOrEmpty(DBPrms[0].Deger.ToString()))
                 {
                     return;
                 }
                 vt.SorguCalistir("UPDATE snlg_V1.TblPlaceHolders SET Title = @Title WHERE (ContainerId = @ContainerId) ", CommandType.Text, DBPrms);
             }
             Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler kaydedildi.", false);
         }
         catch (Exception exc)
         {
             Snlg_Hata.ziyaretci.ExceptionLogla(exc);
             Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", false);
         }
         vt.Kapat();
     }
 }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //site içi sayfa linkleri listeleniyor
            Snlg_DBConnect vt = new Snlg_DBConnect(true);

            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
            DBPrms[0] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, DBNull.Value);
            using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.msp_LinkListele", CommandType.StoredProcedure, DBPrms))
            {
                while (sdr.Read())
                {
                    ListItem item = new ListItem(sdr["LinkText"].ToString(), sdr["Link"].ToString());
                    item.Selected = sdr["Link"].ToString() == "/" + Snlg_ConfigValues.startPage;
                    DDLLinks.Items.Add(item);
                }
            }

            DataTable dtLang = vt.DataTableOlustur("SELECT DId, Name FROM snlg_V1.TblDiller WHERE Aktif = 1 ORDER BY Name", CommandType.Text);
            DDLDefLang.DataSource = dtLang;
            DDLDefLang.DataBind();
            DDLAdminLang.DataSource = dtLang;
            DDLAdminLang.DataBind();

            vt.Kapat();
            CBExtension.Checked = !string.IsNullOrEmpty(Snlg_ConfigValues.urlExtension);
            try { DDLDefLang.SelectedValue = Snlg_ConfigValues.defaultLangId; }
            catch { }
            try { DDLAdminLang.SelectedValue = Snlg_ConfigValues.adminDefaultLangId.ToString(); }
            catch { }
        }
    }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId))
        {
            this.Visible = false;
        }
        else
        {
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
            DBPrms[0] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Snlg_MemberInfo.s_UserId);
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

            using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_UyeDetaySec", CommandType.StoredProcedure, DBPrms))
            {
                if (sdr.Read())
                {
                    if (!string.IsNullOrEmpty(sdr["Resim"].ToString()))
                    {
                        ImgRes.ImageUrl = sdr["Resim"].ToString();
                        ImgRes.Visible  = true;
                    }
                    LtrUyeAdi.Text = sdr["UyeAd"].ToString();
                }
            }
        }
    }
Example #5
0
    protected void BtnLogin_Click(object sender, EventArgs e)
    {
        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[3];
        DBPrms[0] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, Snlg_ConfigValues.MD5Olustur(Request.Form["TLogSifre"]), 128);
        DBPrms[1] = new Snlg_DBParameter("@AdminId", SqlDbType.Int, Snlg_ConfigValues.AdminId);
        DBPrms[2] = new Snlg_DBParameter("@UserName", SqlDbType.NVarChar, Request.Form["TLogUser"], 25);

        try
        {
            SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_UyeLogin", CommandType.StoredProcedure, DBPrms);
            if (sdr.Read())
            {
                //Snlg_MemberInfo.s_UserId = sdr["UyeId"].ToString();
                Snlg_MemberInfo.s_UserId = sdr["UyeId"].ToString();
                //Snlg_MemberInfo.c_LoginGuid = sdr["LoginGuid"].ToString();
                Snlg_MemberInfo.s_UserUrl = sdr["SeoUrl"].ToString();
                if (!string.IsNullOrEmpty(sdr[1].ToString().Trim()))
                {
                    //Snlg_MemberInfo.s_YetkiSayfalar = sdr[1].ToString().Trim() + ",";
                    Snlg_MemberInfo.s_YetkiSayfalar = sdr[1].ToString().Trim() + ",";
                }

                Thread.Sleep(3000);
                Snlg_MemberInfo.s_UserName = Request.Form["TLogUser"];
                //Snlg_Hata.ziyaretci.HataGosterBasarili("Giriş başarılı.", true, "[rel=" + this.ClientID + "]");
                Response.Redirect(Request.RawUrl, false);
            }
            else
            {
                //Snlg_MemberInfo.s_UserId = null;
                Snlg_MemberInfo.s_UserId = null;
                //Snlg_MemberInfo.c_LoginGuid = null;
                Snlg_MemberInfo.s_UserUrl = null;
                //Snlg_MemberInfo.s_YetkiSayfalar = null;
                Snlg_MemberInfo.s_YetkiSayfalar = null;
                //Snlg_MemberInfo.c_UserName = null;
            }
            sdr.Close();
        }
        catch (Exception exc)
        {
            //Snlg_MemberInfo.s_UserId = null;
            Snlg_MemberInfo.s_UserId = null;
            //Snlg_MemberInfo.c_LoginGuid = null;
            Snlg_MemberInfo.s_UserUrl = null;
            //Snlg_MemberInfo.s_YetkiSayfalar = null;
            Snlg_MemberInfo.s_YetkiSayfalar = null;
            //Snlg_MemberInfo.c_UserName = null;

            if (exc.Message.Contains("$#sqlhata1#$"))
            {
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.login_ascx_hata14, false, "#" + UserControlClientID);
            }
            else
            {
                Snlg_Hata.ziyaretci.ExceptionLogla(exc);
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.hataBeklenmeyen, false, "#" + UserControlClientID);
            }
        }
    }
Example #6
0
    protected void BtnSaveImage_Click(object sender, EventArgs e)
    {
        if (!YetkiKontrol(pageName + "-Insert"))
        {
            return;
        }
        try
        {
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];
            DBPrms[0] = new Snlg_DBParameter("@Bilgi", SqlDbType.NVarChar, "");
            DBPrms[1] = new Snlg_DBParameter("@GId", SqlDbType.Int, Request.QueryString["gid"]);
            DBPrms[2] = new Snlg_DBParameter("@Baslik", SqlDbType.NVarChar, "");
            DBPrms[3] = new Snlg_DBParameter("@Resim", SqlDbType.VarChar, HdnImg.Value);
            DBPrms[4] = new Snlg_DBParameter("@LinkUrl", SqlDbType.VarChar, "");

            Snlg_DBConnect vt = new Snlg_DBConnect(true);
            vt.SorguCalistir("snlg_V1.msp_GaleriResimEkle", CommandType.StoredProcedure, DBPrms);
            vt.Kapat();
            Response.Redirect(Request.Url.AbsoluteUri);
        }
        catch (Exception exc)
        {
            Snlg_Hata.ziyaretci.ExceptionLogla(exc);
        }
    }
    protected void Lnk_Click(object sender, EventArgs e)
    {
        divView.Visible = false;
        divEdit.Visible = true;

        //edit formunu doldur
        if (string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId))
        {
            this.Visible = false;
        }
        else
        {
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
            DBPrms[0] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Snlg_MemberInfo.s_UserId);
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

            Byte[] password = new Byte[16];

            using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_UyeDetaySec", CommandType.StoredProcedure, DBPrms))
            {
                if (sdr.Read())
                {
                    TxtEPost.Text = ePosta = sdr["Eposta"].ToString();
                    UserName      = sdr["UserName"].ToString();
                    TAd.Text      = isim = sdr["UyeAd"].ToString();

                    if (!string.IsNullOrEmpty(sdr["Resim"].ToString()))
                    {
                        Image1.ImageUrl = ImgRes.ImageUrl = sdr["Resim"].ToString();
                        Image1.Visible  = ImgRes.Visible = true;
                    }
                }
            }
        }
    }
Example #8
0
    protected void BtnSifreSifirlama_Click(object sender, EventArgs e)
    {
        Uri realURL = new Uri(HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.RawUrl);

        guid = HttpUtility.ParseQueryString(realURL.Query).Get("guid");
        if (!string.IsNullOrEmpty(guid))
        {
            Snlg_DBConnect vt = new Snlg_DBConnect(true);
            vt.Ac();
            if (!string.IsNullOrEmpty(TxtPassword.Text) && TxtPassword.Text == TxtPassword2.Text)
            {
                string SqlSorgu = string.Format(@"SELECT * FROM  snlg_V1.TblUyeApp AS TBUA INNER  JOIN snlg_V1.TblUyeDetay AS TBUD ON  TBUA.UyeId=TBUD.UyeId  WHERE TBUA.SifreUnuttumGuid='{0}'", guid);

                DataTable DtKayitVari = vt.DataTableOlustur(SqlSorgu, CommandType.Text);
                if (DtKayitVari.Rows.Count > 0)
                {
                    #region parametreler
                    string             Sifre  = TxtPassword.Text;
                    Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[4];
                    try
                    {
                        string Eposta = DtKayitVari.Rows[0]["Eposta"].ToString();

                        DBPrms[0] = new Snlg_DBParameter("@IslemTipi", SqlDbType.Int, 1);
                        DBPrms[1] = new Snlg_DBParameter("@Eposta", SqlDbType.VarChar, Eposta, 150);
                        DBPrms[2] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, Snlg_ConfigValues.MD5Olustur(Sifre), 128);
                        DBPrms[3] = new Snlg_DBParameter("@guidDegeri", SqlDbType.VarChar, DBNull.Value);

                        using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_UyeSifreSifirla", CommandType.StoredProcedure, DBPrms))
                        {
                            try
                            {
                                if (sdr.Read())
                                {
                                    Snlg_Hata.ziyaretci.HataGosterBasarili(Resources._default.login_ascx_hata13, false, "#" + UserControlClientID);
                                    TxtPassword2.Text = TxtPassword.Text = "";
                                }
                            }
                            catch (Exception exc)
                            {
                                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.hataBeklenmeyen, false, "#" + UserControlClientID);
                            }
                        }
                    }
                    catch
                    {
                        Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.hataBeklenmeyen, false, "#" + UserControlClientID);
                    }
                    #endregion
                }
            }
            else
            {
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.login_ascx_hata12, false, "#" + UserControlClientID);
            }
        }
    }
Example #9
0
    public static string AnketSonuc(int AnketId)
    {
        if (!string.IsNullOrEmpty(AnketId.ToString()))
        {
            StringBuilder  sb = new StringBuilder();
            Snlg_DBConnect vt = new Snlg_DBConnect(true);
            try
            {
                Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
                DBPrms[0] = new Snlg_DBParameter("@AnketId", SqlDbType.Int, AnketId);

                using (SqlDataReader SDR = vt.DBReaderOlustur("snlg_V1.msp_AnketSonuc", CommandType.StoredProcedure, DBPrms))
                {
                    if (SDR.Read())
                    {
                        sb.AppendFormat("{{\"{0}\":[{{\"{1}\":{2}}},{{\"{3}\":{4}}}", SDR["Soru"].ToString(), SDR["A"].ToString(), SDR["ASay"].ToString(), SDR["B"].ToString(), SDR["BSay"].ToString());
                        if (!string.IsNullOrEmpty(SDR["C"].ToString()))
                        {
                            sb.AppendFormat(",{{\"{0}\":{1}}}", SDR["C"].ToString(), SDR["CSay"].ToString());
                        }
                        if (!string.IsNullOrEmpty(SDR["D"].ToString()))
                        {
                            sb.AppendFormat(",{{\"{0}\":{1}}}", SDR["D"].ToString(), SDR["DSay"].ToString());
                        }
                        if (!string.IsNullOrEmpty(SDR["E"].ToString()))
                        {
                            sb.AppendFormat(",{{\"{0}\":{1}}}", SDR["E"].ToString(), SDR["ESay"].ToString());
                        }
                        if (!string.IsNullOrEmpty(SDR["F"].ToString()))
                        {
                            sb.AppendFormat(",{{\"{0}\":{1}}}", SDR["F"].ToString(), SDR["FSay"].ToString());
                        }
                        if (!string.IsNullOrEmpty(SDR["G"].ToString()))
                        {
                            sb.AppendFormat(",{{\"{0}\":{1}}}", SDR["G"].ToString(), SDR["GSay"].ToString());
                        }
                        if (!string.IsNullOrEmpty(SDR["H"].ToString()))
                        {
                            sb.AppendFormat(",{{\"{0}\":{1}}}", SDR["H"].ToString(), SDR["HSay"].ToString());
                        }
                        sb.Append("]}");
                    }
                }
            }
            catch (Exception exc)
            {
                vt.Kapat();
                Snlg_Hata.ziyaretci.ExceptionLogla(exc);
                return("0");
            }
            vt.Kapat();

            return(sb.ToString());
        }

        return("0");
    }
    protected void SDSYorum_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.Exception == null)
        {
            Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler kaydedildi.", false);
            MPE1.Hide();
            GVYorumlar.DataBind();
            if (((CheckBox)FVYorum.FindControl("CBMail")).Checked)
            {
                Snlg_DBConnect vt = new Snlg_DBConnect(true);
                try
                {
                    DataTable DtMail = vt.DataTableOlustur("snlg_V1.zsp_EPostaSablonGetir_Smtp", CommandType.StoredProcedure, new Snlg_DBParameter[2] {
                        new Snlg_DBParameter("@Anahtar", SqlDbType.VarChar, "makaleYorumOnay"), new Snlg_DBParameter("@Ozelifadeler", SqlDbType.VarChar, "$#url_adresi#$")
                    });

                    Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
                    DBPrms[0] = new Snlg_DBParameter("@YId", SqlDbType.Int, e.Command.Parameters["@YId"].Value.ToString());
                    SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.msp_MakaleYorumCevapEposta", CommandType.StoredProcedure, DBPrms);

                    if (DtMail.Rows.Count > 0)
                    {//mail gönder
                        DataRow   drMail = DtMail.Rows[0];
                        Snlg_Mail eposta = new Snlg_Mail();
                        while (sdr.Read())
                        {
                            if (!string.IsNullOrEmpty(drMail["Kimden"].ToString()) && !string.IsNullOrEmpty(drMail["SmtpHost"].ToString()))
                            {
                                eposta.smtp             = new System.Net.Mail.SmtpClient(drMail["SmtpHost"].ToString(), Convert.ToInt32(drMail["SmtpPort"]));
                                eposta.smtp.EnableSsl   = Convert.ToBoolean(drMail["SSL_"]);
                                eposta.smtp.Credentials = new System.Net.NetworkCredential(drMail["Kimden"].ToString(), drMail["SmtpPsw"].ToString());
                            }
                            try
                            {//ilgili yorumculra mesaj
                                eposta.Gonder(drMail["Kimden"].ToString(), drMail["KimdenIsim"].ToString(), sdr["Kime"].ToString(), drMail["Konu"].ToString(), drMail["Mesaj"].ToString().Replace("$#url_adresi#$", Request.Url.Host + sdr["SeoUrl"].ToString()));
                            }
                            catch { }
                        }
                        sdr.Close();
                    }
                }
                catch { }
                vt.Kapat();
            }
        }
        else
        {
            MPE1.Hide();
            Snlg_Hata.ziyaretci.ExceptionLogla(e.Exception);
            e.ExceptionHandled = true;
            Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", true);
        }
    }
Example #11
0
    protected void Page_Load(object sender, System.EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["makid"]))
        {
            #region sayfalama
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
            DBPrms[0] = new Snlg_DBParameter("@MakId", SqlDbType.Int, Request.QueryString["makid"]);

            int kayitSay = Convert.ToInt32(vt.ScalarSorguCalistir("snlg_V1.zsp_makale_YorumSay", CommandType.StoredProcedure, DBPrms));

            LblYorumSayisi.Text = kayitSay.ToString();

            if (!string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId))
            {
                DBPrms    = new Snlg_DBParameter[1];
                DBPrms[0] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Snlg_MemberInfo.s_UserId);
                eposta    = vt.ScalarSorguCalistir("SELECT Eposta FROM snlg_V1.TblUyeApp WHERE (UyeId = @UyeId) ", CommandType.Text, DBPrms);
                if (eposta == null)
                {
                    eposta = "";
                }
            }

            if (kayitSay < 1)
            {
                this.Visible = false;
            }
            else if (kayitSay > PageSize)
            {//eğer kayıt sayısı sayfada gösterilecek olan kayıt sayısından büyükse sayfalama yap (demekki 1'den fazla sayfa var)
                //listelenecek sayfa sayısı hesaplanıyor.
                Int16 sayfaSay = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(kayitSay) / PageSize));
                LtrSayfalama.Text = "<div class=\"pager\">";
                for (Int16 i = 1; i <= sayfaSay; i++)
                {
                    LtrSayfalama.Text += string.Format("<li><a>{0}</a></li>", i.ToString());
                }
                LtrSayfalama.Text += "</div>";
            }
            else//eğer sayfalanacak kadar kayuıt yoksa sayfalama kısmını gizle
            {
                LtrSayfalama.Visible = false;
            }
            #endregion
        }
        else//makale id yoksa gizle
        {
            this.Visible = false;
        }
    }
Example #12
0
 protected void ImgKaydet_Click(object sender, EventArgs e)
 {
     if (YetkiKontrol(pageName + "-Insert"))
     {
         Snlg_DBConnect     vt     = new Snlg_DBConnect(true);
         Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];
         DBPrms[0] = new Snlg_DBParameter("@GglProfId", SqlDbType.NVarChar, "");
         DBPrms[1] = new Snlg_DBParameter("@GglDogrula", SqlDbType.NVarChar, TBValid.Text);
         DBPrms[2] = new Snlg_DBParameter("@GglAnalytic", SqlDbType.NVarChar, TBAnly.Text);
         DBPrms[3] = new Snlg_DBParameter("@GglUser", SqlDbType.NVarChar, "");
         DBPrms[4] = new Snlg_DBParameter("@GglPsw", SqlDbType.NVarChar, "");
         vt.SorguCalistir("snlg_V1.msp_AramaMotoruDuzenle", CommandType.StoredProcedure, DBPrms);
         Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler kaydedildi.", false);
         vt.Kapat();
         Snlg_ConfigValues.aramaMotoru = TBValid.Text + TBAnly.Text;
     }
 }
    public string MakaleKategoriListesi(string MakaleID)
    {
        string Kategoriler = string.Empty;

        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
        DBPrms[0] = new Snlg_DBParameter("@MakId", SqlDbType.Int, int.Parse(Eval("MakId").ToString()));
        DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

        DataTable Dt = vt.DataTableOlustur("snlg_V1.zsp_Makale_KategoriListesi", CommandType.StoredProcedure, DBPrms);

        if (Dt.Rows.Count > 0)
        {
            for (int i = 0; i < Dt.Rows.Count; i++)
            {
                Kategoriler = " <a href=\"/" + Snlg_ConfigValues.s_Dil + "/" + Snlg_ConfigValues.GetUrlValueByKey("blog") + "/" + Dt.Rows[i]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension + "\">" + Dt.Rows[i]["KtgAd"].ToString() + "</a>";
            }
        }
        return(Kategoriler);
    }
Example #14
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (string.IsNullOrEmpty(Request.QueryString["makid"]))
     {
         this.Visible = false;
     }
     else
     {
         pg.ScriptOrCssFileImportHead("/scripts/jquery.raty-2.4.5/js/jquery.raty.min.js");
         if (!string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId))
         {
             Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
             DBPrms[0] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Snlg_MemberInfo.s_UserId);
             eposta    = vt.ScalarSorguCalistir("SELECT Eposta FROM snlg_V1.TblUyeApp WHERE (UyeId = @UyeId) ", CommandType.Text, DBPrms);
             if (eposta == null)
             {
                 eposta = "";
             }
         }
     }
 }
Example #15
0
    protected void FVSyf_DataBound(object sender, EventArgs e)
    {
        DropDownList DDLLinks = (DropDownList)FVSyf.FindControl("DDLLinks");
        DropDownList DDLUst   = (DropDownList)FVSyf.FindControl("DDLUst");

        try
        {
            DDLUst.Items.Clear();
            DDLUst.Items.Add(new ListItem("Ana Kategori Olsun", ""));
            DDLDoldur(DTMenuler.Select("UstId IS NULL", "Sira"), null, DDLUst);
        }
        catch { }
        DataRow satir = DTMenuler.Rows.Find(editedMenuID);

        try
        {
            if (satir == null || string.IsNullOrEmpty(satir["UstId"].ToString()))
            {
                DDLUst.Items.FindByValue("").Selected = true;
            }
            else
            {
                DDLUst.Items.FindByValue(satir["UstId"].ToString()).Selected = true;
            }
        }
        catch { }

        Snlg_DBConnect vt = new Snlg_DBConnect(true);

        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1];
        DBPrms[0] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, dil);

        try
        {
            DDLLinks.DataSource = vt.DBReaderOlustur("snlg_V1.msp_LinkListele", CommandType.StoredProcedure, DBPrms);
            DDLLinks.DataBind();
        }
        catch { }
        vt.Kapat();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string Taglar = string.Empty;

        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
        DBPrms[0] = new Snlg_DBParameter("@Adet", SqlDbType.TinyInt, 10);
        DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

        List <string> taglar = new List <string>();
        object        tags   = vt.ScalarSorguCalistir("snlg_V1.zsp_MakaleTaglari_EnCokPuanlanan", CommandType.StoredProcedure, DBPrms);

        {
            if (tags != null && tags != DBNull.Value)
            {
                string[] KeywordTang = tags.ToString().Split(',');
                for (int i = 0; i < KeywordTang.Length; i++)
                {
                    KeywordTang[i] = KeywordTang[i].Trim();
                    if (string.IsNullOrEmpty(KeywordTang[i]))
                    {
                        continue;
                    }

                    if (taglar.Contains(KeywordTang[i]))
                    {
                        continue;
                    }
                    else
                    {
                        taglar.Add(KeywordTang[i]);
                    }

                    Taglar += "<a class=\"btn btn-info btn-sm btn-tag\" href=\"/" + Snlg_ConfigValues.s_Dil + "/" + Snlg_ConfigValues.GetUrlValueByKey("blog") + "/" + Snlg_ConfigValues.GetUrlValueByKey("tag") + "/" + trReplace(KeywordTang[i]) + Snlg_ConfigValues.urlExtension + "\">" + KeywordTang[i] + "</a>&nbsp;";
                }
            }
        }

        LtrTAgs.Text = Taglar;
    }
    protected void ImgKaydet_Click(object sender, EventArgs e)
    {
        if (YetkiKontrol(pageName + "-Insert"))
        {
            Snlg_DBConnect vt      = new Snlg_DBConnect(true);
            StringBuilder  sbSorgu = new StringBuilder();
            foreach (GridViewRow satir in GVYetki.Rows)
            {
                if (((CheckBox)satir.FindControl("CB")).Checked)
                {
                    sbSorgu.Append("INSERT INTO snlg_V1.TblRol_Yetki (RolId, YetkiId) VALUES(@RolId, " + GVYetki.DataKeys[satir.RowIndex].Value.ToString() + "); ");
                }
            }

            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
            DBPrms[1] = new Snlg_DBParameter("@RolId", SqlDbType.Int, Request.QueryString["rid"]);
            DBPrms[0] = new Snlg_DBParameter("@YetkiSql", SqlDbType.NVarChar, sbSorgu.ToString());

            vt.SorguCalistir("snlg_V1.msp_Rol_YetkiTanimla", System.Data.CommandType.StoredProcedure, DBPrms);
            vt.Kapat();
            Snlg_Hata.ziyaretci.HataGosterBasarili("Yetkiler tanımlandı.", false);
        }
    }
Example #18
0
    protected void PHSenkronizeEt()
    {
        if (Request.QueryString["sablonSenkr"] != "1")
        {
            return;
        }

        foreach (KeyValuePair <string, PlaceHolder> item in Places)
        {
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
            DBPrms[0] = new Snlg_DBParameter("@Title", SqlDbType.VarChar, item.Value.ID, 100);
            DBPrms[1] = new Snlg_DBParameter("@PHName", SqlDbType.VarChar, item.Value.ID, 100);

            vt.SorguCalistir("snlg_V1.msp_PlaceHolderEkle", CommandType.StoredProcedure, DBPrms);
        }

        string silinecek = "";

        using (SqlDataReader sdr = vt.DBReaderOlustur("SELECT PHName, ContainerId FROM snlg_V1.TblPlaceHolders", System.Data.CommandType.Text))
        {
            while (sdr.Read())
            {
                if (!Places.ContainsKey(sdr["PHName"].ToString()))
                {
                    silinecek += sdr["ContainerId"].ToString() + ",";
                }
            }
            silinecek = silinecek.TrimEnd(',');
        }
        if (!string.IsNullOrEmpty(silinecek))
        {
            vt.SorguCalistir("DELETE FROM snlg_V1.TblPlaceHolders WHERE ContainerId IN (" + silinecek + ")", System.Data.CommandType.Text);
        }
        vt.Kapat();
        Response.Clear();
        Response.End();
    }
    protected void BtnUC_Click(object sender, EventArgs e)
    {
        Snlg_DBConnect vt = new Snlg_DBConnect(true);

        foreach (GridViewRow satir in GVUC.Rows)
        {
            if (((CheckBox)satir.FindControl("CBSec")).Checked)
            {
                if (string.IsNullOrEmpty(((TextBox)satir.FindControl("TB3")).Text))
                {
                    break;
                }

                //kontroller aktarılıyor
                Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[6];
                DBPrms[0] = new Snlg_DBParameter("@Title", System.Data.SqlDbType.NVarChar, ((TextBox)satir.FindControl("TB3")).Text, 100);
                DBPrms[1] = new Snlg_DBParameter("@Baslik", System.Data.SqlDbType.NVarChar, ((TextBox)satir.FindControl("TB1")).Text, 250);
                DBPrms[2] = new Snlg_DBParameter("@Gorunurluk", System.Data.SqlDbType.TinyInt, ((DropDownList)satir.FindControl("DDL1")).SelectedValue);
                DBPrms[3] = new Snlg_DBParameter("@BaslikGorunsun", System.Data.SqlDbType.Bit, ((CheckBox)satir.FindControl("CB1")).Checked);
                DBPrms[4] = new Snlg_DBParameter("@Aciklama", System.Data.SqlDbType.VarChar, ((TextBox)satir.FindControl("TB2")).Text, 500);
                DBPrms[5] = new Snlg_DBParameter("@UCPath", System.Data.SqlDbType.NVarChar, satir.Cells[1].Text.Replace(".ascx", ""), 250);

                if (string.IsNullOrEmpty(((TextBox)satir.FindControl("TB2")).Text))
                {
                    DBPrms[4].Deger = DBNull.Value;
                }
                if (string.IsNullOrEmpty(((TextBox)satir.FindControl("TB1")).Text))
                {
                    DBPrms[1].Deger = DBNull.Value;
                }

                vt.SorguCalistir("snlg_V1.msp_UCKontrolEkle", CommandType.StoredProcedure, DBPrms);
            }
        }
        vt.Kapat();
        Snlg_Hata.ziyaretci.HataGosterBasarili("Kontroller tanımlandı.", false);
    }
    public string MakaleTaglar(string MakID)
    {
        string Taglar = string.Empty;

        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
        DBPrms[0] = new Snlg_DBParameter("@MakId", SqlDbType.Int, int.Parse(MakID));
        DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

        using (SqlDataReader SDRMakaleTag = vt.DBReaderOlustur("snlg_V1.zsp_Makale_Icerik", CommandType.StoredProcedure, DBPrms))
        {
            if (SDRMakaleTag.Read())
            {
                string[] KeywordTang = SDRMakaleTag["Keyword"].ToString().Split(',');
                for (int i = 0; i < KeywordTang.Length; i++)
                {
                    KeywordTang[i] = KeywordTang[i].Trim();

                    Taglar += "<a class=\"btn btn-info btn-sm\" href=\"/" + Snlg_ConfigValues.s_Dil + "/" + Snlg_ConfigValues.GetUrlValueByKey("blog") + "/" + Snlg_ConfigValues.GetUrlValueByKey("tag") + "/" + trReplace(KeywordTang[i]) + Snlg_ConfigValues.urlExtension + "\">" + KeywordTang[i] + "</a>&nbsp;";
                }
            }
        }

        return(Taglar);
    }
Example #21
0
    protected void BtnLogin_Click(object sender, EventArgs e)
    {
        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[3];

        DBPrms[0] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, Snlg_ConfigValues.MD5Olustur(TBSifre.Text), 75);
        DBPrms[1] = new Snlg_DBParameter("@AdminId", SqlDbType.Int, WebConfigurationManager.AppSettings["AdminId"]);
        DBPrms[2] = new Snlg_DBParameter("@UserName", SqlDbType.NVarChar, TBUser.Text, 25);

        Snlg_DBConnect vt = new Snlg_DBConnect(true);

        try
        {
            //if (Request.Url.Host.Contains("demo.sanalog."))
            //    dbReset(vt);

            SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.msp_AdminLogin", CommandType.StoredProcedure, DBPrms);
            if (sdr.Read())
            {
                //Snlg_MemberInfo.s_UserId = sdr["UyeId"].ToString();
                Snlg_MemberInfo.s_UserId = sdr["UyeId"].ToString();
                //Snlg_MemberInfo.c_LoginGuid = sdr["LoginGuid"].ToString();
                Snlg_MemberInfo.s_UserUrl = sdr["SeoUrl"].ToString();

                if (!string.IsNullOrEmpty(sdr[1].ToString().Trim()))
                {
                    //Snlg_MemberInfo.s_YetkiSayfalar = sdr[1].ToString().Trim() + ",";
                    Snlg_MemberInfo.s_YetkiSayfalar = sdr[1].ToString().Trim() + ",";
                }

                Snlg_MemberInfo.s_UserName = TBUser.Text;
            }
            else
            {
                //Snlg_MemberInfo.s_UserId = null;
                Snlg_MemberInfo.s_UserId = null;
                //Snlg_MemberInfo.c_LoginGuid = null;
                Snlg_MemberInfo.s_UserUrl = null;
                //Snlg_MemberInfo.s_YetkiSayfalar = null;
                Snlg_MemberInfo.s_YetkiSayfalar = null;
                //Snlg_MemberInfo.c_UserName = null;
            }


            sdr.Close();
        }
        catch (Exception exc)
        {
            //Snlg_MemberInfo.s_UserId = null;
            Snlg_MemberInfo.s_UserId = null;
            //Snlg_MemberInfo.c_LoginGuid = null;
            Snlg_MemberInfo.s_UserUrl = null;
            //Snlg_MemberInfo.s_YetkiSayfalar = null;
            Snlg_MemberInfo.s_YetkiSayfalar = null;
            //Snlg_MemberInfo.c_UserName = null;

            if (exc.Message.Contains("$#sqlhata1#$"))
            {
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources.admin_language.login_user_psw_wrong, false, "#divLogin");
            }
            else
            {
                Snlg_Hata.ziyaretci.ExceptionLogla(exc);
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources.admin_language.eror_unexcepted, false, "#divLogin");
            }
        }
        vt.Kapat();

        if (!string.IsNullOrEmpty((Snlg_MemberInfo.s_UserId)))
        {//login olduysa
            if (string.IsNullOrEmpty(Request.QueryString["url"]))
            {
                Response.Redirect("default.aspx");
            }
            else
            {
                Response.Redirect(Server.UrlDecode(Request.QueryString["url"]));
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Int16 currentPage = 1;

        try { currentPage = Convert.ToInt16(Request.RawUrl.Substring(Request.RawUrl.IndexOf("page=") + 5).Trim()); }
        catch { }

        //projeler db'den çekilyior.
        #region parametreler
        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];

        DBPrms[0] = new Snlg_DBParameter("@KayitSayisi", SqlDbType.SmallInt, -1, ParameterDirection.InputOutput);
        DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
        DBPrms[2] = new Snlg_DBParameter("@KtgId", SqlDbType.Int, DBNull.Value);
        if (!string.IsNullOrEmpty(Request.QueryString["pktg"]))
        {
            DBPrms[2].Deger = Request.QueryString["pktg"];
        }
        DBPrms[3] = new Snlg_DBParameter("@CurrentPage", SqlDbType.TinyInt, currentPage);
        DBPrms[4] = new Snlg_DBParameter("@PageSize", SqlDbType.TinyInt, PageSize);
        #endregion


        using (SqlDataReader SDRMak = vt.DBReaderOlustur("snlg_V1.zsp_proje_KategoridekiProjeler", CommandType.StoredProcedure, DBPrms))
        {
            if (SDRMak.HasRows) //kayıt varsa işleme devam et
            {                   //kayıt varsa css dosyasını improt et ve datareader'ı repeater'a bağla
                Rpt.DataSource = SDRMak;
                Rpt.DataBind();
            }
            else//kayıt yoksa bu kontrolü gizle
            {
                this.Visible = false;
            }
        }

        //proje kategorisine ait meta verileri.
        if (this.Visible && !string.IsNullOrEmpty(Request.QueryString["pktg"]))
        {
            Snlg_DBParameter[] DBPrms2 = new Snlg_DBParameter[2];
            DBPrms2[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
            DBPrms2[0] = new Snlg_DBParameter("@KtgId", SqlDbType.Int, Request.QueryString["pktg"]);

            using (SqlDataReader SDRMetalar = vt.DBReaderOlustur("snlg_V1.zsp_proje_KategoriDetay", CommandType.StoredProcedure, DBPrms2))
            {
                if (SDRMetalar.Read())
                {
                    base.pg = (Snlg_InterfaceBaseClass)this.Page;

                    LtrKtgAd.Text   = SDRMetalar["KtgAd"].ToString();
                    pg.title       += SDRMetalar["KtgAd"].ToString();
                    pg.keyword     += SDRMetalar["Keyword"].ToString();
                    pg.description += SDRMetalar["Descr"].ToString();
                }
            }
        }


        if (this.Visible)
        {//eğer bu kontrol visible ise sayfalamayı hazırla
            //kayıtlı duyuru sayısı alınıyor
            Int16 kayitSay = Convert.ToInt16(DBPrms[0].Deger);
            #region sayfalama
            if (kayitSay > PageSize)
            {//eğer kayıt sayısı sayfada gösterilecek olan kayıt sayısından büyükse sayfalama yap (demekki 1'den fazla sayfa var)
                //listelenecek sayfa sayısı hesaplanıyor.
                Int16 sayfaSay = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(kayitSay) / PageSize));
                LtrSayfalama.Text = "<nav><ul class=\"pagination\">";
                for (Int16 i = 1; i <= sayfaSay; i++)
                {
                    if (i != currentPage)
                    {
                        LtrSayfalama.Text += string.Format("<li><a class=\"current\" href=\"?page={0}\">{0}</a></li>", i.ToString());
                    }
                    else
                    {
                        LtrSayfalama.Text += string.Format("<li class='active'><a href=\"?page={0}\">{0}</a></li>", i.ToString());
                    }
                }
                LtrSayfalama.Text += "</ul></nav>";
            }
            else//eğer sayfalanacak kadar kayuıt yoksa sayfalama kısmını gizle
            {
                LtrSayfalama.Visible = false;
            }
            #endregion
        }
    }
    public static string DomainTanimla(string tadmin, string tsifre, string tposta, string tackl, string diller, string VarsContent, string TBDBServer, string TBDBName, string TBDBUser, string TBDBSifre, string adminLang, string defaultLang)
    {
        //return "1";


        SqlConnection baglanti = new SqlConnection("Data Source=" + TBDBServer + "; Initial Catalog=" + TBDBName + ";User ID=" + TBDBUser + ";Password="******"USE [" + TBDBName + "] " + Environment.NewLine + "GO" + Environment.NewLine;
            using (StreamReader dosya = new StreamReader(HttpContext.Current.Server.MapPath("sql/" + (VarsContent == "1" ? "create_content_1.sql" : "create_content_lite.sql")), System.Text.Encoding.UTF8))
            {
                script += dosya.ReadToEnd();
                dosya.Close();
                if (baglanti.State != ConnectionState.Open)
                {
                    baglanti.Open();
                }
                SqlCommand com2 = new SqlCommand("", baglanti);
                foreach (string s in script.Split(new string[] { "GO" + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
                {
                    com2.CommandText = s;
                    com2.ExecuteNonQuery();
                }
            }


            /**************************************************************************/
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[7];
            DBPrms[0] = new Snlg_DBParameter("@Eposta", SqlDbType.VarChar, tposta, 75);
            DBPrms[1] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, Snlg_ConfigValues.MD5Olustur(tsifre), 75);
            DBPrms[2] = new Snlg_DBParameter("@UserName", SqlDbType.NVarChar, tadmin, 25);
            DBPrms[3] = new Snlg_DBParameter("@DefaultLang", SqlDbType.VarChar, defaultLang);
            DBPrms[4] = new Snlg_DBParameter("@AdminId", SqlDbType.Int, 0, ParameterDirection.Output);
            DBPrms[5] = new Snlg_DBParameter("@Aciklama", SqlDbType.VarChar, tackl, 2500);
            DBPrms[6] = new Snlg_DBParameter("@AdminLang", SqlDbType.VarChar, adminLang);


            string sorgu = @"
    UPDATE snlg_V1.TblDiller SET Aktif = 0;
    UPDATE snlg_V1.TblDiller SET Aktif = 1 WHERE DId IN(" + diller + @");

   --admin oluşturuluyor
	UPDATE snlg_V1.TblUyeApp SET Eposta=@Eposta, Sifre=@Sifre, Aktif=1, UserName=@UserName, HataSay=0, UyelikTarihi=GETDATE() WHERE UyeID = 1;

	SET @AdminId = 1

	UPDATE snlg_V1.TblDegiskenler SET Deger = @AdminId WHERE Degisken = N'AdminId';
	UPDATE snlg_V1.TblDegiskenler SET Deger = GETDATE() WHERE Degisken = N'Kurulum Tarihi';
	UPDATE snlg_V1.TblDegiskenler SET Deger = @Aciklama WHERE Degisken = N'Kurulum Açıklama';
	UPDATE snlg_V1.TblDegiskenler SET Deger = @AdminLang WHERE Degisken = N'adminDefaultLangID';
	UPDATE snlg_V1.TblDegiskenler SET Deger = @DefaultLang WHERE Degisken = N'DefaultLang';
";

            //DOMAİN OLUŞTURULUYOR, admin tanımlanıyor
            SqlCommand com = new SqlCommand(sorgu, baglanti);
            com.Parameters.Add(DBPrms[0].Prm);
            com.Parameters.Add(DBPrms[1].Prm);
            com.Parameters.Add(DBPrms[2].Prm);
            com.Parameters.Add(DBPrms[3].Prm);
            com.Parameters.Add(DBPrms[4].Prm);
            com.Parameters.Add(DBPrms[5].Prm);
            com.Parameters.Add(DBPrms[6].Prm);
            com.ExecuteNonQuery();

            WebConfigYaz("", DBPrms[4].Deger.ToString(), true);

            baglanti.Close();

            try { Snlg_ConfigValues.ApplicationStartMetod(); }
            catch { }

            return("1");
        }
        catch (Exception exc)
        {
            baglanti.Close();
            if (exc.Message.Contains("$#sql_hata#$"))
            {
                return("<div class=\"alert alert-danger\">Bu alan adı veya kullanıcı adı başkası tarafından kullanılıyor.</div>");
            }
            else
            {
                return("<div class=\"alert alert-danger\">Beklenmeyen bir hata oluştu. Hata : " + exc.Message + "</div>");
            }
        }
    }
Example #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Int16 currentPage = 1;

        try { currentPage = Convert.ToInt16(Request.RawUrl.Substring(Request.RawUrl.IndexOf("page=") + 5).Trim()); }
        catch { }

        //duyurular db'den çekilyior.
        #region parametreler
        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[4];
        DBPrms[0] = new Snlg_DBParameter("@KayitSayisi", SqlDbType.Int, -1, ParameterDirection.InputOutput);
        DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
        DBPrms[2] = new Snlg_DBParameter("@CurrentPage", SqlDbType.Int, currentPage);
        DBPrms[3] = new Snlg_DBParameter("@PageSize", SqlDbType.Int, PageSize);
        #endregion


        using (SqlDataReader SDRDyr = vt.DBReaderOlustur("snlg_V1.zsp_Haberler", CommandType.StoredProcedure, DBPrms))
        {
            if (SDRDyr.HasRows) //kayıt varsa işleme devam et
            {                   //kayıt varsa css dosyasını improt et ve datareader'ı repeater'a bağla
                Rpt.DataSource = SDRDyr;
                Rpt.DataBind();
            }
            else//kayıt yoksa bu kontrolü gizle
            {
                this.Visible = false;
            }
        }


        if (this.Visible)
        {//eğer bu kontrol visible ise sayfalamayı hazırla
            //kayıtlı duyuru sayısı alınıyor
            int   rakam    = 0;
            Int16 kayitSay = Convert.ToInt16(DBPrms[0].Deger);
            #region sayfalama
            if (kayitSay > PageSize)
            {//eğer kayıt sayısı sayfada gösterilecek olan kayıt sayısından büyükse sayfalama yap (demekki 1'den fazla sayfa var)
                //listelenecek sayfa sayısı hesaplanıyor.
                Int16 sayfaSay = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(kayitSay) / PageSize));
                LtrSayfalama.Text  = "<ul class='pagination'>";
                LtrSayfalama.Text += string.Format("<li><a  class='next' href=\"?page={0}\">←</a></li>", ((currentPage - 1) > 0 ? (currentPage - 1) : 1).ToString());

                for (Int16 i = 1; i <= sayfaSay; i++)
                {
                    if (i == currentPage)//page null ise ilk sayfayı curent yap
                    {
                        LtrSayfalama.Text += string.Format("<li class='active'><a  href=\"?page={0}\">{0}</a></li>", i.ToString());
                    }
                    else//diğer sayfaları normal link yap (current yapma)
                    {
                        LtrSayfalama.Text += string.Format("<li><a href=\"?page={0}\">{0}</a></li>", i.ToString());
                    }

                    rakam = i;
                }
                LtrSayfalama.Text += string.Format("<li><a  class='next' href=\"?page={0}\">→</a></li>", (((currentPage + 1) <= sayfaSay) ? currentPage + 1 : currentPage).ToString());
                LtrSayfalama.Text += "</ul>";
            }
            else//eğer sayfalanacak kadar kayuıt yoksa sayfalama kısmını gizle
            {
                LtrSayfalama.Visible = false;
            }
            #endregion
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["yazar"]))
        {
            Int16 currentPage = 1;
            try { currentPage = Convert.ToInt16(Request.RawUrl.Substring(Request.RawUrl.IndexOf("page=") + 5).Trim()); }
            catch { }

            //makaleler db'den çekiliyor.
            #region parametreler
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];
            DBPrms[0] = new Snlg_DBParameter("@KayitSayisi", SqlDbType.Int, -1, ParameterDirection.InputOutput);
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
            DBPrms[2] = new Snlg_DBParameter("@YazarId", SqlDbType.Int, Request.QueryString["yazar"]);
            DBPrms[3] = new Snlg_DBParameter("@CurrentPage", SqlDbType.Int, currentPage);
            DBPrms[4] = new Snlg_DBParameter("@PageSize", SqlDbType.Int, PageSize);
            #endregion


            DataTable Dt = vt.DataTableOlustur("snlg_V1.zsp_makale_YazarMakaleler", CommandType.StoredProcedure, DBPrms);
            {
                if (Dt.Rows.Count > 0) //kayıt varsa işleme devam et
                {                      //kayıt varsa css dosyasını improt et ve datareader'ı repeater'a bağla
                 //base.pg.ScriptOrCssFileImportHead(Snlg_ConfigValues.ThemePath + "scripts/jquery.raty-2.4.5/js/jquery.raty.min.js");

                    Rpt.DataSource = Dt;
                    Rpt.DataBind();
                }
                else//kayıt yoksa bu kontrolü gizle
                {
                    this.Visible = false;
                }
            }

            //yazara ait meta verileri.
            if (this.Visible)
            {
                Snlg_DBParameter[] DBPrms2 = new Snlg_DBParameter[2];
                DBPrms2[0] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Request.QueryString["yazar"]);
                DBPrms2[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

                DataTable Dt2 = vt.DataTableOlustur("snlg_V1.zsp_Makale_YazarDetay", CommandType.StoredProcedure, DBPrms2);
                {
                    if (Dt2.Rows.Count > 0)
                    {
                        isim            = Dt2.Rows[0]["UyeAd"].ToString();
                        bilgi           = Dt2.Rows[0]["UyeBilgi"].ToString();
                        resim           = Dt2.Rows[0]["Resim"].ToString();
                        pg.title       += Dt2.Rows[0]["UyeAd"].ToString();
                        pg.keyword     += Dt2.Rows[0]["UyeAd"].ToString();
                        pg.description += Dt2.Rows[0]["UyeBilgi"].ToString();
                    }
                }
            }


            if (this.Visible)
            {//eğer bu kontrol visible ise sayfalamayı hazırla
                //kayıtlı duyuru sayısı alınıyor
                Int16 kayitSay = Convert.ToInt16(DBPrms[0].Deger);
                #region sayfalama
                if (kayitSay > PageSize)
                {//eğer kayıt sayısı sayfada gösterilecek olan kayıt sayısından büyükse sayfalama yap (demekki 1'den fazla sayfa var)
                    //listelenecek sayfa sayısı hesaplanıyor.
                    Int16 sayfaSay = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(kayitSay) / PageSize));
                    LtrSayfalama.Text = "<div class=\"pager\">";
                    for (Int16 i = 1; i <= sayfaSay; i++)
                    {
                        if (i != currentPage)
                        {
                            LtrSayfalama.Text += string.Format("<li><a href=\"?page={0}\">{0}</a></li>", i.ToString());
                        }
                        else
                        {
                            LtrSayfalama.Text += string.Format("<li><a class=\"current\" href=\"?page={0}\">{0}</a></li>", i.ToString());
                        }
                    }
                    LtrSayfalama.Text += "</div>";
                }
                else//eğer sayfalanacak kadar kayuıt yoksa sayfalama kısmını gizle
                {
                    LtrSayfalama.Visible = false;
                }
                #endregion
            }
        }
    }
Example #26
0
    protected void IcerikGetir()
    {
        foreach (KeyValuePair <string, PlaceHolder> item in Places)
        {
            ContainerleriGizle(item.Value.Parent);
        }

        try
        {
            #region parametreler
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[3];
            DBPrms[0] = new Snlg_DBParameter("@isLogin", SqlDbType.Bit, !string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId.ToString()));
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
            DBPrms[2] = new Snlg_DBParameter("@SablonId", SqlDbType.SmallInt, Request.QueryString["sablon"]);

            if (string.IsNullOrEmpty(Request.QueryString["sablon"]))
            {
                DBPrms[2].Deger = DBNull.Value;
            }
            #endregion

            DataSet   DSSablonIcerik    = vt.DataSetOlustur("snlg_V1.zsp_SablondakiKontrolleriGetir", CommandType.StoredProcedure, DBPrms);
            DataTable DtKontroller      = DSSablonIcerik.Tables[0];
            DataTable DTBlockAttributes = DSSablonIcerik.Tables[1];
            foreach (DataRow drUc in DtKontroller.Select("", "Sira"))
            {
                HtmlGenericControl divBlokParent = new HtmlGenericControl("div");

                if (!string.IsNullOrEmpty(drUc["UCPath"].ToString()))
                {//demekk user control
                    try
                    {
                        Snlg_UserControlBaseClass uc = (Snlg_UserControlBaseClass)LoadControl("~/modules/" + drUc["UCPath"].ToString() + ".ascx");
                        //uc.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;
                        uc.baslikGorunsun      = Convert.ToBoolean(drUc["BaslikGorunsun"]);
                        uc.baslik              = drUc["UCBaslik"].ToString();
                        uc.UserControlClientID = "UC-" + drUc["BlockPlaceID"].ToString();
                        ContainerGoster(Places[drUc["PHName"].ToString()].Parent);

                        foreach (DataRow drAttribute in DTBlockAttributes.Select("BlockPlaceID = " + drUc["BlockPlaceID"].ToString()))
                        {
                            if (!uc.BlockAttributes.ContainsKey(drAttribute["AttributeKey"].ToString()))
                            {
                                uc.BlockAttributes.Add(drAttribute["AttributeKey"].ToString(), drAttribute["AttributeValue"].ToString());
                            }
                        }

                        Literal ltrlUst = new Literal();
                        ltrlUst.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;
                        ltrlUst.Text          = drUc["BlokUstBilgi"].ToString();

                        Literal ltrlAlt = new Literal();
                        ltrlAlt.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;
                        ltrlAlt.Text          = drUc["BlokAltBilgi"].ToString();

                        divBlokParent.Attributes.Add("class", "modules " + uc.UserControlCssClass);
                        divBlokParent.Attributes.Add("id", uc.UserControlClientID);
                        divBlokParent.Controls.Add(ltrlUst);
                        divBlokParent.Controls.Add(uc);
                        divBlokParent.Controls.Add(ltrlAlt);
                        Places[drUc["PHName"].ToString()].Controls.Add(divBlokParent);
                    }
                    catch (Exception exc)
                    { Snlg_Hata.ziyaretci.ExceptionLogla(exc); }
                }
                else if (drUc["BlokType"].ToString() == "Content")
                {//demekki adminde oluşturulmuş bir içerik
                    try
                    {
                        StringBuilder SBBlokHtml = new StringBuilder();

                        if (Convert.ToBoolean(drUc["BaslikGorunsun"]))
                        {
                            SBBlokHtml.Append("<h4>" + drUc["UCBaslik"].ToString() + "</h4>");
                        }
                        SBBlokHtml.Append(drUc["UCIcerik"].ToString());

                        GeleriEmbed(SBBlokHtml, vt);
                        ContainerGoster(Places[drUc["PHName"].ToString()].Parent);
                        Literal ltrl = new Literal();
                        //ltrl.ViewStateMode = System.Web.UI.ViewStateMode.Disabled;
                        ltrl.Text = SBBlokHtml.ToString();

                        divBlokParent.Attributes.Add("class", "snlg-block-" + classReplace(drUc["Title"].ToString()));
                        divBlokParent.Controls.Add(ltrl);
                        Places[drUc["PHName"].ToString()].Controls.Add(divBlokParent);
                    }
                    catch (Exception exc)
                    { Snlg_Hata.ziyaretci.ExceptionLogla(exc); }
                }
                else if (drUc["BlokType"].ToString() == "Menu")
                {//demekki adminde oluşturulmuş bir içerik
                    try
                    {
                        Dictionary <string, string> BlockAttributes = new Dictionary <string, string>();
                        foreach (DataRow drAttribute in DTBlockAttributes.Select("BlockPlaceID = " + drUc["BlockPlaceID"].ToString()))
                        {
                            if (!BlockAttributes.ContainsKey(drAttribute["AttributeKey"].ToString()))
                            {
                                BlockAttributes.Add(drAttribute["AttributeKey"].ToString(), drAttribute["AttributeValue"].ToString());
                            }
                        }

                        string menuType = "Top";
                        try
                        { menuType = BlockAttributes["MenuType"]; }
                        catch { }

                        string menuClass = "snlg-block-menu-" + classReplace(menuType) + " " + classReplace(drUc["Title"].ToString());

                        //memülar alınıyor
                        DataTable DTMenu = vt.DataTableOlustur("snlg_V1.zsp_Menuler", CommandType.StoredProcedure, new Snlg_DBParameter[2] {
                            new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId), new Snlg_DBParameter("@UCID", SqlDbType.Int, drUc["UCId"].ToString())
                        });

                        //memü yoksa gizle
                        if (DTMenu.Rows.Count > 0)
                        {
                            //memülar listeleniyor
                            StringBuilder SBBlokHtml = new StringBuilder();
                            //ilk başta üst ID si null olanlar gönderiliyor.
                            MenuleriDoldur(DTMenu, SBBlokHtml, DTMenu.Select("UstId IS NULL", "Sira"), menuType);

                            ContainerGoster(Places[drUc["PHName"].ToString()].Parent);
                            Literal ltrl = new Literal();
                            ltrl.Text = SBBlokHtml.ToString();

                            divBlokParent.Attributes.Add("class", menuClass);
                            divBlokParent.Controls.Add(ltrl);

                            Places[drUc["PHName"].ToString()].Controls.Add(divBlokParent);
                        }
                    }
                    catch (Exception exc)
                    { Snlg_Hata.ziyaretci.ExceptionLogla(exc); }
                }
            }
        }
        catch (Exception exc)
        { Snlg_Hata.ziyaretci.ExceptionLogla(exc); }
    }
Example #27
0
    protected override void OnPreRenderComplete(EventArgs e)
    {
        //title boşsa sayfa meta verilerini çek
        if (!string.IsNullOrEmpty(Request.QueryString["syf"]) && string.IsNullOrEmpty(this.title))
        {
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2];
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
            DBPrms[0] = new Snlg_DBParameter("@SayfaId", SqlDbType.Int, Request.QueryString["syf"]);

            using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_SayfaMetaGetir", CommandType.StoredProcedure, DBPrms))
            {
                if (sdr.Read())
                {
                    this.keyword     += sdr["Keyword"].ToString();
                    this.description += sdr["Descr"].ToString();
                    this.title       += sdr["Title"].ToString();
                }
            }
        }

        Literal LtrHead = new Literal();

        StringBuilder SBTemp = new StringBuilder();

        //metaları ekle
        SBTemp.Append("<title>" + this.title + "</title>");
        SBTemp.Append("<meta name=\"keywords\" content=\"" + this.keyword + "\" />");
        SBTemp.Append("<meta name=\"description\" content=\"" + this.description + "\" />");
        if (!arama_indexle)
        {
            SBTemp.Append("<meta name=\"robots\" content=\"noindex, nofollow\">");
        }

        //scriptler ve css'ler import ediliyor
        foreach (string importPath in scriptsDosyasi)
        {
            SBTemp.Append("<script type=\"text/javascript\" src=\"" + importPath + "\"></script>");
        }
        foreach (string importPath in cssDosyasi)
        {
            SBTemp.Append("<link href=\"" + importPath + "\" rel=\"stylesheet\" type=\"text/css\" />");
        }

        //script kodları
        SBTemp.Append("<script type=\"text/javascript\">" + SBJsKodlari.ToString() + "</script>");
        SBTemp.Append(Snlg_ConfigValues.aramaMotoru);
        LtrHead.Text = SBTemp.ToString();
        this.Header.Controls.AddAt(0, LtrHead);

        if (!string.IsNullOrEmpty(Snlg_Hata.ziyaretci.hataScript))
        {
            if (!Snlg_Hata.ziyaretci.hataRedirect)
            {//hata göster
                HtmlGenericControl hataJs = new HtmlGenericControl("script");
                hataJs.Attributes.Add("type", "text/javascript");
                hataJs.InnerHtml += "$(document).ready(function () {";
                hataJs.InnerHtml += "$('.errors-out').css('display', 'block');";
                hataJs.InnerHtml += Snlg_Hata.ziyaretci.hataScript;
                hataJs.InnerHtml += "});";
                this.Page.Header.Controls.Add(hataJs);

                Snlg_Hata.ziyaretci.hataScript = "";
            }
        }

        base.OnPreRenderComplete(e);
    }
    protected void LinkKaydet_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(Snlg_MemberInfo.s_UserId.ToString()) || string.IsNullOrEmpty(TxtEPost.Text.Trim()) || string.IsNullOrEmpty(TAd.Text.Trim()))
        {
            Snlg_Hata.ziyaretci.HataGosterHatali("Eposta ve isim girmelisiniz.", false, "#" + UserControlClientID);
            return;
        }

        if (!TSifre.Text.Equals(TSifre2.Text))
        {
            Snlg_Hata.ziyaretci.HataGosterHatali("İki şifre birbirinden farklı olamaz.", false, "#" + UserControlClientID);
            return;
        }

        #region parametreler
        Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];
        try
        {
            DBPrms[0] = new Snlg_DBParameter("@UyeAd", SqlDbType.VarChar, TAd.Text);
            DBPrms[1] = new Snlg_DBParameter("@Eposta", SqlDbType.VarChar, TxtEPost.Text);
            if (TSifre.Text.ToString() != "")
            {
                DBPrms[2] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, Snlg_ConfigValues.MD5Olustur(TSifre.Text));
            }
            else
            {
                DBPrms[2] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, "");
            }
            DBPrms[3] = new Snlg_DBParameter("@Dil", SqlDbType.Int, Snlg_ConfigValues.s_ZDilId);
            DBPrms[4] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Snlg_MemberInfo.s_UserId);
        }
        catch
        {
            Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.ResourceManager.GetString("uyelik_asmx_hata10"), false, "#" + UserControlClientID);

            if (FU1.HasFile)
            {
                if (FU1.PostedFile.ContentType != "image/jpeg" && FU1.PostedFile.ContentType != "image/png" && FU1.PostedFile.ContentType != "image/x-png" && FU1.PostedFile.ContentType != "image/pjpeg" && FU1.PostedFile.ContentType != "image/gif")
                {
                    Snlg_Hata.ziyaretci.HataGosterHatali("Resim kaydedilmedi. Dosya türü uygun olmadığı için kabul edilmedi. Yanlızca JPG, JPEG, PNG ve GIF resimleri yükleyebilirsiniz.", false, "#" + UserControlClientID);
                }
                else if (FU1.PostedFile.ContentLength > 10485760)
                {
                    Snlg_Hata.ziyaretci.HataGosterHatali("Resim kaydedilmedi. Resmin boyutu 10 MB'dan büyük olduğu için resim kabuledilmedi.", true, "#" + UserControlClientID);
                }
                else
                {
                    string resimAdi = Resim_ismi_olustur(Path.GetExtension(FU1.FileName), "~/uploads/user/");
                    resimAdi = "/uploads/user/" + resimAdi;
                    FU1.SaveAs(Server.MapPath(resimAdi));
                    try { File.Delete(Server.MapPath(ImgRes.ImageUrl)); }
                    catch { }

                    DBPrms    = new Snlg_DBParameter[2];
                    DBPrms[0] = new Snlg_DBParameter("@UyeId", SqlDbType.Int, Snlg_MemberInfo.s_UserId);
                    DBPrms[1] = new Snlg_DBParameter("@Resim", SqlDbType.VarChar, resimAdi);
                    vt.SorguCalistir("UPDATE snlg_V1.TblUyeDetay SET Resim = @Resim FROM snlg_V1.TblUyeDetay AS TUD INNER JOIN snlg_V1.TblUyeApp AS TUA ON TUA.UyeId = TUD.UyeId  WHERE TUD.UyeId = @UyeId ", CommandType.Text, DBPrms);
                    ImgRes.ImageUrl = resimAdi;
                }
            }

            return;
        }


        #endregion

        try
        {
            vt.SorguCalistir("snlg_V1.zsp_UyeGuncelle", CommandType.StoredProcedure, DBPrms);
            Snlg_Hata.ziyaretci.HataGosterBasarili(Resources._default.ResourceManager.GetString("uyelik_asmx_hata05"), true, "#" + UserControlClientID);
            Response.Redirect(Request.RawUrl, false);
        }
        catch (Exception exc)
        {
            if (exc.Message.Contains("$#sqlhata1#$"))
            {
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.ResourceManager.GetString("uyelik_asmx_hata04"), false, "#" + UserControlClientID);
            }
            else if (exc.Message.Contains("$#sqlhata2#$"))
            {
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.ResourceManager.GetString("uyelik_asmx_hata03"), false, "#" + UserControlClientID);
            }
            else
            {
                Snlg_Hata.ziyaretci.ExceptionLogla(exc);
                Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.ResourceManager.GetString("hataBeklenmeyen") + exc.Message, false, "#" + UserControlClientID);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["mktg"]))
        {
            Int16 currentPage = 1;
            try { currentPage = Convert.ToInt16(Request.RawUrl.Substring(Request.RawUrl.IndexOf("page=") + 5).Trim()); }
            catch { }

            //makaleler db'den çekilyior.
            #region parametreler
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];
            DBPrms[0] = new Snlg_DBParameter("@KayitSayisi", SqlDbType.Int, -1, ParameterDirection.InputOutput);
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
            DBPrms[2] = new Snlg_DBParameter("@KtgId", SqlDbType.Int, Request.QueryString["mktg"]);
            DBPrms[3] = new Snlg_DBParameter("@CurrentPage", SqlDbType.Int, currentPage);
            DBPrms[4] = new Snlg_DBParameter("@PageSize", SqlDbType.Int, PageSize);
            #endregion

            DataTable Dt = vt.DataTableOlustur("snlg_V1.zsp_Makale_KategoridekiMakaleler", CommandType.StoredProcedure, DBPrms);
            if (Dt.Rows.Count > 0)
            {
                base.pg.ScriptOrCssFileImportHead("/scripts/jquery.raty-2.4.5/js/jquery.raty.min.js");
                Rpt.DataSource = Dt;
                Rpt.DataBind();
            }

            //makale kategorisine ait meta verileri.
            if (this.Visible)
            {
                Snlg_DBParameter[] DBPrms2 = new Snlg_DBParameter[2];
                DBPrms2[0] = new Snlg_DBParameter("@KtgId", SqlDbType.Int, Request.QueryString["mktg"]);
                DBPrms2[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);

                using (SqlDataReader SDRMetalar = vt.DBReaderOlustur("snlg_V1.zsp_makale_KategoriDetay", CommandType.StoredProcedure, DBPrms2))
                {
                    if (SDRMetalar.Read())
                    {
                        LtrKtgAd.Text   = SDRMetalar["KtgAd"].ToString();
                        pg.title       += SDRMetalar["KtgAd"].ToString();
                        pg.keyword     += SDRMetalar["Keyword"].ToString();
                        pg.description += SDRMetalar["Descr"].ToString();
                    }
                    SDRMetalar.Close();
                }
            }


            if (this.Visible)
            {//eğer bu kontrol visible ise sayfalamayı hazırla
                //kayıtlı duyuru sayısı alınıyor
                Int16 kayitSay = Convert.ToInt16(DBPrms[0].Deger);
                #region sayfalama
                if (kayitSay > PageSize)
                {//eğer kayıt sayısı sayfada gösterilecek olan kayıt sayısından büyükse sayfalama yap (demekki 1'den fazla sayfa var)
                 //listelenecek sayfa sayısı hesaplanıyor.

                    int   rakam    = 0;
                    Int16 sayfaSay = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(kayitSay) / PageSize));
                    LtrSayfalama.Text  = "<ul class='pagination'>";
                    LtrSayfalama.Text += string.Format("<li><a  class='next' href=\"?page={0}\">←</a></li>", ((currentPage - 1) > 0 ? (currentPage - 1) : 1).ToString());

                    for (Int16 i = 1; i <= sayfaSay; i++)
                    {
                        if (i == currentPage)//page null ise ilk sayfayı curent yap
                        {
                            LtrSayfalama.Text += string.Format("<li class='active'><a  href=\"?page={0}\">{0}</a></li>", i.ToString());
                        }
                        else//diğer sayfaları normal link yap (current yapma)
                        {
                            LtrSayfalama.Text += string.Format("<li><a href=\"?page={0}\">{0}</a></li>", i.ToString());
                        }

                        rakam = i;
                    }
                    LtrSayfalama.Text += string.Format("<li><a  class='next' href=\"?page={0}\">→</a></li>", (((currentPage + 1) <= sayfaSay) ? currentPage + 1 : currentPage).ToString());
                    LtrSayfalama.Text += "</ul>";
                }
                else//eğer sayfalanacak kadar kayıt yoksa sayfalama kısmını gizle
                {
                    LtrSayfalama.Visible = false;
                }
                #endregion
            }
        }
    }
Example #30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["Tagvalue"]))
        {
            Int16 currentPage = 1;
            try { currentPage = Convert.ToInt16(Request.RawUrl.Substring(Request.RawUrl.IndexOf("page=") + 5).Trim()); }
            catch { }

            //makaleler db'den çekilyior.
            #region parametreler
            Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[5];
            DBPrms[0] = new Snlg_DBParameter("@KayitSayisi", SqlDbType.Int, -1, ParameterDirection.InputOutput);
            DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId);
            DBPrms[2] = new Snlg_DBParameter("@TagValues", SqlDbType.NVarChar, Request.QueryString["Tagvalue"].ToString());
            DBPrms[3] = new Snlg_DBParameter("@CurrentPage", SqlDbType.Int, currentPage);
            DBPrms[4] = new Snlg_DBParameter("@PageSize", SqlDbType.Int, PageSize);
            #endregion

            DataTable Dt = vt.DataTableOlustur("snlg_V1.zsp_Makale_TagMakaleListesi", CommandType.StoredProcedure, DBPrms);
            if (Dt.Rows.Count > 0)
            {
                base.pg.ScriptOrCssFileImportHead("/scripts/jquery.raty-2.4.5/js/jquery.raty.min.js");
                Rpt.DataSource = Dt;
                Rpt.DataBind();
            }

            string tagText = "";
            foreach (string item in Request.QueryString["tagvalue"].Split("-".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
            {
                tagText += item[0].ToString().ToUpper() + item.Substring(1) + " ";
            }

            Page.Title          = tagText;
            LtrMakaleTagAi.Text = tagText;
            if (this.Visible)
            {//eğer bu kontrol visible ise sayfalamayı hazırla
             //kayıtlı duyuru sayısı alınıyor
                Int16 kayitSay = Convert.ToInt16(DBPrms[0].Deger);
                #region sayfalama
                if (kayitSay > PageSize)
                {//eğer kayıt sayısı sayfada gösterilecek olan kayıt sayısından büyükse sayfalama yap (demekki 1'den fazla sayfa var)
                 //listelenecek sayfa sayısı hesaplanıyor.

                    int   rakam    = 0;
                    Int16 sayfaSay = Convert.ToInt16(Math.Ceiling(Convert.ToDouble(kayitSay) / PageSize));
                    LtrSayfalama.Text  = "<ul class='pagination'>";
                    LtrSayfalama.Text += string.Format("<li><a  class='next' href=\"?page={0}\">←</a></li>", ((currentPage - 1) > 0 ? (currentPage - 1) : 1).ToString());

                    for (Int16 i = 1; i <= sayfaSay; i++)
                    {
                        if (i == currentPage)//page null ise ilk sayfayı curent yap
                        {
                            LtrSayfalama.Text += string.Format("<li class='active'><a  href=\"?page={0}\">{0}</a></li>", i.ToString());
                        }
                        else//diğer sayfaları normal link yap (current yapma)
                        {
                            LtrSayfalama.Text += string.Format("<li><a href=\"?page={0}\">{0}</a></li>", i.ToString());
                        }

                        rakam = i;
                    }
                    LtrSayfalama.Text += string.Format("<li><a  class='next' href=\"?page={0}\">→</a></li>", (((currentPage + 1) <= sayfaSay) ? currentPage + 1 : currentPage).ToString());
                    LtrSayfalama.Text += "</ul>";
                }
                else//eğer sayfalanacak kadar kayıt yoksa sayfalama kısmını gizle
                {
                    LtrSayfalama.Visible = false;
                }
                #endregion
            }
        }
    }