Web/search.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 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 COCOWO.DB;
using COCOWO.COMP;

public partial class search : System.Web.UI.Page
{
    blog_Content Blog_Content = new blog_Content();
    public string StrOut = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        BindGrid();
    }
    private void BindGrid()
    {
        string ViewDraft = QueryString.GetViewType;
        bool CanRead = true;
        string StrOutList = @"<div class=""Content-body"" style=""text-align:Left""><table cellpadding=""2"" cellspacing=""2"" width=""100%"">";
        string logLink = QueryString.GetSearchType;
        string logIcon = QueryString.GetSearchContent;
        string SQL = "";

        if (QueryString.GetCateID != null)
            SQL = "log_" + QueryString.GetSearchType + " like '%" + QueryString.GetSearchContent + "%' and log_IsDraft = 0 and Log_cateID=" + QueryString.GetCateID;
        else if (QueryString.GetC_Year != null && QueryString.GetC_Month != null && QueryString.GetC_Day != null)
            SQL = "log_" + QueryString.GetSearchType + " like '%" + QueryString.GetSearchContent + "%' and log_IsDraft = 0 and Convert(char(8),Log_PostTime,112)='" + Convert.ToDateTime("" + QueryString.GetC_Year + "-" + QueryString.GetC_Month + "-" + QueryString.GetC_Day + "").ToString("yyyyMMdd") + "'";
        else if (QueryString.GetC_Year != null && QueryString.GetC_Month != null)
            SQL = "log_" + QueryString.GetSearchType + " like '%" + QueryString.GetSearchContent + "%' and log_IsDraft = 0 and Convert(char(6),Log_PostTime,112)='" + Convert.ToDateTime("" + QueryString.GetC_Year + "-" + QueryString.GetC_Month + "-1").ToString("yyyyMM") + "'";
        else
            SQL = "log_" + QueryString.GetSearchType + " like '%" + QueryString.GetSearchContent + "%' and log_IsDraft = 0";

        int Page = Convert.ToInt32(Application["blogPerPage"]) * 4;
        MultiPage1.CountSum = Convert.ToInt32(Blog_Content.DataList_Count(SQL, Page.ToString()));
        MultiPage2.CountSum = Convert.ToInt32(Blog_Content.DataList_Count(SQL, Page.ToString()));
        DataView mydv = Blog_Content.GetContentList(SQL, "log_IsTop DESC, log_ID DESC", Page.ToString(), QueryString.IntPage.ToString(), "1");
        for (int i = 0; i < mydv.Count; i++)
        {
            StrOutList += @"<tr><td valign=""top"">";
            if (ViewDraft == "draft")
            {
                logLink = @"blogpost.aspx?id=" + mydv[i][0].ToString();
                logIcon = @"<a href=""blogpost.aspx?id=" + mydv[i][0].ToString() + @""" title=""编辑草稿""><img border=""0"" alt=""编辑草稿"" src=""images/drafts.gif"" style=""margin:0px 4px -2px 0px""/></a>";
            }
            else
            {
                logLink = @"article.aspx?id=" + mydv[i][0].ToString();
                logIcon = @"<a href=""article.aspx?cateID=" + mydv[i][1].ToString() + @""" ><img border=""0"" alt=""查看 " + mydv[i][13].ToString() + @" 的日志"" src=""" + mydv[i][11].ToString() + @""" style=""margin:0px 2px -3px 0px""/></a>";
            }

            if (mydv[i][9].ToString() == "1")
                StrOutList += @"<b>";
            StrOutList += logIcon;
后面还有 19 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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