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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" Inherits="Discuz.Web.Admin.attachtypesgrid" Codebehind="forum_attachtypesgrid.aspx.cs"%>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Register TagPrefix="cc2" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  4. <%@ Register TagPrefix="uc1" TagName="PageInfo" Src="../UserControls/PageInfo.ascx" %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html>
  7. <head>
  8. <title>上传附件类型列表</title>
  9. <link href="../styles/datagrid.css" type="text/css" rel="stylesheet" />
  10. <script type="text/javascript" src="../js/common.js"></script>
  11. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" /> 
  12. <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />
  13. <script type="text/javascript" src="../js/modalpopup.js"></script>
  14. <script type="text/javascript">
  15. function Check(form)
  16. {
  17. CheckAll(form);
  18. checkedEnabledButton(form,'id','DelRec')
  19. }
  20. </script>
  21. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  22. </head>
  23. <body>
  24. <form id="Form1" method="post" runat="server">
  25. <uc1:PageInfo id="info1" runat="server" Icon="information"
  26. Text="本功能可限定某特定类型附件的最大尺寸, 当这里设定的尺寸小于用户组允许的最大尺寸时, 指定类型的附件尺寸限制将按本设定为准"></uc1:PageInfo>
  27. <uc1:PageInfo ID="info2" runat="server" Icon="warning"
  28. Text="附件是否有效可在版块及用户组中设置, 且具体版块设置优先于用户组设置" />
  29. <cc1:datagrid id="DataGrid1" runat="server" IsFixConlumnControls="true" OnPageIndexChanged="DataGrid_PageIndexChanged" OnSortCommand="Sort_Grid">
  30. <Columns>
  31. <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form)' type='checkbox' name='chkall' id='chkall'>">
  32. <HeaderStyle Width="20px" />
  33. <ItemTemplate>
  34. <input id="id" onclick="checkedEnabledButton(this.form,'id','DelRec')" type="checkbox" value="<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>" name="id" />
  35. <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.id").ToString())%>
  36. </ItemTemplate>
  37. </asp:TemplateColumn>
  38. <asp:BoundColumn DataField="id" SortExpression="id" HeaderText="id [递增]" Visible="false"></asp:BoundColumn>
  39. <asp:BoundColumn DataField="extension" SortExpression="extension" HeaderText="扩展名"></asp:BoundColumn>
  40. <asp:BoundColumn DataField="maxsize" SortExpression="maxsize" HeaderText="最大尺寸(单位:字节)"></asp:BoundColumn>
  41. </Columns>
  42. </cc1:datagrid>
  43. <p style="text-align:right;">
  44. <cc1:Button id="SaveAttachType" runat="server" Text="保存附件修改"></cc1:Button>&nbsp;&nbsp;
  45. <cc1:Button id="DelRec" runat="server" Text=" 删 除 "  ButtonImgUrl="../images/del.gif" Enabled="false" OnClientClick="if(!confirm('你确认要删除所选的附件类型吗?')) return false;"></cc1:Button>&nbsp;&nbsp;
  46. <button type="button" class="ManagerButton" id="Button2" onclick="BOX_show('neworedit');"><img src="../images/add.gif"/> 添加附件类型 </button>
  47. </p>
  48. <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
  49. <div id="neworedit" style="display: none; background :#fff; padding:10px; border:1px solid #999; width:350px;">
  50. <div class="ManagerForm">
  51. <fieldset>
  52. <legend style="background:url(../images/icons/icon50.jpg) no-repeat 6px 50%;">添加附件类型</legend>
  53. <table width="100%">
  54. <tr><td class="item_title">扩展名</td></tr>
  55. <tr>
  56. <td class="vtop">
  57. <cc2:TextBox id="extension" runat="server" RequiredFieldType="暂无校验" IsReplaceInvertedComma="true" MaxLength="15" Size="15"></cc2:TextBox><br/>允许上传的附件类型,不用输入
  58. </td>
  59. </tr>
  60. <tr><td class="item_title">最大尺寸</td></tr>
  61. <tr>
  62. <td class="vtop rowform">
  63. <cc2:TextBox id="maxsize" runat="server" RequiredFieldType="数据校验"  size="9" MaxLength="8"></cc2:TextBox>(单位:字节)
  64. <select onchange="document.getElementById('maxsize').value=this.value">
  65. <option value="">请选择</option>
  66. <option value="51200">50K</option>
  67. <option value="102400">100K</option>
  68. <option value="153600">150K</option>
  69. <option value="204800">200K</option>
  70. <option value="256000">250K</option>
  71. <option value="307200">300K</option>
  72. <option value="358400">350K</option>
  73. <option value="409600">400K</option>
  74. <option value="512000">500K</option>
  75. <option value="614400">600K</option>
  76. <option value="716800">700K</option>
  77. <option value="819200">800K</option>
  78. <option value="921600">900K</option>
  79. <option value="1024000">1M</option>
  80. <option value="2048000">2M</option>
  81. <option value="4096000">4M</option>
  82. </select>
  83. </td>
  84. </tr>
  85. </table>
  86. <div class="Navbutton">
  87. <cc1:Button id="AddNewRec" runat="server" Text=" 提 交 "></cc1:Button>&nbsp;&nbsp;
  88. <button type="button" class="ManagerButton" id="Button1" onclick="BOX_remove('neworedit');"><img src="../images/state1.gif"/> 取 消 </button>
  89. </div>
  90. </fieldset>
  91. </div>
  92. </div>
  93. <cc1:Hint id="Hint1" runat="server" HintImageUrl="../images"></cc1:Hint>
  94. </form>
  95. <div id="setting" />
  96. <%=footer%>
  97. </body>
  98. </html>