admin/type_one/sisu.aspx.cs

(开头部分) 6KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data;

namespace web.admin.type_one
{
    public partial class sisu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                    int x = 100;
                    int p = 1;
                    if (Request.QueryString["pagex"] != null)
                    {
                        p = Convert.ToInt32(Request.QueryString["pagex"]);
                    }

                    string username = new Random().Next(100).ToString();

                    string sqlstring = string.Empty;
                    if ((p - 1) * x == 0)
                    {
                        sqlstring = "select top " + x + " * from type order by px";
                    }
                    else
                    {
                        sqlstring = "select top " + x + " * from type where px >(select max(px) from type where px in (select top " + (p - 1) * x + " px from type order by px) ) order by px";
                    }

                    using (DataTable li = new AcsHelper().ExecuteDataTable(sqlstring))
                    {
                        this.Repeater1.DataSource = li;
                        this.Repeater1.DataBind();
                    }


                    this.Literal1.Text = liu.fystr(x, "type", username, p, "pagex", "id");
                
            }
        }
        protected void Rp_OnItemCommand(object o, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "del")
            {
                string kid = new AcsHelper().ExecuteScalar("select id from type_one where tid = " + e.CommandArgument + "");
                if (kid == "")
                {
                    string sqlstring = "delete from type where id=" + e.CommandArgument;
                    int a = new AcsHelper().ExecuteNonQuery(sqlstring);
                    if (a > 0)
                    {
                        Response.Redirect(Request.RawUrl);
                    }
                }
后面还有 92 行代码,购买后查看完整代码

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

AI 解读 AI

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

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