From 8cad4c87f095f6199e34c4e2403c42a2a5481582 Mon Sep 17 00:00:00 2001 From: Alan Garcia <a.garcia@nnx.com> Date: Mon, 20 Aug 2012 16:14:37 +0000 Subject: [PATCH] Register globals --- bureau/admin/adm_tld.php | 8 +++++++- bureau/admin/adm_tldadd.php | 10 ++++++++-- bureau/admin/adm_tlddoadd.php | 9 ++++++++- bureau/admin/adm_tlddoedit.php | 8 +++++++- bureau/admin/adm_tldedit.php | 2 +- 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/bureau/admin/adm_tld.php b/bureau/admin/adm_tld.php index c47035ec..2b9f6e22 100644 --- a/bureau/admin/adm_tld.php +++ b/bureau/admin/adm_tld.php @@ -34,6 +34,12 @@ if (!$admin->enabled) { exit(); } +$fields = array ( + "sel" => array ("post", "array", ""), +); +getFields($fields); + + if (is_array($sel)) { $error=""; for($i=0;$i<count($sel);$i++) { @@ -51,7 +57,7 @@ include_once("head.php"); <hr id="topbar" /> <br /> <?php - if ($error) { + if (isset($error) && $error) { echo "<p class=\"error\">$error</p>"; } diff --git a/bureau/admin/adm_tldadd.php b/bureau/admin/adm_tldadd.php index 970cc424..6aba2889 100644 --- a/bureau/admin/adm_tldadd.php +++ b/bureau/admin/adm_tldadd.php @@ -33,6 +33,12 @@ if (!$admin->enabled) { __("This page is restricted to authorized staff"); exit(); } +$fields = array ( + "tld" => array ("post", "string", ""), + "mode" => array ("post", "integer", ""), +); +getFields($fields); + include_once ("head.php"); @@ -41,7 +47,7 @@ include_once ("head.php"); <hr id="topbar"/> <br /> <?php - if ($error) { + if (isset($error) && $error) { echo "<p class=\"error\">$error</p>"; } @@ -56,7 +62,7 @@ include_once ("head.php"); <form method="post" action="adm_tlddoadd.php" name="main" id="main"> <table class="tedit"> -<tr><th><label for="tld"><?php __("TLD"); ?></label></th><td><input type="text" id="tld" name="tld" class="int" value="<?php ehe($tld); ?>" size="20" maxlength="64" /></td></tr> +<tr><th><label for="tld"><?php __("TLD"); ?></label></th><td><input type="text" id="tld" name="tld" class="int" value="<?php ehe( (isset($tld)?$tld:'') ); ?>" size="20" maxlength="64" /></td></tr> <tr><th><label for="mode"><?php __("Allowed Mode"); ?></label></th><td><select name="mode" id="mode" class="inl"> <?php $admin->selecttldmode($mode); ?> </select></td></tr> diff --git a/bureau/admin/adm_tlddoadd.php b/bureau/admin/adm_tlddoadd.php index 6c788e9d..8fcedbb9 100644 --- a/bureau/admin/adm_tlddoadd.php +++ b/bureau/admin/adm_tlddoadd.php @@ -34,6 +34,13 @@ if (!$admin->enabled) { exit(); } +$fields = array ( + "tld" => array ("request", "string", ""), + "mode" => array ("request", "integer", ""), +); +getFields($fields); + + if (!$admin->addtld($tld,$mode)) { $error=$err->errstr(); include("adm_tldadd.php"); @@ -43,4 +50,4 @@ if (!$admin->addtld($tld,$mode)) { include("adm_tld.php"); exit(); } -?> \ No newline at end of file +?> diff --git a/bureau/admin/adm_tlddoedit.php b/bureau/admin/adm_tlddoedit.php index 40d504a6..d889263c 100644 --- a/bureau/admin/adm_tlddoedit.php +++ b/bureau/admin/adm_tlddoedit.php @@ -28,6 +28,12 @@ ---------------------------------------------------------------------- */ require_once("../class/config.php"); +$fields = array ( + "tld" => array ("post", "string", ""), + "mode" => array ("post", "integer", ""), +); +getFields($fields); + if (!$admin->enabled) { __("This page is restricted to authorized staff"); @@ -43,4 +49,4 @@ if (!$admin->edittld($tld,$mode)) { include("adm_tld.php"); exit(); } -?> \ No newline at end of file +?> diff --git a/bureau/admin/adm_tldedit.php b/bureau/admin/adm_tldedit.php index a42314f2..66f735cb 100644 --- a/bureau/admin/adm_tldedit.php +++ b/bureau/admin/adm_tldedit.php @@ -53,7 +53,7 @@ include_once("head.php"); <hr id="topbar"/> <br /> <?php - if ($error) { + if (isset($error) && $error) { echo "<p class=\"error\">$error</p>"; } ?>