Sindbad~EG File Manager
using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Admin_Default2 : System.Web.UI.Page
{
public static int altkatid, katid;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Request.Cookies["UserID"]!=null)
{
KullaniciListele();
{
altkatid = Convert.ToInt32(Request.QueryString["altkatid"].ToString());
katid = Convert.ToInt32(Request.QueryString["katid"].ToString());
}
}
else
{
Response.Redirect("Login.aspx");
}
}
}
private void KullaniciListele()
{
rptKullaniciListesi.DataSource = Genel.VeriGetir("SELECT * FROM Login WHERE Kullanici NOT IN ('standart') ORDER BY id DESC");
rptKullaniciListesi.DataBind();
}
[WebMethod]
public static bool Sil(int id)
{
using (OleDbConnection vt = new baglanti().baglan())
{
vt.Open();
OleDbCommand cmd = new OleDbCommand("DELETE FROM Login WHERE id=" + id, vt);
cmd.ExecuteNonQuery();
vt.Close();
}
return true;
}
protected void btnLoginKaydet_OnServerClick(object sender, EventArgs e)
{
using (OleDbConnection vt=new baglanti().baglan())
{
vt.Open();
OleDbCommand cmd = new OleDbCommand("INSERT INTO Login (Kullanici,Parola,mail,durum) VALUES (@Kullanici,@Parola,@mail,@durum)", vt);
cmd.Parameters.AddWithValue("@Kullanici", txtKullaniciAdi.Text.TrimEnd().TrimStart());
cmd.Parameters.AddWithValue("@Parola", txtSife.Text);
cmd.Parameters.AddWithValue("@mail", txtEmailAdresi.Text);
cmd.Parameters.AddWithValue("@durum", false);
cmd.ExecuteNonQuery();
vt.Close();
Response.Redirect("KullaniciAyarlari.aspx?altkatid=" + Request.QueryString["altkatid"] + "&katid=" + Request.QueryString["katid"] + "");
}
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists