PageRenderTime 38ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/src/web/html/net_route_dynamic_display.php

http://windowsfw.googlecode.com/
PHP | 297 lines | 276 code | 21 blank | 0 comment | 43 complexity | b3454697e0a30ba3fafc99d3ff809792 MD5 | raw file
  1. <?php
  2. session_start();
  3. include_once("function_right.php");
  4. if(!JudgeUserRight()) return FALSE;
  5. ?>
  6. <html>
  7. <head>
  8. <title></title>
  9. <META NAME="robots" CONTENT="index, follow">
  10. <META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <link href="../css/index.css" rel="stylesheet" type="text/css" />
  13. </head>
  14. <script src="/js/common.js"></script>
  15. <script language='javascript'>
  16. function add_recv_route()
  17. {
  18. var i = document.form1.recv_ip_list.length;
  19. if (document.form1.elements["recv_ip"].value == "") {
  20. window.alert("IP?????");
  21. document.form1.elements["recv_ip"].focus();
  22. return false;
  23. } else {
  24. if (!checkNetIP(document.form1.elements["recv_ip"].value)) {
  25. window.alert("??IP??");
  26. document.form1.elements["recv_ip"].focus();
  27. return false;
  28. }
  29. }
  30. var opt = new Option(document.form1.elements["recv_ip"].value, document.form1.elements["recv_ip"].value);
  31. document.form1.recv_ip_list.options[i] = opt;
  32. return true;
  33. }
  34. function add_send_route()
  35. {
  36. var i = document.form1.send_ip_list.length;
  37. if (document.form1.elements["send_ip"].value == "") {
  38. window.alert("IP?????");
  39. document.form1.elements["send_ip"].focus();
  40. return false;
  41. } else {
  42. if (!checkNetIP(document.form1.elements["send_ip"].value)) {
  43. window.alert("??IP??");
  44. document.form1.elements["send_ip"].focus();
  45. return false;
  46. }
  47. }
  48. var opt = new Option(document.form1.elements["send_ip"].value, document.form1.elements["send_ip"].value);
  49. document.form1.send_ip_list.options[i] = opt;
  50. return true;
  51. }
  52. function del_recv_route()
  53. {
  54. var i;
  55. if (document.form1.recv_ip_list.options.length > 0) {
  56. for (i=0; i<document.form1.recv_ip_list.options.length; i++) {
  57. if (document.form1.recv_ip_list.options[i].selected == true) {
  58. document.form1.recv_ip_list.options[i] = null;
  59. break;
  60. }
  61. }
  62. }
  63. }
  64. function del_send_route()
  65. {
  66. var i;
  67. if (document.form1.send_ip_list.options.length > 0) {
  68. for (i=0; i<document.form1.send_ip_list.options.length; i++) {
  69. if (document.form1.send_ip_list.options[i].selected == true) {
  70. document.form1.send_ip_list.options[i] = null;
  71. break;
  72. }
  73. }
  74. }
  75. }
  76. function checksubmit()
  77. {
  78. var strRecvIp, strSendIp;
  79. strRecvIp = "";
  80. for(var i=0; i<document.form1.recv_ip_list.length; i++) {
  81. strRecvIp = strRecvIp + document.form1.recv_ip_list.options[i].value + "%";
  82. }
  83. document.form1.txt_recv_ip.value = strRecvIp;
  84. strSendIp = "";
  85. for(var i=0; i<document.form1.send_ip_list.length; i++) {
  86. strSendIp = strSendIp + document.form1.send_ip_list.options[i].value + "%";
  87. }
  88. document.form1.txt_send_ip.value = strSendIp;
  89. document.form1.submit();
  90. }
  91. </script>
  92. <body class=bianju>
  93. <table width=460 border=0 cellpadding=0 cellspacing=0 >
  94. <tr>
  95. <td colspan=8>???????????? --> ????--> ?????? <br>
  96. <br></td></tr>
  97. </table>
  98. <table height="23" border=0 cellpadding=0 cellspacing=0 >
  99. <tr>
  100. <td width=80 class=ttitle><div align="center"><a href="net_route_static_display.php">????</a></div></td>
  101. <td width=10>&nbsp;</td>
  102. <td width=80 align=center class=ttitle><a href="net_route_policy_display.php">????</a></td>
  103. <td width=10>&nbsp;</td>
  104. <td width=80 align=center class=ttitle01><a href="net_route_dynamic_display.php ">????</a></td>
  105. </tr>
  106. </table>
  107. <?php
  108. include "function_net_route.php";
  109. $ret_array = GetXmlDynamicRoutes();
  110. if ($ret_array[0]['Enabled'] == 1)
  111. {
  112. $enabled = "checked";
  113. }
  114. else
  115. {
  116. $disabled = "checked";
  117. }
  118. if ($ret_array[0]['Ospf'] == 1)
  119. {
  120. $enabled = "checked";
  121. }
  122. else
  123. {
  124. $disabled = "checked";
  125. }
  126. if ($ret_array[0]['Rip'] == 1)
  127. {
  128. $rip_checked = "checked";
  129. }
  130. if ($ret_array[0]['RipProto'] == "ripv1")
  131. {
  132. $ripv1_checked = "checked";
  133. }
  134. if ($ret_array[0]['RipProto'] == "ripv2")
  135. {
  136. $ripv2_checked = "checked";
  137. }
  138. if ($ret_array[0]['RipAuthType'] == "no") # no / simple / md5
  139. {
  140. $rip_auth_no = "checked";
  141. }
  142. if ($ret_array[0]['RipAuthType'] == "simple") # no / simple / md5
  143. {
  144. $rip_auth_simple = "checked";
  145. }
  146. if ($ret_array[0]['RipAuthType'] == "md5") # no / simple / md5
  147. {
  148. $rip_auth_md5 = "checked";
  149. }
  150. $rip_auth_key = $ret_array[0]['RipAuthKey'];
  151. if ($ret_array[0]['Ospf'] == 1)
  152. {
  153. $ospf_checked = "checked";
  154. }
  155. if ($ret_array[0]['OspfAuthType'] == "no") # no / simple / md5
  156. {
  157. $ospf_auth_no = "checked";
  158. }
  159. if ($ret_array[0]['OspfAuthType'] == "simple") # no / simple / md5
  160. {
  161. $ospf_auth_simple = "checked";
  162. }
  163. if ($ret_array[0]['OspfAuthType'] == "md5") # no / simple / md5
  164. {
  165. $ospf_auth_md5 = "checked";
  166. }
  167. $ospf_auth_key = $ret_array[0]['OspfAuthKey'];
  168. ?>
  169. <table width=98% cellpadding=0 cellspacing=0 border=0><tr><td colspan=8 height=3 class=in07></td></tr></table>
  170. <table width=98% cellpadding=0 cellspacing=0 class=tborder>
  171. <tr>
  172. <td class=tline>???????</td>
  173. </tr>
  174. <FORM name=form1 METHOD=post action="net_route_dynamic_set.php">
  175. <tr>
  176. <td height=400 class=ttext01 valign=top>
  177. <table width=100% cellpadding=2 cellspacing=4 border=0>
  178. <tr>
  179. <td width="8%">?&nbsp;&nbsp;&nbsp; ??</td>
  180. <td width="83%"><input type=radio value="1" <?php print $enabled ?> name="run">
  181. ?
  182. <input type=radio value="0" name="run" <?php print $disabled ?> >
  183. ? </td>
  184. </tr>
  185. <tr>
  186. <td width="12%"><input type="checkbox" name="rip" value="1" <?php print $rip_checked ?> >
  187. RIP??</td>
  188. <td width="88%">&nbsp;</td>
  189. </tr>
  190. <tr>
  191. <td>&nbsp;</td>
  192. <td><input type="radio" name="rip_proto" value="ripv1" <?php print $ripv1_checked ?> >
  193. ripv1&nbsp;&nbsp;&nbsp;&nbsp;
  194. <input type="radio" name="rip_proto" value="ripv2" <?php print $ripv2_checked ?> >
  195. ripv2</td>
  196. </tr>
  197. <tr>
  198. <td height="200">&nbsp;</td>
  199. <td><table width="603" height="170" border=0 cellpadding=2 cellspacing=4>
  200. <tr>
  201. <td width="291" height="24">??????????????</td>
  202. <td width="271">??????????????</td>
  203. </tr>
  204. <tr>
  205. <td height="94">
  206. <input type="hidden" name="txt_recv_ip"/>
  207. <input type="hidden" name="txt_send_ip"/>
  208. <div>
  209. <select name="recv_ip_list" class=p03 multiple>
  210. <%=recv_list_line%>
  211. </select>
  212. <input type="button" class=save name="del_recv_ip" value="??" onclick="del_recv_route();">
  213. </div>
  214. <div>IP???
  215. <input type="text" name="recv_ip" size=15>
  216. <input type="button" class=save name="add_recv_ip" value="??" onclick="add_recv_route();">&nbsp;&nbsp;
  217. </div></td><td><div>
  218. <select name="send_ip_list" class=p03 multiple>
  219. <%=send_list_line%>
  220. </select>
  221. <input type="button" class=save name="add_send_ip" value="??" onclick="del_send_route();">
  222. </div>
  223. <div>IP???
  224. <input type="text" name="send_ip" size=15>
  225. <input type="button" class=save name="add_send_ip" value="??" onclick="add_send_route();">&nbsp;&nbsp;
  226. </div></td>
  227. </tr>
  228. </table>
  229. <div>&nbsp;</div>
  230. <div>?????</div>
  231. <div>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="rip_auth_type" value="no" <?php print $rip_auth_no ?>>
  232. ?&nbsp;&nbsp;<input type="radio" name="rip_auth_type" value="simple" <?php print $rip_auth_simple ?>>
  233. ??&nbsp;&nbsp;<input type="radio" name="rip_auth_type" value="md5" <?php print $rip_auth_md5 ?>>
  234. MD5</div>
  235. <div>?????
  236. <input type="text" name="rip_auth_key" value=<?php print $rip_auth_key ?>>(?????????,??128???)
  237. </div></td>
  238. </tr>
  239. <tr>
  240. <td height="18"><input type="checkbox" name="ospf" value="1" <?php print $ospf_checked ?>>
  241. OSPF??</td>
  242. <td>&nbsp;</td>
  243. </tr>
  244. <tr>
  245. <td height="18"></td>
  246. <td><div>?????</div>
  247. <div>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="ospf_auth_type" value="no" <?php print $ospf_auth_no ?>>
  248. ?&nbsp;&nbsp;<input type="radio" name="ospf_auth_type" value="simple" <?php print $ospf_auth_simple ?>>
  249. ??&nbsp;&nbsp;<input type="radio" name="ospf_auth_type" value="md5" <?php print $ospf_auth_md5 ?>>
  250. MD5</div>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td height="18"></td>
  255. <td>?????
  256. <input type="text" name="ospf_auth_key" value=<?php print $ospf_auth_key ?>>(?????????,??128???) </td>
  257. </tr>
  258. </table></td>
  259. </tr>
  260. <tr>
  261. <td height=1 class=in06></td>
  262. </tr>
  263. <tr>
  264. <td class=in05 height=36>
  265. <table cellpadding=2 cellspacing=6 border=0>
  266. <tr>
  267. <td width=70></td>
  268. <td><input name="save" type=button class=save id="id_save" value=?&nbsp;&nbsp;&nbsp;? onclick="checksubmit();"></td>
  269. </tr>
  270. </table></td>
  271. </tr>
  272. </FORM>
  273. </table>
  274. <br>
  275. </body>
  276. </html>