public void Template() { string action = System.Web.HttpContext.Current.Request["action"]; if (action == "help") { string fileName = String.Concat(Cms.PyhicPath, CmsVariables.TEMP_PATH, "tpl_lang_guid.xml"); AutoObjectXml obj = new AutoObjectXml(fileName); obj.InsertFromType(typeof(CmsTemplateImpl), false); obj.Flush(); var rsp = System.Web.HttpContext.Current.Response; rsp.Write(XmlObjectDoc.DocStyleSheet); int tmpInt = 0; foreach (XmlObject _obj in obj.GetObjects()) { rsp.Write(XmlObjectDoc.GetGrid(_obj, ++tmpInt)); } } else { TemplateUtility.PrintTemplatesInfo(); } }
public void Template() { string action = HttpHosting.Context.Request.GetParameter("action"); if (action == "help") { string fileName = String.Concat(Cms.PhysicPath, CmsVariables.TEMP_PATH, "tpl_lang_guid.xml"); AutoObjectXml obj = new AutoObjectXml(fileName); obj.InsertFromType(typeof(CmsTemplateImpl), false); obj.Flush(); var rsp = HttpHosting.Context.Response; rsp.WriteAsync(XmlObjectDoc.DocStyleSheet); int tmpInt = 0; foreach (XmlObject _obj in obj.GetObjects()) { rsp.WriteAsync(XmlObjectDoc.GetGrid(_obj, ++tmpInt)); } } else { HttpHosting.Context.Response.WriteAsync(TemplateUtility.GetTemplatePagesHTML()); } }
/// <summary> /// 获取插件Json数据 /// </summary> public void GetPluginsJson_Post() { string jsonStr = ""; AutoObjectXml xml = new AutoObjectXml( String.Concat(Cms.PyhicPath, CmsVariables.PLUGIN_META_FILE)); XmlObject json = xml.GetObject("plugin_json_data"); if (json == null) { jsonStr = XmlObject.ToJson(xml.GetObjects()); xml.InsertObjectNode("plugin_json_data", "插件Json数据", jsonStr); xml.Flush(); } else { jsonStr = json.Descript; } base.Response.Write(jsonStr); }
/// <summary> /// 获取插件Json数据 /// </summary> public void GetPluginsJson_Post() { string jsonStr=""; AutoObjectXml xml=new AutoObjectXml( String.Concat(Cms.PyhicPath, CmsVariables.Plugin_META_FILE)); XmlObject json=xml.GetObject("plugin_json_data"); if(json==null) { jsonStr=XmlObject.ToJson(xml.GetObjects()); xml.InsertObjectNode("plugin_json_data","插件Json数据",jsonStr); xml.Flush(); } else { jsonStr=json.Descript; } base.Response.Write(jsonStr); }
public void Template() { string action = System.Web.HttpContext.Current.Request["action"]; if (action == "help") { string fileName = String.Concat(AtNet.Cms.Cms.PyhicPath, CmsVariables.TEMP_PATH, "tpl_lang_guid.xml"); AutoObjectXml obj = new AutoObjectXml(fileName); obj.InsertFromType(typeof(CmsTemplates), false); obj.Flush(); var rsp = System.Web.HttpContext.Current.Response; rsp.Write(XmlObjectDoc.DocStyleSheet); int tmpInt = 0; foreach (XmlObject _obj in obj.GetObjects()) { rsp.Write(XmlObjectDoc.GetGrid(_obj, ++tmpInt)); } } else { TemplateUtility.PrintTemplatesInfo(); } }