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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" Inherits="Discuz.Web.Admin.managesubmenu" Codebehind="managesubmenu.aspx.cs"%>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Register Src="../UserControls/PageInfo.ascx" TagName="PageInfo" TagPrefix="uc1" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html>
  6. <head>
  7.     <title>无标题页</title>
  8.     <link href="../styles/datagrid.css" type="text/css" rel="stylesheet" />
  9.     <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />        
  10.     <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />
  11.     <script type="text/javascript" src="../js/modalpopup.js"></script>
  12.     <script type="text/javascript" src="../js/common.js"></script>
  13.     <script type="text/javascript">
  14.         function newMenu()
  15.             {
  16.                 document.getElementById("opt").innerHTML = "新建子菜单";
  17.                 document.getElementById("submenuid").value = "0";
  18.                 document.getElementById("menutitle").value = "";
  19.                 BOX_show('neworeditsubmenu');
  20.             }
  21.             function editMenu(menuid,menutitle)
  22.             {
  23.                 document.getElementById("opt").innerHTML = "编辑子菜单";
  24.                 document.getElementById("submenuid").value = menuid;
  25.                 document.getElementById("menutitle").value = menutitle;
  26.                 BOX_show('neworeditsubmenu');
  27.             }
  28.             function chkSubmit()
  29.             {
  30.                 if(document.getElementById("menutitle").value == "")
  31.                 {
  32.                     alert("子菜单名称不能为空!");
  33.                     document.getElementById("menutitle").focus();
  34.                     return false;
  35.                 }
  36.                 document.getElementById("Form1").submit();
  37.                 return true;
  38.             }
  39.      </script>
  40. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  41. </head>
  42. <body>
  43.     <form id="Form1" runat="server">
  44. <uc1:PageInfo ID="info1" runat="server" Icon="information" Text="子菜单中必须在其下没有子菜单项时才可删除!" />
  45.     <cc1:datagrid id="DataGrid1" runat="server">
  46. <Columns>
  47. <asp:BoundColumn DataField="menutitle" HeaderText="子菜单名称"></asp:BoundColumn>
  48. <asp:TemplateColumn HeaderText="操作"><HeaderStyle Width="30%" />
  49. <ItemTemplate>
  50.     <a href="javascript:;" onclick="editMenu('<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>','<%# DataBinder.Eval(Container, "DataItem.menutitle").ToString() %>');">编辑</a>&nbsp;
  51.                             <%# DataBinder.Eval(Container, "DataItem.delitem").ToString()%>&nbsp;
  52. <a href="managesubmenuitem.aspx?menuid=<%# DataBinder.Eval(Container, "DataItem.menuid").ToString() %>&submenuid=<%# DataBinder.Eval(Container, "DataItem.submenuid").ToString() %>&pagename=<%# Server.UrlEncode(DataBinder.Eval(Container, "DataItem.menutitle").ToString()) %>">管理子菜单项</a>
  53. </ItemTemplate>
  54. </asp:TemplateColumn>
  55. </Columns>
  56. </cc1:datagrid>
  57. <p style="text-align:right;"><button type="button" class="ManagerButton" id="Button2" onclick="newMenu();"><img src="../images/add.gif"/> 新 建 </button>&nbsp;
  58. <button type="button" class="ManagerButton" id="Button3" onclick="window.location='managemainmenu.aspx';"><img src="../images/arrow_undo.gif"/> 返 回 </button></p>
  59.     <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
  60.         <div id="neworeditsubmenu" style="display: none; background :#fff; padding:10px; border:1px solid #999; width:400px;">
  61.         <div class="ManagerForm">
  62. <fieldset>
  63. <legend id="opt" style="background:url(../images/icons/icon53.jpg) no-repeat 6px 50%;">新建主菜单</legend>
  64. <table cellspacing="0" cellPadding="4" class="tabledatagrid" width="80%">
  65.             <tr>
  66.         <td style="width:90px;height:35px;">子菜单名称:<input type="hidden" id="submenuid" name="submenuid" value="0" /></td>
  67.         <td><input id="menutitle"  name="menutitle" type="text" maxlength="8" size="10"class="FormBase" onfocus="this.className='FormFocus';" onblur="this.className='FormBase';" /></td>
  68.         </tr>
  69.         <tr>
  70.             <td colspan="2" align="center" style="height:35px;">
  71.                 <button type="button" class="ManagerButton" id="AddNewRec" onclick="chkSubmit();"><img src="../images/add.gif"/> 提 交 </button>&nbsp;&nbsp;
  72.                 <button type="button" class="ManagerButton" id="Button1" onclick="BOX_remove('neworeditsubmenu');"><img src="../images/state1.gif"/> 取 消 </button>
  73.             </td>
  74.         </tr>
  75.   </table>
  76. </fieldset>
  77. </div>
  78.     </div>
  79.     </form>
  80.     <div id="setting" />
  81.     <%=footer%>
  82. </body>
  83. </html>