[feladat @ 85]
The type of zone wasn't show to users with access level 1.
If a user with access level 1 did have access to a slave zone the
user did not see the IP of the master nameserver of that zone. Now
the user will the IP address (readonly and only if one is set).
Bugfix. If no master IP for a slave zone is given, a warning is
shown regardless of the userlevel.
Bugfix. Both the "add record" and "edit record" buttons in the "edit
zone" screen is no longer available for users with level 1 for
domains of type "slave". Bug report by Antonio Prado.
Some PHP and HTML cleanup (removing of empty tags and unnecessary
repeatings of calls to a single function).
<?
require_once("MDB2.php");
function dbError($msg)
{
// General function for printing critical errors.
include_once("header.inc.php");
?>
<h2><? echo _('Oops! An error occured!'); ?></h2>
<p class="error"><? echo $msg->getDebugInfo(); ?></p>
<?
include_once("footer.inc.php");
die();
}
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dbError');
$dsn = "$dbdsntype://$dbuser:$dbpass@$dbhost/$dbdatabase";
$db = MDB2::connect($dsn);
if (MDB2::isError($db))
{
// Error handling should be put.
error(MYSQL_ERROR_FATAL, $db->getMessage());
}
// Do an ASSOC fetch. Gives us the ability to use ["id"] fields.
$db->setFetchMode(MDB2_FETCHMODE_ASSOC);
/* erase info */
$mysql_pass = $dsn = '';
?>