top.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
namespace khglcrm
{
    public partial class top1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["admin"] == null)
            {
                Response.Write("<script language='javascript'>alert('登录超时');top.location.href='login.aspx';<" + "/script>");
            }
            else
            {
                if (!Page.IsPostBack)
                {
                    this.Label1.Text = Session["admin"].ToString();
                    this.showmenu();

                }
            }
        }
        private void showmenu()
        {
            DB mydb = new DB();
            OleDbDataReader dr = mydb.GetdataReader("select * from quan where biao='" + Session["id"].ToString() + "'");
            if (dr.Read())
            {
                if (dr["system"].ToString().IndexOf("1") < 0)
                {
                    this.sys.Attributes.Add("style", "display:none");
                }
            }
            else
            {
                this.sys.Attributes.Add("style", "display:none");
            }
            dr.Close();
            mydb.close();
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。