detail.aspx.cs

(开头部分) 12KB

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

using System;
using System.Text;
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.Text.RegularExpressions;

public partial class detail : System.Web.UI.Page
{
    protected StringBuilder  lbefore, otherwork, lcomment;
    protected DataRow rowinfo;
    protected string editorcomment, title, ctitle, author, intro, cover, boardname, authorInfo, recommended,download;
    protected int tid, cid, hits, bid,serial;
    protected bool isingle, islock,photo=false;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["tid"] != null && Regular.IsInt(Request.QueryString["tid"]))
        {
            if (Request.QueryString["user"] != null && Request.QueryString["user"] != "" && Request.UrlReferrer != null)
                new SqlStore().Extend(Server.UrlDecode(Request.QueryString["user"]), Request.UserHostAddress, Request.UrlReferrer.AbsoluteUri);
            tid = int.Parse(Request.QueryString["tid"]);
            //评论
            if (Request.HttpMethod == "POST" && Regex.IsMatch(Request.UrlReferrer.AbsoluteUri, "dzxsw\\.com"))
                if (Request.Form["h_tid"] != null && Regular.IsInt(Request.Form["h_tid"]) && Convert.ToString(tid) == Request.Form["h_tid"] && Request.Form["t_comment"] != null)
                {
                    Regular regex = new Regular();
                    string comment = regex.Content(Server.HtmlEncode(Request.Form["t_comment"]));
                    if (regex.IsComment(comment))
                    {
                        string username = Session.Contents["username"] == null ? "游客" : (string)Session.Contents["username"];
                        SqlStore sql = new SqlStore();
                        bool succeed = true;
                        if (Request.QueryString["cid"] == null)
                        {
                            if (!sql.CommentAdd(tid, username, comment, Request.UserHostAddress, ref succeed) && succeed)
                                Response.Write("<script type='text/javascript'>alert('抱歉,该书作者拒绝您发表评论!');location=location;</script>");
                        }
                        else if (Regular.IsInt(Request.QueryString["cid"]))
                        {
                            if (!sql.CommentReplyAdd(tid, Convert.ToInt32(Request.QueryString["cid"]), username, comment, ref succeed) && succeed)
                                Response.Write("<script type='text/javascript'>alert('抱歉,该书作者拒绝您发表评论!');location=location;</script>");
                        }
                        CacheManage.RemoveCache("d" + tid);
                        CacheManage.RemoveCache("l" + tid);
                        if (!succeed)
                            Response.Write("<script type='text/javascript'>alert('评论间隔时间不的小于30秒!');location=location;</script>");
                    }
                }
            //简介、章节
            DataTableCollection tables;
            object value = CacheManage.GetCache("d" + tid);
            if (value == null)
            {
                tables = SqlStore.Detail(tid).Tables;
后面还有 138 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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