managerbody.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:22k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" CodeBehind="managerbody.aspx.cs" Inherits="Discuz.Web.Admin.managerbody" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6.     <title> ASP.net|论坛 管理后台 - Discuz!NT - Powered by Discuz! NT</title>
  7.     <meta name="keywords" content="ASP.net,论坛" />
  8.     <meta name="description" content="Discuz!NT,论坛,asp.net" />
  9.     <link href="../styles/dntmanager.css" rel="stylesheet" type="text/css" />
  10.     <link href="../styles/modelpopup.css" rel="stylesheet" type="text/css" />
  11.     <link href="../styles/nav.css" rel="stylesheet" type="text/css" />
  12.     <script type="text/javascript" src="../js/modalpopup.js"></script>
  13.     <script type="text/javascript" id="jsfile" src="../xml/navmenu.js"></script>
  14.     <script type="text/javascript">var imgpath='../images/';var expandall=false;</script>
  15.     <script type="text/javascript" src="../js/Navbar.js"></script>    
  16. <script type="text/javascript" src="../../javascript/common.js"></script>
  17. <script type="text/javascript" src="../js/AjaxHelper.js"></script>
  18.     <script type="text/javascript" src="../js/common.js"></script>
  19. <script type="text/javascript">
  20.         function window_load(){loadMainFrame();}
  21. function getParam(paramName)
  22. {
  23.     var paramList = location.search.replace("?","").split("&");
  24.     for(var i = 0 ; i < paramList.length ; i++)
  25.     {
  26.         if(paramList[i].split("=")[0] == paramName)
  27.             return paramList[i].substring(paramList[i].indexOf("=") + 1,paramList[i].length);
  28.     }
  29.     return "";
  30. }
  31. function resizediv_onClick()
  32. {
  33. if ($("resizediv").className == "collapse")
  34. {
  35. top.document.getElementsByTagName('FRAMESET')[1].cols = "7,*";
  36. $("resizediv").className = "expand";
  37. }
  38. else
  39. {
  40. top.document.getElementsByTagName('FRAMESET')[1].cols = "150,*";
  41. $("resizediv").className = "collapse";
  42. }
  43. }
  44. function SetMenuItemFocus(obj)
  45. {
  46.     menuitemcollection = document.getElementsByName("menuitem")
  47.     for(i = 0; i < menuitemcollection.length; i++)
  48.     {
  49.         menuitemcollection[i].className = "";
  50.     }
  51.     obj.className = "currentitem";
  52. }
  53.         var toptabmenuid = getParam("toptabmenuid");
  54.         if(toptabmenuid!="")
  55.         {
  56.            document.write("<body class="NtTab" + (toptabmenuid % 7) + "" onload="window_load();">");
  57.         }
  58.         else
  59.         {
  60.            document.write("<body class="NtTab1" onload="window_load();">"); 
  61.         }
  62.         
  63.         function setshorcutmenu(setoption)
  64.         {
  65.            $('shortcutmenu').style.display=setoption;   
  66.         }
  67.         
  68.         function LoadJs()
  69.         {
  70.             var e = document.getElementById("jsfile"); if(e) e.parentNode.removeChild(e);
  71.             var script = document.createElement("SCRIPT"); script.defer = true;
  72.             script.type = "text/javascript"; script.src = "../xml/navmenu.js?r=" + Math.random(); script.id = "jsfile";
  73.             document.getElementsByTagName("HEAD")[0].appendChild(script);
  74.         }
  75.         
  76.         function ShortcutMenuContent()
  77.         {
  78.             var shortcutmenustr = "";
  79.             for(var i = 0 ; i < shortcut.length ; i++)
  80.             {
  81.                 shortcutmenustr += "<dt><a href='#' onclick="resetindexmenu('" + shortcut[i]["showmenuid"] + "','";
  82.                 shortcutmenustr += shortcut[i]["toptabmenuid"] + "','" + shortcut[i]["mainmenulist"];
  83.                 shortcutmenustr += "','" + shortcut[i]["link"] + "');">";
  84.                 shortcutmenustr += shortcut[i]["menutitle"] + "</a></dt>";
  85.             }
  86.             if (shortcutmenustr != "")
  87.                 shortcutmenustr += "<hr class='line' />";
  88.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:top.location.href='../../index.aspx';" onfocus="this.blur();">返回前台</a></dd>';
  89.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/shortcut.aspx';" onfocus="this.blur();" >常用操作</a></dd>';
  90.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/systeminf.aspx';" onfocus="this.blur();" >系统信息</a></dd>';
  91.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/setting.aspx';" onfocus="this.blur();" >快速设置向导</a></dd>';
  92.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/likesetting.aspx';" onfocus="this.blur();" >个人喜好设置</a></dd>';
  93.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/managemainmenu.aspx';" onfocus="this.blur();" >管理功能菜单</a></dd>';
  94.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/manageshortcutmenu.aspx';" onfocus="this.blur();" >管理快捷菜单</a></dd>';
  95.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='../rapidset/onlineupgrade.aspx';" onfocus="this.blur();" >在线升级</a></dd>';
  96.             shortcutmenustr += '<dd><a href="http://www.discuznt.com/admindoc" target="_blank" onfocus="this.blur();">帮助</a></dd>';
  97.             shortcutmenustr += '<dd><a href="javascript:void(0);" onclick="javascript:top.location.href='../logout.aspx';" onfocus="this.blur();" >退出</a></dd>';                
  98.             $("shortcutmenucontent").innerHTML = shortcutmenustr;
  99.         }
  100.                     
  101.         function LoadShortcutMenu()
  102.         {
  103.             LoadJs();
  104.             setTimeout("ShortcutMenuContent()",3000);
  105.         }
  106.         
  107.         function  Search(searchinf,searchtype)
  108.         {
  109.            $('searchresult').innerHTML = '<table width="260" height="75"><tr><td><img border="0" src="../images/ajax_loading.gif" /></td><td valign=middle>正在搜索数据, 请稍候......</td></tr></table>';
  110.            AjaxProxyUrl = new String("../ajax.aspx");
  111.            switch(searchtype)
  112.            {
  113.               case 'function':
  114.               {
  115.                   AjaxHelper.Updater('../UserControls/searchfunction','searchresult','searchinf='+searchinf);break
  116.               }
  117.               case 'user':
  118.               {
  119.                   AjaxHelper.Updater('../UserControls/searchuser','searchresult','searchinf='+searchinf);break;
  120.               }
  121.            }
  122.            $("titlebar").innerHTML = "搜索结果";
  123.            BOX_show('PopUpModel');
  124.            window.parent.frames[0].BOX_show('setting');
  125.         }
  126.         
  127.         function resetindexmenu(showmenu,toptabmenuid,mainmenulist,link)
  128.         {                
  129.             //window.parent.frames[0].BOX_remove('setting');
  130.             top.topFrame.locationurl(showmenu,toptabmenuid,mainmenulist,link);
  131.         }
  132.         
  133.         function hidemodelbox(boxid)
  134.         {
  135.            BOX_remove('setting');
  136.            window.parent.frames[0].BOX_remove('setting');
  137.         }
  138. </script>
  139.     <style type="text/css">
  140.         .collapse 
  141.         {
  142.             background-position: center center; 
  143.             background-image: url(images/collapse.gif); 
  144.             width: 6px; 
  145.             background-repeat: no-repeat; 
  146.             position: absolute; 
  147.             height: 50px; 
  148.             background-color: aliceblue; 
  149.         }
  150.         .expand 
  151.         { 
  152.             background-position: center center; 
  153.             background-image: url(images/expand.gif); 
  154.             width: 6px; 
  155.             background-repeat: no-repeat; 
  156.             position: absolute; 
  157.             height: 50px; 
  158.             background-color: aliceblue; 
  159.         }
  160.         .pluginitemhidd
  161.         {
  162.          display:none;
  163.         }
  164.         .pluginitemshow
  165.         {
  166.          display:block;
  167.         }
  168.     body {margin:0;}
  169.     </style>
  170. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  171. </head>
  172. <div class="NavBody" >
  173.    <form id="Form1" method="post">
  174. <div id="ManagerBodyMenu">
  175. <div class="InnerBodyMenu">
  176.             <!--菜单开始-->
  177. <div class="NavManagerMenu" id="NavManagerMenu"></div>
  178. <!--菜单结束-->
  179. </div>
  180. </div>
  181.         <!--显示快捷菜单-->
  182.         <div id="shortcutmenu" class="DropWindow" style="position:absolute; display:none; top:0px; left:0px;" onmouseout="setshorcutmenu('none')" onmouseover="setshorcutmenu('block')">
  183.             <dl id="shortcutmenucontent">
  184.             </dl>
  185.         </div>
  186.         <!--显示快捷菜单-->    
  187.         <!--显示搜索选项层-->
  188.    <div id="searchoption" class="popupmenu-new" style="position:absolute; display:none;top:-8px; right:154px;width:50px;" onmouseover="setseachmenu('block')" onmouseout="setseachmenu('none')">
  189. <div id="popupmenuitemlast" class="popupmenu-item-last" style="padding: 0px;">
  190. <div id="popupmenuitem" class="popupmenu-item" style="padding:3.5px 0px 4px 0px;">
  191. <div>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="javascript:top.topFrame.setseachtype('function');setseachmenu('none');" onfocus="this.blur();">功能</a></div>
  192. <div>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="javascript:top.topFrame.setseachtype('user');setseachmenu('none');" onfocus="this.blur();" >用户</a></div>
  193. </div>
  194.                 </div>
  195.             </div>
  196.             <script type="text/javascript">
  197.                 function setseachmenu(setoption)
  198.                 {
  199.                    $('searchoption').style.display=setoption;
  200.                 }
  201.                 cancelbubble($('searchoption'));
  202.             </script> 
  203.             <!--显示搜索选项层-->
  204.         <!--显示搜索结果-->     
  205.         <div id="setting" style="display:none;">
  206.         <div id="PopUpModel" style="display: none;" class="PopUpModel">
  207.         <div class="ctrl_title"><a href="javascript:void(0);" onclick="hidemodelbox('setting');"><img src ="../images/close.gif" border="0"/></a><span id="titlebar"></span></div>
  208.         <div id="searchresult" ></div>
  209.         </div>
  210.         </div>
  211.         <!--显示搜索结果-->
  212. </form>
  213. <div id="ManagerBody">
  214. <div class="InnerBody">
  215. <div id="NavManager">
  216.                     <iframe id="main" frameborder="0" scrolling="auto" src="about:blank" width="100%" height="600px" style="z-index:2;"></iframe>
  217.                     <script type="text/javascript">
  218.                         function loadMainFrame()
  219.                         {
  220.                             if(getParam("defaulturl") != "")
  221.                                 $("main").src = "../" +getParam("defaulturl");
  222.                         }
  223.                     </script>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228.     <script type="text/javascript">
  229.         function setscreendiv()
  230.         {
  231.             var clientHeight = 768;
  232.             var bo = $('NavManagerMenu');
  233.             var iframe = $('main');
  234.             if(navigator.userAgent.toLowerCase().indexOf('opera') != -1)
  235.             {
  236.                 clientHeight = document.documentElement.clientHeight + 190;
  237.             }
  238.             else
  239.             { 
  240.                 clientHeight = document.documentElement.clientHeight - 25;
  241.             }
  242.             if(navigator.userAgent.toLowerCase().indexOf('msie') != -1)
  243.             {
  244.                 bo.style.height = clientHeight + 'px';
  245.             }
  246.             else
  247.             {
  248.                 bo.style.minHeight = clientHeight + 'px';
  249.             }
  250.             
  251.             var clientHeight = 768;
  252.               
  253.             if(navigator.userAgent.toLowerCase().indexOf('opera') != -1)
  254.             {
  255.                 clientHeight = document.documentElement.clientHeight + 186;
  256.             }
  257.             else
  258.             {
  259.                 clientHeight = document.documentElement.clientHeight - 27;
  260.             }
  261.             iframe.style.height = clientHeight + 'px';
  262.             
  263.             var navmanagermenu = $('NavManagerMenu');
  264.             navmanagermenu.style.height = clientHeight + 2 + 'px';
  265.             navmanagermenu.style.minHeight = clientHeight + 2 + 'px';
  266.            
  267.             window.onresize = function(){setscreendiv();} 
  268.             window.onscroll = function(){setscreendiv();} 
  269.         }
  270.         
  271.         function LoadMenuItem()
  272.         {
  273.             var menuText = "<ul>";
  274.             for(var i = 0 ; i < toptabmenu.length ; i++)
  275.             {
  276.                 var mainMenu = toptabmenu[i]["mainmenuidlist"].split(",");
  277.                 for(var j = 0 ; j < mainMenu.length ; j++)
  278.                 {
  279.                     for(var k = 0 ; k < mainmenu.length ; k++)
  280.                     {
  281.                         if(mainmenu[k]["menuid"] == mainMenu[j])
  282.                         {
  283.                             //增加菜单大项
  284.                             menuText += createMainMenu(mainmenu[k]["id"],mainmenu[k]["menutitle"],("," + toptabmenu[i]["mainmenulist"] + ",").indexOf("," + getParam("showmenuid") + ",") == -1);
  285.                             //增加菜单子项
  286.                             menuText += createSubMenu(mainmenu[k]["menuid"],mainmenu[k]["id"],getParam("showmenuid") != mainmenu[k]["id"]);
  287.                             break;
  288.                         }
  289.                     }
  290.                 }
  291.             }
  292.             menuText += "</ul>";
  293.             $("NavManagerMenu").innerHTML = menuText;
  294.         }
  295.         
  296.         function createMainMenu(mId,menuText,isHidden)
  297.         {
  298.             var mainMenuItem = "";
  299.             mainMenuItem += '<li Class="CurrentItem"' + (isHidden ? " style='display:none'" : "") + ' forid="' + mId + '">';
  300.             mainMenuItem += '<div class="current" onmousedown="gomenu(event)">';
  301.             mainMenuItem += '<cite>&nbsp;&nbsp;&nbsp;<a href="#" style="font-weight:bold;" onfocus="this.blur();">' + menuText + '</a></cite>';
  302.             mainMenuItem += '<span class="title" id="top" ><img src="../images/dropdown.gif" class="arrow" style="z-Index:-1;"/></span>';
  303.             mainMenuItem += '</div></li>';
  304.             return mainMenuItem;
  305.         }
  306.         
  307.         function createSubMenu(mainMenuId,parentId,isHidden)
  308.         {
  309.             var subMenuItem = "";
  310.             subMenuItem += '<li class="Submenu"><div class="Submenu1"><table><tbody>';
  311.             for(var i = 0 ; i < submenu.length ; i++)
  312.             {
  313.                 if(submenu[i]["menuparentid"] == mainMenuId)
  314.                 {
  315.                     subMenuItem += '<tr><td>';
  316.                     subMenuItem += '<a id="menuitem' + (parentId - 1) + '" name="menuitem" href="javascript:void(0);"';
  317.                     if(submenu[i]["link"] == getParam("defaulturl"))
  318.                         subMenuItem += " class='currentitem'";
  319.                     subMenuItem += ' onclick="javascript:document.getElementById('' + submenu[i]["frameid"] + '').src='../' + submenu[i]["link"] + '';';
  320.                     subMenuItem += 'SetMenuItemFocus(this);"  onfocus="this.blur();">' + submenu[i]["menutitle"] + '</a>';
  321.                     subMenuItem += '</tr></td>';
  322.                 }
  323.             }
  324.             subMenuItem += '</tbody></table></div></li>';
  325.             return subMenuItem;
  326.         }
  327.         
  328.         function resetEscAndF5(e) 
  329.         {
  330.         e = e ? e : window.event;
  331.         actualCode = e.keyCode ? e.keyCode : e.charCode;
  332.         if(actualCode == 27) 
  333.         {
  334.         if($('setting').style.display == 'none') 
  335.         {
  336.         showNavigation();
  337.         } 
  338.         else 
  339.         {
  340.         hideNavigation();
  341.         }
  342.         }
  343.         if(actualCode == 116 && parent.main) 
  344.         {
  345.         parent.main.location.reload();
  346.         if(document.all) 
  347.         {
  348.         e.keyCode = 0;
  349.         e.returnValue = false;
  350.         } 
  351.         else 
  352.         {
  353.         e.cancelBubble = true;
  354.         e.preventDefault();
  355.         }
  356.         }
  357.         }
  358.         function _attachEvent(obj, evt, func) 
  359.         {
  360.             if(obj.addEventListener) 
  361.             {
  362.                 obj.addEventListener(evt, func, false);
  363.             } 
  364.             else if(obj.attachEvent) 
  365.             {
  366.                 obj.attachEvent("on" + evt, func);
  367.             }
  368.         }
  369.         
  370.         function showSubMenu(id)
  371.         {
  372.             showMenu(id,false);
  373.             $(id + "_menu").style.position = "absolute";
  374.             $(id + "_menu").style.top = "0px";
  375.             $(id + "_menu").style.left= (parseInt($(id + "_menu").style.left.replace("px","")) - 290) + "px";
  376.         }
  377.         
  378.         function gotoURL(mainmenuid,toptabmenuid,mainmenulist,url)
  379.         {
  380.             window.parent.frames[0].BOX_remove('setting');
  381.             resetindexmenu(mainmenuid,toptabmenuid,mainmenulist,url);
  382.         }
  383.         
  384.         function gotoShortcut()
  385.         {
  386.             BOX_remove('setting');
  387.             window.parent.frames[0].BOX_remove('setting');
  388.             document.getElementById("main").src="../rapidset/manageshortcutmenu.aspx";
  389.         }
  390.         
  391.         function getElementsByClass(node,searchClass,tag) 
  392.         {
  393.         var classElements = new Array();
  394.         var els = node.getElementsByTagName(tag); 
  395.         var elsLen = els.length;
  396.         var pattern = new RegExp("\b"+searchClass+"\b");
  397.         for (i = 0, j = 0; i < elsLen; i++)
  398.         {
  399.         if (pattern.test(els[i].className)) 
  400.         {
  401.         classElements[j] = els[i];
  402.         j++;
  403.         }
  404.         }
  405.         return classElements;
  406.         }
  407.         
  408.         function showPluginMenu(menuid)
  409.         {
  410.             var el = getElementsByClass(document,'pluginitemshow','li');
  411.         for(var i = 0 ; i < el.length ; i++)
  412.         el[i].className = "pluginitemhidd";            
  413.             $("item" + menuid).className = "pluginitemshow";
  414.         }
  415.         
  416.         function showNavigation()
  417.         {
  418.             $("titlebar").innerHTML = "导航菜单";
  419.             var menutext = "<table width='100%'><tr><td align='left' valign='top' width='83%'>";
  420.             menutext += "<table width='100%'><tr><td colspan='" + toptabmenu.length + "'>&nbsp;&nbsp;<img src='../images/navigation.gif' style='vertical-align: middle;'>&nbsp;按 “ ESC ” 键展开 / 关闭此菜单</td></tr><tr>";
  421.             for(var i = 0 ; i < toptabmenu.length ; i++)
  422.             {
  423.                 menutext += "<td valign='top'><h2 style='text-indent:3px;'>" + toptabmenu[i]["title"] + "</h2><ul>";
  424.                 var isplugin = toptabmenu[i]["system"] == "2" ? true : false;
  425.                 for(var j = 0; j < mainmenu.length ; j++)
  426.                 {
  427.                     if(("," + toptabmenu[i]["mainmenuidlist"] + ",").indexOf("," + mainmenu[j]["menuid"] + ",") != -1)
  428.                     {
  429.                         if(!isplugin)
  430.                         {
  431.                             menutext += "<li style='text-indent:3px;'>" + mainmenu[j]["menutitle"] + "</li>";
  432.                             menutext += "<li><ul style='margin-left:12px;'>";
  433.                         }
  434.                         else
  435.                         {
  436.                             menutext += "<li style='text-indent:3px;cursor:pointer' onclick='showPluginMenu(" + j + ");'>" + mainmenu[j]["menutitle"] + "</li>";
  437.                             menutext += "<li id='item" + j + "' class='pluginitemhidd'><ul style='margin-left:12px;'>";
  438.                         }
  439.                         for(var k = 0 ; k < submenu.length ; k++)
  440.                         {
  441.                             if(mainmenu[j]["menuid"] == submenu[k]["menuparentid"])
  442.                             {
  443.                                 menutext += "<li>&rsaquo;<a href='#' onclick='gotoURL("" + mainmenu[j]["id"] + "","" + toptabmenu[i]["id"] + "","" + toptabmenu[i]["mainmenulist"] + "","" + submenu[k]["link"] + "")'>" + submenu[k]["menutitle"] + "</a></li>";
  444.                             }
  445.                         }
  446.                         menutext += "</ul></li>";
  447.                     }
  448.                 }
  449.                 menutext += "</ul></td>";
  450.             }
  451.             menutext += "</tr></table></td><td width='17%' align='left' valign='top'>";
  452.             menutext += "<table width='100%'><tr><td align='center'><img src='../images/favorite.gif' style='vertical-align: middle;'>&nbsp;<b>快捷菜单</b>(" + shortcut.length + "/15)[<a href='#' onclick='gotoShortcut();'>管理</a>]</td></tr><tr><td align='center'><ul>";
  453.             if(shortcut.length == 0)
  454.             {
  455.                 menutext += "<li>暂无收藏</li>";
  456.             }
  457.             else
  458.             {
  459.                 for(var l = 0 ; l < shortcut.length ; l++)
  460.                 {
  461.                     menutext += "<li><a href='#' onclick='gotoURL("" + shortcut[l]["showmenuid"] + "","" + shortcut[l]["toptabmenuid"] + "","" + shortcut[l]["mainmenulist"] + "","" + shortcut[l]["link"] + "");'>" + shortcut[l]["menutitle"] + "</a></li>";
  462.                 }
  463.             }
  464.             menutext += "</ul></td></tr></table>";
  465.             menutext += "</td></tr></table>";
  466.             $("searchresult").innerHTML = menutext;
  467.             BOX_show('PopUpModel');
  468.             window.parent.frames[0].BOX_show('setting');
  469.         }
  470.         
  471.         function hideNavigation()
  472.         {
  473.             BOX_remove('setting');
  474.             window.parent.frames[0].BOX_remove('setting');
  475.         }
  476.         setscreendiv();
  477.         window.onresize = function(){setscreendiv();} 
  478.         window.onscroll = function(){setscreendiv();} 
  479.         var mainmenulist = getParam("mainmenulist");
  480.         var showmenuid = getParam("showmenuid");
  481.         if(mainmenulist=="")
  482.         {
  483.             mainmenulist = '1,2';
  484.             showmenuid = '1';
  485.         }
  486.         
  487.         LoadMenuItem();
  488.         window.onload = function(){init(showmenuid,mainmenulist);}
  489.         LoadShortcutMenu();
  490.         setscreendiv();
  491.         _attachEvent(document.documentElement, 'keydown', resetEscAndF5);
  492.     </script>
  493. </body>
  494. </html>