|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/dc15253c/377bd30d/ |
?#pragma checksum "D:\wwwroot\jmxbaogao\wwwroot\Counter\NewArticleScoreView.ashx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "9B991CF25E7D9EEBFB1DAE21A02397A8"
#line 1 "D:\wwwroot\jmxbaogao\wwwroot\Counter\NewArticleScoreView.ashx"
/****************************************
* 版权所有:南昌金启软件有限公司
* 网 址:www.21it.com
****************************************/
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Reflection;
using System.Web;
using Com.Huji.DataBll;
using Com.Huji.DataModel;
using Com.Huji.DataTools;
using Com.Huji.Web.Pager;
namespace Com.Huji.Web.Counter
{
public class NewArticleScoreView : BaseHandler
{
protected NewArticleBll articleBll = new NewArticleBll();
protected NewColumnsBll columnBll = new NewColumnsBll();
public override void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
if (!ProcessRequestError()) return;
try
{
#region 显示列表
string strWhere, strClass = "";
string arrClassID = "12|13";
int pageSize = 50;
int columnNum = 4;
strWhere = " and t.column_id in (" + arrClassID.Replace('|', ',').Trim() + ")";
strWhere += " and t.language_id=" + LanguageId;
strWhere += " and exists ( select * from dbo.jinqi_new_article_message m where t.article_id=m.article_id and t.language_id=m.language_id";
strWhere += " and m.message_4='" + context.Request.QueryString["article_id"] + "' ";
strWhere += " )";
//先行查找所有能找到的数据,若是为0,则暗示找不到任何纪录
int articleNum = articleBll.GetNewArticleCount(strWhere);
if (articleNum != 0)
{
string orderType = " t.author_time desc ";
//若是显示文章数为0,则显示所有可查找到的文章,若是显示文章大于所有文章,则只用所有文章,不然用所有文章
DataTable dt = articleBll.GetNewArticleList(pageSize, strWhere, 1, orderType, pageSize);
int i = 0;
foreach (DataRow c in dt.Rows)
{
if (columnNum != PublicParameters.ZeroPram && i % columnNum == PublicParameters.ZeroPram)
{
if (i != 0) strClass += " </div>";
strClass += " <div>";
}
strClass += "<li onmouseover=\"javascript:this.style.filter=\\\'alpha(opacity=70)\\\';this.style.opacity=\\\'0.7\\\';\" onmouseout=\"javascript:this.style.filter=\\\'\\\';this.style.opacity=1;\">";
strClass += "<div class=\"project_li_img\"><a href=\"" + ArticleUrl(c["article_id"].ToString()) + "\"><img src=\"" + ImagesUrl(c["article_id"].ToString(), "true") + "\" width=\"140px\" height=\"105px\"/></a></div>";
strClass += "<div class=\"project_li_title\"><a href=\"" + ArticleUrl(c["article_id"].ToString()) + "\">" + ArticleTitle("15", "...", c["article_id"].ToString()) + " </a></div>";
strClass += "</li>";
i++;
}
if (columnNum != PublicParameters.ZeroPram && i % columnNum == PublicParameters.ZeroPram)
{
strClass += " </div>";
}
}
else
strClass = ShowLangInfo("NoData", context);
context.Response.Write("document.write('" + strClass + "');");
#endregion
}
catch (SqlException ex)
{
Logger.Error(ex.ToString());
throw ex;
}
}
}
}
#line default
#line hidden