?>
<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
$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");
}
}