clubClassEdit.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:11k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="../GVinc/gvInclude.jsp" %>
  3. <%@ include file="clubMasterPass.jsp" %>
  4. <jsp:useBean id="cce" scope="page" class="com.gamvan.club.classed.ClubClassEdit"/>
  5. <jsp:useBean id="ccb" scope="page" class="com.gamvan.club.classed.ClubClassBar"/>
  6. <jsp:useBean id="ccc" scope="page" class="com.gamvan.club.classed.ClubClassCollection"/>
  7. <jsp:useBean id="cci" scope="page" class="com.gamvan.club.classed.ClubClassInfo"/>
  8. <jsp:useBean id="fo" scope="page" class="com.gamvan.tools.FileOperate" /><% 
  9. //权限判断共享代码
  10. boolean ispass = false;
  11. ispass = ae.txtsArray(gvcmgTxt,4,"|");
  12. if(!ispass){
  13. out.print(prtCenter2("您无权进行此项操作!","",2));
  14. out.close();
  15. }
  16. if(request.getParameter("ccID")!=null){
  17. ccID = Integer.parseInt(request.getParameter("ccID"));
  18. }else{
  19. ccID = 0;
  20. }
  21. if(request.getMethod().equals("POST")){
  22. ccName = request.getParameter("ccName");
  23. if(ccName==null || ccName.equals("")){
  24. out.print(prtCenter2("分类或版面名称不能为空!","",2));
  25. out.close();
  26. }else{
  27. cce.setCcName(ccName);
  28. //out.print(request.getParameter("ccSummary"));
  29. cce.setCcSummary(request.getParameter("ccSummary"));
  30. cce.setCcUserPass(request.getParameter("ccUserPass"));
  31. cce.setCcType(TypeChange.stringToByte(request.getParameter("ccType")));
  32. cce.setCcStyle(TypeChange.stringToByte(request.getParameter("ccStyle")));
  33. cce.setCcPro(TypeChange.stringToByte(request.getParameter("ccPro")));
  34. cce.setCcOrder(TypeChange.stringToInt(request.getParameter("ccOrder")));
  35. cce.setCcHidden(TypeChange.stringToBoolean(request.getParameter("ccHidden")));
  36. cce.setCcIDD(TypeChange.stringToInt(request.getParameter("ccIDD")));
  37. cce.setCcUgid(TypeChange.stringToByte(request.getParameter("ccUgid")));
  38. cce.setCcTopicNum(TypeChange.stringToByte(request.getParameter("ccTopicNum")));
  39. cce.setCcReplyNum(TypeChange.stringToByte(request.getParameter("ccReplyNum")));
  40. cce.setCcList(TypeChange.stringToBoolean(request.getParameter("ccList")));
  41. cce.setCcMostOnline(TypeChange.stringToInt(request.getParameter("ccMostOnline")));
  42. cce.setCcUpfilePass(TypeChange.stringToByte(request.getParameter("ccUpfilePass")));
  43. cce.setCcUpfileMax(TypeChange.stringToInt(request.getParameter("ccUpfileMax")));
  44. //cce.setCcID(ccID);
  45. cce.classEdit(ccID);
  46. //out.print(cce.getMessage());
  47. if(TypeChange.stringToInt(request.getParameter("classDo"))==1){
  48. String filePathAndName=request.getRealPath("") + "\club\GVinc\gvFrameBar.jsp";  //绝对路径
  49. StringBuffer fileContent=new StringBuffer("");
  50. fileContent.append("<");
  51. fileContent.append("%@ page language="java" contentType="text/html;charset=UTF-8" errorPage="err.jsp"");
  52. fileContent.append("%");
  53. fileContent.append(">");//
  54. try{
  55. fileContent.append(ccb.classBar_1());
  56. }catch(Exception e){
  57. fileContent.append(e.toString());
  58. }
  59. fo.createFile(filePathAndName,fileContent.toString(),"UTF-8");
  60. }
  61. out.print(prtCenter2("操作成功,点击这里返回!","clubClassEdit.jsp?ccID=" + ccID +"",1));
  62. out.close();
  63. }
  64. }
  65. // 读取版面信息
  66. if(ccID>0){
  67. ClubClassItem ccit = new ClubClassItem();
  68. cci.setCcID(ccID);
  69. ccit = cci.getClubClassInfo();
  70. ccName = ccit.getCcName();
  71. ccType = ccit.getCcType();
  72. ccOrder = ccit.getCcOrder();
  73. ccStyle = ccit.getCcStyle();
  74. ccPro = ccit.getCcPro();
  75. ccIDD = ccit.getCcIDD();
  76. ccHidden = ccit.getCcHidden();
  77. ccUgid = ccit.getCcUgid();
  78. ccList = ccit.getCcList();
  79. ccSummary = ccit.getCcSummary();
  80. ccUpfilePass = ccit.getCcUpfilePass();
  81. ccUpfileMax = ccit.getCcUpfileMax();
  82. ccUserPass = ccit.getCcUserPass();
  83. ccMostOnline = ccit.getCcMostOnline();
  84. ccTopicNum = ccit.getCcTopicNum();
  85. ccReplyNum = ccit.getCcReplyNum();
  86. }
  87. // 版面信息读取结束
  88. %>
  89. <html xmlns="http://www.w3.org/1999/xhtml">
  90. <head>
  91. <title>今晚在线-社区管理</title>
  92. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  93. <link href="css.css" rel="stylesheet" type="text/css">
  94. <style type="text/css">
  95. <!--
  96. .style1 {color: #999999}
  97. -->
  98. </style>
  99. </head>
  100. <body>
  101. <script language="javascript" src="../GVscript/GVtopCode.js"></script>
  102. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
  103.   <tr>
  104.     <td align="center"><strong>社区 版面/分类 添加/编辑</strong></td>
  105.   </tr>
  106. </table>
  107. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
  108. <form name="Gforms" method="post" action="" onSubmit="javascript:postMsg();">
  109.   <tr bgcolor="#f6f6f6">
  110.     <td width="116" bgcolor="#f6f6f6"><strong>名称</strong></td>
  111. <td><input name="ccName" type="text" id="ccName" value="<%=ccName%>" size="30" maxlength="30">
  112. </td>
  113. </tr>
  114.     <tr bgcolor="#f6f6f6">
  115.       <td bgcolor="#f6f6f6"><strong>排序ID</strong></td>
  116.       <td><input name="ccOrder" type="text" id="ccOrder" value="<%=ccOrder%>" size="4" maxlength="4">        
  117.         请填写整数数字,越大排位越靠前。</td>
  118.     </tr>
  119.     <tr bgcolor="#f6f6f6">
  120.       <td bgcolor="#f6f6f6"><strong>所属分类</strong></td>
  121.       <td>
  122. <%
  123. com.gamvan.club.classed.ClubClassCollection cccm = new com.gamvan.club.classed.ClubClassCollection();
  124. %>
  125. <select name="ccIDD">
  126. <option value="0">顶层分类</option>
  127. <c:forEach var="ccc0" items="<%=cccm.classList()%>">
  128. <club:classinfo type="option"  idIs="${ccc0.ccID}" linkId="<%=ccIDD%>" value="${ccc0.ccName}"/>
  129. <c:set value="${ccc0.ccID}"  target="${ccc}" property="reId" />
  130. <c:forEach var="ccc1" items="<%=ccc.classReList()%>">
  131. <club:classinfo property="&nbsp;&nbsp;&nbsp;&nbsp;" type="option"  idIs="${ccc1.ccID}" linkId="<%=ccIDD%>" value="${ccc1.ccName}"/>
  132. </c:forEach>
  133. </c:forEach>
  134. </select>
  135. (只有在分类下才能建设分版)
  136. </td>
  137.     </tr>
  138.     <tr bgcolor="#f6f6f6">
  139.       <td bgcolor="#f6f6f6"><strong>类别</strong></td>
  140.       <td>
  141. <input type="radio" name="ccType" value="0" <% if(ccType==0){out.print("checked");}%> />作为分类
  142. &nbsp;&nbsp;
  143. <input type="radio" name="ccType" value="1" <% if(ccType==1){out.print("checked");}%> />作为版面
  144. </td>
  145.     </tr>
  146.     <tr bgcolor="#f6f6f6">
  147.       <td bgcolor="#f6f6f6"><strong>默认的打开风格</strong></td>
  148.       <td>
  149. <input type="radio" name="ccStyle" value="0" <% if(ccStyle==0){out.print("checked");}%> />论坛风格
  150. &nbsp;&nbsp;
  151. <input type="radio" name="ccStyle" value="1" <% if(ccStyle==1){out.print("checked");}%> />讨论区风格
  152.   </td>
  153.     </tr>
  154.     <tr bgcolor="#f6f6f6">
  155.       <td bgcolor="#f6f6f6"><strong>是否隐藏</strong></td>
  156.       <td>
  157. <input type="radio" name="ccHidden" value="false" <% if(!ccHidden){out.print("checked");}%> />不隐藏
  158. &nbsp;&nbsp;&nbsp;&nbsp;
  159. <input type="radio" name="ccHidden" value="true" <% if(ccHidden){out.print("checked");}%> />隐藏
  160. &nbsp;&nbsp;<span class="style1">(隐藏的版面或分类不影响访问)</span>   </td>
  161.     </tr>
  162.     <tr bgcolor="#f6f6f6">
  163.       <td bgcolor="#f6f6f6"><strong>下属版面是否打开</strong></td>
  164.       <td>
  165. <input type="radio" name="ccList" value="false" <% if(!ccList){out.print("checked");}%> />不打开
  166. &nbsp;&nbsp;&nbsp;&nbsp;
  167. <input type="radio" name="ccList" value="true" <% if(ccList){out.print("checked");}%> />打开
  168. &nbsp;&nbsp;<span class="style1">(隐藏的版面或分类不影响访问)</span>   </td>
  169.     </tr>
  170.     <tr bgcolor="#f6f6f6">
  171.       <td bgcolor="#f6f6f6"><strong>属性</strong></td>
  172.       <td><select name="ccPro" id="ccPro">
  173.         <option value="0" <% if(ccPro==0){out.print("selected");}%> >开放的</option>
  174.         <option value="1" <% if(ccPro==1){out.print("selected");}%> >主题的</option>
  175.         <option value="2" <% if(ccPro==2){out.print("selected");}%> >锁定的</option>
  176.         <option value="3" <% if(ccPro==3){out.print("selected");}%> >认证的</option>
  177. <option value="4" <% if(ccPro==4){out.print("selected");}%> >链接的</option>
  178.       </select>连接的属性请在简介出输入URL地址</td>
  179.     </tr>
  180.     <tr bgcolor="#f6f6f6">
  181.       <td bgcolor="#f6f6f6"><strong>浏览等级</strong></td>
  182.       <td>
  183. <select name="ccUgid">
  184. <c:forEach var="cug" items="<%=cug.userGradeList()%>">
  185. <club:usergrade type="option"  idIs="${cug.ugID}" linkId="<%=ccUgid%>" value="${cug.ugName}"/>
  186. </c:forEach>
  187. </select>
  188. </td>
  189.     </tr>
  190.     <tr bgcolor="#f6f6f6">
  191.       <td bgcolor="#f6f6f6"><strong>参数设定</strong></td>
  192.       <td>
  193. [1]每页显示主题<input name="ccTopicNum" type="text" id="ccTopicNum" value="<%=ccTopicNum%>" size="4" maxlength="4">
  194. <br/>
  195. [2]每篇主题每页显示回复<input name="ccReplyNum" type="text" id="ccReplyNum" value="<%=ccReplyNum%>" size="4" maxlength="4">篇
  196.  <br/>
  197. [3]最高允许在线<input name="ccMostOnline" type="text" id="ccMostOnline" value="<%=ccMostOnline%>" size="5" maxlength="5">人(0为不限制)</td>
  198. </tr>
  199. <tr bgcolor="#f6f6f6">
  200. <td bgcolor="#f6f6f6"><strong>简介</strong></td>
  201. <td>
  202. <textarea name="ccSummary" cols="50" rows="6" id="ccSummary"><%=ccSummary%></textarea>
  203. </td>
  204. </tr>
  205.     <tr bgcolor="#f6f6f6">
  206.       <td bgcolor="#f6f6f6"><strong>认证用户</strong></td>
  207.       <td>
  208. <%out.println(textArea2("ccUserPass",50, 6, ccUserPass));%>
  209. </td>
  210.     </tr>
  211.     <tr bgcolor="#f6f6f6">
  212.       <td bgcolor="#f6f6f6">&nbsp;</td>
  213.       <td>&nbsp;</td>
  214.     </tr>
  215.     <tr bgcolor="#FFFFCC">
  216.       <td colspan="2"><strong>以下参数仅对社区版面有效,对分类无效!</strong></td>
  217.     </tr>
  218.     <tr bgcolor="#f6f6f6">
  219.       <td bgcolor="#f6f6f6"><strong>附件上传</strong></td>
  220.       <td>
  221. <input name="ccUpfilePass" type="radio" value="0" <% if(ccUpfilePass==0){out.print("checked");}%> />默认打开
  222. <input name="ccUpfilePass" type="radio" value="1" <% if(ccUpfilePass==1){out.print("checked");}%> />强行打开 
  223. <input name="ccUpfilePass" type="radio" value="2" <% if(ccUpfilePass==2){out.print("checked");}%> />强行关闭
  224. <span class="style1">(强行打开或关闭优先级高于系统总控制优先级) </span></td>
  225.     </tr>
  226.     <tr bgcolor="#f6f6f6">
  227.       <td bgcolor="#f6f6f6"><strong>单个文件最大限制</strong></td>
  228.       <td>
  229. <input name="ccUpfileMax" type="text" id="ccUpfileMax" value="<%=ccUpfileMax%>" size="10" maxlength="10">
  230. 单位Bytes<span class="style1">(0为不限制) </span></td>
  231.     </tr>
  232.     <tr bgcolor="#f6f6f6">
  233.       <td bgcolor="#f6f6f6">&nbsp;</td>
  234.       <td>
  235. <input type="hidden" name="gvBack" value=""/>
  236. <input type="submit" name="gvSubmit" value="确定提交">
  237. &nbsp;&nbsp;&nbsp;&nbsp;
  238. <input name="classDo" type="checkbox" id="classDo" value="1">
  239. 同时更新前台导航按钮</td>
  240.     </tr>
  241.  </form>
  242. </table>
  243. <br/>
  244. <br/>
  245. </body>
  246. </html>