- <%@ page language="java" contentType="text/html;charset=UTF-8" %>
- <%@ include file="../GVinc/gvInclude.jsp" %>
- <%@ include file="clubMasterPass.jsp" %>
- <jsp:useBean id="gop" scope="request" class="com.gamvan.club.group.GroupEdit"/>
- <jsp:useBean id="gct" scope="request" class="com.gamvan.club.group.GroupCollection"/>
- <jsp:useBean id="tc" scope="request" class="com.gamvan.tools.TypeChange"/>
- <%
- //response.setHeader("Pragma","No-cache");//HTTP 1.1
- //response.setHeader("Cache-Control","no-cache");//HTTP 1.0
- //response.setHeader("Expires","0");//防止被proxy
- //权限判断共享代码
- boolean ispass = false;
- ArrayEdit ae2 = new ArrayEdit();
- ispass = ae2.txtsArray(gvcmgTxt,1,"|");
- if(!ispass){
- out.print(prtCenter("您无权进行此项操作!","",2));
- out.close();
- }
- //权限判断代码结束
- %>
- <%
- int groupID = 0;
- String groupName="";
- int groupIDD = 0;
- int groupType=0;
- int groupOrder = 0;
- int groupLayer = 0;
- groupID = tc.stringToInt(request.getParameter("groupID"));
- groupIDD = tc.stringToInt(request.getParameter("groupIDD"));
- groupType = tc.stringToInt(request.getParameter("groupType"));
- if(groupType<=0){groupType=1;}
- String act=tc.nullOfString(request.getParameter("act"));
- if(act.trim().equals("")){
- act="add";
- }
- if(request.getMethod().equals("POST")){
- groupName=request.getParameter("groupName");
- groupOrder = tc.stringToInt(request.getParameter("groupOrder"));
- if(act.equals("add")){
- if(groupIDD==0){
- groupLayer = 0;
- }else{
- groupLayer = 1;
- }
- }else{
- groupLayer = tc.stringToInt(request.getParameter("groupLayer"));
- }
- gop.setGroupID(groupID);
- gop.setGroupName(groupName);
- gop.setGroupOrder(groupOrder);
- gop.setGroupLayer(groupLayer);
- gop.setGroupType(groupType);
- //out.print(groupType);
- //out.close();
- gop.setGroupIDD(groupIDD);
- gop.groupAct(act);
- out.print(prtCenter2(gop.getMessage(),"groupEdit.jsp?groupType="+groupType+"&act="+act+"&groupID="+groupID+"",1));
- out.close();
- if(true)return;
- }
- %><%
- GroupItem gim = new GroupItem();
- gct.setGroupID(groupID);
- try{
- gim = (GroupItem)gct.groupInfo();
- }catch(Exception e){
- out.print(e.toString());
- }
- if(gim!=null){
- groupName = gim.getGroupName();
- groupLayer = gim.getGroupLayer();
- //groupType = gi.getGroupType();
- groupOrder = gim.getGroupOrder();
- }
- %>
- <html>
- <head>
- <title>网站分类管理</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="css.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#bbbbbb">
- <tr>
- <td align="center"><strong>配置分类信息</strong></td>
- </tr>
- </table>
- <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#bbbbbb">
- <form name="Gforms" method="post" action=""><tr bgcolor="#f6f6f6">
- <td width="150" height="22" bgcolor="#f6f6f6"><strong>分类名称</strong></td>
- <td><input name="groupName" type="text" id="groupName" size="30" value="<%=groupName%>"></td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="1" bgcolor="#f6f6f6"><strong>所属分类</strong></td>
- <td>
- <select name="groupIDD" id="groupIDD">
- <option value="0" selected>顶层分类</option>
- <%
- StringBuffer sql_1 = new StringBuffer();
- sql_1.append("from GroupItem as gi ");
- sql_1.append(" where gi.groupLayer=0 and gi.groupType="+groupType+"");
- sql_1.append(" order by gi.groupOrder desc");
- %>
- <c:set value="<%=sql_1.toString()%>" target="${gct}" property="sql" />
- <c:set var="isid" value="<%=String.valueOf(groupIDD)%>"/>
- <c:forEach var="gIDD" items="<%=gct.groupQuery()%>">
- <c:choose>
- <c:when test="${gIDD.groupID==isid}">
- <option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>" selected><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
- </c:when>
- <c:otherwise>
- <option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>"><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </select>
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>分类排序</strong></td>
- <td>
- <input name="groupOrder" type="text" id="groupOrder" size="4" maxlength="4" value="<%=groupOrder%>">
- 整数数字,数字越大排位越靠前。
- <script language="javascript" src="../gvScript/GVtopCode.js"></script>
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"><strong>当前操作</strong></td>
- <td>
- <input type="hidden" name="groupType" value="<%=groupType%>">
- <input type="hidden" name="groupLayer" value="<%=groupLayer%>">
- </td>
- </tr>
- <tr bgcolor="#f6f6f6">
- <td height="22" bgcolor="#f6f6f6"> </td>
- <td><input name="gvSubmit" type="submit" id="gvSubmit" value="确定更新"></td>
- </tr>
- </form>
- </table>
- </body>
- </html>