Song.Site/Manage/Panel/HelpEditer.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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 System.Text.RegularExpressions;
using System.IO;
namespace Song.Site.Manage.Panel
{
public partial class HelpEditer : Extend.CustomPage
{
//帮助文件
private string helpfile = WeiSha.Common.Request.QueryString["helpfile"].String;
//功能模块的名称
private string name = WeiSha.Common.Request.QueryString["name"].String;
//帮助模板
private string template = "/manage/help/HeplTemplate.html";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
tbHelpContext.Text = getBodyContext();
lbName.Text = name;
linkHelp.NavigateUrl = helpfile;
}
}
/// <summary>
/// 获取帮助文件的内容
/// </summary>
/// <returns></returns>
private string getBodyContext()
{
if (helpfile == "") return "";
string context = this.getOldHtml();
string regTxt = @"(?<=<body>).*(?=</body>)";
Regex re = new Regex(regTxt, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
MatchCollection mc = re.Matches(context);
if (mc.Count > 0)
return mc[0].Value;
return "";
}
/// <summary>
/// 获取原有帮助文件的所有HTML内容,如果不存在,则用模板创建
/// </summary>
/// <returns></returns>
private string getOldHtml()
{
if (helpfile == "") return "";
string context = "";
string helpfileHy = this.Server.MapPath(helpfile);
if (!helpfileHy.EndsWith(".html"))
{
return "";
}
后面还有 59 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
