/src/web/html/vpn_ssl_config.php
PHP | 320 lines | 302 code | 11 blank | 7 comment | 49 complexity | fe860a9542b485a0d87e5dac5d0feb61 MD5 | raw file
- <?php
- session_start();
- include_once("function_right.php");
- if(!JudgeUserRight()) return FALSE;
- ?>
- <html>
- <head>
- <title></title>
- <link href="../css/index.css" rel="stylesheet" type="text/css" />
- <script src="js/common.js"></script>
- <script language='javascript'>
- function CheckSubmit() {
- /*if ( document.IG_snmp.elements["server"].value != "" && !CheckDevname(document.IG_snmp.elements["server"].value)) {
- window.alert("????????????????????1-16??????????");
- document.IG_snmp.elements["server"].focus();
- return false;
- } */
- if (document.IG_snmp.elements["local"].value != "" && !CheckDevname(document.IG_snmp.elements["local"].value)) {
- window.alert("????????????????????1-16??????????");
- document.IG_snmp.elements["local"].focus();
- return false;
- }
- if (document.IG_snmp.elements["connect"].value != "" && !CheckDevname(document.IG_snmp.elements["connect"].value)) {
- window.alert("????????????????????1-16??????????");
- document.IG_snmp.elements["connect"].focus();
- return false;
- }
- if (document.IG_snmp.elements["community"].value == "" ){
- window.alert("Community ?????");
- document.ig_snmp.elements["community"].focus();
- return false;
- }
- if (!CheckDevname(document.IG_snmp.elements["community"].value)) {
- window.alert("????????????????????1-16??????????");
- document.ig_snmp.elements["community"].focus();
- return false;
- }
- document.IG_snmp.submit();
- }
- </script>
- </head>
- <?php
- include_once "function_net_snmp.php";
- $list = GetXmlSnmp();
- $sl = $list['SecLevel'];
- ?>
- <body class=bianju onload="changeShowVersion('priv'),changeShowNoObj('<?php echo $sl ?>')">
- <table width=460 border=0 cellpadding=0 cellspacing=0 >
- <tr>
- <td colspan=8>?????????? --> SSL VPN --> ???? <br>
- <br></td>
- </tr>
- </table>
- <table height="23" border=0 cellpadding=0 cellspacing=0 >
- <tr>
- <td width=80 class=ttitle01><div align="center"><a href="vpn_ssl_config.php">????</a></div></td>
- <td width=10 ></td>
- <td width=80 class=ttitle><div align="center"><a href="vpn_ssl_server_config.php">????</a></div></td>
- <td width=10 ></td>
- <td width=80 class=ttitle><div align="center"><a href="vpn_ssl_client_config.php">????</a></div></td>
- <td width=10 ></td>
- <td width=80 class=ttitle><div align="center"><a href="vpn_ssl_client_list.php">????</a></div></td>
- </tr>
- </table>
- <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>
- <FORM NAME=IG_snmp METHOD=post ACTION="net_snmp_service_set.php">
- <tr>
- <td height=10 align=right class=ttext01><div align="left">
- <table width=100% border=0 align="right" cellpadding=2 cellspacing=1>
- <tr>
- <?php
- //print_r($list);
- if ($list['Enabled'] == "1")
- $Enabled = "checked";
- if ($list['Version'] == "SNMPv1"){
- $v1 = "selected";
- $v2 = "";
- $v3 = "";
- }
- if ($list['Version'] == "SNMPv2c"){
- $v1 = "";
- $v2 = "selected";
- $v3 = "";
- }
- if ($list['Version'] == "SNMPv3"){
- $v1 = "";
- $v2 = "";
- $v3 = "selected";
- }
- ?>
- <td><input type="checkbox" name="status" value="1" <?php echo $Enabled ?> >
- ??SNMP??</td>
- </tr>
- <tr>
- <td>?? ?
- <SELECT name=IG_version class=p id="IG_version" onChange="changeShowVersion('priv')">
- <option value="SNMPv1" <?php echo $v1?> >SNMPv1</option>
- <option value="SNMPv2c"<?php echo $v2?> >SNMPv2c</option>
- <!-- <option value="SNMPv3" <?php echo $v3?> >SNMPv3</op1tion> -->
- </SELECT>
- </td>
- </tr>
-
- <tr>
- <td>Trap??????
- <input name="server" type="text" id="server" value=<?php echo $list['TrapAddr'] ?>> </td>
- </tr>
- <tr id="version12">
- <td>?? ?
- <input name="username" type="text" id="username" value=<?php echo $list['User']?>> </td>
- </tr>
- <tr>
- <td>???? ?
- <input name="local" type="text" id="local" value="<?php echo $list["Local"]?>"> </td>
- </tr>
- <tr>
- <td>????? ?
- <input name="connect" type="text" id="connect" value="<?php echo $list["Contract"]?>" > </td>
- </tr>
- <tr id="community"><td>
- Community ?
- <input type="text" name="community" value="<?php echo $list["Community"]?>">
- </td>
- </tr>
- <div id="AttestationClass">
- <tr id="Attclass">
- <td>???? ?
- <SELECT name=Attestation class=p id="Attestation" onChange="changeShow(this)">
- <?php
- if ($list["SecLevel"] == "priv"){
- $p = "selected";
- $a = "";
- $n = "";
- }
- if ($list["SecLevel"] == "auth"){
- $p = "";
- $a = "selected";
- $n = "";
- }
- if ($list["SecLevel"] == "noauth"){
- $p = "";
- $a = "";
- $n = "selected";
- }
- ?>
- <option value="priv" <?php echo $p?> >?????</option>
- <option value="auth" <?php echo $a?> >??????</option>
- <option value="noauth" <?php echo $n?>>???????</option>
- </SELECT>
- </td>
- </tr>
- <tr name="Att_protocol" id="Att_protocol" style="display:block">
- <td>???? ?
- <select name="Att_protocol_type" >
- <?php
- if ($list['AuthProtocol'] == "MD5"){
- $m = "selected";
- $s = "";
- }
- if ($list['AuthProtocol'] == "SHA1"){
- $m = "";
- $s = "selected";
- }
- if ($list['CryProtocol'] == "DES"){
- $des = "selected";
- $aes = "";
- }
- if ($list['CryProtocol'] == "AES"){
- $des = "";
- $aes = "selected";
- }
- ?>
- <option value="MD5" <?php echo $m ?>>MD5</option>
- <option value="SHA1" <?php echo $s ?>>SHA1</option>
- </SELECT>
- </td>
- </tr>
- <tr name="encrypt_protocol" id="encrypt_protocol" style="display:block">
- <td>???? ?
- <select name="encrypt_protocol_type" >
- <option value="DES" <?php echo $des?>>DES</option>
- <option value="AES" <?php echo $aes?>>AES</option>
- </SELECT>
- </td>
- </tr>
-
- <tr>
- <td id="showpawd1" style="display:block">???? ?
- <input name="authpass" type="password" id="authpass" value="<?php echo $list["AuthPass"]?>" > </td>
- </tr>
- <tr id="showpawd2" style="display:block">
- <td>???? ?
- <input name="secpass" type="password" id="secpass" value="<?php echo $list["CryPass"]?>" > </td>
- </tr>
- </div>
- </table>
- </td></tr>
- <tr><td height=1 class=in06></td></tr>
- <td class="in06">
- <tr>
- <td class=in05 height=36>
- <table cellpadding=2 cellspacing=6 border=0>
- <tr>
- <td width=70></td>
- <td><input name="save" onclick="CheckSubmit()" type=button class=save id="save" value=? ?></td>
- <td> </td>
- </tr>
- </table></td>
- </tr>
- <input type=hidden name=usern value= >
- </FORM>
- </table>
- <br>
- </body>
- </html>
- <script language="JavaScript" type="text/JavaScript">
- function changeShowNoObj(obj_value)
- {
- if(obj_value == "priv")
- {
- Att_protocol.style.display = "block";
- encrypt_protocol.style.display = "block";
- showpawd1.style.display = "block";
- showpawd2.style.display = "block";
- }
- else if(obj_value == "auth")
- {
- Att_protocol.style.display = "block";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "block";
- showpawd2.style.display = "none";
- }
- else
- {
- Att_protocol.style.display = "none";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "none";
- showpawd2.style.display = "none";
- }
- }
- function changeShow(obj)
- {
- var obj_value = obj.value;
- if(obj_value == "priv")
- {
- Att_protocol.style.display = "block";
- encrypt_protocol.style.display = "block";
- showpawd1.style.display = "block";
- showpawd2.style.display = "block";
- }
- else if(obj_value == "auth")
- {
- Att_protocol.style.display = "block";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "block";
- showpawd2.style.display = "none";
- }
- else
- {
- Att_protocol.style.display = "none";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "none";
- showpawd2.style.display = "none";
- }
- }
- function changeShowVersion(Attestation)
- {
- var version = document.IG_snmp.IG_version.value;
- if(version == "SNMPv3")
- {
- Attclass.style.display = "block";
- if(Attestation == "priv")
- {
- Att_protocol.style.display = "block";
- encrypt_protocol.style.display = "block";
- showpawd1.style.display = "block";
- showpawd2.style.display = "block";
- }
- else if(Attestation == "auth")
- {
- Att_protocol.style.display = "block";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "block";
- showpawd2.style.display = "none";
- }
- else
- {
- Att_protocol.style.display = "none";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "none";
- showpawd2.style.display = "none";
- }
- version12.style.display = "block";
- community.style.display = "none";
- }
- else
- {
- version12.style.display = "none";
- community.style.display = "block";
- Attclass.style.display = "none";
- Att_protocol.style.display = "none";
- encrypt_protocol.style.display = "none";
- showpawd1.style.display = "none";
- showpawd2.style.display = "none";
- }
- }
- //-->
- </script>