AddTopic.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class AddTopic : System.Web.UI.Page
{
    SqlHelper data = new SqlHelper();
    public DataTable DsTitle;
    public string useid;
    public string titleid;
    public string FenLeiid;
    public string banzhu = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        DataList1.DataSource = data.GetDataReader("select top 10  * from  News  order by  id desc ");
        DataList1.DataBind();
      
        Session["FenLeiid"] = FenLeiid = Request.QueryString["FenLeiid"].ToString();
        PagiNation1.Pageing = Convert.ToInt32(Request.QueryString["Page"].ToString());
        PagiNation1.FieldValue = FenLeiid;
        PagiNation2.Pageing = PagiNation1.Pageing;
        PagiNation2.FieldValue = PagiNation1.FieldValue;
        DsTitle = DataHelpe.GetDataSet(TitleClass.getTitlePagiNationData("Page", PagiNation1.fieldValue, PagiNation1.Pageing, "FenLei_id='" + FenLeiid + "' and IsVisible='1' ", " IsTopName   ")).Tables[0];

        if (!IsPostBack)
        {



 


        }

    }
    protected void Button_Click(object sender, EventArgs e)
    {
        if (Session["useid"] == null) //没有还没登录
        {
            Alert.AlertAndRedirect("对不起您还没有登录", "Default.aspx");
        }
        else
        {

            string title = StringClass.cutBadStr(subject.Value);
            string title_content = StringClass.cutBadStr(content1.Value);
            string uptime = BBSClass.getDatatime();
            string sql = "insert " + TitleClass.tablename + " (FenLei_id,use_id,title,title_content,title_uptime)";
            sql += "values(" + Session["FenLeiid"].ToString() + "," + Session["useid"].ToString() + ",'" + title + "',";
            sql += " '" + title_content + "','" + uptime + "')";
            DataHelpe.ExecuteSql(sql);
            gotoPage(uptime);
后面还有 21 行代码,购买后查看完整代码

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

AI 解读 AI

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

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