コード例 #1
0
 pconfig_to_address($filterent['source'], $_POST['src'], $_POST['srcmask'], $_POST['srcnot'], $_POST['srcbeginport'], $_POST['srcendport']);
 pconfig_to_address($filterent['destination'], $_POST['dst'], $_POST['dstmask'], $_POST['dstnot'], $_POST['dstbeginport'], $_POST['dstendport']);
 if ($_POST['disabled']) {
     $filterent['disabled'] = true;
 } else {
     unset($filterent['disabled']);
 }
 if ($_POST['dscp']) {
     $filterent['dscp'] = $_POST['dscp'];
 }
 if ($_POST['log']) {
     $filterent['log'] = true;
 } else {
     unset($filterent['log']);
 }
 strncpy($filterent['descr'], $_POST['descr'], 52);
 if ($_POST['gateway'] != "") {
     $filterent['gateway'] = $_POST['gateway'];
 }
 if ($_POST['defaultqueue'] != "") {
     $filterent['defaultqueue'] = $_POST['defaultqueue'];
     if ($_POST['ackqueue'] != "") {
         $filterent['ackqueue'] = $_POST['ackqueue'];
     }
 }
 if ($_POST['dnpipe'] != "") {
     $filterent['dnpipe'] = $_POST['dnpipe'];
     if ($_POST['pdnpipe'] != "") {
         $filterent['pdnpipe'] = $_POST['pdnpipe'];
     }
 }
コード例 #2
0
 } else {
     unset($filterent['icmptype']);
 }
 pconfig_to_address($filterent['source'], $_POST['src'], $_POST['srcmask'], $_POST['srcnot'], $_POST['srcbeginport'], $_POST['srcendport']);
 pconfig_to_address($filterent['destination'], $_POST['dst'], $_POST['dstmask'], $_POST['dstnot'], $_POST['dstbeginport'], $_POST['dstendport']);
 if ($_POST['disabled']) {
     $filterent['disabled'] = true;
 } else {
     unset($filterent['disabled']);
 }
 if ($_POST['log']) {
     $filterent['log'] = true;
 } else {
     unset($filterent['log']);
 }
 strncpy($filterent['descr'], base64_encode($_POST['descr']), 52);
 if ($_POST['gateway'] != "") {
     $filterent['gateway'] = $_POST['gateway'];
 }
 if (isset($_POST['defaultqueue']) && $_POST['defaultqueue'] != "none") {
     $filterent['defaultqueue'] = $_POST['defaultqueue'];
     if (isset($_POST['ackqueue']) && $_POST['ackqueue'] != "none") {
         $filterent['ackqueue'] = $_POST['ackqueue'];
     }
 }
 if (isset($_POST['dnpipe']) && $_POST['dnpipe'] != "none") {
     $filterent['dnpipe'] = $_POST['dnpipe'];
     if (isset($_POST['pdnpipe']) && $_POST['pdnpipe'] != "none") {
         $filterent['pdnpipe'] = $_POST['pdnpipe'];
     }
 }