BBSWeb/Services/CommonData.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using WebApp;
using System.Text.RegularExpressions;
using BaseConfig.BaseBLL;
using BaseConfig;
using BBS.Model;

public partial class Services_Bbs_TopicsMapData : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session[SessionKey.USER] == null) return;
        X_UserInfo u = (X_UserInfo)Session[SessionKey.USER];
        string action = StringUtil.CutBadSqlInfo(StringUtil.GetNullToString(Request["action"]));
        string strWhere = "";

        string table = "", cols = "";
        switch (action)
        {
            #region 论坛部分
            ///版块设置
            case "ForumList":
                table = "F_Forums";
                cols = "id,isInUse,forumTitle,forumInfo,createTime,lastreplytime";
                break;
            case "BbsList":
                table = "F_Bbs";
                cols = "id,isInUse,forumTitle,forumInfo,createUser,createTime,lastreplytime,parentForumId";
                strWhere = "parentForumId=" + StringUtil.GetIntValue(Request["ForumId"]).ToString();
                break;
            case "SubBbsList":
                table = "F_SubBbs";
                cols = "id,isInUse,forumTitle,forumInfo,createUser,createTime,lastreplytime,postCount";
                strWhere = "parentBbsId=" + StringUtil.GetIntValue(Request["BbsId"]).ToString();
                break;
            case "TopicsList":
                table = "F_Topics";
                cols = "id,stateInfo,sub3ForumTitle,title,userName,createTime,lastReplyUser,lastreplytime,orders";
                strWhere = "sub3ForumId=" + StringUtil.GetIntValue(Request["SubBbsId"]).ToString();
                break;
            case "Topics":
                table = "F_Topics";
                cols = "id,stateInfo,sub3ForumTitle,title,userName,createTime,lastReplyUser,lastreplytime,orders";
                if (StringUtil.GetIntValue(Request["SubBbsId"]).ToString() != "0")
                {
                    strWhere = "sub3ForumId=" + StringUtil.GetIntValue(Request["SubBbsId"]).ToString();
                }
                break;
            #endregion
        }
        strWhere = Config.jqGridStrWhere(strWhere);
        int totalRows = Pager.GetAllCount(strWhere, table);
        Config.JqGrid j = Config.GetJqGridParam(totalRows);
        int totalPage = (totalRows - 1) / j.pagesize + 1;
        if (j.p > totalPage) j.p = totalPage;
        DataTable dt = Pager.GetPager(j.pagesize, j.p, strWhere, j.order, table, cols, 1);
        {
            if (dt.Rows.Count > 0)
            {
后面还有 7 行代码,购买后查看完整代码

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

AI 解读 AI

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

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