void CustomizeControl1_UpdateClick(SortedDictionary <string, Control> controls) { try { if (!string.IsNullOrEmpty(Request.QueryString["mdl"])) { using (Kategori m = KategoriMethods.GetKategori(Request.QueryString["mdl"], BAYMYO.UI.Converts.NullToString(((TreeView)controls["Kategoriler"]).SelectedNode.DataPath))) { if (!string.IsNullOrEmpty(m.ID)) { if (!string.IsNullOrEmpty(((TextBox)controls["Adi"]).Text)) { m.Adi = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Adi"]).Text, 35); } //m.Menu = byte.Parse(((DropDownList)controls["Menu"]).SelectedValue); //m.Sira = (byte)((DropDownList)controls["Sira"]).SelectedIndex; //m.Dil = ((DropDownList)controls["Dil"]).SelectedValue; if (Core.IsUserAdmin) { m.Aktif = ((CheckBox)controls["Aktif"]).Checked; } else { m.Aktif = false; } //if (!string.IsNullOrEmpty(((TextBox)controls["Renk"]).Text)) // m.Renk = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Renk"]).Text, 7); if (!string.IsNullOrEmpty(((TextBox)controls["Aciklama"]).Text)) { m.Aciklama = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Aciklama"]).Text, 150); } if (!string.IsNullOrEmpty(((TextBox)controls["Etiket"]).Text)) { m.Etiket = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Etiket"]).Text, 100); } switch (KategoriMethods.Update(m)) { case "ADI": CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, "Eklemek istediğiniz isimde başka bir kategori bulunmaktadır, lütfen kategori adını kontrol ediniz tekrar deneyiniz!"); break; default: Core.CreateCategoryMaps(m.ModulID); jSonData.CreateData(m.ModulID); ((TreeView)controls["Kategoriler"]).DataBind(); CustomizeControl1.MessageText = MessageBox.Show(ProccesType.Update, DialogResult.Succes); ((TextBox)controls["Adi"]).Focus(); break; } } } } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } }
void trv_SelectedNodeChanged(object sender, EventArgs e) { Kategori k = KategoriMethods.GetKategori(Request.QueryString["mdl"], (sender as TreeView).SelectedNode.DataPath); ((TextBox)this.CustomizeControl1.ControlList["Adi"]).Text = k.Adi; //((DropDownList)this.CustomizeControl1.ControlList["Menu"]).SelectedValue = k.Menu.ToString(); //((DropDownList)this.CustomizeControl1.ControlList["Sira"]).SelectedIndex = k.Sira; //((TextBox)this.CustomizeControl1.ControlList["Renk"]).Text = k.Renk; ((TextBox)this.CustomizeControl1.ControlList["Aciklama"]).Text = k.Aciklama; ((TextBox)this.CustomizeControl1.ControlList["Etiket"]).Text = k.Etiket; ((CheckBox)this.CustomizeControl1.ControlList["Aktif"]).Checked = k.Aktif; }
private void View(Album m) { CommentControl1.IsCommandActive = BAYMYO.UI.Converts.NullToGuidString(Core.CurrentUser.ID).Equals(m.HesapID); CommentControl1.Visible = m.Yorum; CommentControl1.ModulID = "galeri"; CommentControl1.IcerikID = m.ID.ToString(); //Icerik Bilgisi if (!BAYMYO.UI.Converts.NullToString(KategoriBilgi.ModulID).Equals("galeri") || !BAYMYO.UI.Converts.NullToString(KategoriBilgi.ID).Equals(m.KategoriID)) { KategoriBilgi = KategoriMethods.GetKategori("galeri", m.KategoriID); } if (KategoriBilgi.Aktif) { this.Page.Title += " | " + KategoriBilgi.Adi.ToUpper(); //+ " | " + Settings.Site.Title + " | " + m.Etiket; } Etiketler = ""; string etiketQuery = string.Empty; foreach (string item in m.Etiket.Split(',')) { Etiketler += string.Format("<a href=\"{0}{1}\" target=\"_blank\"><strong>{2}</strong></a>, ", Settings.SiteUrl.Replace("http:", ""), Core.CreateLink("galerietiket", "", item), item.Trim()); etiketQuery += " or i.yoneticionay=1 and i.aktif=1 and i.etiket like <%USTENTIRNAK%>%" + item.Trim() + ",%<%USTENTIRNAK%>"; } if (!BAYMYO.UI.Converts.NullToString(Session["etiketSession"]).Equals(etiketQuery)) { Session["etiketSession"] = etiketQuery; } using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "galeri", "kayittarihi asc", "albumid=?albumid", 1)) { data.Parameters.Add("albumid", m.ID, BAYMYO.MultiSQLClient.MSqlDbType.BigInt); data.PageNumberTargetControl = pageNumberLiteral; data.Binding(); SayfaURL = (data.CurrentPage >= data.LastPage) ? "/galeriler" : "/?go=galerigoster&mdl=galeri&raid=" + m.ID + "&pno=" + data.NextPage + "#titleBox"; if (data.TotalDataCount < 1) { pageNumberLiteral.Visible = true; pageNumberLiteral.Text = MessageBox.IsNotViews(); } else { jobSet.Visible = (data.TotalPageCount > 1); } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { #region --- Kategoriler --- List <Kategori> kategoriler = KategoriMethods.GetMenu("galeri", false); kategoriler.Insert(0, new Kategori() { ID = "", Adi = "Kategoriye göre süz!" }); ddlKategoriler.DataValueField = "id"; ddlKategoriler.DataTextField = "adi"; ddlKategoriler.DataSource = kategoriler; ddlKategoriler.DataBind(); #endregion Core.GetProccesList("album", ddlIslemler); GetDataPaging(); } }
void CustomizeControl1_RemoveClick(SortedDictionary <string, Control> controls) { try { if (!BAYMYO.UI.Converts.NullToString(((TreeView)controls["Kategoriler"]).SelectedNode.DataPath).Equals("0")) { if (KategoriMethods.Delete(Request.QueryString["mdl"], BAYMYO.UI.Converts.NullToString(((TreeView)controls["Kategoriler"]).SelectedNode.DataPath)) > 0) { ((TreeView)controls["Kategoriler"]).DataBind(); Core.CreateCategoryMaps(Request.QueryString["mdl"]); jSonData.CreateData(Request.QueryString["mdl"]); CustomizeControl1.MessageText = MessageBox.Show(ProccesType.Delete, DialogResult.Succes); Core.ClearControls(controls); ((TextBox)controls["Adi"]).Focus(); } } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { #region --- Kategoriler --- List <Kategori> kategoriler = KategoriMethods.GetMenu("makale", false); ddlKategoriler.DataMember = "kategori"; ddlKategoriler.DataValueField = "id"; ddlKategoriler.DataTextField = "adi"; ddlKategoriler.Items.Add(new ListItem("Kategoriye göre süz!", "0")); ListItem item = null; foreach (Kategori kategori in kategoriler) { switch (kategori.ParentID) { case "": item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = "padding-left: 5px; background: #f5f5f5; color: #454545; font-weight:bold;"; break; case "0": item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = "padding-left: 25px; background: #f5f5f5; color: #fe760c; font-weight: bold;"; break; default: item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = string.Format("padding-left: {0}px; background: #f5f5f5; color: #454545;", (BAYMYO.UI.Converts.NullToInt(kategori.ParentID.Split(',').Length + 1) * 25)); break; } ddlKategoriler.Items.Add(item); } kategoriler.Clear(); #endregion Core.GetProccesList("makale", ddlIslemler); GetDataPaging(); } }
private void View(Makale m) { using (Hesap hsp = HesapMethods.GetHesap(m.HesapID)) { this.Page.Title = m.Baslik + " - " + hsp.Adi + " " + hsp.Soyadi; #region --- html-meta --- string imageUrl = Settings.SiteImageUrl + "profil/" + hsp.ProfilObject.ResimUrl, meslek = KategoriMethods.GetKategori("meslek", hsp.ProfilObject.Meslek).Adi; #endregion CommentControl1.IsCommandActive = BAYMYO.UI.Converts.NullToGuidString(Core.CurrentUser.ID).Equals(m.HesapID); CommentControl1.Visible = m.Yorum; CommentControl1.ModulID = "makale"; CommentControl1.IcerikID = Request.QueryString["mklid"]; ltrContent.Text = BAYMYO.UI.FileIO.ReadText(Server.MapPath(Settings.ViewPath + "ArticleView.view")); //Icerik Bilgisi ltrContent.Text = ltrContent.Text.Replace("%ImagesPath%", Settings.ImagesPath); if (!BAYMYO.UI.Converts.NullToString(KategoriBilgi.ModulID).Equals("makale") || !BAYMYO.UI.Converts.NullToString(KategoriBilgi.ID).Equals(m.KategoriID)) { KategoriBilgi = KategoriMethods.GetKategori("makale", m.KategoriID); } if (KategoriBilgi.Aktif) { this.Page.Title += " | " + KategoriBilgi.Adi.ToUpper();// +" - " + m.Etiket; } ltrContent.Text = ltrContent.Text.Replace("%Renk%", KategoriBilgi.Renk); ltrContent.Text = ltrContent.Text.Replace("%Kategori%", string.Format("<a href=\"{0}\" target=\"_blank\">{1}</a>", Core.CreateLink("makalekategori", KategoriBilgi.ID, KategoriBilgi.Adi), KategoriBilgi.Adi)); ltrContent.Text = ltrContent.Text.Replace("%ResimUrl%", "<div class=\"profil-img\"><a href=\"%Url%\" target=\"_blank\"><img class=\"image left\" src=" + Settings.ImagesPath + "profil/" + hsp.ProfilObject.ResimUrl + " alt=\"%Adi% %Soyadi%\" /></a>" + string.Format("<span class=\"links\"><a class='toolTip' title='Yazarın profilini görüntülemek için buraya tıklayın.' href=\"/{0}\" target=\"_blank\"><b>{4} {1} {2}</b></a> <br/><span style='font-size:12px;color:#454545;margin-bottom: 8px;display:block;'>{3}</span>", hsp.ProfilObject.Url, hsp.Adi, hsp.Soyadi, hsp.ProfilObject.Mail, meslek) + "</span></div>"); ltrContent.Text = ltrContent.Text.Replace("%SpotBaslik%", ((!string.IsNullOrEmpty(m.ResimUrl)) ? string.Format("<figure class=\"photo\"><img itemprop=\"image\" src=\"{0}\" alt=\"%Adi% %Soyadi%\" title=\"%Adi% %Soyadi%\" /><meta itemprop=\"interactionCount\" content=\"UserComments:{1}\" /><meta itemprop=\"thumbnailUrl\" content=\"{0}\" /></figure>", Settings.SiteImageUrl + "makale/" + m.ResimUrl, YorumMethods.Count(m.ID.ToString())) : "")); ltrContent.Text = ltrContent.Text.Replace("%Baslik%", m.Baslik.Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%Body%", BAYMYO.UI.Web.Pages.ClearHtml(m.Icerik).Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%BaslikDiger%", hsp.ProfilObject.Adi + " " + KategoriBilgi.Adi.ToLower() + " kategorisindeki makaleleri ve röportajları."); ltrContent.Text = ltrContent.Text.Replace("%Ozet%", m.Ozet.Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihiSEO%", m.KayitTarihi.ToString("yyyy-MM-ddTHH:mm:ssZ")); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihi%", m.KayitTarihi.ToString("dd MMMMM yyyy ddddd - HH:mm:ss")); ltrContent.Text = ltrContent.Text.Replace("%ImageUrl%", imageUrl); string etiketler = string.Empty; foreach (string item in m.Etiket.Split(',')) { etiketler += string.Format("<a href=\"{0}{1}\" target=\"_blank\"><strong>{2}</strong></a>, ", Settings.SiteUrl.Replace("http:", ""), Core.CreateLink("makaleetiket", "", item), item.Trim()); } ltrContent.Text = ltrContent.Text.Replace("%Etiket%", "<p><b>Etiketler //</b> " + etiketler + "</p>"); //Hesap ve Profil Bilgileri ltrContent.Text = ltrContent.Text.Replace("%Adi%", hsp.Adi); ltrContent.Text = ltrContent.Text.Replace("%Soyadi%", hsp.Soyadi); ltrContent.Text = ltrContent.Text.Replace("%Url%", Settings.VirtualPath + hsp.ProfilObject.Url); ltrContent.Text = ltrContent.Text.Replace("%ProfilAdi%", hsp.ProfilObject.Adi); ltrContent.Text = ltrContent.Text.Replace("%Meslek%", meslek); m.Icerik += string.Format("<div class=\"clear\"></div><a class='toolTip' title='Yazarın tüm yazılarını görüntülemek için buraya tıklayın.' class href=\"{0}\"><u><b>Diğer tüm yazıları için buraya tıklayın!</b></u></a><br/>", Core.CreateLink("makaleyazar", hsp.ProfilObject.Url, hsp.Adi + " " + hsp.Soyadi)); string modulID = CommentControl1.ModulID; if (m.Uye) { if (Core.IsUserActive) { Core.ViewCounter(modulID, m.ID); ltrContent.Text = ltrContent.Text.Replace("%Icerik%", m.Icerik); } else { CommentControl1.Visible = false; ltrContent.Text = ltrContent.Text.Replace("%Icerik%", string.Format("..<br/><br/><br/>Devamını okumak ve yapılan yorumları görmek için sizde <a href=\"{0}?l=1&ReturnUrl={1}\"><b>Üye Girişi</b></a> yapınız yada <a href=\"{0}?l=2&type=standart&ReturnUrl={1}\"><b>Ücretsiz Kayıt</b></a> olunuz.", Settings.VirtualPath, Request.RawUrl)); } } else { Core.ViewCounter(modulID, m.ID); ltrContent.Text = ltrContent.Text.Replace("%Icerik%", m.Icerik); } //Gösterim Bilgisi switch (Settings.Site.CounterView) { case CounterViewType.Hidden: m.GosterimSayi = false; break; } ltrContent.Text = ltrContent.Text.Replace("%Gosterim%", m.GosterimSayi ? string.Format(" - Bu {0} <b class=\"toolTip\" style=\"cursor:pointer;\" title=\"Bu oran {0} tekil izlenme sayısını gösterir.\">{1}</b> kere okundu.", modulID, GosterimMethods.Count(modulID, m.ID)) : ""); modulID = null; } }
void EditorHesap() { CustomizeControl1.AddTitle("Profil Bilgileri"); Image img = new Image(); img.ID = "RprfImageUrl"; img.Width = 210; img.ImageUrl = Settings.ImagesPath + "yok.png"; CustomizeControl1.AddControl("Fotoğraf", img); FileUpload flu = new FileUpload(); flu.ID = "RprfResimUrl"; CustomizeControl1.AddControl("Yeni Fotoğraf", flu, "Genişlik(W):160px - Yükseklik(H):170px"); TextBox txt = new TextBox(); txt.ID = "RprfUrl"; txt.CssClass = "form-control"; txt.MaxLength = 50; CustomizeControl1.AddControl("Url", txt, "Profil bağlantı adresi olacaktır ve sadece küçük harfler girebilirsiniz. Ör. " + Settings.SiteUrl + "<b class=\"toolTip titleFormat1\" title=\"Adres çubuğunda sitemizin adının yanına '/' ters slaş yaparak burada belirteceğiniz isim ile profilinizin görüntülenmesini sağlar.\">adisoyadi</b>"); txt = new TextBox(); txt.ID = "RprfAdi"; txt.CssClass = "form-control"; txt.MaxLength = 50; CustomizeControl1.AddControl("Başlık", txt, "Profilde gösterilecek olan <b>başlıktır</b>. 'Ör. Sezgin'nin Sayfasına Hoş Geldiniz!'"); txt = new TextBox(); txt.ID = "RprfMail"; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Email; txt.MaxLength = 60; CustomizeControl1.AddControl("Profil Maili", txt, "Profilde gösterilecek olan <b>'Mail'</b> adresidir. 'Not: Profiliniz üzerinden bu adrese mail gönderebilecekler!'"); txt = new TextBox(); txt.ID = "RprfWeb"; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Url; txt.MaxLength = 60; CustomizeControl1.AddControl("Web Adresi", txt, "Profilde gösterilecek olan <b>'Web Site'</b> adresidir."); txt = new TextBox(); txt.ID = "RprfTelefon"; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Phone; txt.MaxLength = 16; CustomizeControl1.AddControl("Telefon", txt, "Profilde gösterilecek olan <b>'Telefon'</b> numarasıdır. Ör. <b>0326 6XX 2X 0X</b>"); txt = new TextBox(); txt.ID = "RprfGSM"; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Phone; txt.MaxLength = 16; CustomizeControl1.AddControl("GSM", txt, "Profilde gösterilecek olan <b>'GSM'</b> numarasıdır. Ör. <b>0544 2XX 4X 5X</b>"); DropDownList ddl = new DropDownList(); ddl.ID = "RprfSehir"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "Sehir"; ddl.DataValueField = "Adi"; ddl.DataTextField = "Adi"; SehirCollection sehirler = SehirMethods.GetSelect(); sehirler.Insert(0, new Sehir(0, "")); ddl.DataSource = sehirler; ddl.DataBind(); CustomizeControl1.AddControl("Şehir (İL)", ddl, "<b>Şehir</b> adı harita üzerinde bulunmasını sağlayacaktır."); ddl = new DropDownList(); ddl.ID = "RprfMeslekID"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("meslek", true); ddl.DataBind(); CustomizeControl1.AddControl("Meslek", ddl, "* Seçmesi zorunlu alan."); ddl = new DropDownList(); ddl.ID = "RprfEgitimID"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("egitim", true); ddl.DataBind(); CustomizeControl1.AddControl("Eğitim", ddl, "* Seçmesi zorunlu alan."); txt = new TextBox(); txt.ID = "RprfHakkimda"; txt.CssClass = "form-control"; txt.Height = 150; txt.TextMode = TextBoxMode.MultiLine; txt.MaxLength = 500; CustomizeControl1.AddControl("Hakkimda", txt, "Bu alana <b>500</b> karaktere kadar bilgi girişi yapabilirsiniz."); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { if (!string.IsNullOrEmpty(Request.QueryString["url"])) { using (Hesap hsp = HesapMethods.GetHesapUrl(Request.QueryString["url"])) { string meslek = KategoriMethods.GetKategori("meslek", hsp.ProfilObject.Meslek).Adi; if (string.IsNullOrEmpty(hsp.ID)) { this.ltrContent.Text = MessageBox.Show(DialogResult.Stop, "Şuan erişmeye çalıştığınız sayfa bulunamadı lütfen gitmek istediğiniz adresi kontrol edin ve tekrar deneyiniz!<span class=\"right\"><a href=\"/home\"><b>Anasayfaya geri dön!</b></a> - <a href=\"/contact\"><b>Hatalı sayfa bildirimi!</b></a></span>"); ScreenClear(); return; } GetUniqueID = hsp.ID.ToString(); this.ltrTitle.Text = hsp.ProfilObject.Adi; this.Page.Title = meslek + " " + hsp.Adi + ' ' + hsp.Soyadi; BAYMYO.UI.Web.Pages.AddMetaTag(this.Page, hsp.Adi + " " + hsp.Soyadi + " hakkında ", hsp.ProfilObject.Hakkimda); //switch (hsp.Tipi) //{ // case AccountType.Admin: // case AccountType.Private: // case AccountType.Doctor: // case AccountType.Editor: // if (!string.IsNullOrEmpty(hsp.ProfilObject.Adi)) // this.Page.Title = hsp.ProfilObject.Adi; // else // this.Page.Title = meslek + " " + hsp.Adi + ' ' + hsp.Soyadi; // BAYMYO.UI.Web.Pages.AddMetaTag(this.Page, this.Page.Title + " hakkında ", hsp.ProfilObject.Hakkimda); // break; // default: // this.Page.Title = meslek + " " + hsp.Adi + ' ' + hsp.Soyadi; // BAYMYO.UI.Web.Pages.AddMetaTag(this.Page, hsp.Adi + " " + hsp.Soyadi + " hakkında ", hsp.ProfilObject.Hakkimda); // break; //} if (!hsp.Aktif & !Core.CurrentUser.Tipi.Equals(AccountType.Admin)) { //CommentControl1.Visible = false; contact1.Visible = false; //lastArticle.Visible = false; ltrContent.Text = MessageBox.Show(DialogResult.Warning, "Şuan erişmek istediğiniz <b>'Sayfa'</b> gösterime kapalı durumdadır nedenleri aşağıda belirtilmiştir. <br/>* Üyelik başvuru inceleme altında olabilir.<br/>* Yada yöneticilerimiz tarafından editör üyeliği durdurulmuş olabilir."); return; } ltrContent.Text = BAYMYO.UI.FileIO.ReadText(Server.MapPath(Settings.ViewPath + "ProfilView.view")); //Hesap Bilgi ltrContent.Text = ltrContent.Text.Replace("%ImagesPath%", Settings.ImagesPath); ltrContent.Text = ltrContent.Text.Replace("%Adi%", hsp.Adi); ltrContent.Text = ltrContent.Text.Replace("%Soyadi%", hsp.Soyadi); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihi%", hsp.KayitTarihi.ToShortDateString()); //Profil Bilgi ltrContent.Text = ltrContent.Text.Replace("%Url%", Settings.VirtualPath + hsp.ProfilObject.Url); ltrContent.Text = ltrContent.Text.Replace("%Meslek%", meslek); ltrContent.Text = ltrContent.Text.Replace("%Egitim%", KategoriMethods.GetKategori("egitim", hsp.ProfilObject.Egitim).Adi); ltrContent.Text = ltrContent.Text.Replace("%ResimUrl%", Settings.ImagesPath + ((!string.IsNullOrEmpty(hsp.ProfilObject.ResimUrl)) ? "profil/" + hsp.ProfilObject.ResimUrl : "yok.png")); ltrContent.Text = ltrContent.Text.Replace("%ProfilAdi%", hsp.ProfilObject.Adi); ltrContent.Text = ltrContent.Text.Replace("%Mail%", string.IsNullOrEmpty(hsp.ProfilObject.Mail) ? "***@*****.***" : string.Format("<a href=\"mailto:{0}?subject={1}\">{0}</a>", hsp.ProfilObject.Mail, Settings.Site.Title + " sitesi uzerinden gonderildi!")); ltrContent.Text = ltrContent.Text.Replace("%Web%", string.IsNullOrEmpty(hsp.ProfilObject.Web) ? "http://www.*" : string.Format("<a href=\"http://{0}?ref={1}\" target=\"_blank\">{0}</a>", hsp.ProfilObject.Web, Settings.SiteUrl)); ltrContent.Text = ltrContent.Text.Replace("%Telefon%", string.IsNullOrEmpty(hsp.ProfilObject.Telefon) ? "*** *** ** **" : hsp.ProfilObject.Telefon); ltrContent.Text = ltrContent.Text.Replace("%GSM%", string.IsNullOrEmpty(hsp.ProfilObject.GSM) ? "*** *** ** **" : hsp.ProfilObject.GSM); ltrContent.Text = ltrContent.Text.Replace("%Sehir%", string.IsNullOrEmpty(hsp.ProfilObject.Sehir) ? "********" : hsp.ProfilObject.Sehir); ltrContent.Text = ltrContent.Text.Replace("%Cinsiyet%", hsp.Cinsiyet.ToString()); //Profildeki Baglantilar ltrContent.Text = ltrContent.Text.Replace("%Iletisim%", Core.CreateLink("iletisim", hsp.ProfilObject.Url, "go")); ltrContent.Text = ltrContent.Text.Replace("%Makaleleri%", Core.CreateLink("makaleyazar", hsp.ProfilObject.Url, hsp.Adi + " " + hsp.Soyadi)); ltrContent.Text = ltrContent.Text.Replace("%Mesajlari%", Core.CreateLink("mesajliste", hsp.ID, hsp.Adi + " " + hsp.Soyadi)); ltrContent.Text = ltrContent.Text.Replace("%YazarHakkinda%", Core.CreateLink("yazarhakkinda", hsp.ProfilObject.Url, "go")); switch (viewPage) { case ViewType.Profil: #region --- Profil --- this.Page.Title += " - Profil Sayfası"; if (!string.IsNullOrEmpty(hsp.ProfilObject.Hakkimda)) { ltrContent.Text = ltrContent.Text.Replace("%DetailBlock%", BAYMYO.UI.FileIO.ReadText(Server.MapPath(Settings.ViewPath + "ProfilAboutUs.view"))); ltrContent.Text = ltrContent.Text.Replace("%Hakkimda%", hsp.ProfilObject.Hakkimda); } else { ltrContent.Text = ltrContent.Text.Replace("%DetailBlock%", ""); } Core.ViewCounter("profil", hsp.ID); GetData(hsp.ID); #endregion break; case ViewType.About: this.Page.Title += " - Hakkında"; //if (Core.CurrentUser.ProfilObject != null) // CommentControl1.IsCommandActive = BAYMYO.UI.Converts.NullToString(Core.CurrentUser.ProfilObject.Url).Equals(hsp.ProfilObject.Url); //else // CommentControl1.IsCommandActive = false; //CommentControl1.ModulID = "yazarhakkinda"; //CommentControl1.IcerikID = Request.QueryString["url"]; ltrContent.Text = ltrContent.Text.Replace("%DetailBlock%", ""); break; case ViewType.Contact: this.Page.Title += " - İletişim Formu"; contact1.HesapID = hsp.ID.ToString(); ltrContent.Text = ltrContent.Text.Replace("%DetailBlock%", ""); break; } //Gösterim Bilgisi switch (Settings.Site.CounterView) { case CounterViewType.Hidden: ltrContent.Text = ltrContent.Text.Replace("%Gosterim%", ""); return; default: ltrContent.Text = ltrContent.Text.Replace("%Gosterim%", "PR: " + GosterimMethods.Count("profil", hsp.ID)); break; } } } else { Response.Redirect(Settings.VirtualPath + "?ref=profil", false); } } catch (Exception ex) { Response.Redirect(Settings.VirtualPath + "?ref=profil-error&ex=" + ex.Message, false); } } }
protected override void OnInit(EventArgs e) { try { CustomizeControl1.FormTitle = string.Format(Settings.FormTitleFormat, "Haber", "Ekleme/Düzeltme Formu"); if (Request.QueryString["hid"] != null) { ViewState["tempID"] = Request.QueryString["hid"]; } using (Haber m = HaberMethods.GetHaber(BAYMYO.UI.Converts.NullToInt64(ViewState["tempID"]))) { bool notNull = (m.ID > 0), isAdmin = Core.IsUserAdmin; if (notNull) { Default(m, isAdmin); } TextBox txt = new TextBox(); txt.ID = "Baslik"; txt.CssClass = "form-control"; txt.Text = m.Baslik; txt.MaxLength = 75; CustomizeControl1.AddControl("Başlık", txt); txt = new TextBox(); txt.ID = "Ozet"; txt.CssClass = "form-control"; txt.Text = m.Ozet; txt.TextMode = TextBoxMode.MultiLine; txt.MaxLength = 250; CustomizeControl1.AddControl("Özet", txt, "Liste ve RSS'ler için gösterilecek içeriktir."); CKEditor.NET.CKEditorControl fck = new CKEditor.NET.CKEditorControl(); fck.ID = "Icerik"; fck.Height = 400; fck.Text = m.Icerik; CustomizeControl1.AddControl("Editör", fck); txt = new TextBox(); txt.ID = "Etiket"; txt.CssClass = "form-control"; txt.Text = m.Etiket; txt.MaxLength = 100; CustomizeControl1.AddControl("Etiket", txt, string.Format("Lütfen virgül({0}) ile ayrıarak ve boşluk bırakmadan yazınız! Örnek: elma{0}meyve{0}sebze{0}bahçe", Settings.SplitFormat)); DropDownList ddl = null; // = new DropDownList(); //ddl.ID = "Galeri"; //ddl.Width = 746; //ddl.CssClass = "form-control"; //ddl.DataMember = "album"; //ddl.DataValueField = "id"; //ddl.DataTextField = "adi"; //AlbumCollection albumler = AlbumMethods.GetSelect(20); //albumler.Insert(0, new Album { ID = 0, Adi = "<Seçiniz>" }); //ddl.DataSource = albumler; //ddl.DataBind(); //ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.Galeri); //CustomizeControl1.AddControl("İlgili Galeri", ddl, m.Galeri > 0 ? string.Format("İlgili <b>Galeri</b>'ye resim yüklemek yada düzeltmek için <a href=\"{0}\" target=\"_blank\">buraya tıklayın.</a>", Settings.PanelPath + "?go=galeri&raid=" + m.Galeri) : ""); Image img = new Image(); img.ID = "BuyukResim"; img.Width = 250; img.ToolTip = m.ResimUrl; if (!string.IsNullOrEmpty(m.ResimUrl)) { img.ImageUrl = Settings.ImagesPath + "haber/b/" + m.ResimUrl; } else { img.ImageUrl = Settings.ImagesPath + "admin-yok.png"; } CustomizeControl1.AddControl("Büyük Resim", img); FileUpload flu = new FileUpload(); flu.ID = "ResimUrl"; flu.ToolTip = m.ResimUrl; CustomizeControl1.AddControl("Resim Ekle", flu, "Tavsiye edilen, Genişlik(W):728px - Yükseklik(H):300px"); img = new Image(); img.ID = "KucukResim"; img.Width = 150; if (!string.IsNullOrEmpty(m.ResimUrl)) { img.ImageUrl = Settings.ImagesPath + "haber/" + m.ResimUrl; } else { img.ImageUrl = Settings.ImagesPath + "admin-yok.png"; } CustomizeControl1.AddControl("Küçük Resim", img); flu = new FileUpload(); flu.ID = "KucukResimUrl"; CustomizeControl1.AddControl("Küçük Resim Ekle", flu, "<b>Bu alanda resim seçmezseniz büyük resim küçültülecektir.</b> Genişlik(W):350px/Yükseklik(H):140px"); ddl = new DropDownList(); ddl.ID = "Kategori"; ddl.Width = 300; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; List <Kategori> kategoriler = KategoriMethods.GetMenu("haber", true); ListItem item = null; foreach (Kategori kategori in kategoriler) { switch (kategori.ParentID) { case "": item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = "padding-left: 5px; background: #f5f5f5; color: #454545;"; break; case "0": item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = "padding-left: 25px; background: #f5f5f5; color: #fe760c; font-weight: bold;"; break; default: item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = string.Format("padding-left: {0}px; background: #f5f5f5; color: #454545;", (BAYMYO.UI.Converts.NullToInt(kategori.ParentID.Split(',').Length + 1) * 25)); break; } ddl.Items.Add(item); } kategoriler.Clear(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.KategoriID); CustomizeControl1.AddControl("Kategori", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=haber\">[+] Yeni Kategori</a>"); //ddl = new DropDownList(); //ddl.ID = "Sehir"; //ddl.Width = 300; //ddl.CssClass = "form-control"; //ddl.DataMember = "Sehir"; //ddl.DataValueField = "Adi"; //ddl.DataTextField = "Adi"; //SehirCollection sehirler = SehirMethods.GetSelect(); //sehirler.Insert(0, new Sehir(0, "")); //ddl.DataSource = sehirler; //ddl.DataBind(); //ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.Sehir); //CustomizeControl1.AddControl("Şehir (İL)", ddl); //ddl = new DropDownList(); //ddl.ID = "Anasayfa"; //ddl.Width = 300; //ddl.CssClass = "form-control"; //ddl.DataMember = "MainViewStates"; //ddl.DataValueField = "Key"; //ddl.DataTextField = "Value"; //ddl.DataSource = Core.GetMainViewStates(); //ddl.DataBind(); //ddl.SelectedValue = notNull ? m.Anasayfa.ToString() : "1"; //CustomizeControl1.AddControl("Anasayfa", ddl); //DateTimeControl cnt = this.Page.LoadControl(Settings.DateTimeControlPath) as DateTimeControl; //cnt.ID = "Tarih"; //cnt.FormatType = FormatTypes.DateTime; //CustomizeControl1.AddControl("Yayın Tarihi", cnt, "* Seçilmesi zorunlu alan. Belirtilen tarihte haber yayımlanacaktır."); //cnt.Date = (m.ID > 1) ? m.KayitTarihi : DateTime.Now; CheckBoxList chkList = new CheckBoxList(); chkList.ID = "chkList"; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add("Gösterim Sayı"); chkList.Items[0].Selected = notNull ? m.GosterimSayi : true; chkList.Items.Add("Üyelere Özel"); chkList.Items[1].Selected = m.Uye; chkList.Items.Add("Yorumları Göster"); chkList.Items[2].Selected = notNull ? m.Yorum : false; chkList.Items.Add("Yönetici Onayı"); chkList.Items[3].Selected = notNull ? m.YoneticiOnay : isAdmin; chkList.Items[3].Enabled = isAdmin; chkList.Items.Add("Yayımla"); chkList.Items[4].Selected = notNull ? m.Aktif : isAdmin; chkList.Items[4].Enabled = isAdmin; CustomizeControl1.AddControl("Seçimler", chkList); //CustomizeControl1.AddTitle("HABER İÇERİSİNE VİDEO EKLE"); //ddl = new DropDownList(); //ddl.ID = "Video"; //ddl.Width = 746; //ddl.CssClass = "form-control"; //ddl.DataMember = "video"; //ddl.DataValueField = "id"; //ddl.DataTextField = "baslik"; //VideoCollection videolar = VideoMethods.GetSelect(m.Video, 20); //Video v = VideoMethods.GetVideo(m.Video); //if (v.ID > 0) // videolar.Add(v); //videolar.Insert(0, new Video { ID = 0, Baslik = "<Seçiniz>" }); //ddl.DataSource = videolar; //ddl.DataBind(); //ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.Video); //CustomizeControl1.AddControl("İlgili Video", ddl, m.Video > 0 ? string.Format("İlgili <b>Video</b>'yu güncellemek için <a href=\"{0}\" target=\"_blank\">buraya tıklayın.</a>", Settings.PanelPath + "?go=video&vid=" + m.Video) : "Eğer listeden video seçilirse aşağıdaki embed kod ve kategori dikkate alınmayacaktır."); //txt = new TextBox(); //txt.ID = "HaberEmbed"; //txt.Text = v.Embed; //txt.CssClass = "form-control"; //txt.TextMode = TextBoxMode.MultiLine; //txt.MaxLength = 750; //txt.ClientIDMode = ClientIDMode.Static; //CustomizeControl1.AddControl("Video Embed", txt, "Her hangi bir video sitesinden 'embed' kodu almanız gereklidir."); //ddl = new DropDownList(); //ddl.ID = "KategoriVideo"; //ddl.Width = 250; //ddl.CssClass = "form-control"; //ddl.DataMember = "kategori"; //ddl.DataValueField = "id"; //ddl.DataTextField = "adi"; //ddl.DataSource = KategoriMethods.GetMenu("video", true); //ddl.DataBind(); //ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(v.KategoriID); //CustomizeControl1.AddControl("Video Kategorileri", ddl, "Sadece <b>Embed</b> kod girildiğinde kategori seçilmezse video yüklenmez."); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(CustomizeControl1_SubmitClick); CustomizeControl1.RemoveClick += new CustomizeControl.ButtonEvent(CustomizeControl1_RemoveClick); } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } base.OnInit(e); }
void CustomizeControl1_SubmitClick(SortedDictionary <string, Control> controls) { try { TreeView TW_Kategori = ((TreeView)controls["Kategoriler"]); if (TW_Kategori.SelectedNode == null) { ((TreeView)controls["Kategoriler"]).Nodes[0].Select(); } if (TW_Kategori.SelectedNode.DataPath.Split(',').Length >= 5) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Stop, "Alt kategori ekleme limitini doldurdurunuz, bu bölümde daha fazla alt kategori oluşturamazsınız."); return; } if (!string.IsNullOrEmpty(Request.QueryString["mdl"]) & !string.IsNullOrEmpty(((TextBox)controls["Adi"]).Text)) { using (Kategori m = new Kategori()) { string orjinalID = null, parentID = TW_Kategori.SelectedNode.DataPath + ','; int index = TW_Kategori.SelectedNode.ChildNodes.Count - 1; bool parentActive = Core.IsParentCategory(Request.QueryString["mdl"]); if (!parentActive) { parentID = "0"; if (TW_Kategori.SelectedNode.Parent != null) { if (TW_Kategori.SelectedNode.Parent.ChildNodes.Count > 0) { orjinalID = (BAYMYO.UI.Converts.NullToInt(TW_Kategori.SelectedNode.Parent.ChildNodes[TW_Kategori.SelectedNode.Parent.ChildNodes.Count - 1].DataPath) + 1).ToString("000#"); } } else if (TW_Kategori.SelectedNode.ChildNodes.Count > 0) { orjinalID = (BAYMYO.UI.Converts.NullToInt(TW_Kategori.SelectedNode.ChildNodes[TW_Kategori.SelectedNode.ChildNodes.Count - 1].DataPath) + 1).ToString("000#"); } else { orjinalID = 1.ToString("000#"); } } else if (parentID.Equals("0,")) { if (index >= 0) { orjinalID = (BAYMYO.UI.Converts.NullToInt(TW_Kategori.SelectedNode.ChildNodes[index].DataPath) + 1).ToString("000#"); } else { orjinalID = 1.ToString("000#"); } } else if (TW_Kategori.SelectedNode.ChildNodes.Count > 0) { if (index >= 0) { if (TW_Kategori.SelectedNode.ChildNodes[index].DataPath.Contains(",")) { string[] kategoriler = new string[] { }; kategoriler = TW_Kategori.SelectedNode.ChildNodes[index].DataPath.Split(','); orjinalID = parentID + (BAYMYO.UI.Converts.NullToInt(kategoriler[kategoriler.Length - 1]) + 1).ToString("000#"); } else { orjinalID = parentID + (BAYMYO.UI.Converts.NullToInt(TW_Kategori.SelectedNode.ChildNodes[index].DataPath) + 1).ToString("000#"); } } } else { if (index >= 0) { orjinalID = parentID + (BAYMYO.UI.Converts.NullToInt(TW_Kategori.SelectedNode.ChildNodes[index].DataPath) + 1).ToString("000#"); } else { orjinalID = parentID + 1.ToString("000#"); } } m.ID = orjinalID; if (!string.IsNullOrEmpty(m.ID)) { if (parentID.Length > 1) { m.ParentID = parentID.Remove(parentID.Length - 1); } else { m.ParentID = "0"; } m.ModulID = Request.QueryString["mdl"]; m.Adi = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Adi"]).Text, 35); m.Dil = "tr-TR"; m.Menu = 0; m.Sira = 0; //m.Menu = byte.Parse(((DropDownList)controls["Menu"]).SelectedValue); //m.Sira = (byte)((DropDownList)controls["Sira"]).SelectedIndex; //m.Dil = ((DropDownList)controls["Dil"]).SelectedValue; //m.Renk = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Renk"]).Text, 7); m.Aciklama = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Aciklama"]).Text, 150); m.Etiket = BAYMYO.UI.Commons.SubStringText(((TextBox)controls["Etiket"]).Text, 100); if (Core.IsUserAdmin) { m.Aktif = ((CheckBox)controls["Aktif"]).Checked; } else { m.Aktif = false; } switch (KategoriMethods.Insert(m)) { case "ADI": CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, "Eklemek istediğiniz isimde başka bir kategori bulunmaktadır, lütfen kategori adını kontrol ediniz tekrar deneyiniz!"); break; default: TW_Kategori.DataBind(); Core.CreateCategoryMaps(m.ModulID); jSonData.CreateData(m.ModulID); CustomizeControl1.MessageText = MessageBox.Show(ProccesType.Insert, DialogResult.Succes); Core.ClearControls(controls); ((TextBox)controls["Adi"]).Focus(); break; } } } } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } }
protected override void OnInit(EventArgs e) { if (!Core.IsUserActive) { CustomizeControl1.PanelVisible = false; Response.Redirect(Settings.VirtualPath + "?go=login", false); return; } using (Hesap hsp = Core.CurrentUser) { if (!string.IsNullOrEmpty(hsp.ID)) { this.Page.Title = hsp.Adi + " " + hsp.Soyadi + " - Hesap Ayarları"; System.Web.UI.HtmlControls.HtmlMeta meta = new System.Web.UI.HtmlControls.HtmlMeta(); meta.Attributes.Add("name", "googlebot"); meta.Attributes.Add("content", "noindex"); this.Page.Header.Controls.Add(meta); CustomizeControl1.AddTitle("Hesap Bilgileri"); CustomizeControl1.RemoveVisible = false; TextBox txt = new TextBox(); txt.ID = "hspAdi"; txt.Text = hsp.Adi; txt.CssClass = "form-control"; txt.MaxLength = 18; CustomizeControl1.AddControl("Adı", txt); txt = new TextBox(); txt.ID = "hspSoyadi"; txt.CssClass = "form-control"; txt.Text = hsp.Soyadi; txt.MaxLength = 15; CustomizeControl1.AddControl("Soyadı", txt); txt = new TextBox(); txt.ID = "hspMail"; txt.CssClass = "form-control"; txt.Text = hsp.Mail; txt.MaxLength = 60; txt.Enabled = true; txt.ReadOnly = true; CustomizeControl1.AddControl("Mail", txt, "Sisteme giriş yapmak için kullanılacaktır."); txt = new TextBox(); txt.ID = "hspSifre"; txt.CssClass = "form-control noHtml"; txt.ToolTip = hsp.Sifre; txt.TextMode = TextBoxMode.Password; txt.MaxLength = 25; CustomizeControl1.AddControl("Şifre", txt, "Şifreyi değiştirmek istemiyorsanız boş bırakınız!"); DateTimeControl cnt = this.Page.LoadControl(Settings.DateTimeControlPath) as DateTimeControl; cnt.ID = "DogumTarihi"; cnt.FormatType = FormatTypes.BirthDate; CustomizeControl1.AddControl("Doğum Tarihi", cnt, "* Seçilmesi zorunlu alan."); cnt.Date = hsp.DogumTarihi; DropDownList ddl = new DropDownList(); ddl.ID = "hspCinsiyet"; ddl.Width = 195; ddl.DataValueField = "Key"; ddl.DataTextField = "Value"; ddl.DataSource = Core.GetSexTypes(); ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToByte(hsp.Cinsiyet).ToString(); CustomizeControl1.AddControl("Cinsiyet", ddl); CheckBox chk = new CheckBox(); chk.ID = "hspAbonelik"; chk.Checked = hsp.Abonelik; CustomizeControl1.AddControl("Abonelik", chk); if (hsp.ProfilObject != null) { switch (hsp.Tipi) { case AccountType.Admin: case AccountType.Private: case AccountType.Doctor: case AccountType.Editor: CustomizeControl1.AddTitle("Profil Bilgileri"); Image img = new Image(); img.ID = "prfImageUrl"; img.Width = 210; img.ImageUrl = Settings.ImagesPath + ((!string.IsNullOrEmpty(hsp.ProfilObject.ResimUrl)) ? "profil/" + hsp.ProfilObject.ResimUrl : "yok.png"); CustomizeControl1.AddControl("Fotoğraf", img); FileUpload flu = new FileUpload(); flu.ID = "prfResimUrl"; CustomizeControl1.AddControl("Yeni Fotoğraf", flu, "Genişlik(W):160px - Yükseklik(H):170px"); txt = new TextBox(); txt.ID = "prfUrl"; txt.Text = hsp.ProfilObject.Url; txt.CssClass = "form-control"; txt.MaxLength = 50; CustomizeControl1.AddControl("Url", txt, "Sadece küçük harf ve en az '<b>4</b>' karakter den oluşan içerik girebilirsiniz. Ör. " + Settings.SiteUrl + "<b class=\"toolTip titleFormat1\" title=\"Adres çubuğunda sitemizin adının yanına '/' ters slaş yaparak burada belirteceğiniz isim ile profilinizin görüntülenmesini sağlar.\">adisoyadi</b>"); txt = new TextBox(); txt.ID = "prfAdi"; txt.Text = hsp.ProfilObject.Adi; txt.CssClass = "form-control"; txt.MaxLength = 50; CustomizeControl1.AddControl("Başlık", txt, "Profilde gösterilecek olan <b>başlıktır</b>. 'Ör. Sezgin'nin Sayfasına Hoş Geldiniz!'"); txt = new TextBox(); txt.ID = "prfMail"; txt.Text = hsp.ProfilObject.Mail; txt.CssClass = "form-control"; txt.MaxLength = 60; CustomizeControl1.AddControl("Profil Maili", txt, "Profilde gösterilecek olan <b>'Mail'</b> adresidir. 'Not: Profiliniz üzerinden bu adrese mail gönderebilecekler!'"); txt = new TextBox(); txt.ID = "prfWeb"; txt.Text = hsp.ProfilObject.Web; txt.CssClass = "form-control noHtml"; txt.MaxLength = 60; CustomizeControl1.AddControl("Web Adresi", txt, "Profilde gösterilecek olan <b>'Web Site'</b> adresidir."); txt = new TextBox(); txt.ID = "prfTelefon"; txt.Text = hsp.ProfilObject.Telefon; txt.CssClass = "form-control noHtml isNumber"; txt.MaxLength = 16; CustomizeControl1.AddControl("Telefon", txt, "Profilde gösterilecek olan <b>'Telefon'</b> numarasıdır. Ör. <b>0326 6XX 2X 0X</b>"); txt = new TextBox(); txt.ID = "prfGSM"; txt.Text = hsp.ProfilObject.GSM; txt.CssClass = "form-control noHtml isNumber"; txt.MaxLength = 16; CustomizeControl1.AddControl("GSM", txt, "Profilde gösterilecek olan <b>'GSM'</b> numarasıdır. Ör. <b>0544 2XX 4X 5X</b>"); ddl = new DropDownList(); ddl.ID = "RprfSehir"; ddl.Width = 250; ddl.DataMember = "Sehir"; ddl.DataValueField = "Adi"; ddl.DataTextField = "Adi"; SehirCollection sehirler = SehirMethods.GetSelect(); sehirler.Insert(0, new Sehir(0, "")); ddl.DataSource = sehirler; ddl.DataBind(); ddl.SelectedValue = hsp.ProfilObject.Sehir; CustomizeControl1.AddControl("Şehir (İL)", ddl, "<b>Şehir</b> adı harita üzerinde bulunmasını sağlayacaktır."); ddl = new DropDownList(); ddl.ID = "prfMeslekID"; ddl.Width = 250; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("meslek", true); ddl.DataBind(); ddl.SelectedValue = hsp.ProfilObject.Meslek; CustomizeControl1.AddControl("Meslek", ddl, "* Seçmesi zorunlu alan."); ddl = new DropDownList(); ddl.ID = "prfEgitimID"; ddl.Width = 250; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("egitim", true); ddl.DataBind(); ddl.SelectedValue = hsp.ProfilObject.Egitim; CustomizeControl1.AddControl("Eğitim", ddl, "* Seçmesi zorunlu alan."); txt = new TextBox(); txt.ID = "prfHakkimda"; txt.Text = hsp.ProfilObject.Hakkimda; txt.CssClass = "form-control noHtml"; txt.Height = 150; txt.TextMode = TextBoxMode.MultiLine; txt.MaxLength = 500; CustomizeControl1.AddControl("Hakkimda", txt, "Bu alana <b>500</b> karaktere kadar bilgi girişi yapabilirsiniz."); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(editorHesap_SubmitClick); break; default: CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(standartHesap_SubmitClick); break; } } } } base.OnInit(e); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { using (Haber m = HaberMethods.GetHaber(BAYMYO.UI.Converts.NullToInt64(Request.QueryString["hid"]))) { if (m != null) { #region --- html-meta --- //Core.ClearMetaTags(this.Page); this.Page.Title = m.Baslik;// +" | " + Settings.Site.Title; this.Page.MetaDescription = m.Ozet; this.Page.MetaKeywords = m.Etiket; string etiket = m.Etiket; if (string.IsNullOrEmpty(etiket)) { etiket = m.Ozet; } string imageUrl = Settings.SiteImageUrl + "haber/" + m.ResimUrl; #endregion if (!m.Aktif) { ltrContent.Text = MessageBox.Show(DialogResult.Warning, "Bu içerik gösterime kapatılmıştır. Bağlantının doğru olduğundan eminseniz lütfen bu durumu yöneticilerimize bildiriniz!"); return; } CommentControl1.IsCommandActive = BAYMYO.UI.Converts.NullToGuidString(Core.CurrentUser.ID).Equals(m.HesapID); CommentControl1.Visible = m.Yorum; CommentControl1.ModulID = "haber"; CommentControl1.IcerikID = Request.QueryString["hid"]; using (Hesap hsp = HesapMethods.GetHesap(m.HesapID)) { //Icerik Bilgisi ltrContent.Text = BAYMYO.UI.FileIO.ReadText(Server.MapPath(Settings.ViewPath + "NewsView.view")); //string ilgiliVideo = "", ilgiliFoto = "", fotogaleri = "", videogaleri = ""; //if (m.Video > 0) //{ // videogaleri = string.Format("<div class=\"clear\"></div><a href=\"{0}\"><img style=\"float:left\" itemprop=\"image\" src=\"/images/video-tikla.png\" alt=\"{1} videosunu izlemek için tıklayın.\" title=\"{1} videosunu izlemek için tıklayın.\" /></a>", Core.CreateLink("video", m.Video, "video galeri " + m.Baslik), m.Baslik); // ilgiliVideo = string.Format("<span class=\"video\"><a href=\"{0}\">{1}</a></span>", Core.CreateLink("video", m.Video, m.Baslik + " video"), "Web<br/>TV"); //} //if (m.Galeri > 0) //{ // fotogaleri = string.Format("<div class=\"clear\"></div><a href=\"{0}\"><img style=\"float:left\" itemprop=\"image\" src=\"/images/foto-galeri-tikla.png\" alt=\"{1} foto galeriyi gezinmek için tıklayın.\" title=\"{1} foto galeriyi gezinmek için tıklayın.\" /></a>", Core.CreateLink("galeri", m.Galeri, "foto galeri " + m.Baslik), m.Baslik); // ilgiliFoto = string.Format("<span class=\"galeri\"><a href=\"{0}\">{1}</a></span>", Core.CreateLink("galeri", m.Galeri, m.Baslik + " fotogaleri"), "Foto<br/>Galeri"); //} ltrContent.Text = ltrContent.Text.Replace("%ImagesPath%", Settings.ImagesPath); if (!BAYMYO.UI.Converts.NullToString(KategoriBilgi.ModulID).Equals("haber") || !BAYMYO.UI.Converts.NullToString(KategoriBilgi.ID).Equals(m.KategoriID)) { KategoriBilgi = KategoriMethods.GetKategori("haber", m.KategoriID); if (KategoriBilgi.Aktif) { this.Page.Title += " | " + KategoriBilgi.Adi; } } if (!string.IsNullOrWhiteSpace(m.Sehir) & !KategoriBilgi.Adi.ToLower().Equals(m.Sehir.ToLower())) { this.Page.Title += " | " + m.Sehir; } ltrContent.Text = ltrContent.Text.Replace("%Renk%", KategoriBilgi.Renk); ltrContent.Text = ltrContent.Text.Replace("%Kategori%", string.Format("<a href=\"{0}\" target=\"_blank\">{1}</a>", Core.CreateLink("haberkategori", KategoriBilgi.ID, KategoriBilgi.Adi), KategoriBilgi.Adi)); if (!string.IsNullOrEmpty(m.ResimUrl)) { string url = Settings.ImagesPath + "haber/b/" + m.ResimUrl; if (!System.IO.File.Exists(Server.MapPath(url))) { ltrContent.Text = ltrContent.Text.Replace("%ResimUrl%", ""); } else { ltrContent.Text = ltrContent.Text.Replace("%ResimUrl%", string.Format("<img itemprop=\"image\" src=\"{0}\" alt=\"%Baslik%\" title=\"%Baslik%\" />", url)); } } else { ltrContent.Text = ltrContent.Text.Replace("%ResimUrl%", ""); } ltrContent.Text = ltrContent.Text.Replace("%ImageUrl%", imageUrl); ltrContent.Text = ltrContent.Text.Replace("%Baslik%", m.Baslik.Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%Body%", BAYMYO.UI.Web.Pages.ClearHtml(m.Icerik).Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%BaslikDiger%", m.Sehir + " haber son dakika " + KategoriBilgi.Adi.ToLower() + " haberleri."); ltrContent.Text = ltrContent.Text.Replace("%SpotBaslik%", ""); ltrContent.Text = ltrContent.Text.Replace("%Ozet%", m.Ozet.Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihiSEO%", m.KayitTarihi.ToString("yyyy-MM-ddTHH:mm:ssZ")); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihi%", m.KayitTarihi.ToString("dd/MM/yyyy ddddd HH:mm")); ltrContent.Text = ltrContent.Text.Replace("%Sehir%", m.Sehir); //int indexOf = -1; //string etiketler = string.Empty, etiketQuery = string.Empty; etiket = string.Empty; //foreach (string item in m.Etiket.Split(',')) //{ // etiket = string.Format("<a href=\"{0}{1}\" target=\"_blank\"><strong>{2}</strong></a>", Settings.SiteUrl.Replace("http:", ""), Core.CreateLink("haberetiket", "", item), item.Trim()); // etiketQuery += " or i.yoneticionay=1 and i.aktif=1 and i.etiket like <%USTENTIRNAK%>%" + item.Trim() + ",%<%USTENTIRNAK%>"; // indexOf = m.Icerik.IndexOf(item.Trim()); // if (indexOf >= 0) // { // m.Icerik = m.Icerik.Remove(indexOf, item.Trim().Length); // m.Icerik = m.Icerik.Insert(indexOf, etiket); // } // indexOf = -1; // etiketler += etiket + ", "; //} //if (!BAYMYO.UI.Converts.NullToString(Session["etiketSession"]).Equals(etiketQuery)) // Session["etiketSession"] = etiketQuery; //ltrContent.Text = ltrContent.Text.Replace("%Etiket%", "<p><b>Etiketler //</b> " + etiketler + "</p>"); //etiketler = null; etiket = null; indexOf = 0; //Hesap Bilgileri ltrContent.Text = ltrContent.Text.Replace("%Adi%", hsp.Adi); ltrContent.Text = ltrContent.Text.Replace("%Soyadi%", hsp.Soyadi); ltrContent.Text = ltrContent.Text.Replace("%Url%", Settings.VirtualPath + hsp.ProfilObject.Url); ltrContent.Text = ltrContent.Text.Replace("%ProfilAdi%", hsp.ProfilObject.Adi.Replace('"', '\'')); //ltrContent.Text = ltrContent.Text.Replace("%Meslek%", KategoriMethods.GetKategori("meslek", hsp.ProfilObject.Meslek).Adi); string modulID = CommentControl1.ModulID, icerik = string.Empty; if (m.Uye & !Core.CurrentUser.Tipi.Equals(AccountType.Admin)) { if (Core.IsUserActive) { //Core.ViewCounter(modulID, m.ID); //if (Settings.Site.IsVideoView > 0 & m.Video > 0) // using (Video v = VideoMethods.GetVideo(m.Video)) // { // if (Core.IsMobileBrowser()) // v.Embed = v.Embed.Replace("width=\"728\" height=\"410\"", "width=\"100%\" height=\"250\""); // switch (Settings.Site.IsVideoView) // { // case 1: // icerik = string.Format("<div class=\"clear\"></div>{0}<div class=\"clear\" style=\"margin-bottom:5px\"></div>", v.Embed) + m.Icerik; // break; // case 2: // icerik = m.Icerik + string.Format("<div class=\"clear\"> </div>{0}<div class=\"clear\"> </div>", v.Embed); // break; // default: // icerik = m.Icerik; // break; // } // } //else icerik = m.Icerik; this.ltrContent.Text = this.ltrContent.Text.Replace("%Icerik%", icerik); //+ fotogaleri + videogaleri); } else { CommentControl1.Visible = false; this.ltrContent.Text = this.ltrContent.Text.Replace("%Icerik%", string.Format("..<br/><div class=\"clear\"> </div>Devamını okumak ve yapılan yorumları görmek için sizde <a href=\"{0}?l=1&ReturnUrl={1}\"><b>Üye Girişi</b></a> yapınız yada <a href=\"{0}?l=2&type=standart&ReturnUrl={1}\"><b>Ücretsiz Kayıt</b></a> olunuz.", Settings.VirtualPath, Request.RawUrl)); } } else { //Core.ViewCounter(modulID, m.ID); //if (Settings.Site.IsVideoView > 0 & m.Video > 0) // using (Video v = VideoMethods.GetVideo(m.Video)) // { // if (Core.IsMobileBrowser()) // v.Embed = v.Embed.Replace("width=\"728\" height=\"410\"", "width=\"100%\" height=\"250\""); // switch (Settings.Site.IsVideoView) // { // case 1: // icerik = string.Format("<div class=\"clear\"></div>{0}<div class=\"clear\" style=\"margin-bottom:5px\"></div>", v.Embed) + m.Icerik; // break; // case 2: // icerik = m.Icerik + string.Format("<div class=\"clear\"> </div>{0}<div class=\"clear\"> </div>", v.Embed); // break; // default: // icerik = m.Icerik; // break; // } // } //else icerik = m.Icerik; this.ltrContent.Text = this.ltrContent.Text.Replace("%Icerik%", icerik);// + fotogaleri + videogaleri); } ////Gösterim Bilgisi //switch (Settings.Site.CounterView) //{ // case CounterViewType.Hidden: // m.GosterimSayi = false; // break; //} //this.ltrContent.Text = this.ltrContent.Text.Replace("%Gosterim%", m.GosterimSayi ? string.Format(" - Bu {0} <b class=\"toolTip\" style=\"cursor:pointer;\" title=\"Bu oran {0} tekil izlenme sayısını gösterir.\">{1}</b> kere okundu.", modulID, GosterimMethods.Count(modulID, m.ID)) : ""); modulID = icerik = null; } } } } catch (Exception ex) { ltrContent.Text = MessageBox.Show(DialogResult.Error, "Son dakika Türkiye gündemi ve haberleri, intertnet'deki en son gelişmeler'den ilk sizin haberiniz olsun. Bu habere teknik bir arızadan dolayı geçici bir süre için erişim sağlanamayacaktır.<br/>//Sistem Mesajı: " + ex.Message + "!"); } } base.OnInit(e); }
protected override void OnInit(EventArgs e) { try { CustomizeControl1.FormTitle = string.Format(Settings.FormTitleFormat, "Hesap", "Ekleme/Düzeltme Formu"); using (Hesap hsp = HesapMethods.GetHesap(BAYMYO.UI.Converts.NullToGuidString(Request.QueryString["uid"]))) { bool notNull = !string.IsNullOrEmpty(Request.QueryString["uid"]); CustomizeControl1.RemoveVisible = notNull; if (notNull) { CustomizeControl1.StatusText = string.Format("<div style=\"margin-top: 5px !important;padding-top: 5px !important;border-top: dashed 1px #c5c5c5;\"><a class=\"toolTip\" title=\"Hesap listesine geri dönmek için tıklayın!\" href=\"{1}\" target=\"_blank\"><b>Hesap Listesi!</b></a> - <a class=\"toolTip\" title=\"Önizleme için tıklayın!\" href=\"{0}\" target=\"_blank\"><b>Önizleme Yap!</b></a></div>", Settings.VirtualPath + hsp.ProfilObject.Url, Settings.PanelPath + "?go=hesapliste"); } //if (hsp.ProfilObject == null) // hsp.ProfilObject = new Profil(); TextBox txt = new TextBox(); txt.ID = "Adi"; txt.CssClass = "form-control"; txt.Text = hsp.Adi; txt.MaxLength = 18; CustomizeControl1.AddControl("Adı", txt); txt = new TextBox(); txt.ID = "Soyadi"; txt.CssClass = "form-control"; txt.Text = hsp.Soyadi; txt.MaxLength = 15; CustomizeControl1.AddControl("Soyadı", txt); txt = new TextBox(); txt.ID = "Mail"; txt.CssClass = "form-control"; txt.Text = hsp.Mail; txt.TextMode = TextBoxMode.Email; txt.MaxLength = 60; CustomizeControl1.AddControl("Mail", txt, "Sisteme giriş yapmak için kullanılacaktır."); txt = new TextBox(); txt.ID = "Sifre"; txt.CssClass = "form-control"; txt.ToolTip = hsp.Sifre; txt.TextMode = TextBoxMode.Password; txt.MaxLength = 25; CustomizeControl1.AddControl("Şifre", txt, "Şifreyi değiştirmek istemiyorsanız boş bırakınız!"); DateTimeControl cnt = this.Page.LoadControl(Settings.DateTimeControlPath) as DateTimeControl; cnt.ID = "DogumTarihi"; cnt.FormatType = FormatTypes.BirthDate; CustomizeControl1.AddControl("Doğum Tarihi", cnt, "* Seçilmesi zorunlu alan."); cnt.Date = hsp.DogumTarihi; DropDownList ddl = new DropDownList(); ddl.ID = "Cinsiyet"; ddl.Width = 195; ddl.CssClass = "form-control"; ddl.DataValueField = "Key"; ddl.DataTextField = "Value"; ddl.DataSource = Core.GetSexTypes(); ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToByte(hsp.Cinsiyet).ToString(); CustomizeControl1.AddControl("Cinsiyet", ddl); AccountType tipi; if (!string.IsNullOrEmpty(Request.QueryString["type"])) { tipi = Core.GetAccountType(BAYMYO.UI.Converts.NullToByte(Request.QueryString["type"])); } else { tipi = hsp.Tipi; } ddl = new DropDownList(); ddl.ID = "Tipi"; ddl.Width = 195; ddl.CssClass = "form-control"; ddl.DataValueField = "Key"; ddl.DataTextField = "Value"; ddl.DataSource = Core.GetAccountTypes(); ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToByte(tipi).ToString(); CustomizeControl1.AddControl("Hesap Türü", ddl, "(Not: Sadece Admin yönetim panelini görebilir!)"); CheckBoxList chkList = new CheckBoxList(); chkList.ID = "chkList"; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add("Abonelik"); chkList.Items[0].Selected = notNull ? hsp.Abonelik : true; chkList.Items.Add("Aktivasyon"); chkList.Items[1].Selected = notNull ? hsp.Aktivasyon : true; chkList.Items.Add("Yorum Yapabilir"); chkList.Items[2].Selected = notNull ? hsp.Yorum : true; chkList.Items.Add("Hesap Durumu"); chkList.Items[3].Selected = notNull ? hsp.Aktif : true; CustomizeControl1.AddControl("Seçimler", chkList); switch (tipi) { case AccountType.Admin: case AccountType.Private: case AccountType.Doctor: case AccountType.Editor: CustomizeControl1.AddTitle("Profil Bilgileri"); Image img = new Image(); img.ID = "prfImageUrl"; img.Width = 210; img.ImageUrl = Settings.ImagesPath + ((!string.IsNullOrEmpty(hsp.ProfilObject.ResimUrl)) ? "profil/" + hsp.ProfilObject.ResimUrl : "profil/noavatar.png"); CustomizeControl1.AddControl("Fotoğraf", img); FileUpload flu = new FileUpload(); flu.ID = "prfResimUrl"; flu.CssClass = "form-control"; CustomizeControl1.AddControl("Yeni Fotoğraf", flu, "Genişlik(W):160px - Yükseklik(H):170px"); txt = new TextBox(); txt.ID = "prfUrl"; txt.Text = hsp.ProfilObject.Url; txt.CssClass = "form-control"; txt.MaxLength = 50; CustomizeControl1.AddControl("Url", txt, "Profil bağlantı adresi olacaktır ve sadece küçük harfler girebilirsiniz. Ör. " + Settings.SiteUrl + "<b class=\"toolTip titleFormat1\" title=\"Adres çubuğunda sitemizin adının yanına '/' ters slaş yaparak burada belirteceğiniz isim ile profilinizin görüntülenmesini sağlar.\">adisoyadi</b>"); txt = new TextBox(); txt.ID = "prfAdi"; txt.Text = hsp.ProfilObject.Adi; txt.CssClass = "form-control"; txt.MaxLength = 50; CustomizeControl1.AddControl("Başlık", txt, "Profilde gösterilecek olan <b>başlıktır</b>. 'Ör. Sezgin'in Sayfasına Hoş Geldiniz!'"); txt = new TextBox(); txt.ID = "prfMail"; txt.Text = hsp.ProfilObject.Mail; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Email; txt.MaxLength = 60; CustomizeControl1.AddControl("Profil Maili", txt, "Profilde gösterilecek olan <b>'Mail'</b> adresidir. 'Not: Profiliniz üzerinden bu adrese mail gönderebilecekler!'"); txt = new TextBox(); txt.ID = "prfWeb"; txt.Text = hsp.ProfilObject.Web; txt.CssClass = "form-control"; txt.MaxLength = 60; CustomizeControl1.AddControl("Web Adresi", txt, "Profilde gösterilecek olan <b>'Web Site'</b> adresidir."); txt = new TextBox(); txt.ID = "prfTelefon"; txt.Text = hsp.ProfilObject.Telefon; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Phone; txt.MaxLength = 16; CustomizeControl1.AddControl("Telefon", txt, "Profilde gösterilecek olan <b>'Telefon'</b> numarasıdır. Ör. <b>0326 6XX 2X 0X</b>"); txt = new TextBox(); txt.ID = "prfGSM"; txt.Text = hsp.ProfilObject.GSM; txt.CssClass = "form-control"; txt.TextMode = TextBoxMode.Phone; txt.MaxLength = 16; CustomizeControl1.AddControl("GSM", txt, "Profilde gösterilecek olan <b>'GSM'</b> numarasıdır. Ör. <b>0544 2XX 4X 5X</b>"); ddl = new DropDownList(); ddl.ID = "Sehir"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "Sehir"; ddl.DataValueField = "Adi"; ddl.DataTextField = "Adi"; SehirCollection sehirler = SehirMethods.GetSelect(); sehirler.Insert(0, new Sehir(0, "")); ddl.DataSource = sehirler; ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(hsp.ProfilObject.Sehir); CustomizeControl1.AddControl("Şehir (İL)", ddl, "<b>Şehir</b> adı harita üzerinde bulunmasını sağlayacaktır."); ddl = new DropDownList(); ddl.ID = "prfMeslekID"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("meslek", true); ddl.DataBind(); ddl.SelectedValue = hsp.ProfilObject.Meslek; CustomizeControl1.AddControl("Meslek", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=meslek\">[+] Yeni Meslek Tanımla</a>"); ddl = new DropDownList(); ddl.ID = "prfEgitimID"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("egitim", true); ddl.DataBind(); ddl.SelectedValue = hsp.ProfilObject.Egitim; CustomizeControl1.AddControl("Eğitim", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=egitim\">[+] Yeni Eğitim Durumu</a>"); txt = new TextBox(); txt.ID = "prfHakkimda"; txt.Text = hsp.ProfilObject.Hakkimda; txt.CssClass = "form-control noHtml"; txt.Height = 150; txt.TextMode = TextBoxMode.MultiLine; txt.MaxLength = 500; CustomizeControl1.AddControl("Hakkimda", txt, "Bu alana <b>500</b> karaktere kadar bilgi girişi yapabilirsiniz."); CustomizeControl1.AddTitle("Hesap Yetkileri"); chkList = new CheckBoxList(); chkList.ID = "chkSecure"; chkList.Font.Bold = true; chkList.RepeatColumns = 5; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add(new ListItem("Panel", "P")); chkList.Items.Add(new ListItem("Ayarlar", "A")); //chkList.Items.Add(new ListItem("Ajans", "J")); chkList.Items.Add(new ListItem("Manşet", "T")); chkList.Items.Add(new ListItem("Haber", "H")); chkList.Items.Add(new ListItem("Makale", "M")); //chkList.Items.Add(new ListItem("Reklam", "R")); //chkList.Items.Add(new ListItem("Resmi İlan", "I")); chkList.Items.Add(new ListItem("Mesaj", "Q")); //chkList.Items.Add(new ListItem("Firma", "F")); //chkList.Items.Add(new ListItem("Seri İlan", "S")); chkList.Items.Add(new ListItem("Video", "V")); chkList.Items.Add(new ListItem("Galeri", "G")); chkList.Items.Add(new ListItem("Yorum", "Y")); chkList.Items.Add(new ListItem("<a class=\"toolTip\" href=\"#\">Diğerleri ..</a>", "O")); if (!string.IsNullOrEmpty(hsp.Roller)) { foreach (string rol in hsp.Roller.Split(',')) { if (chkList.Items.FindByValue(rol) != null) { chkList.Items.FindByValue(rol).Selected = true; } } } CustomizeControl1.AddControl("Yetkiler", chkList); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(editorHesap_SubmitClick); break; default: CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(standartHesap_SubmitClick); break; } CustomizeControl1.RemoveClick += new CustomizeControl.ButtonEvent(hesap_RemoveClick); } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } base.OnInit(e); }
protected override void OnInit(EventArgs e) { try { CustomizeControl1.FormTitle = string.Format(Settings.FormTitleFormat, "Galeri", "Ekleme/Düzeltme Formu"); using (Album m = AlbumMethods.GetAlbum(BAYMYO.UI.Converts.NullToInt64(Request.QueryString["raid"]))) { bool notNull = (m.ID > 0), isAdmin = Core.IsUserAdmin; if (notNull) { CustomizeControl1.RemoveVisible = isAdmin; CreateLinks(m); } TextBox txt = new TextBox(); txt.ID = "Adi"; txt.CssClass = "form-control"; txt.Text = m.Adi; txt.MaxLength = 75; CustomizeControl1.AddControl("Album Adı", txt); txt = new TextBox(); txt.ID = "Etiket"; txt.CssClass = "form-control"; txt.Text = m.Etiket; txt.MaxLength = 100; CustomizeControl1.AddControl("Etiket", txt, string.Format("Lütfen virgül({0}) ile ayrıarak ve boşluk bırakmadan yazınız! Örnek: elma{0}meyve{0}sebze{0}bahçe", Settings.SplitFormat)); DropDownList ddl = new DropDownList(); ddl.ID = "Kategori"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("galeri", true); ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.KategoriID); CustomizeControl1.AddControl("Kategori", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=galeri\">[+] Yeni Kategori</a>"); CheckBoxList chkList = new CheckBoxList(); chkList.ID = "chkList"; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add("Gösterim Sayı"); chkList.Items[0].Selected = notNull ? m.GosterimSayi : true; chkList.Items.Add("Üyelere Özel"); chkList.Items[1].Selected = m.Uye; chkList.Items.Add("Yorumları Göster"); chkList.Items[2].Selected = notNull ? m.Yorum : false; chkList.Items.Add("Yönetici Onayı"); chkList.Items[3].Selected = notNull ? m.YoneticiOnay : isAdmin; chkList.Items[3].Enabled = isAdmin; chkList.Items.Add("Yayımla"); chkList.Items[4].Selected = notNull ? m.Aktif : isAdmin; chkList.Items[4].Enabled = isAdmin; CustomizeControl1.AddControl("Seçimler", chkList); int index = 1; CustomizeControl1.AddTitle(index + ". Resim Bilgileri"); FileUpload flu = new FileUpload(); flu.ID = "Resim" + index; flu.CssClass = "form-control"; CustomizeControl1.AddControl("Resim", flu, "Genişlik(W):600px"); txt = new TextBox(); txt.ID = "Aciklama" + index; txt.TextMode = TextBoxMode.MultiLine; txt.CssClass = "form-control"; txt.MaxLength = 500; CustomizeControl1.AddControl("Açıklama", txt); index++; CustomizeControl1.AddTitle(index + ". Resim Bilgileri"); flu = new FileUpload(); flu.ID = "Resim" + index; flu.CssClass = "form-control"; CustomizeControl1.AddControl("Resim", flu, "Genişlik(W):600px"); txt = new TextBox(); txt.ID = "Aciklama" + index; txt.TextMode = TextBoxMode.MultiLine; txt.CssClass = "form-control"; txt.MaxLength = 500; CustomizeControl1.AddControl("Açıklama", txt); index++; CustomizeControl1.AddTitle(index + ". Resim Bilgileri"); flu = new FileUpload(); flu.ID = "Resim" + index; flu.CssClass = "form-control"; CustomizeControl1.AddControl("Resim", flu, "Genişlik(W):600px"); txt = new TextBox(); txt.ID = "Aciklama" + index; txt.TextMode = TextBoxMode.MultiLine; txt.CssClass = "form-control"; txt.MaxLength = 500; CustomizeControl1.AddControl("Açıklama", txt); RadioButtonList radioList = new RadioButtonList(); radioList.ID = "Kapak"; radioList.RepeatDirection = RepeatDirection.Horizontal; radioList.Items.Add("1. Resim"); radioList.Items.Add("2. Resim"); radioList.Items.Add("3. Resim"); CustomizeControl1.AddControl("Kapak Olarak", radioList); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(CustomizeControl1_SubmitClick); CustomizeControl1.RemoveClick += new CustomizeControl.ButtonEvent(CustomizeControl1_RemoveClick); } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } base.OnInit(e); }
private void View(Video m) { using (Hesap hsp = HesapMethods.GetHesap(m.HesapID)) { if (Core.IsMobileBrowser()) { m.Embed = m.Embed.Replace("width=\"728\" height=\"410\"", "width=\"100%\" height=\"250\""); } CommentControl1.IsCommandActive = BAYMYO.UI.Converts.NullToGuidString(Core.CurrentUser.ID).Equals(m.HesapID); CommentControl1.Visible = m.Yorum; CommentControl1.ModulID = "video"; CommentControl1.IcerikID = Request.QueryString["vid"]; ltrContent.Text = BAYMYO.UI.FileIO.ReadText(Server.MapPath(Settings.ViewPath + "VideoView.view")); //Icerik Bilgisi if (!BAYMYO.UI.Converts.NullToString(KategoriBilgi.ModulID).Equals("video") || !BAYMYO.UI.Converts.NullToString(KategoriBilgi.ID).Equals(m.KategoriID)) { KategoriBilgi = KategoriMethods.GetKategori("video", m.KategoriID); } if (KategoriBilgi.Aktif) { this.Page.Title += " | " + KategoriBilgi.Adi.ToUpper(); ltrContent.Text = ltrContent.Text.Replace("%Renk%", KategoriBilgi.Renk); } string imageUrl = Settings.SiteImageUrl + "video/" + m.ResimUrl; //, embedUrl = ""; //System.Text.RegularExpressions.Match m2 = System.Text.RegularExpressions.Regex.Match(m.Embed, @"src=\""(.*?)\""", System.Text.RegularExpressions.RegexOptions.Singleline); //if (m2.Success) // embedUrl = m2.Groups[1].Value; //else // embedUrl = ""; //ltrContent.Text = ltrContent.Text.Replace("%EmbedUrl%", embedUrl); ltrContent.Text = ltrContent.Text.Replace("%ImageUrl%", imageUrl); ltrContent.Text = ltrContent.Text.Replace("%Kategori%", string.Format("<a id=\"ctgALink\" href=\"{0}\" target=\"_blank\" alt=\"{2}\">{1}</a>", Core.CreateLink("videokategori", KategoriBilgi.ID, KategoriBilgi.Adi), KategoriBilgi.Adi, KategoriBilgi.ID)); //ltrContent.Text = ltrContent.Text.Replace("%ResimUrl%", ((!string.IsNullOrEmpty(m.ResimUrl)) ? "<img class=\"image left\" src=" + Settings.ImagesPath + "video/" + m.ResimUrl + " alt=\"%Baslik%\" />" : "")); ltrContent.Text = ltrContent.Text.Replace("%Baslik%", m.Baslik.Replace('"', '\'')); ltrContent.Text = ltrContent.Text.Replace("%Ozet%", KategoriBilgi.Adi + " konusuna bağlı en son videoları izleyin."); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihiSEO%", m.KayitTarihi.ToString("yyyy-MM-ddTHH:mm:ssZ")); ltrContent.Text = ltrContent.Text.Replace("%KayitTarihi%", m.KayitTarihi.ToString("dd/MM/yyyy ddddd HH:mm")); string etiketler = string.Empty, etiketQuery = string.Empty, siteUrl = Settings.SiteUrl.Replace("http:", ""); foreach (string item in m.Etiket.Split(',')) { etiketler += string.Format("<a href=\"{0}{1}\" target=\"_blank\"><strong>{2}</strong></a>, ", Settings.SiteUrl.Replace("http:", ""), Core.CreateLink("videoetiket", "", item), item.Trim()); etiketQuery += " or i.yoneticionay=1 and i.aktif=1 and i.etiket like <%USTENTIRNAK%>%" + item.Trim() + ",%<%USTENTIRNAK%>"; } if (!BAYMYO.UI.Converts.NullToString(Session["etiketSession"]).Equals(etiketQuery)) { Session["etiketSession"] = etiketQuery; } ltrContent.Text = ltrContent.Text.Replace("%Etiket%", "<b>Etiketler;</b> " + etiketler); //Hesap Bilgileri switch (hsp.Tipi) { case AccountType.Admin: ltrContent.Text = ltrContent.Text.Replace("%Ekleyen%", ""); break; default: ltrContent.Text = ltrContent.Text.Replace("%Ekleyen%", "<b class=\"left\">Ekleyen; </b><a href=\"%Url%\" target=\"_blank\"><b class=\"left\">%Adi% %Soyadi%</b><img class=\"toolTip left\" style=\"margin-left: 3px;\" src=\"%ImagesPath%icons/10/expand.png\" title=\"%Adi% %Soyadi% sayfasına git.\" alt=\"Yazarın sayfasına git.\" border=\"0\" /><div class=\"clear\"></div></a>"); ltrContent.Text = ltrContent.Text.Replace("%Adi%", hsp.Adi); ltrContent.Text = ltrContent.Text.Replace("%Soyadi%", hsp.Soyadi); break; } ltrContent.Text = ltrContent.Text.Replace("%Url%", Settings.VirtualPath + hsp.ProfilObject.Url); ltrContent.Text = ltrContent.Text.Replace("%ProfilAdi%", hsp.ProfilObject.Adi); ltrContent.Text = ltrContent.Text.Replace("%ImagesPath%", Settings.ImagesPath); //ltrContent.Text = ltrContent.Text.Replace("%Meslek%", KategoriMethods.GetKategori("meslek", hsp.ProfilObject.Meslek).Adi); string modulID = CommentControl1.ModulID; if (m.Uye) { if (Core.IsUserActive) { Core.ViewCounter(modulID, m.ID); ltrContent.Text = ltrContent.Text.Replace("%Icerik%", m.Embed.Trim()); } else { CommentControl1.Visible = false; ltrContent.Text = ltrContent.Text.Replace("%Icerik%", string.Format("..<br/><br/><br/>Devamını okumak ve yapılan yorumları görmek için sizde <a href=\"{0}?l=1&ReturnUrl={1}\"><b>Üye Girişi</b></a> yapınız yada <a href=\"{0}?l=2&type=standart&ReturnUrl={1}\"><b>Ücretsiz Kayıt</b></a> olunuz.", Settings.VirtualPath, Request.RawUrl)); } } else { Core.ViewCounter(modulID, m.ID); ltrContent.Text = ltrContent.Text.Replace("%Icerik%", m.Embed.Trim()); } //Gösterim Bilgisi switch (Settings.Site.CounterView) { case CounterViewType.Hidden: m.GosterimSayi = false; ltrContent.Text = ltrContent.Text.Replace("%GosterimSayi%", ""); ltrContent.Text = ltrContent.Text.Replace("%Gosterim%", ""); break; default: int viewCount = GosterimMethods.Count(modulID, m.ID); ltrContent.Text = ltrContent.Text.Replace("%GosterimSayi%", viewCount.ToString()); ltrContent.Text = ltrContent.Text.Replace("%Gosterim%", m.GosterimSayi ? string.Format("<small>Gösterim: </small>{0}", viewCount) : ""); break; } modulID = null; GetOtherData(m); } }
protected override void OnInit(EventArgs e) { try { CustomizeControl1.FormTitle = string.Format(Settings.FormTitleFormat, "Video", "Ekleme/Düzeltme Formu"); if (Request.QueryString["vid"] != null) { ViewState["tempID"] = Request.QueryString["vid"]; } using (Video m = VideoMethods.GetVideo(BAYMYO.UI.Converts.NullToInt64(ViewState["tempID"]))) { bool notNull = (m.ID > 0), isAdmin = Core.IsUserAdmin; if (notNull) { Default(m, isAdmin); } TextBox txt = new TextBox(); txt.ID = "Baslik"; txt.CssClass = "form-control"; txt.Text = m.Baslik; txt.MaxLength = 75; txt.ClientIDMode = ClientIDMode.Static; CustomizeControl1.AddControl("Başlık", txt); txt = new TextBox(); txt.ID = "Embed"; txt.CssClass = "form-control"; txt.Text = m.Embed; txt.TextMode = TextBoxMode.MultiLine; txt.MaxLength = 750; txt.ClientIDMode = ClientIDMode.Static; CustomizeControl1.AddControl("Embed", txt, "Her hangi bir video sitesinden 'embed' kodu almanız gereklidir."); txt = new TextBox(); txt.ID = "Etiket"; txt.CssClass = "form-control"; txt.Text = m.Etiket; txt.MaxLength = 100; txt.ClientIDMode = ClientIDMode.Static; CustomizeControl1.AddControl("Etiket", txt, string.Format("Lütfen virgül({0}) ile ayrıarak ve boşluk bırakmadan yazınız! Örnek: elma{0}meyve{0}sebze{0}bahçe", Settings.SplitFormat)); DropDownList ddl = new DropDownList(); ddl.ID = "Kategori"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.DataSource = KategoriMethods.GetMenu("video", true); ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.KategoriID); CustomizeControl1.AddControl("Kategori", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=video\">[+] Yeni Kategori</a>"); Image img = new Image(); img.ID = "VideoResim"; img.Width = 250; img.ToolTip = m.ResimUrl; img.ClientIDMode = ClientIDMode.Static; if (!string.IsNullOrEmpty(m.ResimUrl)) { img.ImageUrl = Settings.ImagesPath + "video/" + m.ResimUrl; } else { img.ImageUrl = Settings.ImagesPath + "admin-yok.png"; } CustomizeControl1.AddControl("Resim", img); txt = new TextBox(); txt.ID = "ImgUrl"; txt.CssClass = "form-control"; txt.ClientIDMode = ClientIDMode.Static; CustomizeControl1.AddControl("Image Url", txt, "Video bağlantısı eklendiğinde otomatik olarak resim adresi alır."); FileUpload flu = new FileUpload(); flu.ID = "ResimUrl"; flu.CssClass = "form-control"; flu.ToolTip = m.ResimUrl; CustomizeControl1.AddControl("Resim Ekle", flu, "Genişlik(W):300px - Yükseklik(H):150px"); CheckBoxList chkList = new CheckBoxList(); chkList.ID = "chkList"; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add("Gösterim Sayı"); chkList.Items[0].Selected = notNull ? m.GosterimSayi : true; chkList.Items.Add("Üyelere Özel"); chkList.Items[1].Selected = m.Uye; chkList.Items.Add("Yorumları Göster"); chkList.Items[2].Selected = notNull ? m.Yorum : false; chkList.Items.Add("Yönetici Onayı"); chkList.Items[3].Selected = notNull ? m.YoneticiOnay : isAdmin; chkList.Items[3].Enabled = isAdmin; chkList.Items.Add("Yayımla"); chkList.Items[4].Selected = notNull ? m.Aktif : isAdmin; chkList.Items[4].Enabled = isAdmin; CustomizeControl1.AddControl("Seçimler", chkList); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(CustomizeControl1_SubmitClick); CustomizeControl1.RemoveClick += new CustomizeControl.ButtonEvent(CustomizeControl1_RemoveClick); } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } base.OnInit(e); }
protected override void OnInit(EventArgs e) { try { CustomizeControl1.FormTitle = string.Format(Settings.FormTitleFormat, "Bağlantı", "Tanımlama"); if (Request.QueryString["fid"] != null) { ViewState["tempID"] = Request.QueryString["fid"]; } using (Firma m = FirmaMethods.GetFirma(BAYMYO.UI.Converts.NullToInt64(ViewState["tempID"]))) { bool notNull = (m.ID > 0), isAdmin = Core.IsUserAdmin; if (notNull) { Default(m, isAdmin); } Image img = new Image(); img.ID = "BuyukResim"; img.Width = 250; img.ToolTip = m.ResimUrl; if (!string.IsNullOrEmpty(m.ResimUrl)) { img.ImageUrl = Settings.ImagesPath + "firma/b/" + m.ResimUrl; } else { img.ImageUrl = Settings.ImagesPath + "admin-yok.png"; } CustomizeControl1.AddControl("Büyük Resim", img); FileUpload flu = new FileUpload(); flu.ID = "ResimUrl"; flu.ToolTip = m.ResimUrl; CustomizeControl1.AddControl("Resim Ekle", flu); img = new Image(); img.ID = "KucukResim"; img.Width = 150; if (!string.IsNullOrEmpty(m.ResimUrl)) { img.ImageUrl = Settings.ImagesPath + "firma/" + m.ResimUrl; } else { img.ImageUrl = Settings.ImagesPath + "admin-yok.png"; } CustomizeControl1.AddControl("Küçük Resim", img); flu = new FileUpload(); flu.ID = "KucukResimUrl"; CustomizeControl1.AddControl("Küçük Resim Ekle", flu, "<b>Bu alanda resim seçmezseniz büyük resim küçültülecektir.</b> Genişlik(W):350px/Yükseklik(H):140px"); TextBox txt = new TextBox(); txt.ID = "Adi"; txt.CssClass = "form-control"; txt.Text = m.Adi; txt.MaxLength = 75; CustomizeControl1.AddControl("Bağlantı Adı", txt); txt = new TextBox(); txt.ID = "Yetkili"; txt.CssClass = "form-control"; txt.Text = m.Yetkili; txt.MaxLength = 40; CustomizeControl1.AddControl("Yetkili", txt); txt = new TextBox(); txt.ID = "Adres"; txt.CssClass = "form-control"; txt.Text = m.Adres; txt.TextMode = TextBoxMode.MultiLine; CustomizeControl1.AddControl("Adres", txt); txt = new TextBox(); txt.ID = "Mail"; txt.CssClass = "form-control"; txt.Text = m.Mail; txt.MaxLength = 60; CustomizeControl1.AddControl("Mail", txt); txt = new TextBox(); txt.ID = "Web"; txt.CssClass = "form-control"; txt.Text = m.Web; txt.MaxLength = 60; CustomizeControl1.AddControl("Web", txt); txt = new TextBox(); txt.ID = "Telefon1"; txt.CssClass = "form-control"; txt.Text = m.Telefon1; txt.MaxLength = 16; CustomizeControl1.AddControl("Telefon (1)", txt); txt = new TextBox(); txt.ID = "Telefon2"; txt.CssClass = "form-control"; txt.Text = m.Telefon2; txt.MaxLength = 16; CustomizeControl1.AddControl("Telefon (2)", txt); txt = new TextBox(); txt.ID = "GSM"; txt.CssClass = "form-control"; txt.Text = m.GSM; txt.MaxLength = 16; CustomizeControl1.AddControl("GSM", txt); DropDownList ddl = new DropDownList(); ddl.ID = "Kategori"; ddl.Width = 250; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; ddl.CssClass = "form-control"; ddl.DataSource = KategoriMethods.GetMenu("firma", true); ddl.DataBind(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.KategoriID); CustomizeControl1.AddControl("Kategori", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=firma\">[+] Yeni Kategori</a>"); ddl = new DropDownList(); ddl.ID = "Sehir"; ddl.Width = 250; ddl.DataMember = "Sehir"; ddl.DataValueField = "Adi"; ddl.DataTextField = "Adi"; ddl.CssClass = "form-control"; SehirCollection sehirler = SehirMethods.GetSelect(); sehirler.Insert(0, new Sehir(0, "")); ddl.DataSource = sehirler; ddl.DataBind(); ddl.Text = BAYMYO.UI.Converts.NullToString(m.Sehir); CustomizeControl1.AddControl("Şehir (İL)", ddl); CheckBoxList chkList = new CheckBoxList(); chkList.ID = "chkList"; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add("Gösterim Sayı"); chkList.Items[0].Selected = (notNull) ? m.GosterimSayi : true; chkList.Items.Add("Yönetici Onayı"); chkList.Items[1].Selected = (notNull) ? m.YoneticiOnay : isAdmin; chkList.Items[1].Enabled = isAdmin; chkList.Items.Add("Yayımla"); chkList.Items[2].Selected = (notNull) ? m.Aktif : isAdmin; chkList.Items[2].Enabled = isAdmin; CustomizeControl1.AddControl("Seçimler", chkList); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(CustomizeControl1_SubmitClick); CustomizeControl1.RemoveClick += new CustomizeControl.ButtonEvent(CustomizeControl1_RemoveClick); } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } base.OnInit(e); }
protected override void OnInit(EventArgs e) { try { CustomizeControl1.FormTitle = string.Format(Settings.FormTitleFormat, "Makale", "Ekleme/Düzeltme Formu"); if (Request.QueryString["mklid"] != null) { ViewState["tempID"] = Request.QueryString["mklid"]; } using (Makale m = MakaleMethods.GetMakale(BAYMYO.UI.Converts.NullToInt64(ViewState["tempID"]))) { bool notNull = (m.ID > 0), isAdmin = Core.IsUserAdmin; if (notNull) { Default(m, isAdmin); } TextBox txt = new TextBox(); txt.ID = "Baslik"; txt.CssClass = "form-control"; txt.Text = m.Baslik; txt.MaxLength = 75; CustomizeControl1.AddControl("Başlık", txt); txt = new TextBox(); txt.ID = "Ozet"; txt.CssClass = "form-control"; txt.Text = m.Ozet; txt.TextMode = TextBoxMode.MultiLine; txt.MaxLength = 150; CustomizeControl1.AddControl("Özet", txt, "Liste ve RSS'ler için gösterilecek içeriktir."); CKEditor.NET.CKEditorControl fck = new CKEditor.NET.CKEditorControl(); fck.ID = "Icerik"; fck.Height = 400; fck.Text = m.Icerik; CustomizeControl1.AddControl("Editör", fck); txt = new TextBox(); txt.ID = "Etiket"; txt.CssClass = "form-control"; txt.Text = m.Etiket; txt.MaxLength = 100; CustomizeControl1.AddControl("Etiket", txt, string.Format("Lütfen virgül({0}) ile ayrıarak ve boşluk bırakmadan yazınız! Örnek: elma{0}meyve{0}sebze{0}bahçe", Settings.SplitFormat)); //DateTimeControl cnt = this.Page.LoadControl(Settings.DateTimeControlPath) as DateTimeControl; //cnt.ID = "Tarih"; //cnt.FormatType = FormatTypes.DateTime; //CustomizeControl1.AddControl("Tarih", cnt, "* Seçilmesi zorunlu alan."); //cnt.Date = m.KayitTarihi; DropDownList ddl = new DropDownList(); ddl.ID = "Yazar"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "hesap"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; using (BAYMYO.UI.Web.CustomSqlQuery data = new BAYMYO.UI.Web.CustomSqlQuery(ddl, "select id, concat_ws(' ',adi,soyadi) as adi from hesap where tipi in(1,2,5)")) { data.Execute(); } ddl.Items.Insert(0, new ListItem("<Seçiniz>", "")); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.HesapID); CustomizeControl1.AddControl("Yazarlar", ddl, "<a href=\"" + Settings.PanelPath + "?go=hesap&type=2\">[+] Yeni Yazar</a> (Not: Buraya sadece <b>Admin</b>, <b>Moderatör</b> ve <b>Private</b> olan yazarlar getirilir.)"); ddl = new DropDownList(); ddl.ID = "Kategori"; ddl.Width = 250; ddl.CssClass = "form-control"; ddl.DataMember = "kategori"; ddl.DataValueField = "id"; ddl.DataTextField = "adi"; List <Kategori> kategoriler = KategoriMethods.GetMenu("makale", true); ListItem item = null; foreach (Kategori kategori in kategoriler) { switch (kategori.ParentID) { case "": item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = "padding-left: 5px;background: #f5f5f5; color: #454545;"; break; case "0": item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = "padding-left: 25px;background: #f5f5f5; color: #fe760c; font-weight: bold;"; break; default: item = new ListItem(kategori.Adi, kategori.ID); item.Attributes.CssStyle.Value = string.Format("padding-left: {0}px;background: #f5f5f5; color: #454545;", (BAYMYO.UI.Converts.NullToInt(kategori.ParentID.Split(',').Length + 1) * 25)); break; } ddl.Items.Add(item); } kategoriler.Clear(); ddl.SelectedValue = BAYMYO.UI.Converts.NullToString(m.KategoriID); CustomizeControl1.AddControl("Kategori", ddl, "<a href=\"" + Settings.PanelPath + "?go=kategori&mdl=makale\">[+] Yeni Kategori</a>"); Image img = new Image(); img.ID = "BuyukResim"; img.ToolTip = m.ResimUrl; if (!string.IsNullOrEmpty(m.ResimUrl)) { img.ImageUrl = Settings.ImagesPath + "makale/" + m.ResimUrl; } else { img.ImageUrl = Settings.ImagesPath + "admin-yok.png"; } CustomizeControl1.AddControl("Makale Resim", img); FileUpload flu = new FileUpload(); flu.ID = "ResimUrl"; flu.ToolTip = m.ResimUrl; flu.CssClass = "form-control"; CustomizeControl1.AddControl("Resim Ekle", flu, "Genişlik(W):728px - Yükseklik(H):300px"); CheckBoxList chkList = new CheckBoxList(); chkList.ID = "chkList"; chkList.RepeatDirection = RepeatDirection.Horizontal; chkList.Items.Add("Gösterim Sayı"); chkList.Items[0].Selected = notNull ? m.GosterimSayi : true; chkList.Items.Add("Üyelere Özel"); chkList.Items[1].Selected = m.Uye; chkList.Items.Add("Yorumları Göster"); chkList.Items[2].Selected = notNull ? m.Yorum : false; chkList.Items.Add("Yönetici Onayı"); chkList.Items[3].Selected = notNull ? m.YoneticiOnay : isAdmin; chkList.Items[3].Enabled = isAdmin; chkList.Items.Add("Yayımla"); chkList.Items[4].Selected = notNull ? m.Aktif : isAdmin; chkList.Items[4].Enabled = isAdmin; CustomizeControl1.AddControl("Seçimler", chkList); CustomizeControl1.SubmitClick += new CustomizeControl.ButtonEvent(CustomizeControl1_SubmitClick); CustomizeControl1.RemoveClick += new CustomizeControl.ButtonEvent(CustomizeControl1_RemoveClick); } } catch (Exception ex) { CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message); } base.OnInit(e); }