MxWeiXinPF.Web.UI/HtmlBuilder.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Web;
using MxWeiXinPF.Common;
using System.Text.RegularExpressions;
namespace MxWeiXinPF.Web.UI
{
public class HtmlBuilder
{
BLL.article_category objarticle_category = new BLL.article_category();//文章分类
BLL.channel objchannel = new BLL.channel();//频道
BLL.channel_category objchannel_category = new BLL.channel_category();//频道分类
BLL.article objarticle = new BLL.article();//文章
Model.siteconfig config = new BLL.siteconfig().loadConfig();//站点配置
Model.channel modelchanel = new Model.channel();//频道实体类
private const string urlstr = "\"{0}tools/admin_ajax.ashx?action=get_builder_html&lang={1}&html_filename=&indexy=&aspx_filename={2}&catalogue={3}\"";
protected internal Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
public HtmlBuilder()
{
//构造函数
}
#region 获取生成静态地址
/// <summary>
/// 获取生成静态地址
/// </summary>
/// <param name="context"></param>
public void getpublishsite(HttpContext context)
{
string lang = MXRequest.GetQueryString("lang");
string name = MXRequest.GetQueryString("name");
string type = MXRequest.GetQueryString("type");
StringBuilder sbjson = new StringBuilder();
//获得URL配置列表
BLL.url_rewrite bll = new BLL.url_rewrite();
List<Model.url_rewrite> ls = (!string.IsNullOrEmpty(type)) ? bll.GetList(name, type) : bll.GetList(name);
string linkurl = string.Empty;
sbjson.Append("[");
foreach (Model.url_rewrite modeltrewrite in ls)
{
if (modeltrewrite.url_rewrite_items.Count > 0)
{
if (modeltrewrite.channel == string.Empty || modeltrewrite.channel == name)
{
//遍历URL字典的子节点
foreach (Model.url_rewrite_item item in modeltrewrite.url_rewrite_items)
{
if (item.querystring == string.Empty)
{
linkurl = string.Format("{0}/{1}/{2}", MXKeys.DIRECTORY_REWRITE_ASPX, lang, modeltrewrite.page);
string HTMLPattern = string.Format("{0}/{1}/{2}", MXKeys.DIRECTORY_REWRITE_HTML, lang, Utils.GetUrlExtension(item.pattern, config.staticextension)); //替换扩展名
后面还有 211 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
