clubClassEdit.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:11k
- <%@ page language="java" contentType="text/html;charset=UTF-8" %>
- <%@ include file="../GVinc/gvInclude.jsp" %>
- <%@ include file="clubMasterPass.jsp" %>
- <jsp:useBean id="cce" scope="page" class="com.gamvan.club.classed.ClubClassEdit"/>
- <jsp:useBean id="ccb" scope="page" class="com.gamvan.club.classed.ClubClassBar"/>
- <jsp:useBean id="ccc" scope="page" class="com.gamvan.club.classed.ClubClassCollection"/>
- <jsp:useBean id="cci" scope="page" class="com.gamvan.club.classed.ClubClassInfo"/>
- <jsp:useBean id="fo" scope="page" class="com.gamvan.tools.FileOperate" /><%
- //权限判断共享代码
- boolean ispass = false;
- ispass = ae.txtsArray(gvcmgTxt,4,"|");
- if(!ispass){
- out.print(prtCenter2("您无权进行此项操作!","",2));
- out.close();
- }
- if(request.getParameter("ccID")!=null){
- ccID = Integer.parseInt(request.getParameter("ccID"));
- }else{
- ccID = 0;
- }
- if(request.getMethod().equals("POST")){
- ccName = request.getParameter("ccName");
- if(ccName==null || ccName.equals("")){
- out.print(prtCenter2("分类或版面名称不能为空!","",2));
- out.close();
- }else{
- cce.setCcName(ccName);
- //out.print(request.getParameter("ccSummary"));
- cce.setCcSummary(request.getParameter("ccSummary"));
- cce.setCcUserPass(request.getParameter("ccUserPass"));
- cce.setCcType(TypeChange.stringToByte(request.getParameter("ccType")));
- cce.setCcStyle(TypeChange.stringToByte(request.getParameter("ccStyle")));
- cce.setCcPro(TypeChange.stringToByte(request.getParameter("ccPro")));
- cce.setCcOrder(TypeChange.stringToInt(request.getParameter("ccOrder")));
- cce.setCcHidden(TypeChange.stringToBoolean(request.getParameter("ccHidden")));
- cce.setCcIDD(TypeChange.stringToInt(request.getParameter("ccIDD")));
- cce.setCcUgid(TypeChange.stringToByte(request.getParameter("ccUgid")));
- cce.setCcTopicNum(TypeChange.stringToByte(request.getParameter("ccTopicNum")));
- cce.setCcReplyNum(TypeChange.stringToByte(request.getParameter("ccReplyNum")));
- cce.setCcList(TypeChange.stringToBoolean(request.getParameter("ccList")));
- cce.setCcMostOnline(TypeChange.stringToInt(request.getParameter("ccMostOnline")));
- cce.setCcUpfilePass(TypeChange.stringToByte(request.getParameter("ccUpfilePass")));
- cce.setCcUpfileMax(TypeChange.stringToInt(request.getParameter("ccUpfileMax")));
- //cce.setCcID(ccID);
- cce.classEdit(ccID);
- //out.print(cce.getMessage());
-
- if(TypeChange.stringToInt(request.getParameter("classDo"))==1){
- String filePathAndName=request.getRealPath("") + "\club\GVinc\gvFrameBar.jsp"; //绝对路径
- StringBuffer fileContent=new StringBuffer("");
- fileContent.append("<");
- fileContent.append("%@ page language="java" contentType="text/html;charset=UTF-8" errorPage="err.jsp"");
- fileContent.append("%");
- fileContent.append(">");//
- try{
- fileContent.append(ccb.classBar_1());
- }catch(Exception e){
- fileContent.append(e.toString());
- }
- fo.createFile(filePathAndName,fileContent.toString(),"UTF-8");
- }
-
-
- out.print(prtCenter2("操作成功,点击这里返回!","clubClassEdit.jsp?ccID=" + ccID +"",1));
- out.close();
- }
- }
- // 读取版面信息
- if(ccID>0){
- ClubClassItem ccit = new ClubClassItem();
- cci.setCcID(ccID);
- ccit = cci.getClubClassInfo();
- ccName = ccit.getCcName();
- ccType = ccit.getCcType();
- ccOrder = ccit.getCcOrder();
- ccStyle = ccit.getCcStyle();
- ccPro = ccit.getCcPro();
- ccIDD = ccit.getCcIDD();
- ccHidden = ccit.getCcHidden();
- ccUgid = ccit.getCcUgid();
- ccList = ccit.getCcList();
- ccSummary = ccit.getCcSummary();
- ccUpfilePass = ccit.getCcUpfilePass();
- ccUpfileMax = ccit.getCcUpfileMax();
- ccUserPass = ccit.getCcUserPass();
- ccMostOnline = ccit.getCcMostOnline();
- ccTopicNum = ccit.getCcTopicNum();
- ccReplyNum = ccit.getCcReplyNum();
- }
- // 版面信息读取结束
- %>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>今晚在线-社区管理</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="css.css" rel="stylesheet" type="text/css">
- <style type="text/css">
- <!--
- .style1 {color: #999999}
- -->
- </style>
- </head>
- <body>
- <script language="javascript" src="../GVscript/GVtopCode.js"></script>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
- <tr>
- <td align="center"><strong>社区 版面/分类 添加/编辑</strong></td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
- <form name="Gforms" method="post" action="" onSubmit="javascript:postMsg();">
- <tr bgcolor="#f6f6f6">
- <td width="116" bgcolor="#f6f6f6"><strong>名称</strong></td>
- <td><input name="ccName" type="text" id="ccName" value="<%=ccName%>" size="30" maxlength="30">
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>排序ID</strong></td>
- <td><input name="ccOrder" type="text" id="ccOrder" value="<%=ccOrder%>" size="4" maxlength="4">
- 请填写整数数字,越大排位越靠前。</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>所属分类</strong></td>
- <td>
- <%
- com.gamvan.club.classed.ClubClassCollection cccm = new com.gamvan.club.classed.ClubClassCollection();
- %>
- <select name="ccIDD">
- <option value="0">顶层分类</option>
- <c:forEach var="ccc0" items="<%=cccm.classList()%>">
- <club:classinfo type="option" idIs="${ccc0.ccID}" linkId="<%=ccIDD%>" value="${ccc0.ccName}"/>
-
- <c:set value="${ccc0.ccID}" target="${ccc}" property="reId" />
- <c:forEach var="ccc1" items="<%=ccc.classReList()%>">
- <club:classinfo property=" " type="option" idIs="${ccc1.ccID}" linkId="<%=ccIDD%>" value="${ccc1.ccName}"/>
- </c:forEach>
-
- </c:forEach>
- </select>
- (只有在分类下才能建设分版)
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>类别</strong></td>
- <td>
- <input type="radio" name="ccType" value="0" <% if(ccType==0){out.print("checked");}%> />作为分类
-
- <input type="radio" name="ccType" value="1" <% if(ccType==1){out.print("checked");}%> />作为版面
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>默认的打开风格</strong></td>
- <td>
- <input type="radio" name="ccStyle" value="0" <% if(ccStyle==0){out.print("checked");}%> />论坛风格
-
- <input type="radio" name="ccStyle" value="1" <% if(ccStyle==1){out.print("checked");}%> />讨论区风格
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>是否隐藏</strong></td>
- <td>
- <input type="radio" name="ccHidden" value="false" <% if(!ccHidden){out.print("checked");}%> />不隐藏
-
- <input type="radio" name="ccHidden" value="true" <% if(ccHidden){out.print("checked");}%> />隐藏
- <span class="style1">(隐藏的版面或分类不影响访问)</span> </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>下属版面是否打开</strong></td>
- <td>
- <input type="radio" name="ccList" value="false" <% if(!ccList){out.print("checked");}%> />不打开
-
- <input type="radio" name="ccList" value="true" <% if(ccList){out.print("checked");}%> />打开
- <span class="style1">(隐藏的版面或分类不影响访问)</span> </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>属性</strong></td>
- <td><select name="ccPro" id="ccPro">
- <option value="0" <% if(ccPro==0){out.print("selected");}%> >开放的</option>
- <option value="1" <% if(ccPro==1){out.print("selected");}%> >主题的</option>
- <option value="2" <% if(ccPro==2){out.print("selected");}%> >锁定的</option>
- <option value="3" <% if(ccPro==3){out.print("selected");}%> >认证的</option>
- <option value="4" <% if(ccPro==4){out.print("selected");}%> >链接的</option>
- </select>连接的属性请在简介出输入URL地址</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>浏览等级</strong></td>
- <td>
- <select name="ccUgid">
- <c:forEach var="cug" items="<%=cug.userGradeList()%>">
- <club:usergrade type="option" idIs="${cug.ugID}" linkId="<%=ccUgid%>" value="${cug.ugName}"/>
- </c:forEach>
- </select>
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>参数设定</strong></td>
- <td>
- [1]每页显示主题<input name="ccTopicNum" type="text" id="ccTopicNum" value="<%=ccTopicNum%>" size="4" maxlength="4">
- 篇
- <br/>
- [2]每篇主题每页显示回复<input name="ccReplyNum" type="text" id="ccReplyNum" value="<%=ccReplyNum%>" size="4" maxlength="4">篇
- <br/>
- [3]最高允许在线<input name="ccMostOnline" type="text" id="ccMostOnline" value="<%=ccMostOnline%>" size="5" maxlength="5">人(0为不限制)</td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>简介</strong></td>
- <td>
- <textarea name="ccSummary" cols="50" rows="6" id="ccSummary"><%=ccSummary%></textarea>
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>认证用户</strong></td>
- <td>
- <%out.println(textArea2("ccUserPass",50, 6, ccUserPass));%>
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"> </td>
- <td> </td>
- </tr>
- <tr bgcolor="#FFFFCC">
- <td colspan="2"><strong>以下参数仅对社区版面有效,对分类无效!</strong></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>附件上传</strong></td>
- <td>
- <input name="ccUpfilePass" type="radio" value="0" <% if(ccUpfilePass==0){out.print("checked");}%> />默认打开
- <input name="ccUpfilePass" type="radio" value="1" <% if(ccUpfilePass==1){out.print("checked");}%> />强行打开
- <input name="ccUpfilePass" type="radio" value="2" <% if(ccUpfilePass==2){out.print("checked");}%> />强行关闭
- <span class="style1">(强行打开或关闭优先级高于系统总控制优先级) </span></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"><strong>单个文件最大限制</strong></td>
- <td>
- <input name="ccUpfileMax" type="text" id="ccUpfileMax" value="<%=ccUpfileMax%>" size="10" maxlength="10">
- 单位Bytes<span class="style1">(0为不限制) </span></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td bgcolor="#f6f6f6"> </td>
- <td>
- <input type="hidden" name="gvBack" value=""/>
- <input type="submit" name="gvSubmit" value="确定提交">
-
- <input name="classDo" type="checkbox" id="classDo" value="1">
- 同时更新前台导航按钮</td>
- </tr>
-
- </form>
- </table>
- <br/>
- <br/>
- </body>
- </html>