<%@ WebHandler Language="C#" Class="loadmenus" %> using System; using System.Web; using System.Text; using System.IO; using eMIS.Data; using System.Data; using System.Web.SessionState; using System.Configuration; using eMIS; public class loadmenus : IHttpHandler, IRequiresSessionState { public void ProcessRequest(HttpContext context) { if (context.Session["userid"] == null) { context.Response.Write("会话丢失!"); context.Response.End(); } DataManager dm = new DataManager(); string userId = context.Session["userid"].ToString(); string parentId = context.Request.QueryString["ParentID"].ToString(); string wwwroot = context.Request.ApplicationPath; string ui = ConfigurationManager.AppSettings["ui"].ToString(); if (wwwroot == "/") wwwroot = ""; string imgpath = wwwroot + "/UI/"+ui+"/common"; string html = ""; string sql = ""; DataTable dt = null; int i,l; string menuId,menuDesc; bool isParent,isLast; int isDisabled; string img1,img2,img3; if (parentId==ConfigurationManager.AppSettings["RootMenuID"].ToString()) { html += ""; html += ""; html += ""; html += ""; } //l = dt.Rows.Count; //for(i=0;i"; html += ""; html += ""; if (isParent) { html += ""; } } html += "
"; html += "
"; html += "收藏菜单"; html += "
"; html += "
"; if (isParent) html += "" + menuDesc + ""; else html += "" + menuDesc + ""; //ddm_open_item('" + desc + "','" + id + "','" + target+"'); html += "
"; context.Response.Write(html); } private string GetItemValue(string itemsString,string itemName) { int i = itemsString.IndexOf("\"" + itemName + "\" : \"") + itemName.Length + 6; int j = itemsString.IndexOf("\"",i); return itemsString.Substring(i, j - i); } public bool IsReusable { get { return false; } } }