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

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="gop" scope="request" class="com.gamvan.club.group.GroupEdit"/>
  5. <jsp:useBean id="gct" scope="request" class="com.gamvan.club.group.GroupCollection"/>
  6. <jsp:useBean id="tc" scope="request" class="com.gamvan.tools.TypeChange"/>
  7. <% 
  8. //response.setHeader("Pragma","No-cache");//HTTP 1.1
  9. //response.setHeader("Cache-Control","no-cache");//HTTP 1.0
  10. //response.setHeader("Expires","0");//防止被proxy
  11. //权限判断共享代码
  12. boolean ispass = false;
  13. ArrayEdit ae2 = new ArrayEdit();
  14. ispass = ae2.txtsArray(gvcmgTxt,1,"|");
  15. if(!ispass){
  16. out.print(prtCenter("您无权进行此项操作!","",2));
  17. out.close();
  18. }
  19. //权限判断代码结束
  20. %>
  21. <% 
  22. int groupID = 0;
  23. String groupName="";
  24. int groupIDD = 0;
  25. int groupType=0;
  26. int groupOrder = 0;
  27. int groupLayer = 0; 
  28. groupID = tc.stringToInt(request.getParameter("groupID"));
  29. groupIDD = tc.stringToInt(request.getParameter("groupIDD"));
  30. groupType = tc.stringToInt(request.getParameter("groupType"));
  31. if(groupType<=0){groupType=1;}
  32. String act=tc.nullOfString(request.getParameter("act"));
  33. if(act.trim().equals("")){
  34. act="add";
  35. }
  36. if(request.getMethod().equals("POST")){
  37. groupName=request.getParameter("groupName");
  38. groupOrder = tc.stringToInt(request.getParameter("groupOrder"));
  39. if(act.equals("add")){
  40. if(groupIDD==0){
  41. groupLayer = 0; 
  42. }else{
  43. groupLayer = 1; 
  44. }
  45. }else{
  46. groupLayer = tc.stringToInt(request.getParameter("groupLayer"));
  47. }
  48. gop.setGroupID(groupID);
  49. gop.setGroupName(groupName);
  50. gop.setGroupOrder(groupOrder);
  51. gop.setGroupLayer(groupLayer);
  52. gop.setGroupType(groupType);
  53. //out.print(groupType);
  54. //out.close();
  55. gop.setGroupIDD(groupIDD);
  56. gop.groupAct(act);
  57. out.print(prtCenter2(gop.getMessage(),"groupEdit.jsp?groupType="+groupType+"&act="+act+"&groupID="+groupID+"",1));
  58. out.close();
  59. if(true)return;
  60. }
  61. %><%
  62. GroupItem gim = new GroupItem();
  63. gct.setGroupID(groupID);
  64. try{
  65. gim = (GroupItem)gct.groupInfo();
  66. }catch(Exception e){
  67. out.print(e.toString());
  68. }
  69. if(gim!=null){
  70. groupName = gim.getGroupName();
  71. groupLayer = gim.getGroupLayer();
  72. //groupType = gi.getGroupType();
  73. groupOrder = gim.getGroupOrder();
  74. }
  75. %>
  76. <html>
  77. <head>
  78. <title>网站分类管理</title>
  79. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  80. <link href="css.css" rel="stylesheet" type="text/css">
  81. </head>
  82. <body>
  83. <table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#bbbbbb">
  84.   <tr>
  85.     <td align="center"><strong>配置分类信息</strong></td>
  86.   </tr>
  87. </table>
  88. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#bbbbbb">
  89.   <form name="Gforms" method="post" action=""><tr bgcolor="#f6f6f6">
  90.     <td width="150" height="22" bgcolor="#f6f6f6"><strong>分类名称</strong></td>
  91.     <td><input name="groupName" type="text" id="groupName" size="30" value="<%=groupName%>"></td>
  92.   </tr>
  93.   <tr bgcolor="#f6f6f6">
  94.     <td height="1" bgcolor="#f6f6f6"><strong>所属分类</strong></td>
  95.     <td>
  96. <select name="groupIDD" id="groupIDD">
  97. <option value="0" selected>顶层分类</option>
  98. <%
  99. StringBuffer sql_1 = new StringBuffer();
  100. sql_1.append("from GroupItem as gi ");
  101. sql_1.append(" where gi.groupLayer=0 and  gi.groupType="+groupType+"");
  102. sql_1.append(" order by gi.groupOrder desc");
  103. %>
  104. <c:set value="<%=sql_1.toString()%>"  target="${gct}" property="sql" />
  105. <c:set var="isid" value="<%=String.valueOf(groupIDD)%>"/>
  106. <c:forEach var="gIDD" items="<%=gct.groupQuery()%>"> 
  107. <c:choose>
  108. <c:when test="${gIDD.groupID==isid}">
  109. <option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>" selected><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
  110. </c:when>
  111. <c:otherwise>
  112. <option value="<c:out value="${gIDD.groupID}" escapeXml="false"/>"><c:out value="${gIDD.groupName}" escapeXml="false"/></option>
  113. </c:otherwise>
  114. </c:choose>
  115. </c:forEach>
  116. </select>
  117. </td>
  118.   </tr>  
  119. <tr bgcolor="#f6f6f6">
  120.     <td height="22" bgcolor="#f6f6f6"><strong>分类排序</strong></td>
  121.     <td>
  122. <input name="groupOrder" type="text" id="groupOrder" size="4" maxlength="4" value="<%=groupOrder%>"> 
  123. 整数数字,数字越大排位越靠前。
  124.  <script language="javascript" src="../gvScript/GVtopCode.js"></script>
  125. </td>
  126.   </tr>
  127.   <tr bgcolor="#f6f6f6">
  128.     <td height="22" bgcolor="#f6f6f6"><strong>当前操作</strong></td>
  129.     <td>
  130. <input type="hidden" name="groupType" value="<%=groupType%>">
  131. <input type="hidden" name="groupLayer" value="<%=groupLayer%>">
  132. </td>
  133.   </tr>
  134.    <tr bgcolor="#f6f6f6">
  135.     <td height="22" bgcolor="#f6f6f6">&nbsp;</td>
  136.     <td><input name="gvSubmit" type="submit" id="gvSubmit" value="确定更新"></td>
  137.   </tr>
  138.   </form>
  139. </table>
  140. </body>
  141. </html>