ug... i have no idea really...
[PHPIPManager.git] / lib / www.php
index f38f5e8..4fc2f27 100644 (file)
@@ -131,6 +131,10 @@ Description <input type="text" name="desc"></input>
                ?>
 <html>
 <head><title><?php echo $title ?></title>
+<?php 
+               if(file_exists("style.css")) echo '<link href="style.css" rel="stylesheet" type="text/css" />'; 
+
+?>
 </head>
 <body><h1><?php echo $title ?></h1>
                <?php
@@ -267,10 +271,11 @@ function www_ip_allocateSubRange()
        $desc = $_REQUEST["subdesc"];
        
        $myip = new ip();
-       if($myip->addSubnet($name, $subip, $mask, $desc, $superid)) {
+       $err = $myip->addSubnet($name, $subip, $mask, $desc, $superid);
+       if($err ===true) {
                header("Location: index.php?notice=range added");
        } else {
-               header("Location: index.php?error=invalid ipaddress");
+               header("Location: index.php?error=$err");
        }
 }