DTcms.Web.UI/DTcms.Web.UI.Page/search.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using DTcms.BLL;
using DTcms.Common;
using DTcms.Model;
using System;
using System.Data;
namespace DTcms.Web.UI.Page
{
public class search : BasePage
{
protected string channel = string.Empty;
protected string tags = string.Empty;
protected string keyword = string.Empty;
protected string pagelist = string.Empty;
protected int page;
protected int totalcount;
protected override void ShowPage()
{
this.page = DTRequest.GetQueryInt("page", 1);
this.tags = DTRequest.GetQueryString("tags").Replace("'", string.Empty);
this.keyword = DTRequest.GetQueryString("keyword").Replace("'", string.Empty);
this.channel = DTRequest.GetQueryString("channel").Replace("'", string.Empty);
}
protected DataTable get_search_list(int _pagesize, out int _totalcount)
{
DataTable dt = new DataTable();
dt.Columns.Add("id", Type.GetType("System.Int32"));
dt.Columns.Add("title", Type.GetType("System.String"));
dt.Columns.Add("remark", Type.GetType("System.String"));
dt.Columns.Add("channel_id", Type.GetType("System.String"));
dt.Columns.Add("link_url", Type.GetType("System.String"));
dt.Columns.Add("add_time", Type.GetType("System.String"));
dt.Columns.Add("img_url", Type.GetType("System.String"));
DataSet ds = new DataSet();
if (!string.IsNullOrEmpty(this.tags))
{
ds = new DTcms.BLL.article().GetSearch(this.channel, this.tags, _pagesize, this.page, string.Empty, "add_time desc,id desc", out _totalcount);
}
else
{
ds = new DTcms.BLL.article().GetSearch(this.channel, _pagesize, this.page, string.Concat(new string[]
{
"(title like '%",
this.keyword,
"%' or zhaiyao like '%",
this.keyword,
"%')"
}), "add_time desc,id desc", out _totalcount);
}
if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
后面还有 59 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。