protected void Page_Load(object sender, EventArgs e) { int t = 0; if (!this.Page.IsPostBack) { if (!string.IsNullOrEmpty(base.Request.QueryString["t"])) { t = DataConverter.CLng(base.Request.QueryString["t"]); } else { t = 0; } B_Node bll = new B_Node(); TreeNode tmpNd; tmpNd = new TreeNode(); tmpNd.Value = "0"; tmpNd.Text = SiteConfig.SiteInfo.SiteName; tmpNd.NavigateUrl = "~/" + this.GetManagePath() + "/Content/ContentManage.aspx?NodeID=0"; tmpNd.Target = "main_right"; tmpNd.ImageUrl = ""; tmpNd.ToolTip = "根节点"; tvNav.Nodes.Add(tmpNd); bll.InitTreeNode(tmpNd.ChildNodes, 0, t); tvNav.ExpandAll(); } }
protected void Page_Load(object sender, EventArgs e) { Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='ProductManage.aspx'>商城管理</a></li> <li>加盟商管理[<a href='AddBoss.aspx?nodeid=1'>添加加盟商 </a>]</li>"); if (!this.Page.IsPostBack) { if (Request.QueryString["type"] != null && Request.QueryString["id"] != null) { if (Request.QueryString["type"].ToString() == "del") { b_Boss.GetDelete(DataConverter.CLng(Request.QueryString["id"].ToString())); } } B_Node bll = new B_Node(); string menu = string.IsNullOrEmpty(Request.QueryString["menu"]) ? "0" : Request.QueryString["menu"].ToString(); } if (!B_ARoleAuth.Check(ZLEnum.Auth.shop, "DeliverType")) { function.WriteErrMsg("没有权限进行此项操作"); } DataTable dt = b_Boss.Sel(); RPT.DataSource = dt; RPT.DataBind(); string types = Request.QueryString["types"]; string Nid = Request.QueryString["nodeid"]; if (types != null) { b_Boss.DelByNodeId(Convert.ToInt32(Nid)); function.WriteSuccessMsg("删除成功!", "Bosstree.aspx"); } }
// 生成百度地图 public void MakeBaiduMap() { int num = 0; if (Request.QueryString["num"] != null) { num = DataConverter.CLng(Request.QueryString["num"].ToString()); } int updatePeris = 0; if (Request.QueryString["updatePeri"] != null) { updatePeris = DataConverter.CLng(Request.QueryString["updatePeri"].ToString()); } B_Node nll = new B_Node();//定义一个对象 nll,继承 B_Node 的方法 DataTable dt = null; Response.Write("<script>"); StringBuilder maptxt = new StringBuilder(""); //分类栏目 maptxt.AppendLine("<?xml version=\"1.0\" encoding=\"gb2312\" ?>"); maptxt.AppendLine("<document>"); for (int i = 0; i < dt.Rows.Count && i < num; i++) { maptxt.AppendLine("<item>"); maptxt.AppendLine("<webSite>" + SiteConfig.SiteInfo.SiteUrl + "</webSite>"); maptxt.AppendLine("<webMaster>" + SiteConfig.SiteInfo.WebmasterEmail + "</webMaster>"); maptxt.AppendLine("<updatePeri>" + updatePeris + "</updatePeri>"); //maptxt.AppendLine("<items xmlns=\"" + SiteConfig.SiteInfo.SiteUrl + "ColumnList.aspx?Nodeid=" + dt.Rows[o]["NodeID"].ToString() + "\"/>"); maptxt.AppendLine("<title>" + dt.Rows[i]["Title"] + "</title>"); maptxt.AppendLine("<link>" + SiteConfig.SiteInfo.SiteUrl + "/Item/" + dt.Rows[i]["GeneralID"] + ".aspx</link>"); //maptxt.AppendLine("<description>sfsff</description>"); //maptxt.AppendLine("<text>sfsfsf</text>"); //maptxt.AppendLine("<image>/images/nopic.gif</image>"); //maptxt.AppendLine("<source>wtwtwt</source>"); maptxt.AppendLine("<author>" + dt.Rows[i]["Inputer"] + "</author>"); maptxt.AppendLine("<pubDate>" + dt.Rows[i]["CreateTime"] + "</pubDate>"); maptxt.AppendLine("</item>"); Response.Write("document.write(\"生成地图...\");"); Response.Write("document.write(\"" + dt.Rows[i]["title"].ToString() + "\");"); Response.Write("document.write(\" <font color=blue><b>完成</b></font><br>\");"); //Response.Write(dd.Rows[i]["GeneralID"].ToString() + "<br>"); } maptxt.AppendLine("</document>"); XmlDocument xdon = new XmlDocument(); xdon.LoadXml(maptxt.ToString()); xdon.Save(Server.MapPath("/Mapfile.xml")); Response.Write("</script>"); //Response.Write("<script>alert('创建成功!');location.href='SiteMap.aspx';</script>"); //Label1.Text = "<div align=center style=\"padding-top:10px; padding-bottom:10px\">恭喜,SiteMap.xml生成完毕!<br><br><a href=/Mapfile.xml target=_blank>点击查看生成好的 Mapfile.xml 文件</a></div>"; Response.Write("<br>"); Response.Write("<a href=\"/Mapfile.xml\" target=\"_blank\">Mapfile.xml</a>"); Response.Write("<br>"); Response.Write("<br>一共 " + dt.Rows.Count + " 篇内容<br><input type=\"button\" name=\"Button2\" value=\"返回\" id=\"Button2\" onclick=\"location.href='SiteMap.aspx';\" />"); }
/// <summary> /// 将指定节点文章拷到一个新节点下(将旧的也转换为此) /// </summary> /// <param name="nodeDT">需要拷贝的节点信息</param> /// <param name="pnode">父节点信息</param> /// <param name="mu">用户信息</param> private void CopyNodeAndContent(DataTable nodeDT, M_Node pnode) { if (pnode.CUser < 1) { throw new Exception("未指定用户ID"); } if (string.IsNullOrEmpty(pnode.CUName)) { throw new Exception("未指定用户名称"); } B_Node nodeBll = new B_Node(); B_CodeModel conBll = new B_CodeModel("ZL_CommonModel"); B_CodeModel artBll = new B_CodeModel("ZL_C_Article"); foreach (DataRow nodedr in nodeDT.Rows) { M_Node cnode = new M_Node().GetModelFromReader(nodedr);//当前循环的写入数据库的节点 cnode.ParentID = pnode.NodeID; cnode.CUser = pnode.CUser; cnode.CUName = pnode.CUName; cnode.NodeBySite = pnode.NodeBySite; cnode.CDate = DateTime.Now; cnode.NodeID = nodeBll.Insert(cnode); //拷贝相应的文章进入该节点 DataTable conDT = DBCenter.Sel("ZL_CommonModel", "NodeID=" + nodedr["NodeID"]); DataTable artDT = DBCenter.Sel("ZL_C_Article", "ID IN (SELECT ItemID FROM ZL_CommonModel WHERE NodeID=" + nodedr["NodeID"] + ")"); if (artDT.Columns.Contains("ppics")) { artDT.Columns.Remove("ppics"); } if (artDT.Columns.Contains("tpic")) { artDT.Columns.Remove("tpic"); } for (int i = 0; i < conDT.Rows.Count; i++) { DataRow condr = conDT.Rows[i]; condr["CreateTime"] = DateTime.Now; condr["UPDateTime"] = DateTime.Now; condr["Inputer"] = pnode.CUName; condr["NodeID"] = cnode.NodeID; int itemID = Convert.ToInt32(condr["ItemID"]); if (artDT.Select("ID='" + itemID + "'").Length > 0) { //其中可能包含没有的字段,需要一个方法,将其导入(根据站站迁移扩展) DataRow artdr = artDT.Select("ID='" + itemID + "'")[0]; itemID = artBll.Insert(artdr); } else { itemID = 0; } condr["ItemID"] = itemID; conBll.Insert(condr, "GeneralID"); } } }
protected void Page_Load(object sender, EventArgs e) { string hasChild = "<a href='" + path + "PageContent.aspx?TemplateID={0}' target='main_right' id='a{0}' class='list1' >{2}<span class='list_span'>{1}</span></a>"; string noChild = "<a href='" + path + "PageContent.aspx?TemplateID={0}' target='main_right'>{2}{1}</a>"; DataTable nodeDT = tlpBll.Sel(); string head = "<ul class='tvNav'><li class='menu_tit'><span class='fa fa-chevron-down'></span>黄页内容管理</li>"; head += "<li><a class='list1' id='a0' href='" + path + "PageContent.aspx' target='main_right' ><span class='list_span'>全部节点</span><span class='fa fa-list'></span></a>"; nodeHtml.Text = head + B_Node.GetLI(nodeDT, hasChild, noChild) + "</li></ul>"; }
protected void Page_Load(object sender, EventArgs e) { //根据不同的类型,传入不同的参数 string hasChild = "<a href='" + path + "QuestList.aspx?grade={0}' target='main_right' id='a{0}' class='list1' >{2}<span class='list_span'>{1}</span></a>"; string noChild = "<a href='" + path + "QuestList.aspx?grade={0}' target='main_right'>{2}{1}</a>"; DataTable nodeDT = B_GradeOption.GetGradeList(6, 0); nodeDT.Columns["GradeID"].ColumnName = "ID"; nodeDT.Columns["GradeName"].ColumnName = "Name"; string head = "<ul class='tvNav'><li class='menu_tit'><span class='fa fa-chevron-down'></span>试题管理</li>"; head += "<li><a class='list1' id='a0' href='" + path + "QuestList.aspx' target='main_right' ><span class='list_span'>全部试题</span><span class='fa fa-list'></span></a>"; nodeHtml.Text = head + B_Node.GetLI(nodeDT, hasChild, noChild) + "</li></ul>"; }
protected void Page_Load(object sender, EventArgs e) { //根据不同的类型,传入不同的参数 string hasChild = "<a href='" + path + "Papers_System_Manage.aspx?NodeID={0}' target='main_right' id='a{0}' class='list1' >{2}<span class='list_span'>{1}</span></a>"; string noChild = "<a href='" + path + "Papers_System_Manage.aspx?NodeID={0}' target='main_right'>{2}{1}</a>"; DataTable nodeDT = NodeBll.Sel(); nodeDT.Columns["TypeName"].ColumnName = "Name"; nodeDT.Columns["Pid"].ColumnName = "ParentID"; string head = "<ul class='tvNav'><li class='menu_tit'><span class='fa fa-chevron-down'></span>试卷管理</li>"; head += "<li><a class='list1' id='a0' href='" + path + "Papers_System_Manage.aspx' target='main_right' ><span class='list_span'>全部试卷</span><span class='fa fa-list'></span></a>"; nodeHtml.Text = head + B_Node.GetLI(nodeDT, hasChild, noChild) + "</li></ul>"; }
/// <summary> /// 创建用户的根节点,站点数据均存其下 /// </summary> public M_Node CreateUserRootNode(M_UserInfo mu) { B_Node nodeBll = new B_Node(); M_Node nodeMod = new M_Node(); nodeMod.ContentModel = "2";//内容模型 nodeMod.NodeName = mu.UserName + "的根节点"; nodeMod.NodeDir = function.GetRandomString(6).ToLower(); nodeMod.CUser = mu.UserID; nodeMod.CUName = mu.UserName; nodeMod.NodeBySite = mu.SiteID == 0 ? -1 : mu.SiteID; nodeMod.NodeType = 0;//标识自身为主栏目 nodeMod.NodeID = nodeBll.Insert(nodeMod); return(nodeMod); }
public string GetTitle(string ItemID, string NID, string Title) { string n = ""; if (DataConverter.CLng(NID) == this.NodeID) { n = "<a href=\"EditContent.aspx?GeneralID=" + ItemID + "\">" + Title + "</a>"; } else { B_Node bl = new B_Node(); n = "<a href=\"EditContent.aspx?GeneralID=" + ItemID + "\"><strong>[" + bl.GetNode(DataConverter.CLng(NID)).NodeName + "]</strong> " + Title + "</a>"; } return(n); }
//行绑定 protected void Egv_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { HiddenField hfId = e.Row.FindControl("hfId") as HiddenField; int id = DataConverter.CLng(hfId.Value); Label lblContent = e.Row.FindControl("lblContent") as Label; B_Node node = new B_Node(); M_Node no = node.GetNodeXML(id); if (no != null && no.NodeID > 0) { lblContent.Text = no.NodeName; } } }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(base.Request.QueryString["NodeID"])) { int ItemID = DataConverter.CLng(base.Request.QueryString["NodeID"]); B_Node bnode = new B_Node(); M_Node nodeinfo = bnode.GetNode(ItemID); if (nodeinfo.IsNull) { Response.Write("[产生错误的可能原因:您访问的内容信息不存在!]"); } string TemplateDir = ""; if (string.IsNullOrEmpty(nodeinfo.IndexTemplate)) { TemplateDir = nodeinfo.ListTemplateFile; } else { TemplateDir = nodeinfo.IndexTemplate; } if (string.IsNullOrEmpty(TemplateDir)) { Response.Write("[产生错误的可能原因:该节点未指定模板!]"); } else { TemplateDir = SiteConfig.SiteOption.TemplateDir + TemplateDir; int Cpage = 1; if (string.IsNullOrEmpty(base.Request.QueryString["page"])) { Cpage = 1; } else { Cpage = DataConverter.CLng(base.Request.QueryString["page"]); } TemplateDir = base.Request.PhysicalApplicationPath + TemplateDir; TemplateDir = TemplateDir.Replace("/", @"\"); string ContentHtml = this.bll.CreateHtml(FileSystemObject.ReadFile(TemplateDir), Cpage, ItemID); Response.Write(ContentHtml); } } else { Response.Write("[产生错误的可能原因:没有指定栏目ID]"); } }
protected void Page_Load(object sender, EventArgs e) { function.AccessRulo(); B_Admin badmin = new B_Admin(); if (!this.IsPostBack) { int pubid = DataConverter.CLng(Request.QueryString["Pubid"]); ViewState["pubid"] = pubid.ToString(); M_Pub pubinfo = pub.GetSelect(pubid); string prowinfo = B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList); if (!badmin.GetAdminLogin().RoleList.Contains(",1,") && !prowinfo.Contains("," + pubinfo.PubTableName + ",")) { function.WriteErrMsg("无权限管理该互动模型!!"); } string ModelID = (pubinfo.PubModelID == 0) ? "0" : pubinfo.PubModelID.ToString(); if (DataConverter.CLng(ModelID) <= 0) { function.WriteErrMsg("无模块信息"); } int ID = string.IsNullOrEmpty(Request.QueryString["ID"]) ? 0 : DataConverter.CLng(Request.QueryString["ID"]); this.HdnID.Value = ID.ToString(); string type = (Request.QueryString["type"] == null) ? "0" : Request.QueryString["type"].ToString(); M_ModelInfo model = bmodel.GetModelById(DataConverter.CLng(ModelID)); this.HdnModelID.Value = ModelID.ToString(); this.HiddenType.Value = type; this.HiddenPubid.Value = pubid.ToString(); this.ViewState["ModelID"] = ModelID.ToString(); this.ViewState["cType"] = "1"; RepNodeBind(); int nodeid = (Request.QueryString["nodeid"] == null) ? 0 : DataConverter.CLng(Request.QueryString["nodeid"]); this.HiddenNode.Value = ""; if (nodeid == 0) { Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li><li><a href='AddPub.aspx?Parentid=" + this.HdnID.Value + "&Pubid=" + this.HiddenPubid.Value + "' style='color:red;'>[添加回复]</a></li>"); } else { B_Node bbn = new B_Node(); M_Node nn = bbn.GetNodeXML(nodeid); Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li><li><a href='Pubsinfo.aspx?nodeid=" + nodeid + "&Pubid=" + this.HiddenPubid.Value + "' style='color:red;'>" + nn.NodeName + "</a></li>"); this.HiddenNode.Value = "&nodeid=" + nodeid; } //this.Label1.Text = "<a href='AddPub.aspx?Parentid=" + this.HdnID.Value + "&Pubid=" + this.HiddenPubid.Value + "'>[ 添加回复 ]</a>"; } }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(base.Request.QueryString["ItemID"])) { int ItemID = DataConverter.CLng(base.Request.QueryString["ItemID"]); B_Content bcontent = new B_Content(); B_Model bmode = new B_Model(); B_Node bnode = new B_Node(); M_CommonData ItemInfo = bcontent.GetCommonData(ItemID); if (ItemInfo.IsNull) { Response.Write("[产生错误的可能原因:您访问的内容信息不存在!]"); } M_ModelInfo modelinfo = bmode.GetModelById(ItemInfo.ModelID); string TempNode = bnode.GetModelTemplate(ItemInfo.NodeID, ItemInfo.ModelID); string TempContent = ItemInfo.Template; string TemplateDir = modelinfo.ContentModule; if (!string.IsNullOrEmpty(TempContent)) { TemplateDir = TempContent; } else { if (!string.IsNullOrEmpty(TempNode)) { TemplateDir = TempNode; } } if (string.IsNullOrEmpty(TemplateDir)) { Response.Write("[产生错误的可能原因:该内容所属模型未指定模板!]"); } else { TemplateDir = base.Request.PhysicalApplicationPath + SiteConfig.SiteOption.TemplateDir + TemplateDir; TemplateDir = TemplateDir.Replace("/", @"\"); string ContentHtml = this.bll.CreateHtml(FileSystemObject.ReadFile(TemplateDir), 0, ItemID); Response.Write(ContentHtml); } } else { Response.Write("[产生错误的可能原因:您访问的内容信息不存在!]"); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] != null && !(Request.QueryString["id"].Equals(""))) { int productId = DataConverter.CLng(Request.QueryString["id"]); if (productId == 0) { function.WriteErrMsg("参数错误"); } else { bll = new B_Product(); node = new B_Node(); pinfo = bll.GetproductByid(productId); if (pinfo != null) { int nodeId = pinfo.Nodeid; M_Node m_node = node.GetNodeXML(nodeId); NodeName.Text = m_node.NodeName; AddUser_L.Text = pinfo.AddUser; shopState.Text = pinfo.Sales == 1 ? "销售中" : "停售状态"; codes.Text = pinfo.ProClass == 1 ? "正常销售" : "特价处理"; codes.Text += pinfo.Isnew == 1 ? "|新品" : ""; codes.Text += pinfo.Ishot == 1 ? "|热销" : ""; codes.Text += pinfo.Isbest == 1 ? "|精品" : ""; ProID_L.Text = pinfo.ID.ToString(); title_T.Text = pinfo.Proname; lblCountHits.Text = pinfo.AllClickNum.ToString(); ckPrice.Text = pinfo.ShiPrice.ToString(); nowPrice.Text = pinfo.LinPrice.ToString(); B_Model m_model = new B_Model(); M_ModelInfo MM = m_model.GetModelById(pinfo.Nodeid); string bar = " <span><a href=\"ProductManage.aspx?NodeID=" + nodeId + "\">" + node.GetNodeXML(nodeId).NodeName + "</a></span>"; Call.SetBreadCrumb(Master, "<li>商城管理</li><li><a href='ProductManage.aspx'>商品管理</a></li><li>" + bar + "</li>" + "<div class='pull-right hidden-xs'><span onclick=\"opentitle('../Content/EditNode.aspx?NodeID=" + nodeId + "','配置本节点');\" class='fa fa-cog' title='配置本节点' style='cursor:pointer;margin-left:5px;'></span></div>"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { int t = DataConverter.CLng(Request.QueryString["t"]); if (t == 0) { t = 1; } B_Node bll = new B_Node(); TreeNode tmpNd; tmpNd = new TreeNode(); tmpNd.Value = "0"; tmpNd.Text = SiteConfig.SiteInfo.SiteName; tmpNd.NavigateUrl = "MyContent.aspx"; tmpNd.Target = "main_right"; tmpNd.ImageUrl = ""; tmpNd.ToolTip = "根节点"; tvNav.Nodes.Add(tmpNd); bll.InitTreeNodeUser(tmpNd.ChildNodes, 0, t); tvNav.ExpandAll(); } }
//首页 public IActionResult Default() { //M_UserInfo mu = buser.SelReturnModel(1); //buser.SetLoginState(mu); //M_AdminInfo adminMod = B_Admin.GetAdminByAdminId(1); //B_Admin.SetLoginState(HttpContext, adminMod); ////return Redirect("/Plat/Blog/Default"); //// return Redirect("/Admin/Template/LabelSql?LabelName=" + HttpUtility.UrlEncode("通用网站地图_基础子类")); //return Redirect("/Admin/Default"); if (SiteConfig.SiteInfo.IsInstalled == false) { return(RedirectToAction("Index", "Install")); } //-------------- string vpath = SiteConfig.SiteOption.TemplateDir + "/" + SiteConfig.SiteOption.IndexTemplate.TrimStart('/'); string TemplateDir = function.VToP(vpath); string fileex = B_Node.GetFileEx(DataConverter.CLng(SiteConfig.SiteOption.IndexEx)); if (FileSystemObject.IsExist(function.VToP("/index" + fileex), FsoMethod.File)) { Response.Redirect("index" + fileex); } if (!FileSystemObject.IsExist(TemplateDir, FsoMethod.File)) { return(WriteErr("[产生错误的可能原因:(" + vpath + ")不存在或未开放!]")); } else { string readfile = FileSystemObject.ReadFile(TemplateDir); string IndexHtml = bll.CreateHtml(readfile); return(HtmlToClient(IndexHtml)); } }
protected void GetPic_Btn_Click(object sender, EventArgs e) { //http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=3dc4538262d0f703e6e79dd83dca7d0b/7a899e510fb30f24f570e996c895d143ac4b03b8.jpg if (string.IsNullOrEmpty(Remote_Url.Text)) { return; } string vdir = SiteConfig.SiteOption.UploadDir; M_Node nodeMod = new B_Node().GetNodeXML(DataConverter.CLng(NodeID_Hid.Value)); vdir += nodeMod.NodeDir + "/" + DateTime.Now.ToString("yyyy/MM/"); //------------------- string[] imgurl = Remote_Url.Text.Split('\r'); string result = ""; for (int i = 0; i < imgurl.Length; i++) { string imgname = GetFNameFromUrl(imgurl[i]); if (!SafeC.IsImage(imgname)) { continue; } string url = imgurl[i].ToLower().Replace(" ", ""); if (string.IsNullOrEmpty(url) || (!url.Contains("http") && !url.Contains("https"))) { continue; } //function.WriteErrMsg("错误:" + url); string vpath = vdir + RemoveChar(imgname); try { httpHelper.DownFile(url, vpath); } catch (Exception) { }//function.WriteErrMsg("抓取失败,原因:" + ex.Message); result += vpath + "|"; } result = result.TrimEnd('|').Replace("//", "/"); Remote_Url.Text = ""; function.Script(this, "AddAttach('" + result + "');"); }
public string GetNodeType(string NodeType) { return(B_Node.GetNodeType(DataConverter.CLng(NodeType))); }
protected void BindNode() { DataTable dt = strBll.Sel(); nodeHtml.Text = "<ul class='tvNav'><li><a class='list1' id='a0' href='StructList.aspx' ><span class='list_span'>全部成员</span><span class='fa fa-list'></span></a>" + B_Node.GetLI(dt, hasChild, noChild) + "</li></ul>"; }
public ActionResult NodeTree() { string hasChild = "<a href='MyContent?NodeID={0}' id='a{0}' class='list1' target='main_right1'>{2}<span class='list_span'>{1}</span></a>"; string noChild = "<a href='MyContent?NodeID={0}' target='main_right1'>{2}{1}</a>"; M_PageReg regMod = regBll.SelModelByUid(mu.UserID); DataTable nodeDT = tempBll.Sel(mu.UserID, true); nodeDT.DefaultView.RowFilter = "NodeType IN (0,1)"; nodeDT = nodeDT.DefaultView.ToTable(); ViewBag.NodeHtml = "<ul class='tvNav'><li><a class='list1' id='a0' href='MyContent' target='main_right1'><span class='list_span'>全部内容</span><span class='zi zi_list'></span></a>" + B_Node.GetLI(nodeDT, hasChild, noChild) + "</li></ul>"; return(View()); }
/// <summary> /// 获取用户的根节点 /// </summary> public M_Node GetUserRootNode(M_UserInfo mu) { B_Node nodeBll = new B_Node(); return(nodeBll.SelModelByWhere("CUser="******" AND NodeType=0", null)); }
//----------Logical ////用户无微站信息,则自动创建 //public M_Design_MBSite AutoCreate(M_UserInfo mu) //{ // if (mu == null || mu.IsNull) { return null; } // if (DBCenter.IsExist(TbName, "UserID=" + mu.UserID)) { return null; } // M_Design_MBSite mbMod = new M_Design_MBSite(); // mbMod.UserID = mu.UserID; // mbMod.TlpID = 1; // mbMod.SiteID = mu.SiteID; // mbMod.ID = Insert(mbMod); // return mbMod; //} /// <summary> /// 根据用户与模板信息,创建站点 /// </summary> public M_Design_MBSite CreateSite(M_UserInfo mu, M_Design_MBSite mbMod, out string err) { B_Design_Node desNodeBll = new B_Design_Node(); B_Node nodeBll = new B_Node(); B_Product proBll = new B_Product(); //int mbsitecount = SiteConfig.SiteOption.DN_MBSiteCount; int mbsitecount = 10000;//取消数量限制 if (mu == null || mu.IsNull) { err = "用户不存在"; return(null); } else if (mbMod.TlpID < 1 || mbMod.TlpID > 8) { err = "未指定模板或模板[" + mbMod.TlpID + "]不存在"; return(null); } else if (GetSiteCount(mu.UserID) >= mbsitecount) { err = "用户只能创建" + mbsitecount + "个微站"; return(null); } if (string.IsNullOrEmpty(mbMod.SiteName)) { mbMod.SiteName = B_User.GetUserName(mu.HoneyName, mu.UserName) + "的微站" + DBCenter.Count(TbName, "UserID=" + mu.UserID) + 1; } mbMod.UserID = mu.UserID; mbMod.ID = Insert(mbMod); //-----建立微站节点信息,从指定的模板处拷节点数据,父节点需要自建 M_Node pnode = desNodeBll.GetUserRootNode(mu); if (pnode.IsNull) { pnode = desNodeBll.CreateUserRootNode(mu); } M_Node nodeMod = new M_Node(); nodeMod.NodeName = "微建站"; nodeMod.NodeDir = function.GetRandomString(6); nodeMod.CUser = mu.UserID; nodeMod.CUName = mu.UserName; nodeMod.NodeBySite = mbMod.ID; nodeMod.NodeType = 1;//标识自身为主栏目 nodeMod.ParentID = pnode.NodeID; nodeMod.NodeID = nodeBll.Insert(nodeMod); //---导入对应的模板节点数据 string nodename = "微建站" + mbMod.TlpID; DataTable nodeDT = SelNodeByPName(nodename); CopyNodeAndContent(nodeDT, nodeMod); //---如果有商品数据,则导入商品 DataTable proDT = SelProByPName(nodename); foreach (DataRow dr in proDT.Rows) { M_Product proMod = new M_Product().GetModelFromReader(dr); proMod.ID = 0; proMod.ParentID = mbMod.ID;//所属哪个站点 proMod.UserID = mu.UserID; proMod.AddUser = mu.UserName; proMod.Nodeid = UserShopNodeID; proMod.AddTime = DateTime.Now; proMod.UpdateTime = DateTime.Now; proBll.Insert(proMod); } err = ""; return(mbMod); }
/// <summary> /// [main] /// </summary> public PageSetting SelPage(int cpage, int psize, Filter_Product filter) { string where = "1=1 "; List <SqlParameter> sp = new List <SqlParameter>(); if (filter.NodeID > 0) { string nids = new B_Node().GetChilds(filter.NodeID); //where += " AND (A.NodeID=" + filter.NodeID + " OR A.FirstNodeID=" + filter.NodeID + ")"; where += " AND A.NodeID IN (" + nids + ")"; } if (!string.IsNullOrEmpty(filter.NodeIDS)) { SafeSC.CheckIDSEx(filter.NodeIDS); where += " AND A.NodeID IN (" + filter.NodeIDS + ")"; } //组合|单品 if (filter.pclass != -100) { where += "AND [Class]=" + filter.pclass; } //商品分类 if (!string.IsNullOrEmpty(filter.proclass)) { SafeSC.CheckIDSEx(filter.proclass); where += " AND A.ProClass IN (" + filter.proclass + ")"; } if (filter.hasRecycle != -100) { where += " AND Recycler=" + filter.hasRecycle; } if (filter.istrue != -100) { where += " AND IsTrue=" + filter.istrue; } if (filter.issale != -100) { where += " AND Sales=" + filter.issale; } //搜索,支持指定条件 //if (!string.IsNullOrEmpty(filter.skey)) //{ // if (string.IsNullOrEmpty(filter.stype)) { filter.stype = "proname"; } // sp.Add(new SqlParameter("skey", "%" + filter.skey + "%")); // int sid = DataConverter.CLng(filter.skey); // switch (filter.stype.ToLower()) // { // case "id": where += " AND A.ID=" + sid; break; // case "proname": where += " AND A.Proname LIKE @skey"; break; // case "id_proname": where += " AND (A.ID=" + sid + " OR A.ProName LIKE @skey)"; break; // case "adduser": where += " AND A.AddUser LIKE @skey"; break; // case "storeid": filter.storeid = sid; break; // } //} if (!string.IsNullOrEmpty(filter.proname)) { sp.Add(new SqlParameter("proname", "%" + filter.proname + "%")); where += " AND A.Proname LIKE @proname"; } if (!string.IsNullOrEmpty(filter.adduser)) { sp.Add(new SqlParameter("adduser", "%" + filter.adduser + "%")); where += " AND A.AddUser LIKE @adduser"; } if (filter.special > 0) { where += " AND SpecialID LIKE '%," + filter.special + ",%'"; } //快速筛选 where += GetWhereByType(filter.type); if (filter.storeid == 0) { where += " AND (A.UserShopID=0 OR A.UserShopID IS NULL)"; } //仅商城 else if (filter.storeid > 0) { where += " AND A.UserShopID=" + filter.storeid; } //指定店铺 else if (filter.storeid == -1) { where += " AND A.UserShopID>0"; } //仅店铺 else if (filter.storeid == -100) { } //全部 string orderBy = StrHelper.SQL_OrderBy(filter.orderBy, "id,linprice", "A.OrderId DESC,A.ID DESC"); PageSetting setting = new PageSetting() { cpage = cpage, psize = psize, fields = "A.*,B.NodeName,(SELECT Title FROM ZL_CommonModel WHERE GeneralID=A.UserShopID) StoreName", t1 = TbName, t2 = "ZL_Node", on = "A.NodeID=B.NodeID", where = where, order = orderBy, spList = sp }; DBCenter.SelPage(setting); return(setting); }
/// <summary> /// 添加节点数据进表,再依表生成xml /// 注意:必须将NodeID设为可插入值的状态,并且修改PK /// </summary> public void CopyNodes(DataTable dt) { B_Node bll = new B_Node();//需先关闭主键,与M_Node中主键标识 foreach (DataRow dr in dt.Rows) { //DataTable NodeName, NodeDir; //NodeName = bll.GetNodeForNodeName(TxtNodeName.Text, DataConverter.CLng(HdnDepth.Value), DataConverter.CLng(Request.QueryString["ParentID"])); //NodeDir = bll.GetNodeForDirname(TxtNodeDir.Text, DataConverter.CLng(HdnDepth.Value), DataConverter.CLng(Request.QueryString["ParentID"])); //HttpResponse.RemoveOutputCacheItem(customPath2 + "Content/NodeTree.aspx"); //if (NodeName.Rows.Count > 0 || NodeDir.Rows.Count > 0) { function.Script(this, "alert('发现同栏目下栏目名或标识名重复,请点击确定重新添加节点');"); return; } /*-------------------------------------------------------------------------------------------------*/ M_Node node = new M_Node(); node.NodeID = Convert.ToInt32(dr["NodeID"]); node.NodeName = dr["NodeName"].ToString(); node.NodeType = 1; node.NodePic = ""; node.NodeDir = PinYin.GetFirstPinYin(node.NodeName); node.ParentID = DataConvert.CLng(dr["ParentID"]); node.Depth = node.ParentID == 0 ? 2 : 1;//后期更新下深度 node.NodeUrl = ""; node.OrderID = 1; node.Tips = ""; node.Description = ""; node.Meta_Keywords = ""; node.Meta_Description = ""; node.OpenNew = false; node.ItemOpenType = false; node.PurviewType = false; node.CommentType = "1"; node.HitsOfHot = 0; node.Viewinglimit = ""; node.ConsumePoint = 0; node.ConsumeType = 0; node.ConsumeTime = 0; node.ConsumeCount = 0; node.Shares = 0; node.OpenTypeTrue = "0"; node.ItemOpenTypeTrue = "0"; node.Custom = ""; node.NodeListUrl = ""; node.SiteConfige = ""; ///////////////////////////////////////////////////// node.NodeListType = 1; node.ListPageHtmlEx = 3; node.ContentFileEx = 3; node.ListPageEx = 3; node.LastinfoPageEx = 3; node.HotinfoPageEx = 3; node.ProposePageEx = 3; node.SafeGuard = 0; node.ContentPageHtmlRule = 2; node.HtmlPosition = 1; node.Contribute = 0; node.SiteContentAudit = 99; node.Purview = "<View>allUser</View><ViewGroup>-1,1,2</ViewGroup><ViewSunGroup>-1,1,2</ViewSunGroup><input>-1,1,2</input><forum>1,2</forum>"; node.PK = ""; DBCenter.Insert(node); } }
public void PageContent() { if (ItemID < 1) { RepToClient("[产生错误的可能原因:您访问的内容信息不存在!访问规则:PageContent?ItemID=信息ID]"); return; } B_Model bmode = new B_Model(); B_Node bnode = new B_Node(); M_CommonData ItemInfo = conBll.GetCommonData(ItemID); if (ItemInfo.IsNull) { RepToClient("[产生错误的可能原因:内容信息不存在或未开放!]"); return; } M_ModelInfo modelinfo = bmode.GetModelById(ItemInfo.ModelID); M_Templata Nodeinfo = tll.Getbyid(ItemInfo.NodeID); string TemplateDir = GetTempPath(ItemInfo, Nodeinfo, pageID); if (string.IsNullOrEmpty(TemplateDir)) { RepToClient("[产生错误的可能原因:该内容所属模型未指定模板!]"); return; } else { int Cpage = 1; if (string.IsNullOrEmpty(base.Request.QueryString["p"])) { Cpage = 1; } else { Cpage = DataConverter.CLng(base.Request.QueryString["p"]); } string ContentHtml = ""; try { ContentHtml = FileSystemObject.ReadFile(TemplateDir); } catch { RepToClient("[产生错误的可能原因:该内容所属模型未指定模板!]"); return; } ContentHtml = this.createBll.CreateHtml(ContentHtml, Cpage, ItemID, 0); /* --------------------判断是否分页 并做处理------------------------------------------------*/ if (!string.IsNullOrEmpty(ContentHtml)) { string infoContent = ""; //进行处理的内容字段 string pagelabel = ""; string infotmp = ""; #region 分页符分页 string pattern = @"{\#PageCode}([\s\S])*?{\/\#PageCode}"; //查找要分页的内容 if (Regex.IsMatch(ContentHtml, pattern, RegexOptions.IgnoreCase)) { infoContent = Regex.Match(ContentHtml, pattern, RegexOptions.IgnoreCase).Value; infotmp = infoContent; infoContent = infoContent.Replace("{#PageCode}", "").Replace("{/#PageCode}", ""); //查找分页标签 //bool flag = false; bool isPage = false; string pattern1 = @"{ZL\.Page([\s\S])*?\/}"; if (Regex.IsMatch(ContentHtml, pattern1, RegexOptions.IgnoreCase)) { pagelabel = Regex.Match(ContentHtml, pattern1, RegexOptions.IgnoreCase).Value; isPage = true; } if (isPage) { if (string.IsNullOrEmpty(infoContent)) //没有设定要分页的字段内容 { ContentHtml = ContentHtml.Replace(pagelabel, ""); } else //进行内容分页处理 { //取分页标签处理结果 返回字符串数组 根据数组元素个数生成几页 string ilbl = pagelabel.Replace("{ZL.Page ", "").Replace("/}", "").Replace(" ", ","); string lblContent = ""; IList <string> ContentArr = new List <string>(); if (string.IsNullOrEmpty(ilbl)) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 ContentArr = this.createBll.GetContentPage(infoContent); } else { string[] paArr = ilbl.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (paArr.Length == 0) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 ContentArr = this.createBll.GetContentPage(infoContent); } else { string lblname = paArr[0].Split(new char[] { '=' })[1].Replace("\"", ""); B_Label blbl = new B_Label(); lblContent = blbl.GetLabelXML(lblname).Content; if (string.IsNullOrEmpty(lblContent)) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 } ContentArr = this.createBll.GetContentPage(infoContent); } } if (ContentArr.Count > 0) //存在分页数据 { ContentHtml = ContentHtml.Replace(infotmp, ContentArr[CPage - 1]); ContentHtml = ContentHtml.Replace(pagelabel, this.createBll.GetPage(lblContent, ItemID, CPage, ContentArr.Count, ContentArr.Count)); } else { ContentHtml = ContentHtml.Replace(infotmp, infoContent); ContentHtml = ContentHtml.Replace(pagelabel, ""); } } } else //没有分页标签 { //如果设定了分页内容字段 将该字段内容的分页标志清除 if (!string.IsNullOrEmpty(infoContent)) { ContentHtml = ContentHtml.Replace(infotmp, infoContent); } } } #endregion pattern = @"{\#Content}([\s\S])*?{\/\#Content}"; //查找要分页的内容 if (Regex.IsMatch(ContentHtml, pattern, RegexOptions.IgnoreCase)) { infoContent = Regex.Match(ContentHtml, pattern, RegexOptions.IgnoreCase).Value; infotmp = infoContent; infoContent = infoContent.Replace("{#Content}", "").Replace("{/#Content}", ""); //查找分页标签 //bool flag = false; bool isPage = false; string pattern1 = @"{ZL\.Page([\s\S])*?\/}"; if (Regex.IsMatch(ContentHtml, pattern1, RegexOptions.IgnoreCase)) { pagelabel = Regex.Match(ContentHtml, pattern1, RegexOptions.IgnoreCase).Value; isPage = true; } if (isPage) { if (string.IsNullOrEmpty(infoContent)) //没有设定要分页的字段内容 { ContentHtml = ContentHtml.Replace(pagelabel, ""); } else //进行内容分页处理 { //取分页标签处理结果 返回字符串数组 根据数组元素个数生成几页 string ilbl = pagelabel.Replace("{ZL.Page ", "").Replace("/}", "").Replace(" ", ","); string lblContent = ""; int NumPerPage = 500; IList <string> ContentArr = new List <string>(); if (string.IsNullOrEmpty(ilbl)) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 ContentArr = this.createBll.GetContentPage(infoContent, NumPerPage); } else { string[] paArr = ilbl.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (paArr.Length == 0) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 ContentArr = this.createBll.GetContentPage(infoContent, NumPerPage); } else { string lblname = paArr[0].Split(new char[] { '=' })[1].Replace("\"", ""); if (paArr.Length > 1) { NumPerPage = DataConverter.CLng(paArr[1].Split(new char[] { '=' })[1].Replace("\"", "")); } B_Label blbl = new B_Label(); lblContent = blbl.GetLabelXML(lblname).Content; if (string.IsNullOrEmpty(lblContent)) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 } ContentArr = this.createBll.GetContentPage(infoContent, NumPerPage); } } if (ContentArr.Count > 0) //存在分页数据 { ContentHtml = ContentHtml.Replace(infotmp, ContentArr[Cpage - 1]); ContentHtml = ContentHtml.Replace(pagelabel, this.createBll.GetPage(lblContent, ItemID, CPage, ContentArr.Count, NumPerPage)); } else { ContentHtml = ContentHtml.Replace(infotmp, infoContent); ContentHtml = ContentHtml.Replace(pagelabel, ""); } } } else //没有分页标签 { //如果设定了分页内容字段 将该字段内容的分页标志清除 if (!string.IsNullOrEmpty(infoContent)) { ContentHtml = ContentHtml.Replace(infotmp, infoContent); } } } } string patterns = @"{ZL\.Page([\s\S])*?\/}"; string pagelabels = Regex.Match(ContentHtml, patterns, RegexOptions.IgnoreCase).Value; if (pagelabels != "") { ContentHtml = ContentHtml.Replace(pagelabels, ""); } /*--------------------- 分页内容处理结束-------------------------------------------------------------------------*/ Response.Write(ContentHtml); } }
protected void Page_Load(object sender, EventArgs e) { string prodirName = Request.QueryString["prodirName"]; if (prodirName != null) { Page.ClientScript.RegisterStartupScript(GetType(), "", "showconfig('1');", true); } if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "SiteConfig")) { function.WriteErrMsg("没有权限进行此项操作"); } if (!IsPostBack) { B_Node nll = new B_Node(); txtStylePath.Text = SiteConfig.SiteOption.StylePath; txtAdvertisementDir.Text = SiteConfig.SiteOption.AdvertisementDir; languages.SelectedValue = SiteConfig.SiteOption.Language; TraditionalChinese.SelectedValue = System.Configuration.ConfigurationManager.AppSettings["TraditionalChinese"]; //rblManage.SelectedValue = SiteConfig.SiteOption.SiteManageMode + ""; EnableSiteManageCod.Checked = SiteConfig.SiteOption.EnableSiteManageCode; EnableSoftKey.Checked = SiteConfig.SiteOption.EnableSoftKey; EnableUploadFiles.Checked = SiteConfig.SiteOption.EnableUploadFiles; if (SiteConfig.SiteOption.IsAbsoluatePath) { rdoIapTrue.Checked = true; } else { rdoIapFalse.Checked = true; } rdoBtnLSh.Checked = SiteConfig.SiteOption.RegPageStart; if (SiteConfig.SiteOption.IsOpenHelp == "0") { DeleteLocal.Text = "同时删除本地帮助文件"; PromptHelp.Visible = false; } else { DeleteLocal.Text = "从云端下载帮助文件放到Manage/help下"; PromptHelp.Visible = true; } MailPermission.Checked = SiteConfig.SiteOption.MailPermission == "1"?true:false; FileN.Items[Convert.ToInt32(SiteConfig.SiteOption.FileN)].Selected = true; //个人空间设置 IsZone.Checked = SiteConfig.SiteOption.IsZone; //云盘权限 for (int i = 0; i < cloud_ChkList.Items.Count && !string.IsNullOrEmpty(SiteConfig.SiteOption.Cloud_Auth); i++) { cloud_ChkList.Items[i].Selected = SiteConfig.SiteOption.Cloud_Auth.Contains(cloud_ChkList.Items[i].Value); } //多用户网店 IsMall.Checked = SiteConfig.SiteOption.IsMall; //是否开启短信 OpenSendMessage.Checked = SiteConfig.SiteOption.OpenSendMessage; cloudLeadTips.Checked = SiteConfig.SiteOption.CloudLeadTips == "1" ? true : false; //短消息提示 //SMSTips.Checked=SiteConfig.SiteOption.SMSTips; //快递跟踪,订单提醒 if (SiteConfig.SiteOption.KDAPI == 0) { RB_switch.Checked = false; } else { RB_switch.Checked = true; Api.Style.Add("display", "block"); } TB_Api.Text = SiteConfig.SiteOption.KDKey; SetCheckVal(OrderMsg_Chk, SiteConfig.SiteOption.OrderMsg_Chk); SetCheckVal(OrderMasterMsg_Chk, SiteConfig.SiteOption.OrderMasterMsg_Chk); SetCheckVal(OrderMasterEmail_Chk, SiteConfig.SiteOption.OrderMasterEmail_Chk); ReturnDate_T.Text = SiteConfig.SiteOption.THDate.ToString(); OrderMsg_ordered_T.Text = SetJsonVal(SiteConfig.SiteOption.OrderMsg_Tlp, "ordered"); OrderMsg_payed_T.Text = SetJsonVal(SiteConfig.SiteOption.OrderMsg_Tlp, "payed"); OrderMasterMsg_ordered_Tlp.Text = SetJsonVal(SiteConfig.SiteOption.OrderMasterMsg_Tlp, "ordered"); OrderMasterMsg_payed_Tlp.Text = SetJsonVal(SiteConfig.SiteOption.OrderMasterMsg_Tlp, "payed"); OrderMasterEmail_ordered_Tlp.Text = SetJsonVal(SiteConfig.SiteOption.OrderMasterEmail_Tlp, "ordered"); OrderMasterEmail_payed_Tlp.Text = SetJsonVal(SiteConfig.SiteOption.OrderMasterEmail_Tlp, "payed"); /*-------------------------------------------------------*/ EditVer.SelectedValue = SiteConfig.SiteOption.EditVer; //freedomain.Text = SiteConfig.SiteOption.freedomain; OpenLog.Checked = SiteConfig.SiteOption.OpenLog == "1"?true:false; //Savadaylog.Text = SiteConfig.SiteOption.Savadaylog; //Savanumlog.Text = SiteConfig.SiteOption.Savanumlog; IndexEx.Text = SiteConfig.SiteOption.IndexEx; SiteCollKey_T.Text = SiteConfig.SiteOption.SiteCollKey; PayType_Hid.Value = SiteConfig.SiteOption.SiteID; //IsManageReg.Checked = SiteConfig.SiteOption.RegManager == 1; //safeDomainT.Text = SiteConfig.SiteOption.SafeDomain; txtSiteManageCode.Text = SiteConfig.SiteOption.SiteManageCode; if (prodirName != null) { //Text = "/Template/" + prodirName; txtCssDir.Text = "/Template/" + prodirName + "/style"; } else { DataTable Dfileinfo = FileSystemObject.GetDirectorySmall(function.VToP("/Template/")); for (int i = 0; i < Dfileinfo.Rows.Count; i++) { ListItem li = new ListItem("/Template/" + Dfileinfo.Rows[i]["name"]); if (li.Text.Equals(SiteConfig.SiteOption.TemplateDir)) { li.Selected = true; } DropTemplateDir.Items.Add(li); } //txtTemplateDir.Text = SiteConfig.SiteOption.TemplateDir; txtCssDir.Text = SiteConfig.SiteOption.CssDir; } if (!string.IsNullOrEmpty(SiteConfig.SiteOption.TemplateDir)) { BindDP(SiteConfig.SiteOption.TemplateDir); IndexTemplate_DP.SelectedValue = SiteConfig.SiteOption.IndexTemplate; } txtProjectServer.Text = SiteConfig.SiteOption.ProjectServer.Trim(); txtCatalog.Text = SiteConfig.SiteOption.GeneratedDirectory; txtPdf.Text = SiteConfig.SiteOption.PdfDirectory;//生成PDF目录 ShopTemplate_DP.SelectedValue = SiteConfig.SiteOption.ShopTemplate; txtUploadDir.Text = SiteConfig.SiteOption.UploadDir; txtUploadFileExts.Text = SiteConfig.SiteOption.UploadFileExts; txtUploadFileMaxSize.Text = webhelper.GetMaxFile(); TxtUpPicExt.Text = SiteConfig.SiteOption.UploadPicExts; TxtUpPicSize.Text = SiteConfig.SiteOption.UploadPicMaxSize.ToString(); TxtUpMediaExt.Text = SiteConfig.SiteOption.UploadMdaExts; TxtUpMediaSize.Text = SiteConfig.SiteOption.UploadMdaMaxSize.ToString(); TxtUpFlashSize.Text = SiteConfig.SiteOption.UploadFlhMaxSize.ToString(); TxtSensitivity.Text = SiteConfig.SiteOption.Sensitivity; //短消息提示 if (SiteConfig.SiteOption.UAgent) { UAgent.Checked = true; uaMag.Visible = true; } else { UAgent.Checked = false; uaMag.Visible = false; } OpenMessage.Checked = SiteConfig.SiteOption.OpenMessage == 1?true:false; //标题查重 IsRepet.Checked = SiteConfig.SiteOption.FileRj == 1 ? true : false; DupTitleNum_T.Text = SiteConfig.SiteOption.DupTitleNum.ToString(); rdoIsSensitivity.Checked = SiteConfig.SiteOption.IsSensitivity == 1?true:false; OpenAudit.Checked = SiteConfig.SiteOption.OpenAudit == 1 ? true : false; //商城配置 OpenMoneySel_Chk.Checked = SiteConfig.SiteOption.OpenMoneySel; IsCheckPay.Checked = SiteConfig.ShopConfig.IsCheckPay == 1; //txtSetPrice.Text = SiteConfig.ShopConfig.OrderNum.ToString(); ItemRegular_T.Text = SiteConfig.ShopConfig.ItemRegular; OrderExpired_T.Text = SiteConfig.ShopConfig.OrderExpired.ToString(); Videourl.Text = SiteConfig.SiteOption.Videourl; FlexKey.Text = SiteConfig.SiteOption.FlexKey; APPAuth_T.Text = SiteConfig.SiteOption.WxAppID; MastMoney.Text = SiteConfig.SiteOption.MastMoney.ToString("F2"); DeleteLocal.Checked = SiteConfig.SiteOption.DeleteLocal; IsOpenHelp.Checked = SiteConfig.SiteOption.IsOpenHelp == "1"?true:false; CommentRule.Text = SiteConfig.UserConfig.CommentRule.ToString(); // Getgooglemap(); Call.SetBreadCrumb(Master, "<li><a href='SiteInfo.aspx'>系统设置</a></li><li><a href='SiteInfo.aspx'>网站配置</a></li><li class=\"active\"><a href='SiteOption.aspx'>网站参数配置</a></li>" + Call.GetHelp(3)); } }
protected void Page_Load(object sender, EventArgs e) { hasChild = "{2}<label><input name='nodeChk' type='checkbox' data-name='{1}' value='{0}' onclick='ChkChild(this);'><i class='fa fa-folder' style='color:#337AB7'></i></label><a href='javascript:;' id='a{0}' class='list1' onclick='ShowChild();'><span class='list_span'>{1}</span></a>"; noChild = "{2}<label><input name='nodeChk' type='checkbox' data-name='{1}' value='{0}'><i class='fa fa-file-text' style='color:#337AB7'></i></label><a href='javascript:;'>{1}</a>"; DataTable dt = strBll.Sel(); NodeHtml_Lit.Text = "<ul class='tvNav list-unstyled'><li><input id='AllCheck' type='checkbox' onclick='checkAll()'><a class='list1' id='a0' href='javascript:;' ><span class='fa fa-list'></span><span class='list_span'>全部部门</span></a>" + B_Node.GetLI(dt, hasChild, noChild) + "</li></ul>"; }
public ActionResult NodeTree() { string hasChild = "<a href='MyContent?NodeID={0}' id='a{0}' class='list1' target='main_right1'>{2}<span class='list_span'>{1}</span></a>"; string noChild = "<a href='MyContent?NodeID={0}' target='main_right1'>{2}{1}</a>"; M_PageReg regMod = prBll.SelModelByUid(mu.UserID); DataTable nodeDT = tempBll.SelByStyleAndPid(regMod.NodeStyle); ViewBag.NodeHtml = "<ul class='tvNav'><li><a class='list1' id='a0' href='javascript:;' ><span class='list_span'>全部节点</span><span class='fa fa-list'></span></a>" + B_Node.GetLI(nodeDT, hasChild, noChild) + "</li></ul>"; return(View()); }