admin/managetype.aspx.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Collections;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class admin_managetype : System.Web.UI.Page
{
    static string type, tag, info;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            type = "所有";
            tag = "所有";
            info = "";
            BindGrv(type, tag, info);
           
        }
        this.DropDownList1.Attributes.Add("onkeydown", "if(event.keyCode==13) {document.all." + this.Button1.ClientID + ".focus();document.all." + this.Button1.ClientID + ".OnClick();}");
        this.TextBox10.Attributes.Add("onkeydown", "if(event.keyCode==13) {document.all." + this.Button1.ClientID + ".focus();document.all." + this.Button1.ClientID + ".OnClick();}");
        this.DropDownList2.Attributes.Add("onkeydown", "if(event.keyCode==13) {document.all." + this.Button1.ClientID + ".focus();document.all." + this.Button1.ClientID + ".OnClick();}");

        if ((string)Session["userid"] == "")
        {
            //Response.Redirect("~/login/adminlogin.htm");
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "location.replace('/login/adminlogin.htm');", true);
        }
        else
        {
            Bindadmin();
        }
    }

    private void Bindadmin()
    {
        string username = (string)Session["userid"];
        string xy_sql = "select * from tb_gys where gys_user = @user  and  gys_admintag =@admintag ";//gys_admintag表示可以进入后台
        SqlParameter[] p = new SqlParameter[] {
                     new SqlParameter("@user",username),
                     new SqlParameter("@admintag","1"),

        };
        DataTable dt = SqlHelper.ExecuteQuery(xy_sql, p);
        if (dt.Rows.Count <= 0)
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "location.replace('/login/adminlogin.htm');", true);
        }

    }
后面还有 270 行代码,购买后查看完整代码

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

AI 解读 AI

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

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