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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" CodeBehind="managesubmenuitem.aspx.cs" Inherits="Discuz.Web.Admin.managesubmenuitem" %>
  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("id").value = "-1";
  18.             document.getElementById("menutitle").value = "";
  19.             document.getElementById("link").value = "";
  20.             BOX_show('neworeditsubmenuitem');
  21.         }
  22.         function editMenu(id,menutitle,link)
  23.         {
  24.             document.getElementById("opt").innerHTML = "编辑子菜单项";
  25.             document.getElementById("id").value = id;
  26.             document.getElementById("menutitle").value = menutitle;
  27.             document.getElementById("link").value = link;
  28.             BOX_show('neworeditsubmenuitem');
  29.         }
  30.         function chkSubmit()
  31.         {
  32.             if(document.getElementById("menutitle").value == "")
  33.             {
  34.                 alert("子菜单项名称不能为空!");
  35.                 document.getElementById("menutitle").focus();
  36.                 return false;
  37.             }
  38.             if(document.getElementById("link").value == "")
  39.             {
  40.                 alert("子菜单项链接不能为空!");
  41.                 document.getElementById("link").focus();
  42.                 return false;
  43.             }
  44.             document.getElementById("form1").submit();
  45.             return true;
  46.         }
  47.     </script>
  48. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  49. </head>
  50. <body>
  51.     <form id="form1" runat="server">
  52. <uc1:PageInfo ID="info1" runat="server" Icon="information" Text="主菜单项必须在其下没有子菜单时才可删除!" />
  53.     <cc1:datagrid id="DataGrid1" runat="server">
  54.    <Columns>
  55.     <asp:BoundColumn DataField="menutitle" HeaderText="子菜单项名称"></asp:BoundColumn>
  56.         <asp:BoundColumn DataField="link" HeaderText="页面地址"><ItemStyle HorizontalAlign="left" /></asp:BoundColumn>
  57.           <asp:TemplateColumn HeaderText="操作">
  58.             <ItemTemplate>
  59.                 <a href="javascript:;" onclick="editMenu('<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>','<%# DataBinder.Eval(Container, "DataItem.menutitle").ToString() %>','<%# DataBinder.Eval(Container, "DataItem.link").ToString() %>');">编辑</a>&nbsp;
  60.                 <a href="managesubmenuitem.aspx?menuid=<%=menuid%>&submenuid=<%=submenuid%>&pagename=<%=pagename%>&mode=del&id=<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>" onclick='return confirm("您确认要删除此菜单项吗?")'>删除</a>
  61.             </ItemTemplate>
  62.           </asp:TemplateColumn>
  63.       </Columns>
  64. </cc1:datagrid>
  65. <p style="text-align:right;"><button type="button" class="ManagerButton" id="Button2" onclick="newMenu();"><img src="../images/add.gif"/> 新 建 </button>&nbsp;
  66. <button type="button" class="ManagerButton" id="Button3" onclick="window.location='managesubmenu.aspx?menuid=<%=menuid%>';"><img src="../images/arrow_undo.gif"/> 返 回 </button></p>
  67.     <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
  68.         <div id="neworeditsubmenuitem" style="display: none; background :#fff; padding:10px; border:1px solid #999; width:400px;">
  69.         <div class="ManagerForm">
  70. <fieldset>
  71. <legend id="opt" style="background:url(../images/icons/icon53.jpg) no-repeat 6px 50%;">新建子菜单项</legend>
  72. <table cellspacing="0" cellPadding="4" class="tabledatagrid" width="80%">
  73.     <tr>
  74. <td style="width:90px;height:35px;">子菜单项名称:<input type="hidden" id="id" name="id" value="0" /></td>
  75. <td><input id="menutitle"  name="menutitle" type="text" maxlength="15" size="10"class="FormBase" onfocus="this.className='FormFocus';" onblur="this.className='FormBase';" /></td>
  76. </tr>
  77. <tr>
  78. <td style="height:35px;">页面地址:</td>
  79. <td><input id="link" name="link" type="text" maxlength="100" size="30" class="FormBase" onfocus="this.className='FormFocus';" onblur="this.className='FormBase';" /></td>
  80. </tr>
  81. <tr>
  82.     <td align="center" colspan="2" style="height:35px;">
  83.         <button type="button" class="ManagerButton" id="AddNewRec" onclick="chkSubmit();"><img src="../images/add.gif"/> 提 交 </button>&nbsp;&nbsp;
  84.         <button type="button" class="ManagerButton" id="Button1" onclick="BOX_remove('neworeditsubmenuitem');"><img src="../images/state1.gif"/> 取 消 </button>
  85.     </td>
  86. </tr>
  87. </table>
  88. </fieldset>
  89. </div>
  90.     </div>
  91.     </form>
  92.     <div id="setting" />
  93.     <%=footer%>
  94. </body>
  95. </html>