source/en/articledetail.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class en_articledetail : System.Web.UI.Page
{
public String id = "", classid = "", articleTitle = "", articleTime = "", articleContent = "", otherPage = "", downloadUrl = "", title = "", keywords = "", description = "";
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
return;
}
if (StringUtil.isEmpty(Context.Request["id"]))
Response.End();
else
id = StringUtil.HtmlEncode(Context.Request["id"].ToString());
DataTable dt = UserDBS.reDatatable("select * from " + Common.getLan() + "_article where id = " + long.Parse(id) + "");
if (dt.Rows.Count == 0)
Response.End();
articleTitle = dt.Rows[0]["name"].ToString();
articleContent = Server.HtmlDecode(dt.Rows[0]["content"].ToString());
articleTime = dt.Rows[0]["time"].ToString();
if (dt.Rows[0]["downloadurl"].ToString().Trim() != "")
downloadUrl = "<div class=\"detailUrl\"><a target=_blank href=\"../upload/file/" + dt.Rows[0]["downloadurl"].ToString().Trim() + "\">Download</a></div>";
classid = dt.Rows[0]["classid"].ToString();
title = StringUtil.isEmpty(dt.Rows[0]["title"]) ? dt.Rows[0]["name"].ToString() : dt.Rows[0]["title"].ToString();
keywords = StringUtil.isEmpty(dt.Rows[0]["keywords"]) ? Common.getKeywords() : dt.Rows[0]["keywords"].ToString();
description = StringUtil.isEmpty(dt.Rows[0]["description"]) ? Common.getDescription() : dt.Rows[0]["description"].ToString();
otherPage = "<div class='otherPage'>";
DataTable otherPageDt = UserDBS.reDatatable("select id,name from " + Common.getLan() + "_article where classid like '" + dt.Rows[0]["classid"].ToString().Substring(0, 2) + "%' ORDER BY sort DESC, [time] DESC");
for (int i = 0; i < otherPageDt.Rows.Count; i++)
{
if (otherPageDt.Rows[i]["id"].ToString() == id)
{
if (i == 0)
{
otherPage += "<div class='prevBox'>Previous:<a>No</a></div>";
}
else
{
otherPage += "<div class='prevBox'>Previous:<a title='" + otherPageDt.Rows[i - 1]["name"] + "' href='articledetail.aspx?id=" + otherPageDt.Rows[i - 1]["id"] + "'>" + otherPageDt.Rows[i - 1]["name"] + "</a></div>";
}
if (i == otherPageDt.Rows.Count - 1)
后面还有 15 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。