/src/web/html/net_route_dynamic_display.php
PHP | 297 lines | 276 code | 21 blank | 0 comment | 43 complexity | b3454697e0a30ba3fafc99d3ff809792 MD5 | raw file
- <?php
- session_start();
- include_once("function_right.php");
- if(!JudgeUserRight()) return FALSE;
- ?>
- <html>
- <head>
- <title></title>
- <META NAME="robots" CONTENT="index, follow">
- <META NAME="GOOGLEBOT" CONTENT="INDEX, FOLLOW">
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="../css/index.css" rel="stylesheet" type="text/css" />
- </head>
- <script src="/js/common.js"></script>
- <script language='javascript'>
- function add_recv_route()
- {
- var i = document.form1.recv_ip_list.length;
- if (document.form1.elements["recv_ip"].value == "") {
- window.alert("IP?????");
- document.form1.elements["recv_ip"].focus();
- return false;
- } else {
- if (!checkNetIP(document.form1.elements["recv_ip"].value)) {
- window.alert("??IP??");
- document.form1.elements["recv_ip"].focus();
- return false;
- }
- }
- var opt = new Option(document.form1.elements["recv_ip"].value, document.form1.elements["recv_ip"].value);
- document.form1.recv_ip_list.options[i] = opt;
-
- return true;
- }
- function add_send_route()
- {
- var i = document.form1.send_ip_list.length;
- if (document.form1.elements["send_ip"].value == "") {
- window.alert("IP?????");
- document.form1.elements["send_ip"].focus();
- return false;
- } else {
- if (!checkNetIP(document.form1.elements["send_ip"].value)) {
- window.alert("??IP??");
- document.form1.elements["send_ip"].focus();
- return false;
- }
- }
- var opt = new Option(document.form1.elements["send_ip"].value, document.form1.elements["send_ip"].value);
- document.form1.send_ip_list.options[i] = opt;
-
- return true;
- }
- function del_recv_route()
- {
- var i;
- if (document.form1.recv_ip_list.options.length > 0) {
- for (i=0; i<document.form1.recv_ip_list.options.length; i++) {
- if (document.form1.recv_ip_list.options[i].selected == true) {
- document.form1.recv_ip_list.options[i] = null;
- break;
- }
- }
- }
- }
- function del_send_route()
- {
- var i;
- if (document.form1.send_ip_list.options.length > 0) {
- for (i=0; i<document.form1.send_ip_list.options.length; i++) {
- if (document.form1.send_ip_list.options[i].selected == true) {
- document.form1.send_ip_list.options[i] = null;
- break;
- }
- }
- }
- }
- function checksubmit()
- {
- var strRecvIp, strSendIp;
- strRecvIp = "";
- for(var i=0; i<document.form1.recv_ip_list.length; i++) {
- strRecvIp = strRecvIp + document.form1.recv_ip_list.options[i].value + "%";
- }
- document.form1.txt_recv_ip.value = strRecvIp;
- strSendIp = "";
- for(var i=0; i<document.form1.send_ip_list.length; i++) {
- strSendIp = strSendIp + document.form1.send_ip_list.options[i].value + "%";
- }
- document.form1.txt_send_ip.value = strSendIp;
- document.form1.submit();
- }
- </script>
- <body class=bianju>
- <table width=460 border=0 cellpadding=0 cellspacing=0 >
- <tr>
- <td colspan=8>???????????? --> ????--> ?????? <br>
- <br></td></tr>
- </table>
- <table height="23" border=0 cellpadding=0 cellspacing=0 >
- <tr>
- <td width=80 class=ttitle><div align="center"><a href="net_route_static_display.php">????</a></div></td>
- <td width=10> </td>
- <td width=80 align=center class=ttitle><a href="net_route_policy_display.php">????</a></td>
- <td width=10> </td>
- <td width=80 align=center class=ttitle01><a href="net_route_dynamic_display.php ">????</a></td>
- </tr>
- </table>
- <?php
- include "function_net_route.php";
- $ret_array = GetXmlDynamicRoutes();
- if ($ret_array[0]['Enabled'] == 1)
- {
- $enabled = "checked";
- }
- else
- {
- $disabled = "checked";
- }
- if ($ret_array[0]['Ospf'] == 1)
- {
- $enabled = "checked";
- }
- else
- {
- $disabled = "checked";
- }
- if ($ret_array[0]['Rip'] == 1)
- {
- $rip_checked = "checked";
- }
- if ($ret_array[0]['RipProto'] == "ripv1")
- {
- $ripv1_checked = "checked";
- }
- if ($ret_array[0]['RipProto'] == "ripv2")
- {
- $ripv2_checked = "checked";
- }
- if ($ret_array[0]['RipAuthType'] == "no") # no / simple / md5
- {
- $rip_auth_no = "checked";
- }
- if ($ret_array[0]['RipAuthType'] == "simple") # no / simple / md5
- {
- $rip_auth_simple = "checked";
- }
- if ($ret_array[0]['RipAuthType'] == "md5") # no / simple / md5
- {
- $rip_auth_md5 = "checked";
- }
- $rip_auth_key = $ret_array[0]['RipAuthKey'];
- if ($ret_array[0]['Ospf'] == 1)
- {
- $ospf_checked = "checked";
- }
- if ($ret_array[0]['OspfAuthType'] == "no") # no / simple / md5
- {
- $ospf_auth_no = "checked";
- }
- if ($ret_array[0]['OspfAuthType'] == "simple") # no / simple / md5
- {
- $ospf_auth_simple = "checked";
- }
- if ($ret_array[0]['OspfAuthType'] == "md5") # no / simple / md5
- {
- $ospf_auth_md5 = "checked";
- }
- $ospf_auth_key = $ret_array[0]['OspfAuthKey'];
- ?>
- <table width=98% cellpadding=0 cellspacing=0 border=0><tr><td colspan=8 height=3 class=in07></td></tr></table>
- <table width=98% cellpadding=0 cellspacing=0 class=tborder>
- <tr>
- <td class=tline>???????</td>
- </tr>
- <FORM name=form1 METHOD=post action="net_route_dynamic_set.php">
- <tr>
- <td height=400 class=ttext01 valign=top>
- <table width=100% cellpadding=2 cellspacing=4 border=0>
- <tr>
- <td width="8%">? ??</td>
- <td width="83%"><input type=radio value="1" <?php print $enabled ?> name="run">
- ?
- <input type=radio value="0" name="run" <?php print $disabled ?> >
- ? </td>
- </tr>
- <tr>
- <td width="12%"><input type="checkbox" name="rip" value="1" <?php print $rip_checked ?> >
- RIP??</td>
- <td width="88%"> </td>
- </tr>
- <tr>
- <td> </td>
- <td><input type="radio" name="rip_proto" value="ripv1" <?php print $ripv1_checked ?> >
- ripv1
- <input type="radio" name="rip_proto" value="ripv2" <?php print $ripv2_checked ?> >
- ripv2</td>
- </tr>
- <tr>
- <td height="200"> </td>
- <td><table width="603" height="170" border=0 cellpadding=2 cellspacing=4>
- <tr>
- <td width="291" height="24">??????????????</td>
- <td width="271">??????????????</td>
- </tr>
- <tr>
- <td height="94">
- <input type="hidden" name="txt_recv_ip"/>
- <input type="hidden" name="txt_send_ip"/>
- <div>
- <select name="recv_ip_list" class=p03 multiple>
- <%=recv_list_line%>
- </select>
- <input type="button" class=save name="del_recv_ip" value="??" onclick="del_recv_route();">
- </div>
- <div>IP???
- <input type="text" name="recv_ip" size=15>
- <input type="button" class=save name="add_recv_ip" value="??" onclick="add_recv_route();">
- </div></td><td><div>
- <select name="send_ip_list" class=p03 multiple>
- <%=send_list_line%>
- </select>
- <input type="button" class=save name="add_send_ip" value="??" onclick="del_send_route();">
- </div>
- <div>IP???
- <input type="text" name="send_ip" size=15>
- <input type="button" class=save name="add_send_ip" value="??" onclick="add_send_route();">
- </div></td>
- </tr>
- </table>
- <div> </div>
- <div>?????</div>
- <div> <input type="radio" name="rip_auth_type" value="no" <?php print $rip_auth_no ?>>
- ? <input type="radio" name="rip_auth_type" value="simple" <?php print $rip_auth_simple ?>>
- ?? <input type="radio" name="rip_auth_type" value="md5" <?php print $rip_auth_md5 ?>>
- MD5</div>
- <div>?????
- <input type="text" name="rip_auth_key" value=<?php print $rip_auth_key ?>>(?????????,??128???)
- </div></td>
- </tr>
- <tr>
- <td height="18"><input type="checkbox" name="ospf" value="1" <?php print $ospf_checked ?>>
- OSPF??</td>
- <td> </td>
- </tr>
- <tr>
- <td height="18"></td>
- <td><div>?????</div>
- <div> <input type="radio" name="ospf_auth_type" value="no" <?php print $ospf_auth_no ?>>
- ? <input type="radio" name="ospf_auth_type" value="simple" <?php print $ospf_auth_simple ?>>
- ?? <input type="radio" name="ospf_auth_type" value="md5" <?php print $ospf_auth_md5 ?>>
- MD5</div>
- </td>
- </tr>
- <tr>
- <td height="18"></td>
- <td>?????
- <input type="text" name="ospf_auth_key" value=<?php print $ospf_auth_key ?>>(?????????,??128???) </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height=1 class=in06></td>
- </tr>
- <tr>
- <td class=in05 height=36>
- <table cellpadding=2 cellspacing=6 border=0>
- <tr>
- <td width=70></td>
- <td><input name="save" type=button class=save id="id_save" value=? ? onclick="checksubmit();"></td>
- </tr>
- </table></td>
- </tr>
- </FORM>
- </table>
- <br>
- </body>
- </html>