|
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\NewCommentsView.ashx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "7793B25D6B033A7496126C80C7FC2A2C"
#line 1 "D:\wwwroot\jmxbaogao\wwwroot\Counter\NewCommentsView.ashx"
/****************************************
* 版权所有:南昌金启软件有限公司
* 网 址:www.21it.com
****************************************/
using System.Data;
using System.Web;
using Com.Huji.DataBll;
using Com.Huji.DataTools;
using Com.Huji.Web.Pager;
namespace Com.Huji.Web.Counter
{
public class NewCommentsView : BaseHandler
{
protected NewColumnsBll columnBll = new NewColumnsBll();
protected NewArticleBll articleBll = new NewArticleBll();
private NewCommentsBll comBll = new NewCommentsBll();
public override void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
if (!ProcessRequestError()) return;
StringText builderList = new StringText();
string strWhere = " and t.article_id=" + context.Request.QueryString["id"] + " and t.language_id=" + context.Request.QueryString["language_id"];
//先行查找所有能找到的数据,若是为0,则暗示找不到任何纪录
int articleNum = comBll.GetNewCommentsCount(strWhere);
builderList.Append("<div class=\"pl_show\">");
builderList.Append("<div class=\"pl_show_title\">");
builderList.Append("<div class=\"right\">");
if (articleNum != 0)
{
builderList.Append("<span>");
builderList.Append(ShowLangInfo("CommentTotal", context) + ":<b>" + articleNum + "</b> " + ShowLangInfo("CommentUnit", context) + " ");
builderList.Append("<a target=\"_blank\" href=\"/NewsView.aspx?id=" + context.Request.QueryString["id"] + "&hl=" + LanguageData.LanguagePath + "\">[" + ShowLangInfo("CommentAll", context) + "]</a>");
builderList.Append("</span>");
}
builderList.Append(ShowLangInfo("CommentNet", context));
builderList.Append("</div>");
builderList.Append("</div>");
builderList.Append("<div class=\"mode-comment\" id=\"commentWrapper\">");
if (articleNum != 0)
{
//12 UsePage -------是否分页显示,True为分页显示,False为不分页显示,每页显示的文章数量在后盾栏目设置中指定
int page = Converts.ToInt32(context.Request.QueryString["page_num"]) != 0 ? Converts.ToInt32(context.Request.QueryString["page_num"]) : articleNum;
DataTable dt = comBll.GetNewCommentsList(page, strWhere, 1, " order by t.createdate desc ", articleNum);
foreach (DataRow c in dt.Rows)
{
builderList.Append("<div class=\"pl_show_list\">");
builderList.Append("<div class=\"pl_show_head\">");
builderList.Append("<span class=\"f-l\">" + ShowLangInfo("CommentNetFriend", context) + " [" + c["comments_name"] + "]:" + ShowLangInfo("CommentIn", context) + " " + Converts.ToDateTime(c["createdate"]) + " " + ShowLangInfo("CommentSay", context) + ":</span>");
builderList.Append("</div>" + Converts.StrToHtml(c["comments_content"].ToString()));
builderList.Append("</div>");
}
}
else
{
builderList.Append(ShowLangInfo("NoData", context));
}
builderList.Append("</div>");
builderList.Append("</div>");
context.Response.Write("document.write('" + builderList.ToString() + "');");
}
}
}
#line default
#line hidden