NewMenu.jsp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <%@ include file="/include/head.jsp"%>
  2. <%@ page contentType="text/html;charset=GBK"%>
  3. <%
  4. String[][] views = (String[][])request.getAttribute("views");
  5. String roles = (String)request.getAttribute("roles");
  6. String[][] pindaos = (String[][])request.getAttribute("pindaos");
  7. String selectFlag="选择";
  8. %>
  9. <html>
  10. <head>
  11. <title>菜单编辑</title>
  12. <LINK rel="stylesheet" type="text/css" href="/shares/resources/css/type1.css" />
  13. <SCRIPT LANGUAGE="JavaScript">
  14. function submitForm(){
  15. //var re=window.confirm("您要将提交当前的页面吗?");
  16. s1=theForm.PinDao.options(theForm.PinDao.options.selectedIndex).text;
  17. if (s1=="<%=selectFlag%>") {
  18. window.alert("频道不能为空");return("");
  19. }
  20. // if (theForm.Childs.options(theForm.Childs.options.selectedIndex).text=="<%=selectFlag%>")
  21. // {
  22. // window.alert("级别数不能为空");return("");
  23. //}
  24. if (theForm.Layers.options(theForm.Layers.options.selectedIndex).text=="<%=selectFlag%>")
  25. {
  26. window.alert("子数不能为空");return("");
  27. }
  28. if (theForm.MenuName.value=="") {window.alert("菜单名不能为空");return("");}
  29. if (theForm.MenuURL.value=="") {window.alert("菜单URL不能为空");return("");}
  30. if (theForm.Pos.value=="") {
  31. window.alert("位置不能为空");return("");
  32. }
  33. s1=theForm.Role.options(theForm.Role.options.selectedIndex).text;
  34. if (s1=="<%=selectFlag%>") {
  35. window.alert("角色不能为空");return("");
  36. }
  37. theForm.submit();
  38. }
  39. </SCRIPT>
  40. </head>
  41. <body>
  42. <form name="theForm" method="POST" action="SubmitMenu.do?new=0">
  43. <%@ include file="/include/top.jsp"%>
  44. <!-- AncestorID 当选择频道后由系统带出 -->
  45. <input type="hidden" name="AncestorID">
  46. <table border="0" width="100%" cellspacing="1">
  47. <tr>
  48. <td ><label>书册</label></td>
  49. <td >
  50. <select name="PinDao" class="formselect">
  51. <option><%=selectFlag%></option>
  52. <%
  53. if (pindaos!= null){
  54. for(int i=0;i<pindaos.length;i++) {
  55. %>
  56. <option value=<%=pindaos[i][1]%>><%=pindaos[i][0]%></option>
  57. <%
  58. }
  59. }
  60. %>
  61. </select>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td ><label>级别数</label></td>
  66. <td >
  67. <select type="text" name="Layers" class="formselect">
  68. <option><%=selectFlag%></option>
  69. <option value=0>最上层</option>
  70. <option>1</option>
  71. <option>2</option>
  72. <option>3</option>
  73. <option>4</option>
  74. </select>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td ><label>子数</label></td>
  79. <td >
  80. <select name="Childs" class="formselect">
  81. <option><%=selectFlag%></option>
  82. <option value=0>有子项</option>
  83. <option value=1>无子项</option>
  84. </select></td>
  85. </tr>
  86. <tr>
  87. <td ><label>菜单名</label></td>
  88. <td ><input type="text" name="MenuName" size="80" ></td>
  89. </tr>
  90. <tr>
  91. <td ><label>菜单URL</label></td>
  92. <td ><input type="text" name="MenuURL" size="80" value="\viewengine.do" ></td>
  93. </tr>
  94. <tr>
  95. <td ><label>视图关系</label></td>
  96. <td >
  97. <select name="ViewAppName" class="formselect">
  98. <option selected><%=selectFlag%></option>
  99. <%
  100. if (views!= null){
  101. for(int i=0;i<views.length;i++) {
  102. %>
  103. <option><%=views[i][0]%></option>
  104. <%
  105. }
  106. }
  107. %>
  108. </select>
  109. </td>
  110. </tr>
  111. <tr>
  112. <td ><label>请求参数表达式</label></td>
  113. <td ><input type="text" name="Parameter" size="80" value="" ></td>
  114. </tr>
  115. <tr>
  116. <td ><label>图标</label></td>
  117. <td ><input type="text" name="Image" size="80" value="\images\tree\vwicn019.gif" ></td>
  118. </tr>
  119. <tr>
  120. <td ><label>位置</label></td>
  121. <td ><input type="text" name="Pos" size="2" ></td>
  122. </tr>
  123. <tr>
  124. <td ><label>角色</label></td>
  125. <td >
  126. <select name="Role" class="formselect">
  127. <%=roles%>
  128. </select></td>
  129. </tr>
  130. </table>
  131. <p>
  132. <input class="small" type="button" value="下一步骤" name="B1" onclick="submitForm()">
  133. </form>
  134. </body>
  135. </html>