[feladat @ 296]
authorrejo
Sat, 12 Jul 2008 13:44:34 +0000
changeset 187 ae77a8f97ee2
parent 186 a3e83a34f267
child 188 4066e4c0de01
[feladat @ 296] Fixed a number of errors for undefined variables.
add_zone_master.php
--- a/add_zone_master.php	Sat Jul 12 13:15:50 2008 +0000
+++ b/add_zone_master.php	Sat Jul 12 13:44:34 2008 +0000
@@ -32,14 +32,31 @@
 	$dom_type = $_POST["dom_type"];
 }
 
-$domain = trim($_POST["domain"]);
-$webip = $_POST["webip"];
-$mailip = $_POST["mailip"];
-$empty = $_POST["empty"];
+if (isset($_POST['domain'])) {
+	$domain = trim($_POST['domain']);
+} else {
+	$domain = "";
+}
+
+if (isset($_POST['webip'])) {
+	$webip = $_POST['webip'];
+} else {
+	$webip = "";
+}
+
+if (isset($_POST['mailip'])) {
+	$mailip = $_POST['mailip'];
+} else {
+	$mailip = "";
+}
+
+if (isset($_POST['empty'])) {
+	$empty = $_POST['empty'];
+}
 
 (verify_permission('zone_master_add')) ? $zone_master_add = "1" : $zone_master_add = "0" ;
 
-if ($_POST['submit'] && $zone_master_add == "1" ) {
+if (isset($_POST['submit']) && $zone_master_add == "1" ) {
 
 	// Boy. I will be happy when I have found the time to replace
 	// this "template wanabee" code with something that is really