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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" Codebehind="forum_mymenumanage.aspx.cs" Inherits="Discuz.Web.Admin.mymenumanage" %>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Register TagPrefix="uc1" TagName="PageInfo" Src="../UserControls/PageInfo.ascx" %>
  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. <script type="text/javascript" src="../js/common.js"></script>
  10. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet"/>        
  11. <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet"/>
  12. <script type="text/javascript" src="../js/modalpopup.js"></script>
  13. <script type="text/javascript">
  14. function setexample()
  15. {
  16. $("ehref").innerHTML = $("ahref").value;
  17. $("eonclick").innerHTML = $("aonclick").value;
  18. $("etarget").innerHTML = $("atarget").value;
  19. $("etext").innerHTML = $("atext").value;
  20. }
  21. function Check(form)
  22. {
  23. CheckAll(form);
  24. checkedEnabledButton(form,'menuid','DelRec');
  25. }
  26. </script>
  27. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  28. </head>
  29. <body>
  30. <form id="Form1" method="post" runat="server">
  31. <uc1:PageInfo id="info1" runat="server" Icon="Information" Text="&quot;我的菜单&quot;将管理前台首页中&quot;我的&quot;中的自定义项,可以增加、删除、修改"></uc1:PageInfo>
  32. <cc1:datagrid id="DataGrid1" runat="server" IsFixConlumnControls="true" OnPageIndexChanged="DataGrid_PageIndexChanged" OnSortCommand="Sort_Grid">
  33. <Columns>
  34. <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form)' type='checkbox' name='chkall' id='chkall' />">
  35. <HeaderStyle Width="20px" />
  36. <ItemTemplate>
  37. <input id="menuid" type="checkbox" onclick="checkedEnabledButton(this.form,'menuid','DelRec')" value="<%# DataBinder.Eval(Container, "DataItem.menuid").ToString() %>" name="menuid"/>
  38. <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.menuid").ToString())%>
  39. </ItemTemplate>
  40. </asp:TemplateColumn>
  41. <asp:BoundColumn DataField="menuorder" HeaderText="序号[递增]"></asp:BoundColumn>
  42. <asp:BoundColumn DataField="text"  HeaderText="链接文字"></asp:BoundColumn>
  43. <asp:BoundColumn DataField="href" HeaderText="链接地址"></asp:BoundColumn>
  44. <asp:BoundColumn DataField="onclick"  HeaderText="单击事件"></asp:BoundColumn>
  45. <asp:BoundColumn DataField="target"  HeaderText="目标窗口"></asp:BoundColumn>
  46. </Columns>
  47. </cc1:datagrid>
  48. <p style="text-align:right;">
  49. <cc1:Button id="SaveMyMenu" runat="server" Text="保存我的菜单修改"></cc1:Button>&nbsp;&nbsp;
  50. <button type="button" class="ManagerButton" id="Button2" onclick="BOX_show('neworedit');"><img src="../images/add.gif"/> 建立菜单项 </button>&nbsp;&nbsp;
  51. <cc1:Button id="DelRec" runat="server" Text=" 删 除 " Enabled="false" ButtonImgUrl="../images/del.gif" OnClientClick="if(!confirm('你确认要删除所选菜单项吗?')) return false;"></cc1:Button>
  52. </p>
  53. <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
  54. <div id="neworedit" style="display: none; background :#fff; padding:10px; border:1px solid #999; width:400px;">
  55. <div class="ManagerForm">
  56. <fieldset>
  57. <legend style="background:url(../images/icons/icon53.jpg) no-repeat 6px 50%;">添加我的菜单项</legend>
  58. <table cellspacing="0" cellpadding="4" width="100%" align="center">
  59. <tr>
  60. <td style="width: 70px;height:35px;">链接文字:</td>
  61. <td>
  62. <cc1:TextBox runat="server" ID="atext" />
  63. </td>
  64. </tr>
  65. <tr>
  66. <td style="height:35px;">单击事件:</td>
  67. <td>
  68. <cc1:TextBox runat="server" ID="aonclick" IsReplaceInvertedComma="false" />
  69. </td>
  70. </tr>
  71. <tr>
  72. <td style="height:35px;">链接地址:</td>
  73. <td><cc1:TextBox runat="server" ID="ahref" /></td>
  74. </tr>
  75. <tr>
  76. <td style="height:35px;">目标窗口:</td>
  77. <td>
  78. <cc1:TextBox runat="server" ID="atarget" Text="_blank" Size="15" />
  79. <select onchange="document.getElementById('atarget').value=this.value;setexample();">
  80. <option value=""></option>
  81. <option value="_blank" selected="selected">新窗口</option>
  82. <option value="_parent">父窗口</option>
  83. <option value="_self">当前窗口</option>
  84. <option value="_top">顶层窗口</option>
  85. </select>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td colspan="2" style="height:35px;">
  90. &nbsp;&nbsp;代码:&lt;a href="<span id="ehref"></span>" onclick="<span id="eonclick"></span>" 
  91. target="<span id="etarget">_blank</span>"&gt;<span id="etext"></span>&lt;/a&gt;
  92. </td>
  93. </tr>
  94. <tr>
  95. <td colspan="2" align="center" style="height:35px;">                        
  96. <cc1:Button id="addmenu" runat="server" Text=" 增 加 " ButtonImgUrl="../images/add.gif"></cc1:Button>&nbsp;&nbsp;
  97. <button type="button" class="ManagerButton" id="Button1" onclick="BOX_remove('neworedit');"><img src="../images/state1.gif"/> 取 消 </button>
  98. </td>
  99. </tr>
  100. </table>
  101. <cc1:Hint id="Hint1" runat="server" HintImageUrl="../images"></cc1:Hint>
  102. </fieldset>
  103. </div>
  104. </div>
  105. </form>
  106. <div id="setting" />
  107. <%=footer%>
  108. </body>
  109. </html>