using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using xabaraCOM;

public partial class WebXabara_userDel : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        sqlServer sql = new sqlServer();
        admin a = new admin();
        javasrcipt js = new javasrcipt();

        bool check = a.check("|adminDel|");

        if (check)
        {
            if (!a.uid.Equals(xabara.safeSql(Request.QueryString["id"].Trim()).ToString()))
            {
                string returnValue = sql.del("AdminUser", "UserId", xabara.safeSql(Request["id"].Trim()).ToString(), string.Empty, false, string.Empty);

                sql.log(a.uid, "admin", "删除管理员");

                js.div(false, "", "text", returnValue, 300, 0, "userList.aspx?page=" + Request.QueryString["page"], "goto");
            }
            else
            {
                js.div(false, "", "text", "不会吧，删除自己呀！", 300, 0, "userList.aspx?page=" + Request.QueryString["page"], "goto");
            }
        }
    }
}
