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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" Inherits="Discuz.Web.Admin.identifymanage" Codebehind="forum_identifymanage.aspx.cs" %>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Import NameSpace="Discuz.Common"%>
  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. <script type="text/javascript" src="../../javascript/common.js"></script>
  11. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />  
  12. <script type="text/javascript">
  13. function validate()
  14. {
  15. var str = ",<%=ViewState["code"]%>";
  16. var count = 2;
  17. while(true)
  18. {
  19. if( document.getElementById("id" + count) != null)
  20. {
  21. for(var i = count - 1; i >= 1; i--)
  22. {
  23. if(!document.getElementById("id" + i).checked) continue;
  24. if(!document.getElementById("id" + count).checked) continue;
  25. if(document.getElementById("name" + i).value == document.getElementById("name" + count).value)
  26. {
  27. Message("第" + i + "行的代码名称与第" + count + "行相同");
  28. return false;
  29. }
  30. }
  31. count++;
  32. }
  33. else
  34. break;
  35. }
  36. for(var i = 1;;i++)
  37. {
  38. if(document.getElementById("id" + i) == null)
  39. {
  40. Message("没有要提交的数据!");
  41. return false;
  42. }
  43. if(document.getElementById("id" + i).checked) break;
  44. }
  45. for(var i = 1;; i++)
  46. {
  47. if(document.getElementById("id" + i) == null)
  48. return true;
  49. else
  50. {
  51. if(document.getElementById("name" + i).value == "")
  52. {
  53. Message("第" + i + "行的代码名称为空!");
  54. document.getElementById("name" + i).focus();
  55. return;
  56. }
  57. if(document.getElementById("id" + i).checked)
  58. {
  59. if(str.indexOf("," + document.getElementById("name" + i).value + ",") >= 0)
  60. {
  61. Message("第" + i + "行的代码名称与原有的代码名称相同");
  62. return false;
  63. }
  64. }
  65. }
  66. }
  67. }
  68. function Message(m)
  69. {
  70. document.getElementById("success").style.display = 'none';
  71. document.getElementById("SubmitButton").disabled = false;
  72. alert(m);
  73. }
  74. function CheckSelect(form)
  75. {
  76. for (var i=0;i<form.elements.length;i++)
  77. {
  78. var e = form.elements[i];
  79. if (e.name != 'chkall' && e.name =='id')
  80. e.checked = form.chkall.checked;
  81. }
  82. }
  83. function checkFileList(form)
  84. {
  85. var i = 1;
  86. while(true)
  87. {
  88. if(form.elements["id" + i] == null)
  89. break;
  90. form.elements["id" + i].checked = form.cfile.checked;
  91. i++;
  92. }
  93. }
  94. function Check(form)
  95. {
  96. CheckSelect(form);
  97. checkedEnabledButton(form,'id','DelRec');
  98. }
  99. </script>
  100. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  101. </head>
  102. <body>
  103. <div id="append_parent"></div>
  104. <form id="Form1" method="post" runat="server">
  105. <cc1:datagrid id="identifygrid" runat="server" OnPageIndexChanged="DataGrid_PageIndexChanged" IsFixConlumnControls="true" pagesize="10">
  106. <Columns>
  107. <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form)' type='checkbox' name='chkall' id='chkall' />">
  108. <HeaderStyle Width="20px" />
  109. <ItemTemplate>
  110. <input id="id" type="checkbox" onclick="checkedEnabledButton(this.form,'id','DelRec')" value="<%# DataBinder.Eval(Container, "DataItem.identifyid").ToString()%>" name="id" />
  111. <%# identifygrid.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.identifyid").ToString())%>
  112. </ItemTemplate>
  113. </asp:TemplateColumn>
  114. <asp:BoundColumn DataField="name" HeaderText="名称"><HeaderStyle width="80%" /></asp:BoundColumn>
  115. <asp:TemplateColumn HeaderText="图片">
  116. <ItemTemplate>
  117. <div id="layer<%# DataBinder.Eval(Container, "DataItem.identifyid").ToString()%>_a" onmouseover="showMenu(this.id,false)">
  118. <%# PicStr(DataBinder.Eval(Container, "DataItem.filename").ToString(),20) %>
  119. </div>
  120. <div id="layer<%# DataBinder.Eval(Container, "DataItem.identifyid").ToString()%>_a_menu" style="display:none">
  121. <%# PicStr(DataBinder.Eval(Container, "DataItem.filename").ToString())%>
  122. </div>
  123. </ItemTemplate>
  124. </asp:TemplateColumn>
  125. </Columns>
  126. </cc1:datagrid>
  127. <p style="text-align:right;">
  128. <cc1:Button id="EditIdentify" runat="server" Text=" 保存鉴定修改 "></cc1:Button>&nbsp;&nbsp;
  129. <cc1:Button id="DelRec" runat="server" Text=" 删 除 " ButtonImgUrl="../images/del.gif" Enabled="false" OnClientClick="if(!confirm('你确认要删除所选的鉴定吗?')) return false;"></cc1:Button>&nbsp;&nbsp;
  130. <button type="button" class="ManagerButton" onclick="javascript:window.location.href='forum_addidentify.aspx';"><img src="../images/add.gif" /> 上传鉴定</button>
  131. </p>
  132. <div class="ManagerForm">
  133. <fieldset>
  134. <legend style="background:url(../images/icons/icon49.jpg) no-repeat 6px 50%;">增加现有鉴定</legend>
  135. <table class="ntcplist" >
  136. <tr>
  137. <td>
  138. <table class="datalist" cellspacing="0" cellpadding="3" rules="rows" border="0" width="100%">
  139. <tr class="category">
  140.   <td width="8%"><input type="checkbox" name="cfile" onclick="checkFileList(this.form)"></td>
  141.   <td width="82%" align="left">名称</td>
  142.   <td width="10%">图片</td>
  143. </tr>
  144. <asp:Literal ID="fileinfoList" Runat="server" />
  145. <tr><td align="center" colspan="3"><br /><cc1:Button id="SubmitButton" runat="server" Text=" 提 交 " ValidateForm="true"></cc1:Button></td></tr>
  146. </table>
  147. </td>
  148. </tr>
  149. </table>
  150. </fieldset>
  151. </div>
  152. </form>
  153. <%=footer%>
  154. </body>
  155. </html>