protected void Page_Load(object sender, EventArgs e)
    {
        mAdmin mA = new mAdmin();
        bAdmin bA = new bAdmin();

        mA.UserName = Request["UserName"];
        if (bA.IsAdminUserName(mA))
        {
            Response.Write("此用户名已存在!");
        }
    }
    /// <summary>
    /// 绑定管理员列表
    /// </summary>
    protected void AdminBind()
    {
        bAdmin  bA = new bAdmin();
        SgqPage pg = new SgqPage();

        pg.PageIndex      = Pages;
        pg.PageSize       = 30;
        pg.dt             = bA.AdminList().Tables[0];
        DBList.DataSource = pg.DataSource();
        DBList.DataBind();
        this.PageView.Text = pg.PageView1();
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        mAdmin mA = new mAdmin();
        bAdmin bA = new bAdmin();

        mA.UserName = Session["AdminManage"].ToString();
        mA.UserPwd  = Encryp.DESEncrypt(Request["OldPwd"]);
        if (!bA.IsOldPwd(mA))
        {
            Response.Write("旧密码输入有误!");
        }
    }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdminManage();
     if (IsPostBack)
     {
         mAdmin mA = new mAdmin();
         bAdmin bA = new bAdmin();
         mA.UserName = Session["AdminManage"].ToString();
         mA.UserPwd  = Encryp.DESEncrypt(this.UserPwd.Text);
         if (bA.AdminPwdEdit(mA))
         {
             StringDeal.Alter("修改完成!");
         }
     }
 }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage(null);
        UserName = Session["AdminManage"].ToString();
        bChannel b = new bChannel();

        DBList.DataSource = b.GetChannelMenu(0, UserName)[0].Tables[0];
        DBList.DataBind();

        mAdmin mA = new mAdmin();
        bAdmin bA = new bAdmin();

        mA.UserName = UserName;
        if (!bA.GetAdminEditPwd(mA))
        {
            this.EditPwdId.Visible = false;
        }
    }
Beispiel #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         mAdmin m = new mAdmin();
         m.UserName    = this.tUserName.Text;
         m.UserPwd     = Encryp.DESEncrypt(this.tUserPwd.Text);
         m.LastLoginIp = Request.UserHostAddress.ToString();
         string Code = this.tCode.Text;
         if (hidden1.Value == "1")
         {
             Code = Session["SGQ_WebValidate"].ToString().ToLower();
         }
         if (Session["SGQ_WebValidate"] == null)
         {
             Msg = "验证码过期,请重试!";
         }
         else if (Session["SGQ_WebValidate"].ToString().ToLower() != Code.ToLower())
         {
             Msg = "验证码输入错误,请重试!";
         }
         else
         {
             bAdmin         b     = new bAdmin();
             IList <mAdmin> list  = b.AdminLogin(m);
             string         state = list[0].Temp;
             if (state == "0")
             {
                 Msg = "密码输入有误!";
             }
             else if (state == "1")
             {
                 Msg = "密码输入有误!";
             }
             else if (state == "2")
             {
                 Msg = "帐号被锁定!";
             }
             else
             {
                 mOnlineAdmin mOA = new mOnlineAdmin();
                 bOnlineAdmin bOA = new bOnlineAdmin();
                 mOA.UserName  = m.UserName;
                 mOA.SessionId = Session.SessionID;
                 if (Caches.GetCache("Admin_" + m.UserName) == null || b.GetAdminMultiLogin(m) || bOA.GetUpdateTimeSpan(mOA) > 10)
                 {
                     Caches.SetCache("Admin_" + m.UserName, "manage");
                     Session["AdminManage"] = m.UserName;
                     bOA.OnlineAdminInsert(mOA);
                     Response.Redirect("Default.aspx", true);
                 }
                 else
                 {
                     StringDeal.Alter("此管理帐号处于登陆状态,不允许多人同时登陆!");
                 }
             }
         }
     }
     else
     {
         this.tUserName.Text = "admin";
         this.tUserPwd.Attributes.Add("value", "admin");
         if (Systemlogin("IsManageCode").ToString().Trim() == "True")
         {
             yinc          = "";
             hidden1.Value = "0";
         }
         else
         {
             hidden1.Value = "1";
             yinc          = " style=\"display:none;\"";
         }
     }
 }