Example #1
0
        protected void ButtonAra_Click(object sender, EventArgs e)
        {
            try
            {
                if (TextBoxArama.Text == "" && DropDownList_siniflar.SelectedValue == "sinifYok")
                {
                    return;
                }

                if (TextBoxArama.Text.Length > 40)
                {
                    return;
                }

                da = new accessDatabase();
                if (TextBoxArama.Text == "")
                {
                    getSinif = DropDownList_siniflar.SelectedItem.ToString();
                }
                da.ekle("insert into aramaIstatistik (tarih,arananlar) values ('" + string.Format("{0:dd.MM.yyyy HH:mm:ss}", TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById("Turkey Standard Time"))) + "', '" + (TextBoxArama.Text == "" ? getSinif : TextBoxArama.Text) + "')");
                Response.Redirect("Arama.aspx?gelen=" + TextBoxArama.Text + "&sinif=" + DropDownList_siniflar.SelectedValue + "&detayliArama=" + DropDownList_detayliAra.SelectedValue);
            }
            catch
            {
            }
        }
Example #2
0
        protected void ButtonMesajGonder_Click(object sender, EventArgs e)
        {
            accessDatabase ad;

            try
            {
                if (TextBoxGuvenlikSorusu.Text == Session["sonuc"].ToString() &&
                    TextBoxAdsoyad.Text != "" &&
                    TextBoxEposta.Text != "" &&
                    TextBoxKonu.Text != "" &&
                    TextAreaileti.InnerText != "")

                {
                    ad = new accessDatabase();
                    ad.ekle("INSERT INTO iletisim (adsoyad,eposta,konu,ileti,tarih) VALUES ('" + TextBoxAdsoyad.Text + "','" + TextBoxEposta.Text + "','" + TextBoxKonu.Text + "','" + TextAreaileti.InnerText + "','" + string.Format("{0:dd.MM.yyyy HH:mm}", TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById("Turkey Standard Time"))) + "')");
                    Page.Response.Redirect(Page.Request.Url.ToString(), false);
                }
                else
                {
                    LabelBilgilendirme.Text = "Kutucukları boş bırakmayınız !";
                }
            }
            catch
            {
                LabelBilgilendirme.Text = "Mesajınız gönderilemedi !";
            }
        }
Example #3
0
        protected void btnUyelikOlustur_Click(object sender, EventArgs e)
        {
            accessDatabase ad;

            try
            {
                if (TextBoxGuvenlikSorusu.Text == Session["sonuc"].ToString() &&
                    txtUyeAd.Text != "" &&
                    txtUyeSoyad.Text != "" &&
                    txtUyeMail.Text != "" &&
                    txtUyeSifre.Text != "" &&
                    txtUyeSifreTekrar.Text != "" &&
                    txtUyeSifre.Text == txtUyeSifreTekrar.Text)
                {
                    ad = new accessDatabase();
                    ad.ekle("INSERT INTO uyeol (uyelikTarihi,uyeAd,uyeSoyad,uyeMail,uyeSifre) VALUES ('" + string.Format("{0:dd.MM.yyyy HH:mm}", TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById("Turkey Standard Time"))) + "','" + txtUyeAd.Text + "','" + txtUyeSoyad.Text + "','" + txtUyeMail.Text + "','" + txtUyeSifre.Text + "')");
                    Page.Response.Redirect(Page.Request.Url.ToString(), false);
                    Response.Redirect("hosgeldiniz.aspx");
                }
                else
                {
                    LabelBilgilendirme.Text = "Kutucukları boş bırakmayınız !";
                }
            }
            catch
            {
                LabelBilgilendirme.Text = "Mesajınız gönderilemedi !";
            }
        }
Example #4
0
        //--------------------------------------------------------------------------------------------//

        protected void Button1_Click(object sender, EventArgs e)//makaleEkle
        {
            if (TextBox1.Text != "" &&
                DropDownList1.Text != "" &&
                CKEditorControl1.Text != "" &&
                TextBoxKucukResim.Text != "" &&
                DropDownList1.SelectedItem.ToString() != "Yok")
            {
                ad = new accessDatabase();
                ad.ekle("INSERT INTO makale (baslik,sinif,icerik,tarih,kategoriid,yazar,anahtarKelimeler,aciklama,kucukResim) VALUES ('" + TextBox1.Text + "'," + DropDownList_sinif.SelectedValue + ",'" + CKEditorControl1.Text + "','" + string.Format("{0:dd.MM.yyyy}", DateTime.Now) + ", " + CultureInfo.GetCultureInfo("tr-TR").DateTimeFormat.DayNames[(int)DateTime.Now.DayOfWeek] + "'," + DropDownList1.SelectedValue + ",'" + txtYazar + "','" + TextBoxKeywords.Text + "','" + TextBoxAciklama.Text + "','" + TextBoxKucukResim.Text + "')");
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Makale Ekleme Uyarısı", "<script>alert('Lütfen tüm kutucukları doldurun');</script>");
            }
        }
Example #5
0
 protected void ButtonYazarEkle_Click(object sender, EventArgs e)
 {
     ad = new accessDatabase();
     ad.ekle("insert into login (email,sifre,yetki) values ('" + TextBoxYazarMail.Text + "','" + TextBoxYazarSifre.Text + "'," + DropDownListYazarYetki.SelectedValue.ToString() + ")");
     Response.Write(@"<script language='javascript'>alert('Yazar başarıyla eklendi.')</script>");
 }