X-Git-Url: http://git.pjr.cc/?p=PHPIPManager.git;a=blobdiff_plain;f=lib%2Fwww.php;h=2ec7c736270e7824d0b9bdcbb7bedacff9c37275;hp=79409a8d88a45514e80aa6b3a80ec15c14d13a82;hb=25d958f0efba2469a49a6de196f5a9ba0790ecd1;hpb=0264b5a42242521bd85ab2568f4bf23381df7a36 diff --git a/lib/www.php b/lib/www.php index 79409a8..2ec7c73 100644 --- a/lib/www.php +++ b/lib/www.php @@ -123,10 +123,9 @@ function www_ip_addSuperRange() $mask = $_REQUEST["mask"]; $desc = $_REQUEST["desc"]; - if(ip::isValid($sn, $mask)) { - $sn = ip::truncateNetwork($sn, $mask); - $sql = "insert into supernet values (NULL, '$name', '$sn', '$mask', '$desc')"; - $db->dbobject->query($sql); + $myip = new ip(); + + if($myip->addSupernet($name, $sn, $mask, $desc)) { header("Location: index.php?notice=range added"); } else { header("Location: index.php?error=invalid ipaddress");