Example #1
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);
            }
        }
    }
    protected void Unnamed1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        CultureInfo   cuNew = new CultureInfo(e.CommandArgument.ToString());
        SqlDataReader sdr   = vt.DBReaderOlustur("SELECT Id, UrlAnahtar, SablonAnahtar FROM snlg_V1.TblSiteLinkleri WHERE(SeoUrl = '" + Request.RawUrl.Substring(Request.RawUrl.LastIndexOf("/") + 1) + "') AND Dil = " + Thread.CurrentThread.CurrentCulture.LCID.ToString(), CommandType.Text);

        if (sdr.Read())
        {
            string linkId        = sdr["Id"].ToString();
            string urlAnahtar    = sdr["UrlAnahtar"].ToString();
            string sablonAnahtar = sdr["SablonAnahtar"].ToString();
            sdr.Close();

            object menuUrl = vt.ScalarSorguCalistir("SELECT SeoUrl FROM snlg_V1.TblSiteLinkleri WHERE(Id = " + linkId + ") AND UrlAnahtar = '" + urlAnahtar + "' AND SablonAnahtar = '" + sablonAnahtar + "' AND Dil = " + cuNew.LCID.ToString(), CommandType.Text);
            if (menuUrl == null || string.IsNullOrEmpty(menuUrl.ToString()))
            {
                menuUrl = Request.RawUrl.Substring(Request.RawUrl.LastIndexOf("/") + 1);
            }

            vt.Kapat();

            string[] splitUrl = Request.RawUrl.Split('/');

            if (splitUrl.Length > 3)
            {
                string  urlKey = Snlg_ConfigValues.GetUrlKeyByValue(splitUrl[2]);
                DataRow dr     = Snlg_ConfigValues.DTurlKeyList.Select("Dil = " + cuNew.LCID.ToString() + " AND UrlKeyName = '" + urlKey + "'")[0];
                Response.Redirect("/" + cuNew.Name + "/" + dr["UrlKeyValue"].ToString() + "/" + menuUrl + Snlg_ConfigValues.urlExtension);
            }
            else
            {
                Response.Redirect("/" + cuNew.Name + "/" + menuUrl + Snlg_ConfigValues.urlExtension);
            }
        }
    }
Example #3
0
    protected void SDSUye_Inserting(object sender, SqlDataSourceCommandEventArgs e)
    {
        if (!YetkiKontrol(pageName + "-Insert"))
        {
            e.Cancel = true;
            return;
        }

        e.Command.Parameters["@Sifre"].Value = Snlg_ConfigValues.MD5Olustur(e.Command.Parameters["@Sifre"].Value.ToString());
    }
Example #4
0
    protected void SDSUye_Updating(object sender, SqlDataSourceCommandEventArgs e)
    {
        if (!YetkiKontrol(pageName + "-Update"))
        {
            e.Cancel = true;
            return;
        }

        if (!string.IsNullOrEmpty(((TextBox)FVUye.FindControl("TSifre")).Text))
        {
            e.Command.Parameters["@Sifre"].Value = Snlg_ConfigValues.MD5Olustur(((TextBox)FVUye.FindControl("TSifre")).Text);
        }
    }
 protected string LinkAyarla(object link)
 {
     if (link.ToString().Contains("http") || link.ToString().Contains("//"))
     {
         return(link.ToString());
     }
     else if (string.IsNullOrEmpty(link.ToString()))
     {
         return("#");
     }
     else
     {
         return("/" + Snlg_ConfigValues.s_Dil + "/" + Snlg_ConfigValues.GetUrlValueByKey("project") + "/" + link.ToString() + Snlg_ConfigValues.urlExtension);
     }
 }
    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);
    }
    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>");
            }
        }
    }
    protected void Page_Load(object sender, System.EventArgs e)
    {
        //yorumlar alınıyor
        DataTable DTKtg;

        DTKtg = vt.DataTableOlustur("snlg_V1.zsp_Referans_Kategorileri", CommandType.StoredProcedure, new Snlg_DBParameter[1] {
            new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId)
        });

        DTKtg.PrimaryKey = new DataColumn[] { DTKtg.Columns["KtgId"] };

        //yorum yoksa gizle
        if (DTKtg.Rows.Count < 1)
        {
            this.Visible = false;
        }
        else
        {
            StringBuilder SBBlokHtml = new StringBuilder();
            //ilk başta üst ID si null olanlar gönderiliyor.
            for (int i = 0; i < DTKtg.Rows.Count; i++)
            {
                SBBlokHtml.AppendFormat("<li><a href=\"/{1}/{2}/{0}\">{3}</a></li>", DTKtg.Rows[i]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("portfolio"), DTKtg.Rows[i]["KtgAd"].ToString());
            }

            ltrKtg.Text = SBBlokHtml.ToString();
        }
    }
    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 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);
            }
        }
    }
Example #11
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);
            }
        }
    }
    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 #13
0
    protected void MenuleriDoldur(DataTable DTMenu, StringBuilder SBMenu, DataRow[] DRC)
    {
        if (DRC.Length < 1)
        {
            return;
        }

        if (DRC[0]["UstId"] == DBNull.Value)
        {
            SBMenu.Append("<ul data-snlg='menu'>");
        }
        else
        {
            SBMenu.Append("<ul>");
        }


        for (int i = 0; i < DRC.Length; i++)
        {
            DataRow[] drSubs = DTMenu.Select("UstId = " + DRC[i]["KtgID"].ToString(), "Sira");
            SBMenu.Append("<li>");
            if (drSubs.Length > 0)
            {
                if (!string.IsNullOrEmpty(DRC[i]["Resim"].ToString()))
                {
                    SBMenu.AppendFormat("<img src=\"{0}\"/>", DRC[i]["Resim"].ToString());
                }
                SBMenu.AppendFormat("<a href=\"javascript:;\">{0}</a><i class='fa fa-angle-right'></i>", DRC[i]["KtgAd"].ToString());
            }
            else
            {
                if (!string.IsNullOrEmpty(DRC[i]["Resim"].ToString()))
                {
                    SBMenu.AppendFormat("<img src=\"{0}\"/>", DRC[i]["Resim"].ToString());
                }
                SBMenu.AppendFormat("<a href=\"/{1}/{2}/{0}\">", DRC[i]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("shop"));
                SBMenu.AppendFormat("{0}</a>", DRC[i]["KtgAd"].ToString());
            }
            MenuleriDoldur(DTMenu, SBMenu, drSubs);
            SBMenu.Append("</li>");
        }
        SBMenu.Append("</ul>");

        return;
    }
Example #14
0
 protected string LinkOlustur(object yil, object ay)
 {
     return("<a href=\"/" + Snlg_ConfigValues.s_Dil + "/" + Snlg_ConfigValues.GetUrlValueByKey("blog") + "/" + yil.ToString() + "-" + ay.ToString() + Snlg_ConfigValues.urlExtension + "\">" + Ay_ismi(Convert.ToInt32(ay)) + " " + yil.ToString() + "</a>");
 }
Example #15
0
 void context_ApplicationStart()
 {
     try { Snlg_ConfigValues.ApplicationStartMetod(); }
     catch { }
 }
Example #16
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 MenuleriDoldur(DataTable DTMenu, StringBuilder SBMenu, DataRow[] DRC)
    {
        if (DRC.Length < 1)
        {
            return;
        }

        int sorguNo = Convert.ToInt32(DRC[0]["SorguNo"]);

        if (DRC[0]["UstId"] == DBNull.Value)
        {
            SBMenu.Append("<ul data-snlg='menu'>");
        }
        else
        {
            SBMenu.Append("<ul>");
        }

        for (int i = 0; i < DRC.Length; i++)
        {
            DataRow[] drSubs = DTMenu.Select("UstId = " + DRC[i]["ID"].ToString() + " AND SorguNo = " + sorguNo.ToString(), "Sira");
            if (drSubs.Length < 1)
            {//eğer sorguNoya ait kayıt kalmadıysa bi sornakine geçebilmek için
                sorguNo++;
                drSubs = DTMenu.Select("UstId = " + DRC[i]["ID"].ToString() + " AND SorguNo = " + sorguNo.ToString(), "Sira");
            }


            SBMenu.Append("<li>");
            if (drSubs.Length > 0)
            {
                if (!string.IsNullOrEmpty(DRC[i]["Resim"].ToString()))
                {
                    SBMenu.AppendFormat("<img src=\"{0}\"/>", DRC[i]["Resim"].ToString());
                }
                SBMenu.AppendFormat("<a href=\"javascript:;\">{0}</a><i class='fa fa-angle-right'></i>", DRC[i]["KtgAd"].ToString());
            }
            else
            {
                string link = "javascript:;";
                if (DRC[i]["SeoUrl"].ToString().Contains("http") || DRC[i]["SeoUrl"].ToString().Contains("//"))
                {
                    link = DRC[i]["SeoUrl"].ToString();
                }
                else if (string.IsNullOrEmpty(DRC[i]["SeoUrl"].ToString().Replace("#", "")))
                {
                    link = "javascript:;";
                }
                else
                {
                    link = string.Format("/{0}/{1}/{2}", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("project"), DRC[i]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension);
                }

                if (!string.IsNullOrEmpty(DRC[i]["Resim"].ToString()))
                {
                    SBMenu.AppendFormat("<img src=\"{0}\"/>", DRC[i]["Resim"].ToString());
                }
                SBMenu.AppendFormat("<a href=\"{0}\">", link);
                SBMenu.AppendFormat("{0}</a>", DRC[i]["KtgAd"].ToString());
            }
            MenuleriDoldur(DTMenu, SBMenu, drSubs);
            SBMenu.Append("</li>");
        }
        SBMenu.Append("</ul>");

        return;
    }
Example #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region default olarak sayfaları bu ascxe attribute olarak at (bunu  title gösterirken aşağıda kullanacağız.
        string ascxName = this.AppRelativeVirtualPath.Replace("/", "\\").Replace("\\modules\\", "").Replace(".ascx", "").Replace("~", "");
        object ascxID   = vt.ScalarSorguCalistir("SELECT UCID FROM snlg_V1.TblUCApp WHERE UCPath = '" + ascxName + "'", CommandType.Text);
        if (ascxID == null || ascxID == DBNull.Value)
        {
            return;
        }

        DataTable dt = vt.DataTableOlustur("SELECT DISTINCT SAd FROM snlg_V1.TblSayfaApp ORDER BY SAd", CommandType.Text);

        string key          = "breadcrumbs";
        string defaultValue = dt.Rows[0]["SAd"].ToString().Replace("'", "'");
        string values       = "";
        foreach (DataRow dr in dt.Rows)
        {
            values += "," + dr["SAd"].ToString();
        }

        values = values.Substring(1).Replace("'", "''");

        object attrID = vt.ScalarSorguCalistir("SELECT * FROM snlg_V1.TblBlockAttributeKeys WHERE BlockID = " + ascxID + " AND AttributeKey = '" + key + "'", CommandType.Text);
        if (attrID == null)
        {
            if (dt.Rows.Count > 0)
            {
                vt.SorguCalistir("INSERT INTO snlg_V1.TblBlockAttributeKeys (BlockID, AttributeKey, DefaultValue, ValueList) VALUES(" + ascxID.ToString() + ", '" + key + "', '" + defaultValue + "', '" + values + "');", CommandType.Text);
            }
        }
        else
        {
            if (dt.Rows.Count > 0)
            {
                vt.SorguCalistir("UPDATE snlg_V1.TblBlockAttributeKeys SET ValueList='" + values + "' WHERE BlockID = " + ascxID + " AND AttributeKey = '" + key + "'", CommandType.Text);
            }
        }
        #endregion


        StringBuilder SBMenu = new StringBuilder();

        #region önce ana sayfanın linkini oluştur
        object sayfa = vt.ScalarSorguCalistir("SELECT SeoUrl FROM snlg_V1.TblSayfaDetay WHERE (SayfaId = (SELECT SayfaId FROM snlg_V1.TblSayfaDetay WHERE (SeoUrl = N'" + Snlg_ConfigValues.startPage + "') AND (DId = " + Snlg_ConfigValues.defaultLangId + "))) AND (DId = " + Snlg_ConfigValues.s_ZDilId + ")", CommandType.Text);
        if (sayfa != null && sayfa != DBNull.Value)
        {
            string sayfaText = "";
            foreach (string item in sayfa.ToString().Split("-".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
            {
                sayfaText += item[0].ToString().ToUpper() + item.Substring(1) + " ";
            }

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, sayfa.ToString(), sayfaText);
        }
        #endregion


        #region  breadcump çek
        if (!string.IsNullOrEmpty(Request.QueryString["syf"]))
        {
            #region sayfa ise
            string[] urlDizi = HttpContext.Current.Request.RawUrl.Split('/');

            DataTable dtMenu = vt.DataTableOlustur(@"
                WITH RekursifSorgu(MenuId)
                AS
                (
	                SELECT MenuId FROM snlg_V1.TblMenuApp
	                WHERE UstId IS NULL
		                UNION ALL
	                SELECT TMA.MenuId FROM snlg_V1.TblMenuApp TMA JOIN RekursifSorgu 
	                ON TMA.UstId = RekursifSorgu.MenuId
                )
                SELECT TMA.Sira, TMA.UstId, TMA.Hedef, RekursifSorgu.MenuId,TMA.Resim,
		                ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = "         + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem,
		                ISNULL(TMD.MenuLink, (SELECT TOP 1 MenuLink FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = "         + Snlg_ConfigValues.defaultLangId + @")) AS MenuLink
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblMenuApp AS TMA ON TMA.MenuId = RekursifSorgu.MenuId LEFT OUTER JOIN
		                snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            Dictionary <string, List <string> > menuHiyerarsi = new Dictionary <string, List <string> >();
            BreadCumpDoldur(dtMenu, dtMenu.Select("MenuLink = '/" + urlDizi[2] + "'"), menuHiyerarsi, "");
            if (menuHiyerarsi.Count > 0)
            {//bu sayfa menüde var ise
                int    enUzunMenu    = 0;
                string enUzunMenuKey = "";
                foreach (KeyValuePair <string, List <string> > item in menuHiyerarsi)
                {
                    if (item.Value.Count > enUzunMenu)
                    {
                        enUzunMenu    = item.Value.Count;
                        enUzunMenuKey = item.Key;
                    }
                }

                for (int i = enUzunMenu - 1; i >= 0; i--)
                {
                    DataRow dr = dtMenu.Select("MenuID = " + menuHiyerarsi[enUzunMenuKey][i])[0];

                    string link = "";
                    if (dr["MenuLink"].ToString().Contains("http") || dr["MenuLink"].ToString().Contains("//"))
                    {
                        link = dr["MenuLink"].ToString();
                    }
                    else if (string.IsNullOrEmpty(dr["MenuLink"].ToString().Replace("#", "")))
                    {
                        link = "#";
                    }
                    else
                    {
                        link = "/" + Snlg_ConfigValues.s_Dil + dr["MenuLink"].ToString();
                    }

                    SBMenu.AppendFormat(@"<li><a href='{0}'>{1}</a></li>", link, dr["MenuItem"].ToString());
                }
            }
            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["urunid"]))
        {
            #region ürün ise
            //ürünlerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //şimdi kategorileri listeliyoruz
            object mKtg = vt.ScalarSorguCalistir(@"SELECT TOP(1) MK.KtgId FROM snlg_V1.TblUrunApp AS M INNER JOIN snlg_V1.TblUrun_Kategori AS MK ON M.UrunID = MK.UrunID WHERE M.UrunID = " + Request.QueryString["urunid"], CommandType.Text);

            DataTable dt2 = vt.DataTableOlustur(@"
                WITH RekursifSorgu(KtgId,UstId)
                AS
                (
	                SELECT KtgId,UstId FROM snlg_V1.TblUrunKtgApp WHERE KtgID= "     + mKtg + @"
		                UNION ALL
	                SELECT TMKA.KtgId,TMKA.UstId FROM snlg_V1.TblUrunKtgApp TMKA JOIN RekursifSorgu ON RekursifSorgu.UstId = TMKA.KtgId
                )
                SELECT ISNULL(TMKD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblUrunKtgDetay WHERE KtgId = TMKA.KtgId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS KtgAd,
		                TMKD.SeoUrl
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblUrunKtgApp AS TMKA ON TMKA.KtgId = RekursifSorgu.KtgId LEFT OUTER JOIN
		                snlg_V1.TblUrunKtgDetay AS TMKD ON TMKA.KtgId = TMKD.KtgId AND TMKD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            for (int i = dt2.Rows.Count - 1; i >= 0; i--)
            {
                DataRow dr = dt2.Rows[i];
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("shop"), dr["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dr["KtgAd"].ToString());
            }

            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	ISNULL(TMD.UrunAd, (SELECT TOP 1 UrunAd FROM snlg_V1.TblUrunDetay WHERE (UrunID = TMA.UrunID) AND (Dil = " + Snlg_ConfigValues.defaultLangId + @"))) AS UrunAd,
			                TMD.SeoUrl
                FROM	snlg_V1.TblUrunApp AS TMA LEFT OUTER JOIN
			                snlg_V1.TblUrunDetay AS TMD ON TMA.UrunID = TMD.UrunID AND TMD.Dil = "             + Snlg_ConfigValues.s_ZDilId + @"
                WHERE     (TMA.UrunID= " + Request.QueryString["urunid"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("shop"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["UrunAd"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["uktg"]))
        {
            #region ürün kategori ise
            //ürünlerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //şimdi kategorileri listeliyoruz
            object mKtg = Request.QueryString["uktg"];

            DataTable dt2 = vt.DataTableOlustur(@"
                WITH RekursifSorgu(KtgId,UstId)
                AS
                (
	                SELECT KtgId,UstId FROM snlg_V1.TblUrunKtgApp WHERE KtgID= "     + mKtg + @"
		                UNION ALL
	                SELECT TMKA.KtgId,TMKA.UstId FROM snlg_V1.TblUrunKtgApp TMKA JOIN RekursifSorgu ON RekursifSorgu.UstId = TMKA.KtgId
                )
                SELECT ISNULL(TMKD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblUrunKtgDetay WHERE KtgId = TMKA.KtgId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS KtgAd,
		                TMKD.SeoUrl
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblUrunKtgApp AS TMKA ON TMKA.KtgId = RekursifSorgu.KtgId LEFT OUTER JOIN
		                snlg_V1.TblUrunKtgDetay AS TMKD ON TMKA.KtgId = TMKD.KtgId AND TMKD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            for (int i = dt2.Rows.Count - 1; i >= 0; i--)
            {
                DataRow dr = dt2.Rows[i];
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("shop"), dr["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dr["KtgAd"].ToString());
            }

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["makid"]))
        {
            #region makale ise
            //makalelerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //şimdi kategorileri listeliyoruz
            object mKtg = vt.ScalarSorguCalistir(@"SELECT TOP(1) MK.KtgId FROM snlg_V1.TblMakaleApp AS M INNER JOIN snlg_V1.TblMakale_Kategori AS MK ON M.MakId = MK.MakId WHERE M.MakId = " + Request.QueryString["makid"], CommandType.Text);

            DataTable dt2 = vt.DataTableOlustur(@"
                WITH RekursifSorgu(KtgId,UstId)
                AS
                (
	                SELECT KtgId,UstId FROM snlg_V1.TblMakaleKtgApp WHERE KtgID= "     + mKtg + @"
		                UNION ALL
	                SELECT TMKA.KtgId,TMKA.UstId FROM snlg_V1.TblMakaleKtgApp TMKA JOIN RekursifSorgu ON RekursifSorgu.UstId = TMKA.KtgId
                )
                SELECT ISNULL(TMKD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblMakaleKtgDetay WHERE KtgId = TMKA.KtgId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS KtgAd,
		                TMKD.SeoUrl
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblMakaleKtgApp AS TMKA ON TMKA.KtgId = RekursifSorgu.KtgId LEFT OUTER JOIN
		                snlg_V1.TblMakaleKtgDetay AS TMKD ON TMKA.KtgId = TMKD.KtgId AND TMKD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            for (int i = dt2.Rows.Count - 1; i >= 0; i--)
            {
                DataRow dr = dt2.Rows[i];
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("blog"), dr["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dr["KtgAd"].ToString());
            }

            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	ISNULL(TMD.Baslik, (SELECT TOP 1 Baslik FROM snlg_V1.TblMakaleDetay WHERE (MakId = TMA.MakId) AND (Dil = " + Snlg_ConfigValues.defaultLangId + @"))) AS Baslik,
			                TMD.SeoUrl
                FROM	snlg_V1.TblMakaleApp AS TMA LEFT OUTER JOIN
			                snlg_V1.TblMakaleDetay AS TMD ON TMA.MakId = TMD.MakId AND TMD.Dil = "             + Snlg_ConfigValues.s_ZDilId + @"
                WHERE     (TMA.MakId= " + Request.QueryString["makid"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("blog"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["Baslik"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["tagvalue"]))
        {
            #region makale tag ise
            //makalelerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

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

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{4}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("blog"), Request.QueryString["tagvalue"] + Snlg_ConfigValues.urlExtension, tagText, Snlg_ConfigValues.GetUrlValueByKey("tag"));

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["mktg"]))
        {
            #region makale kategori ise
            //makalelerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //şimdi kategorileri listeliyoruz
            object mKtg = Request.QueryString["mktg"];

            DataTable dt2 = vt.DataTableOlustur(@"
                WITH RekursifSorgu(KtgId,UstId)
                AS
                (
	                SELECT KtgId,UstId FROM snlg_V1.TblMakaleKtgApp WHERE KtgID= "     + mKtg + @"
		                UNION ALL
	                SELECT TMKA.KtgId,TMKA.UstId FROM snlg_V1.TblMakaleKtgApp TMKA JOIN RekursifSorgu ON RekursifSorgu.UstId = TMKA.KtgId
                )
                SELECT ISNULL(TMKD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblMakaleKtgDetay WHERE KtgId = TMKA.KtgId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS KtgAd,
		                TMKD.SeoUrl
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblMakaleKtgApp AS TMKA ON TMKA.KtgId = RekursifSorgu.KtgId LEFT OUTER JOIN
		                snlg_V1.TblMakaleKtgDetay AS TMKD ON TMKA.KtgId = TMKD.KtgId AND TMKD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            for (int i = dt2.Rows.Count - 1; i >= 0; i--)
            {
                DataRow dr = dt2.Rows[i];
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("blog"), dr["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dr["KtgAd"].ToString());
            }

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["mak_arsiv_yil"]))
        {
            #region makale ARŞİVİ ise
            //makalelerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            SBMenu.AppendFormat(@"<li>{0}</li>", LinkOlustur(Request.QueryString["mak_arsiv_yil"], Request.QueryString["mak_arsiv_ay"]));

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["paltid"]))
        {
            #region PROJE ise
            //proje listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //şimdi kategorileri listeliyoruz
            object mKtg = vt.ScalarSorguCalistir(@"SELECT TOP(1) MK.KtgId FROM snlg_V1.TblProjeAltBilgiApp AS M INNER JOIN snlg_V1.TblProje_Kategori AS MK ON M.ProjeID = MK.ProjeID WHERE M.ProjeAltId = " + Request.QueryString["paltid"], CommandType.Text);

            DataTable dt2 = vt.DataTableOlustur(@"
                WITH RekursifSorgu(KtgId,UstId)
                AS
                (
	                SELECT KtgId,UstId FROM snlg_V1.TblProjeKtgApp WHERE KtgID= "     + mKtg + @"
		                UNION ALL
	                SELECT TMKA.KtgId,TMKA.UstId FROM snlg_V1.TblProjeKtgApp TMKA JOIN RekursifSorgu ON RekursifSorgu.UstId = TMKA.KtgId
                )
                SELECT ISNULL(TMKD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblProjeKtgDetay WHERE KtgId = TMKA.KtgId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS KtgAd,
		                TMKD.SeoUrl
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblProjeKtgApp AS TMKA ON TMKA.KtgId = RekursifSorgu.KtgId LEFT OUTER JOIN
		                snlg_V1.TblProjeKtgDetay AS TMKD ON TMKA.KtgId = TMKD.KtgId AND TMKD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            for (int i = dt2.Rows.Count - 1; i >= 0; i--)
            {
                DataRow dr = dt2.Rows[i];
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("project"), dr["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dr["KtgAd"].ToString());
            }


            //proje başlığı
            DataTable dt4 = vt.DataTableOlustur(@"
SELECT TOP (1) M.ProjeUrl,
	ISNULL(PD.Baslik, (SELECT TOP 1 Baslik FROM snlg_V1.TblProjeDetay WHERE (ProjeId = PD.ProjeId) AND (Dil = "     + Snlg_ConfigValues.defaultLangId + @"))) AS Baslik
FROM  snlg_V1.TblProjeApp AS M INNER JOIN
        snlg_V1.TblProjeDetay AS PD ON M.ProjeId = PD.ProjeId INNER JOIN
        snlg_V1.TblProjeAltBilgiApp AS PD2 ON M.ProjeId = PD2.ProjeId
WHERE     (PD2.ProjeAltId= " + Request.QueryString["paltid"] + ")", CommandType.Text);

            if (dt4.Rows[0]["ProjeUrl"].ToString().ToLower().StartsWith("http"))
            {
                SBMenu.AppendFormat(@"<li><a href='{0}'>{1}</a></li>", dt4.Rows[0]["ProjeUrl"].ToString(), dt4.Rows[0]["Baslik"].ToString());
            }
            else
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("project"), dt4.Rows[0]["ProjeUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt4.Rows[0]["Baslik"].ToString());
            }


            //proje alt bilgi
            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	ISNULL(TMD.Baslik, (SELECT TOP 1 Baslik FROM snlg_V1.TblProjeAltBilgiDetay WHERE (ProjeAltId = TMA.ProjeAltId) AND (Dil = " + Snlg_ConfigValues.defaultLangId + @"))) AS Baslik,
			                TMD.SeoUrl
                FROM	snlg_V1.TblProjeAltBilgiApp AS TMA LEFT OUTER JOIN
			                snlg_V1.TblProjeAltBilgiDetay AS TMD ON TMA.ProjeAltId = TMD.ProjeAltId AND TMD.Dil = "             + Snlg_ConfigValues.s_ZDilId + @"
                WHERE     (TMA.ProjeAltId= " + Request.QueryString["paltid"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("project"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["Baslik"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["pktg"]))
        {
            #region PROJE kategori, ise
            //projelerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //şimdi kategorileri listeliyoruz
            object mKtg = Request.QueryString["pktg"];

            DataTable dt2 = vt.DataTableOlustur(@"
                WITH RekursifSorgu(KtgId,UstId)
                AS
                (
	                SELECT KtgId,UstId FROM snlg_V1.TblProjeKtgApp WHERE KtgID= "     + mKtg + @"
		                UNION ALL
	                SELECT TMKA.KtgId,TMKA.UstId FROM snlg_V1.TblProjeKtgApp TMKA JOIN RekursifSorgu ON RekursifSorgu.UstId = TMKA.KtgId
                )
                SELECT ISNULL(TMKD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblProjeKtgDetay WHERE KtgId = TMKA.KtgId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS KtgAd,
		                TMKD.SeoUrl
                FROM RekursifSorgu INNER JOIN 
		                snlg_V1.TblProjeKtgApp AS TMKA ON TMKA.KtgId = RekursifSorgu.KtgId LEFT OUTER JOIN
		                snlg_V1.TblProjeKtgDetay AS TMKD ON TMKA.KtgId = TMKD.KtgId AND TMKD.Dil = "         + Snlg_ConfigValues.s_ZDilId, CommandType.Text);

            for (int i = dt2.Rows.Count - 1; i >= 0; i--)
            {
                DataRow dr = dt2.Rows[i];
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("project"), dr["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dr["KtgAd"].ToString());
            }

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["hbrid"]))
        {
            #region haber ise
            //haberlerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //haberin bredcumps'u
            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	ISNULL(TMD.Baslik, (SELECT TOP 1 Baslik FROM snlg_V1.TblHaberDetay WHERE (HaberID = TMA.HaberID) AND (Dil = " + Snlg_ConfigValues.defaultLangId + @"))) AS Baslik,
			                TMD.SeoUrl
                FROM	snlg_V1.TblHaberApp AS TMA LEFT OUTER JOIN
			                snlg_V1.TblHaberDetay AS TMD ON TMA.HaberID = TMD.HaberID AND TMD.Dil = "             + Snlg_ConfigValues.s_ZDilId + @"
                WHERE     (TMA.HaberID= " + Request.QueryString["hbrid"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("news"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["Baslik"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["dyrid"]))
        {
            #region duyuru ise
            //duyuruların listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //duyuru bredcumps'u
            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	ISNULL(TMD.Baslik, (SELECT TOP 1 Baslik FROM snlg_V1.TblDuyuruDetay WHERE (DuyuruID = TMA.DuyuruID) AND (Dil = " + Snlg_ConfigValues.defaultLangId + @"))) AS Baslik,
			                TMD.SeoUrl
                FROM	snlg_V1.TblDuyuruApp AS TMA LEFT OUTER JOIN
			                snlg_V1.TblDuyuruDetay AS TMD ON TMA.DuyuruID = TMD.DuyuruID AND TMD.Dil = "             + Snlg_ConfigValues.s_ZDilId + @"
                WHERE     (TMA.DuyuruID= " + Request.QueryString["dyrid"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("announce"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["Baslik"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["rktg"]))
        {
            #region referans ise
            //kategorilerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //kategori bredcumps'u
            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	ISNULL(TMD.KtgAd, (SELECT TOP 1 KtgAd FROM snlg_V1.TblReferansKtgDetay WHERE (KtgID = TMA.KtgID) AND (Dil = " + Snlg_ConfigValues.defaultLangId + @"))) AS KtgAd,
			                SeoUrl
                FROM	snlg_V1.TblReferansKtgApp AS TMA LEFT OUTER JOIN
			                snlg_V1.TblReferansKtgDetay AS TMD ON TMA.KtgID = TMD.KtgID AND TMD.Dil = "             + Snlg_ConfigValues.s_ZDilId + @"
                WHERE     (TMA.KtgID= " + Request.QueryString["rktg"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("portfolio"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["KtgAd"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["yazar"]))
        {
            #region duyuru ise
            //editörlerin listelendiği sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //editör bredcumps'u
            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	UyeAd,SeoUrl
                FROM	snlg_V1.TblUyeApp INNER JOIN snlg_V1.TblUyeDetay ON snlg_V1.TblUyeDetay.UyeID = snlg_V1.TblUyeApp.UyeID 
                WHERE     (snlg_V1.TblUyeApp.UyeID= " + Request.QueryString["yazar"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("editor"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["UyeAd"].ToString());

            #endregion
        }
        else if (!string.IsNullOrEmpty(Request.QueryString["uye"]))
        {
            #region üye ise
            //üyelerin sayfa menüsünü alıyoruz
            object SayfaUrl = vt.ScalarSorguCalistir("select SeoUrl from snlg_v1.TblSayfaDetay D JOIN snlg_v1.TblSayfaApp A ON A.SayfaID = D.SayfaID WHERE SAd = '" + GetBlockAttribute(key) + "' AND DId = " + Snlg_ConfigValues.s_ZDilId, CommandType.Text).ToString();

            object sayfaMenuText = vt.ScalarSorguCalistir(@"
SELECT ISNULL(TMD.MenuItem, (SELECT TOP 1 MenuItem FROM snlg_V1.TblMenuDetay WHERE MenuId = TMA.MenuId AND Dil = " + Snlg_ConfigValues.defaultLangId + @")) AS MenuItem
FROM snlg_V1.TblMenuApp AS TMA LEFT OUTER JOIN
		snlg_V1.TblMenuDetay AS TMD ON TMA.MenuId = TMD.MenuId AND TMD.Dil = "         + Snlg_ConfigValues.s_ZDilId + " WHERE        (TMD.MenuLink = N'/" + SayfaUrl.ToString() + "')", CommandType.Text);

            if (sayfaMenuText != null && sayfaMenuText != DBNull.Value)
            {
                SBMenu.AppendFormat(@"<li><a href='/{0}/{1}'>{2}</a></li>", Snlg_ConfigValues.s_Dil, SayfaUrl, sayfaMenuText);
            }

            //üye bredcumps'u
            DataTable dt3 = vt.DataTableOlustur(@"
                SELECT	UyeAd,SeoUrl
                FROM	snlg_V1.TblUyeApp INNER JOIN snlg_V1.TblUyeDetay ON snlg_V1.TblUyeDetay.UyeID = snlg_V1.TblUyeApp.UyeID 
                WHERE     (snlg_V1.TblUyeApp.UyeID= " + Request.QueryString["uye"] + ")", CommandType.Text);

            SBMenu.AppendFormat(@"<li><a href='/{0}/{1}/{2}'>{3}</a></li>", Snlg_ConfigValues.s_Dil, Snlg_ConfigValues.GetUrlValueByKey("user"), dt3.Rows[0]["SeoUrl"].ToString() + Snlg_ConfigValues.urlExtension, dt3.Rows[0]["UyeAd"].ToString());

            #endregion
        }

        LtrBread.Text = SBMenu.ToString();
        #endregion
    }