[feladat @ 60]
Merged 1.4.0 changes r23:59 into trunk.
--- a/add_record.php Sun Apr 22 16:27:45 2007 +0000
+++ b/add_record.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,24 +1,7 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
+require_once("inc/toolkit.inc.php");
-//
-// $Id: add_record.php,v 1.6 2003/02/05 15:25:01 azurazu Exp $
-//
-
-require_once("inc/toolkit.inc.php");
if ($_POST["commit"]) {
$ret = add_record($_POST["zoneid"], $_POST["name"], $_POST["type"], $_POST["content"], $_POST["ttl"], $_POST["prio"]);
if ($ret != '1') {
@@ -26,16 +9,28 @@
}
clean_page("edit.php?id=".$_POST["zoneid"]);
}
+
include_once("inc/header.inc.php");
?>
-<H2><? echo _('Add record to zone'); ?> "<?= get_domain_name_from_id($_GET["id"]) ?>"</H2>
-<FONT CLASS="nav"><BR><A HREF="index.php"><? echo _('DNS Admin'); ?></A> >> <A HREF="edit.php?id=<?= $_GET["id"] ?>"><?= get_domain_name_from_id($_GET["id"]) ?></A> >> <? echo _('Add record'); ?><BR><BR></FONT>
+
+ <h2><? echo _('Add record to zone'); ?> "<? echo get_domain_name_from_id($_GET["id"]) ?>"</H2>
-<FORM METHOD="post">
-<INPUT TYPE="hidden" NAME="zoneid" VALUE="<?= $_GET["id"] ?>">
-<TABLE BORDER="0" CELLSPACING="4">
-<TR STYLE="font-weight: Bold"><TD CLASS="tdbg"><? echo _('Name'); ?></TD><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><? echo _('Type'); ?></TD><TD CLASS="tdbg"><? echo _('Priority'); ?></TD><TD CLASS="tdbg"><? echo _('Content'); ?></TD><TD CLASS="tdbg"><? echo _('TTL'); ?></TD></TR>
-<TR><TD CLASS="tdbg"><INPUT TYPE="text" NAME="name" CLASS="input">.<?= get_domain_name_from_id($_GET["id"]) ?></TD><TD CLASS="tdbg">IN</TD><TD CLASS="tdbg"><SELECT NAME="type">
+ <form method="post">
+ <input type="hidden" name="zoneid" value="<? echo $_GET["id"] ?>">
+ <table border="0" cellspacing="4">
+ <tr>
+ <td class="n"><? echo _('Name'); ?></td>
+ <td class="n"> </td>
+ <td class="n"><? echo _('Type'); ?></td>
+ <td class="n"><? echo _('Priority'); ?></td>
+ <td class="n"><? echo _('Content'); ?></td>
+ <td class="n"><? echo _('TTL'); ?></td>
+ </tr>
+ <tr>
+ <td class="n"><input type="text" name="name" class="input">.<? echo get_domain_name_from_id($_GET["id"]) ?></td>
+ <td class="n">IN</td>
+ <td class="n">
+ <select name="type">
<?
$dname = get_domain_name_from_id($_GET["id"]);
foreach (get_record_types() as $c) {
@@ -46,11 +41,18 @@
} else {
unset($add);
}
- ?><OPTION<?= $add ?> VALUE="<?= $c ?>"><?= $c ?></OPTION><?
+ ?><option<? echo $add ?> value="<? echo $c ?>"><? echo $c ?></option><?
}
-?></SELECT></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="prio" CLASS="sinput"></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="content" CLASS="input"></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="ttl" CLASS="sinput" VALUE="<?=$DEFAULT_TTL?>"></TD></TR>
-</TABLE>
-<BR><INPUT TYPE="submit" NAME="commit" VALUE="<? echo _('Add record'); ?>" CLASS="button">
-</FORM>
+?>
+ </select>
+ </td>
+ <td class="n"><input type="text" name="prio" class="sinput"></td>
+ <td class="n"><input type="text" name="content" class="input"></td>
+ <td class="n"><input type="text" name="ttl" class="sinput" value="<? echo $DEFAULT_TTL?>"></td>
+ </tr>
+ </table>
+ <br>
+ <input type="submit" name="commit" value="<? echo _('Add record'); ?>" class="button">
+ </form>
<? include_once("inc/footer.inc.php"); ?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/add_supermaster.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,82 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+
+if (!level(5))
+{
+ error(ERR_LEVEL_5);
+}
+
+if($_POST["submit"])
+{
+ $master_ip = $_POST["master_ip"];
+ $ns_name = $_POST["ns_name"];
+ $account = $_POST["account"];
+ if (!$error)
+ {
+ if (!is_valid_ip($master_ip) && !is_valid_ip6($master_ip))
+ {
+ $error = _('Given master IP address is not valid IPv4 or IPv6.');
+ }
+ elseif (!is_valid_hostname($ns_name))
+ {
+ $error = _('Given hostname for NS record not valid.');
+ }
+ elseif (!validate_account($account))
+ {
+ $error = _('Account name is not valid (may contain only alpha chars).');
+ }
+ else
+ {
+ if(add_supermaster($master_ip, $ns_name, $account))
+ {
+ $success = _('Successfully added supermaster.');
+ }
+ }
+ }
+}
+
+include_once("inc/header.inc.php");
+
+ if ($error != "")
+ {
+ ?><div class="error"><? echo _('Error'); ?>: <? echo $error; ?></div><?
+ }
+ elseif ($success != "")
+ {
+ ?><div class="success"><? echo $success; ?></div><?
+ }
+
+ ?>
+ <h2><? echo _('Add supermaster'); ?></h2>
+ <form method="post" action="add_supermaster.php">
+ <table>
+ <tr>
+ <td class="n"><? echo _('IP address of supermaster'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="master_ip" value="<? if ($error) print $_POST["master_ip"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Hostname in NS record'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="ns_name" value="<? if ($error) print $_POST["ns_name"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Account'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="account" value="<? if ($error) print $_POST["account"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n">
+ <input type="submit" class="button" name="submit" value="<? echo _('Add supermaster'); ?>">
+ </td>
+ </tr>
+ </table>
+ </form>
+<?
+include_once("inc/footer.inc.php");
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/add_zone_master.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,127 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+
+if (!level(5))
+{
+ error(ERR_LEVEL_5);
+
+}
+
+if ($_POST["submit"])
+{
+ $domain = trim($_POST["domain"]);
+ $owner = $_POST["owner"];
+ $webip = $_POST["webip"];
+ $mailip = $_POST["mailip"];
+ $empty = $_POST["empty"];
+ $dom_type = isset($_POST["dom_type"]) ? $_POST["dom_type"] : "NATIVE";
+ if(!$empty)
+ {
+ $empty = 0;
+ if(!eregi('in-addr.arpa', $domain) && (!is_valid_ip($webip) || !is_valid_ip($mailip)) )
+ {
+ $error = "Web or Mail ip is invalid!";
+ }
+ }
+ if (!$error)
+ {
+ if (!is_valid_domain($domain))
+ {
+ $error = "Zone name is invalid!";
+ }
+ elseif (domain_exists($domain))
+ {
+ $error = "Zone already exists!";
+ }
+ //elseif (isset($mailip) && is_valid_ip(
+ else
+ {
+ add_domain($domain, $owner, $webip, $mailip, $empty, $dom_type, '');
+ $success = _('Successfully added master zone.');
+ }
+ }
+}
+
+include_once("inc/header.inc.php");
+
+ if ($error != "")
+ {
+ ?><div class="error"><? echo _('Error'); ?>: <? echo $error; ?></div><?
+ }
+ elseif ($success != "")
+ {
+ ?><div class="success"><? echo $success; ?></div><?
+ }
+
+ ?>
+ <h2>Add master zone</h2>
+ <?
+
+ // Zone type set to master and native only, slave zones are created
+ // on a different page.
+ $zone_types = array("MASTER", "NATIVE");
+ $users = show_users();
+ ?>
+ <form method="post" action="add_zone_master.php">
+ <table>
+ <tr>
+ <td class="n"><? echo _('Zone name'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="domain" value="<? if ($error) print $_POST["domain"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Web IP'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="webip" value="<? if ($error) print $_POST["webip"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Mail IP'); ?>:</TD>
+ <td class="n">
+ <input type="text" class="input" name="mailip" value="<? if ($error) print $_POST["mailip"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Owner'); ?>:</td>
+ <td class="n">
+ <select name="owner">
+ <?
+ foreach ($users as $u)
+ {
+ ?><option value="<? echo $u['id'] ?>"><? echo $u['fullname'] ?></option><?
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Zone type'); ?>:</td>
+ <td class="n">
+ <select name="dom_type">
+ <?
+ foreach($zone_types as $s)
+ {
+ ?><option value="<? echo $s?>"><? echo $s ?></option><?
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Create zone without applying records-template'); ?>:</td>
+ <td class="n"><input type="checkbox" name="empty" value="1"></td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n">
+ <input type="submit" class="button" name="submit" value="<? echo _('Add domain'); ?>">
+ </td>
+ </tr>
+ </table>
+ </form>
+<?
+
+include_once("inc/footer.inc.php");
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/add_zone_slave.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,93 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+
+if (!level(5))
+{
+ error(ERR_LEVEL_5);
+
+}
+
+if ($_POST["submit"])
+{
+ $domain = trim($_POST["domain"]);
+ $owner = $_POST["owner"];
+ $slave_master = $_POST["slave_master"];
+ $dom_type = "SLAVE";
+ if (!$error)
+ {
+ if (!is_valid_domain($domain))
+ {
+ $error = "Zone name is invalid!";
+ }
+ elseif (domain_exists($domain))
+ {
+ $error = "Zone already exists!";
+ }
+ elseif (!is_valid_ip($slave_master))
+ {
+ $error = "IP of master NS for slave zone is not valid!";
+ }
+ else
+ {
+ if(add_domain($domain, $owner, $webip, $mailip, $empty, $dom_type, $slave_master))
+ {
+ $success = _('Successfully added slave zone.');
+ }
+ }
+ }
+}
+
+include_once("inc/header.inc.php");
+
+ if ($error != "")
+ {
+ ?><div class="error"><? echo _('Error'); ?>: <? echo $error; ?></div><?
+ }
+ elseif ($success != "")
+ {
+ ?><div class="success"><? echo $success; ?></div><?
+ }
+
+ $users = show_users();
+
+ ?>
+ <h2><? echo _('Add slave zone'); ?></h2>
+ <form method="post" action="add_zone_slave.php">
+ <table>
+ <tr>
+ <td class="n"><? echo _('Zone name'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="domain" value="<? if ($error) print $_POST["domain"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('IP of master NS'); ?>:</td>
+ <td class="n">
+ <input type="text" class="input" name="slave_master" value="<? if ($error) print $_POST["slave_master"]; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Owner'); ?>:</td>
+ <td class="n">
+ <select name="owner">
+ <?
+ foreach ($users as $u)
+ {
+ ?><option value="<? echo $u['id'] ?>"><? echo $u['fullname'] ?></option><?
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n">
+ <input type="submit" class="button" name="submit" value="<? echo _('Add domain'); ?>">
+ </td>
+ </tr>
+ </table>
+ </form>
+<?
+include_once("inc/footer.inc.php");
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/change_password.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,45 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+
+if($_POST["submit"])
+{
+ if(strlen($_POST["newpass"]) < 8)
+ {
+ error('Password length should be at least 8 characters.');
+ }
+ else
+ {
+ change_user_pass($_POST["currentpass"], $_POST["newpass"], $_POST["newpass2"]);
+ }
+}
+
+include_once("inc/header.inc.php");
+?>
+ <h2>Change password</h2>
+ <form method="post" action="change_password.php">
+ <table border="0" CELLSPACING="4">
+ <tr>
+ <td class="n"><? echo _('Current password'); ?>:</td>
+ <td class="n"><input type="password" class="input" NAME="currentpass" value=""></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('New password'); ?>:</td>
+ <td class="n"><input type="password" class="input" NAME="newpass" value=""></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('New password'); ?>:</td>
+ <td class="n"><input type="password" class="input" NAME="newpass2" value=""></td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n">
+ <input type="submit" class="button" NAME="submit" value="<? echo _('Change password'); ?>">
+ </td>
+ </tr>
+ </table>
+ </form>
+
+<?
+include_once("inc/footer.inc.php");
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/credits.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,11 @@
+<?php
+include_once("inc/config.inc.php");
+include_once("inc/header.inc.php");
+?>
+ <h2><? echo _('Credits'); ?></h2>
+
+ <p><a href="https://rejo.zenger.nl/poweradmin/">This version</a> is an adaption of the original <a href="http://www.poweradmin.org">Poweradmin</a>, version 1.2.7-patched. Poweradmin was written by <a href="http://sjeemz.nl/">Sjeemz</a> and <a href="http://www.trancer.nl/">Trancer</a>. The Poweradmin code includes patches by <a href="http://mostrey.be/">Wim Mostrey</a> and Dennis Roos. <a href="https://rejo.zenger.nl/poweradmin/">This version</a> has been patched by <a href="http://rejo.zenger.nl">Rejo Zenger</a> and includes many additional features like multi-language support, an update of the database abstraction layer, support for slave zones, support for supermasters, basic support for skins and a number of bug fixes.</p>
+
+<?
+include_once("inc/footer.inc.php");
+?>
--- a/delete_domain.php Sun Apr 22 16:27:45 2007 +0000
+++ b/delete_domain.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,23 +1,5 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: delete_domain.php,v 1.6 2002/12/18 01:13:10 azurazu Exp $
-//
-
require_once("inc/toolkit.inc.php");
if (!level(5))
@@ -35,12 +17,30 @@
}
include_once("inc/header.inc.php");
$info = get_domain_info_from_id($_GET["id"]);
- ?><H2><? echo _('Delete domain'); ?> "<?= $info["name"] ?>"</H2>
- <? echo _('Owner'); ?>: <?= $info["owner"] ?><BR>
- <? echo _('Number of records in zone'); ?>: <?= $info["numrec"] ?><BR><BR>
- <FONT CLASS="warning"><? echo _('Are you sure?'); ?></FONT><BR><BR>
- <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=1'" VALUE="<? echo _('Yes'); ?>"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=0'" VALUE="<? echo _('No'); ?>">
+ ?><h2><? echo _('Delete zone'); ?> "<? echo $info["name"] ?>"</h2>
<?
+ if($info["owner"])
+ {
+ print (_('Owner') . ": " . $info["owner"] . "<br>");
+ }
+ print (_('Type') . ": " . strtolower($info["type"]) . "<br>");
+ print (_('Number of records in zone') . ": " . $info["numrec"] . "<br>");
+ if($info["type"] == "SLAVE")
+ {
+ $slave_master = get_domain_slave_master($_GET["id"]);
+ if(supermaster_exists($slave_master))
+ {
+ print ("<font class=\"warning\">");
+ printf(_('You are about to delete a slave zone of which the master nameserver, %s, is a supermaster. Deleting the zone now, will result in temporary removal only. Whenever the supermaster sends a notification for this zone, it will be added again!'), $slave_master);
+ print ("</font><br>");
+ }
+ }
+ ?>
+ <font class="warning"><? echo _('Are you sure?'); ?></font>
+ <br><br>
+ <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=1'" value="<? echo _('Yes'); ?>">
+ <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=0'" value="<? echo _('No'); ?>">
+ <?
} elseif ($_GET["edit"]) {
include_once("inc/header.inc.php");
} else {
--- a/delete_record.php Sun Apr 22 16:27:45 2007 +0000
+++ b/delete_record.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,23 +1,5 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: delete_record.php,v 1.5 2002/12/10 01:29:47 azurazu Exp $
-//
-
require_once("inc/toolkit.inc.php");
if ($_GET["id"]) {
@@ -28,15 +10,18 @@
clean_page("edit.php?id=".$_GET["domain"]);
}
include_once("inc/header.inc.php");
- ?><H2><? echo _('Delete record'); ?> "<?
+ ?>
+
+ <h2><? echo _('Delete record'); ?> "<?
$data = get_record_from_id($_GET["id"]);
print $data["name"]." IN ".$data["type"]." ".$data["content"];
- ?>"</H2><?
+ ?>"</h2><?
if (($data["type"] == "NS" && $data["name"] == get_domain_name_from_id($_GET["domain"])) || $data["type"] == "SOA") {
- print "<FONT CLASS=\"warning\">" . ('You are trying to delete a record that is needed for this zone to work.') . "</FONT><BR>";
+ print "<font class=\"warning\">" . _('You are trying to delete a record that is needed for this zone to work.') . "</font><br>";
}
- ?><BR><FONT CLASS="warning"><? echo _('Are you sure?'); ?></FONT><BR><BR>
- <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=1'" VALUE="<? echo _('Yes'); ?>"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='<?= $_SERVER["REQUEST_URI"] ?>&confirm=0'" VALUE="<? echo _('No'); ?>">
+ ?><br><font class="warning"><? echo _('Are you sure?'); ?></font><br><br>
+ <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=1'" value="<? echo _('Yes'); ?>">
+ <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=0'" value="<? echo _('No'); ?>">
<?
} else {
include_once("inc/header.inc.php");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/delete_supermaster.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,32 @@
+<?php
+
+require_once("inc/toolkit.inc.php");
+
+if (!level(5))
+{
+ error(ERR_LEVEL_5);
+
+}
+
+if ($_GET["master_ip"]) {
+ if ($_GET["confirm"] == '0') {
+ clean_page("index.php");
+ } elseif ($_GET["confirm"] == '1') {
+ delete_supermaster($_GET["master_ip"]);
+ clean_page("index.php");
+ }
+ include_once("inc/header.inc.php");
+ $info = get_supermaster_info_from_ip($_GET["master_ip"]);
+ ?>
+ <h2><? echo _('Delete supermaster'); ?> "<? echo $_GET["master_ip"] ?>"</h2>
+ <? echo _('Hostname in NS record'); ?>: <? echo $info["ns_name"] ?><br>
+ <? echo _('Account'); ?>: <? echo $info["account"] ?><br><br>
+ <font class="warning"><? echo _('Are you sure?'); ?></font><br><br>
+ <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=1'" value="<? echo _('Yes'); ?>">
+ <input type="button" class="button" OnClick="location.href='<? echo $_SERVER["REQUEST_URI"] ?>&confirm=0'" value="<? echo _('No'); ?>">
+ <?
+} else {
+ include_once("inc/header.inc.php");
+ die("Nothing to do!");
+}
+include_once("inc/footer.inc.php");
--- a/delete_user.php Sun Apr 22 16:27:45 2007 +0000
+++ b/delete_user.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,23 +1,4 @@
<?php
-
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: delete_user.php,v 1.9 2003/01/01 22:33:46 azurazu Exp $
-//
-
require_once("inc/toolkit.inc.php");
$id = ($_POST["id"]) ? $_POST["id"] : $_GET["id"];
@@ -51,13 +32,15 @@
clean_page($BASE_URL . $BASE_PATH . "users.php");
}
include_once("inc/header.inc.php");
- ?><H2><? echo _('Delete user'); ?> "<?= get_fullname_from_userid($id) ?>"</H2>
- <FORM METHOD="post">
+ ?>
+
+ <h3><? echo _('Delete user'); ?> "<? echo get_fullname_from_userid($id) ?>"</h3>
+ <form method="post">
<?
$domains = get_domains_from_userid($id);
if (count($domains) > 0)
{
- echo _('This user has access to the following domain(s)'); ?> :<BR><?
+ echo _('This user has access to the following zone(s)'); ?> :<BR><?
$users = show_users($id);
if(count($users) < 1)
{
@@ -65,42 +48,50 @@
$no_users = 1;
}
?>
- <TABLE BORDER="0" CELLSPACING="4">
- <TR STYLE="font-weight: Bold"><TD WIDTH="50" CLASS="tdbg">Delete</TD><TD CLASS="tdbg">Name</TD><? if (!$no_users) { ?><TD CLASS="tdbg">New owner</TD><? } ?></TR>
+ <table>
+ <tr>
+ <td class="n">Delete</td>
+ <td class="n">Name</td>
+ <? if (!$no_users) { ?>
+ <td class="n">New owner</td>
+ <? } ?>
+ </tr>
<?
foreach ($domains as $d)
{
- ?><TR><TD CLASS="tdbg" ALIGN="center"><?
+ ?>
+ <tr>
+ <td class="n" align="center"><?
if ($no_users)
{
- ?><INPUT TYPE="hidden" NAME="delete[]" VALUE="<?= $d["id"] ?>"><?
+ ?><input type="hidden" name="delete[]" value="<? echo $d["id"] ?>"><?
}
- ?><INPUT TYPE="checkbox"<?= $add ?> NAME="delete[]" VALUE="<?= $d["id"] ?>"></TD><TD CLASS="tdbg"><?= $d["name"] ?></TD><TD CLASS="tdbg"><?
+ ?><input type="checkbox"<? echo $add ?> name="delete[]" value="<? echo $d["id"] ?>"></td><td class="n"><? echo $d["name"] ?></td><td class="n"><?
if (!$no_users)
{
- ?><SELECT NAME="domain[<?= $d["id"] ?>]"><?
+ ?><select name="domain[<? echo $d["id"] ?>]"><?
foreach($users as $u)
{
- ?><OPTION VALUE="<?= $u["id"] ?>"><?= $u["fullname"] ?></OPTION><?
+ ?><option value="<? echo $u["id"] ?>"><? echo $u["fullname"] ?></option><?
}
- ?></SELECT></TD><?
+ ?></select></td><?
}
- ?></TR><?
+ ?></tr><?
}
- ?></TABLE><?
+ ?></table><?
}
$message = _('You are going to delete this user, are you sure?');
if(($numrows = $db->queryOne("select count(id) from zones where owner=$id")) != 0)
{
- $message .= " " . _('This user has access to ') . $numrows . _('domain(s), by deleting him you will also delete these domains');
+ $message .= " " . _('This user has access to ') . $numrows . _(' zones, by deleting him you will also delete these zones.');
}
?>
- <BR><FONT CLASS="warning"><?= $message ?></FONT><BR><BR>
- <INPUT TYPE="hidden" NAME="id" VALUE="<?=$id ?>">
- <INPUT TYPE="hidden" NAME="confirm" VALUE="1">
- <INPUT TYPE="submit" CLASS="button" VALUE="<? echo _('Yes'); ?>"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='users.php'" VALUE="<? echo _('No'); ?>"></FORM>
+ <font class="warning"><? echo $message ?></font><br>
+ <input type="hidden" name="id" value="<? echo $id ?>">
+ <input type="hidden" name="confirm" value="1">
+ <input type="submit" class="button" value="<? echo _('Yes'); ?>"> <input type="button" class="button" OnClick="location.href='users.php'" value="<? echo _('No'); ?>"></FORM>
<?
include_once("inc/footer.inc.php");
}
--- a/docs/CHANGELOG Sun Apr 22 16:27:45 2007 +0000
+++ b/docs/CHANGELOG Mon Jun 04 18:43:11 2007 +0000
@@ -12,7 +12,7 @@
more details docs/README.i18n.
- Removed the so-called "sequence updater". The code has been changed
- to use the auto increment functionalitiy in both mysql ang pgsql. It
+ to use the auto increment functionalitiy in both mysql and pgsql. It
is only tested on these backends, other backends are untested and
may be unsupported. See docs/README.sequence for more details on
inserting records and zones into the powerdns database when using
--- a/docs/README.i18n Sun Apr 22 16:27:45 2007 +0000
+++ b/docs/README.i18n Mon Jun 04 18:43:11 2007 +0000
@@ -6,8 +6,8 @@
All available translations can be found in the locale directory in the
poweradmin base directory. The Dutch translation for example, can be
-found in nl_NL. To review the status of the translation, you can have a
-look at the nl.po file in the LC_MESSAGE directory.
+found in locale/nl_NL. To review the status of the translation, you
+can have a look at the nl.po file in the LC_MESSAGE directory.
If you want to use a translation, say the nl_NL, all you have to do is
edit inc/i18n.php file and change the $language variable to the desired
--- a/docs/template.pot Sun Apr 22 16:27:45 2007 +0000
+++ b/docs/template.pot Mon Jun 04 18:43:11 2007 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-04-21 19:20+0200\n"
+"POT-Creation-Date: 2007-05-28 09:33+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,383 +16,463 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: add_record.php:31
+#: add_record.php:16
msgid "Add record to zone"
msgstr ""
-#: add_record.php:32 edit.php:160 edit_record.php:61 index.php:73
-#: search.php:40 users.php:49
-msgid "DNS Admin"
-msgstr ""
-
-#: add_record.php:32 add_record.php:53 edit.php:271
-msgid "Add record"
-msgstr ""
-
-#: add_record.php:37 edit.php:186 edit_record.php:67 index.php:119
-#: search.php:78 search.php:121 users.php:72
+#: add_record.php:22 edit.php:226 edit_record.php:65 list_zones.php:23
+#: search.php:45 search.php:99 users.php:57
msgid "Name"
msgstr ""
-#: add_record.php:37 edit.php:187 edit_record.php:67 search.php:122
+#: add_record.php:24 delete_domain.php:26 edit.php:227 edit_record.php:67
+#: list_zones.php:24 search.php:100
msgid "Type"
msgstr ""
-#: add_record.php:37 edit.php:189 edit_record.php:67 search.php:124
+#: add_record.php:25 edit.php:229 edit_record.php:68 search.php:102
msgid "Priority"
msgstr ""
-#: add_record.php:37 edit.php:188 edit_record.php:67 search.php:123
+#: add_record.php:26 edit.php:228 edit_record.php:69 search.php:101
msgid "Content"
msgstr ""
-#: add_record.php:37 edit.php:190 edit_record.php:67 search.php:125
+#: add_record.php:27 edit.php:230 edit_record.php:70 search.php:103
msgid "TTL"
msgstr ""
-#: delete_domain.php:38 users.php:87
+#: add_record.php:55 edit.php:193
+msgid "Add record"
+msgstr ""
+
+#: add_supermaster.php:19
+msgid "Given master IP address is not valid IPv4 or IPv6."
+msgstr ""
+
+#: add_supermaster.php:23
+msgid "Given hostname for NS record not valid."
+msgstr ""
+
+#: add_supermaster.php:27
+msgid "Account name is not valid (may contain only alpha chars)."
+msgstr ""
+
+#: add_supermaster.php:33
+msgid "Successfully added supermaster."
+msgstr ""
+
+#: add_supermaster.php:43 add_zone_master.php:50 add_zone_slave.php:45
+#: edit.php:39
+msgid "Error"
+msgstr ""
+
+#: add_supermaster.php:51
+msgid "Add new supermaster"
+msgstr ""
+
+#: add_supermaster.php:55 list_supermasters.php:33
+msgid "IP address of supermaster"
+msgstr ""
+
+#: add_supermaster.php:61 delete_supermaster.php:22 list_supermasters.php:34
+msgid "Hostname in NS record"
+msgstr ""
+
+#: add_supermaster.php:67 delete_supermaster.php:23 list_supermasters.php:35
+msgid "Account"
+msgstr ""
+
+#: add_supermaster.php:75 index.php:18 inc/header.inc.php:34
+msgid "Add supermaster"
+msgstr ""
+
+#: add_zone_master.php:41
+msgid "Successfully added master zone."
+msgstr ""
+
+#: add_zone_master.php:69 add_zone_slave.php:59
+msgid "Domain name"
+msgstr ""
+
+#: add_zone_master.php:75
+msgid "Web IP"
+msgstr ""
+
+#: add_zone_master.php:81
+msgid "Mail IP"
+msgstr ""
+
+#: add_zone_master.php:87 add_zone_slave.php:71 delete_domain.php:24
+#: list_zones.php:26 search.php:47
+msgid "Owner"
+msgstr ""
+
+#: add_zone_master.php:100
+msgid "Domain type"
+msgstr ""
+
+#: add_zone_master.php:113
+msgid "Create zone without applying records-template"
+msgstr ""
+
+#: add_zone_master.php:119 add_zone_slave.php:86
+msgid "Add domain"
+msgstr ""
+
+#: add_zone_slave.php:35
+msgid "Successfully added slave zone."
+msgstr ""
+
+#: add_zone_slave.php:55
+msgid "Add new slave zone"
+msgstr ""
+
+#: add_zone_slave.php:65
+msgid "IP of master NS"
+msgstr ""
+
+#: change_password.php:23
+msgid "Current password"
+msgstr ""
+
+#: change_password.php:27 change_password.php:31
+msgid "New password"
+msgstr ""
+
+#: change_password.php:37 index.php:22 inc/header.inc.php:38
+msgid "Change password"
+msgstr ""
+
+#: credits.php:5
+msgid "Credits"
+msgstr ""
+
+#: delete_domain.php:20 users.php:77
msgid "Delete domain"
msgstr ""
-#: delete_domain.php:39 index.php:119 index.php:174 search.php:80
-msgid "Owner"
-msgstr ""
-
-#: delete_domain.php:40
+#: delete_domain.php:27
msgid "Number of records in zone"
msgstr ""
-#: delete_domain.php:41 delete_record.php:38
+#: delete_domain.php:34
+#, php-format
+msgid "You are about to delete a slave domain of which the master nameserver, %s, is a supermaster. Deleting the zone now, will result in temporary removal only. Whenever the supermaster sends a notification for this zone, it will be added again!"
+msgstr ""
+
+#: delete_domain.php:39 delete_record.php:22 delete_supermaster.php:24
msgid "Are you sure?"
msgstr ""
-#: delete_domain.php:42 delete_record.php:39 delete_user.php:103
+#: delete_domain.php:41 delete_record.php:23 delete_supermaster.php:25
+#: delete_user.php:94
msgid "Yes"
msgstr ""
-#: delete_domain.php:42 delete_record.php:39 delete_user.php:103
+#: delete_domain.php:42 delete_record.php:24 delete_supermaster.php:26
+#: delete_user.php:94
msgid "No"
msgstr ""
-#: delete_record.php:31 edit.php:203 search.php:142
+#: delete_record.php:15 edit.php:246 search.php:120
msgid "Delete record"
msgstr ""
-#: delete_user.php:54 users.php:79
+#: delete_record.php:20
+msgid "You are trying to delete a record that is needed for this zone to work."
+msgstr ""
+
+#: delete_supermaster.php:21 list_supermasters.php:56
+msgid "Delete supermaster"
+msgstr ""
+
+#: delete_user.php:37 users.php:69
msgid "Delete user"
msgstr ""
-#: delete_user.php:60
-msgid "This user has access to the following domain(s)"
+#: delete_user.php:43
+msgid "This user has access to the following zone(s)"
msgstr ""
-#: delete_user.php:93
+#: delete_user.php:84
msgid "You are going to delete this user, are you sure?"
msgstr ""
-#: delete_user.php:96
+#: delete_user.php:87
msgid "This user has access to "
msgstr ""
-#: delete_user.php:96
-msgid "domain(s), by deleting him you will also delete these domains"
+#: delete_user.php:87
+msgid " zones, by deleting him you will also delete these zones."
msgstr ""
-#: edit.php:52
+#: edit.php:49
+msgid "Type of this domain is \"slave\", but there is no IP address for it's master given. Please specify!"
+msgstr ""
+
+#: edit.php:56
msgid "Edit domain"
msgstr ""
-#: edit.php:58
-msgid "This domain isn't owned by anyone yet, please assign someone."
-msgstr ""
-
-#: edit.php:69
-msgid "Add an owner"
+#: edit.php:65
+msgid "Owner of zone"
msgstr ""
-#: edit.php:88
-msgid "Add"
-msgstr ""
-
-#: edit.php:101
-msgid "Current listed owners"
-msgstr ""
-
-#: edit.php:115
+#: edit.php:80
msgid "Delete"
msgstr ""
-#: edit.php:132
-msgid "Type of this domain"
+#: edit.php:91
+msgid "No owner set or this domain!"
msgstr ""
-#: edit.php:136
-msgid "Change type"
+#: edit.php:118
+msgid "Add"
msgstr ""
-#: edit.php:152
+#: edit.php:133
+msgid "Type of zone"
+msgstr ""
+
+#: edit.php:155 edit.php:177
msgid "Change"
msgstr ""
-#: edit.php:162
-msgid "Number of records"
+#: edit.php:167
+msgid "IP address of master NS"
msgstr ""
-#: edit.php:185
+#: edit.php:199 list_zones.php:63 search.php:60
+msgid "Delete zone"
+msgstr ""
+
+#: edit.php:223 edit_record.php:40
msgid "Sub-owners"
msgstr ""
-#: edit.php:202 edit_record.php:61 search.php:141
+#: edit.php:245 search.php:119
msgid "Edit record"
msgstr ""
-#: edit.php:241
+#: edit.php:299
msgid "No records for this domain."
msgstr ""
-#: edit.php:262
+#: edit.php:320
msgid "Assign to user"
msgstr ""
-#: edit.php:276 index.php:143 search.php:91
-msgid "Delete zone"
-msgstr ""
-
-#: edit_record.php:60
+#: edit_record.php:29
msgid "Edit record in zone"
msgstr ""
-#: edit_record.php:104 edit_user.php:76
+#: edit_record.php:122 edit_user.php:81
msgid "Commit changes"
msgstr ""
-#: edit_record.php:104
+#: edit_record.php:123
msgid "Reset changes"
msgstr ""
-#: edit_record.php:109
-msgid "Sub-users"
-msgstr ""
-
-#: edit_record.php:115
-msgid "trash"
-msgstr ""
-
-#: edit_user.php:54 edit_user.php:59
+#: edit_user.php:35
msgid "Edit user"
msgstr ""
-#: edit_user.php:59 index.php:79 search.php:44 users.php:47
-msgid "User admin"
-msgstr ""
-
-#: edit_user.php:69 users.php:99
+#: edit_user.php:44 users.php:98
msgid "User name"
msgstr ""
-#: edit_user.php:70 install.php:204 users.php:100
+#: edit_user.php:48 install.php:201 users.php:102
msgid "Full name"
msgstr ""
-#: edit_user.php:71 install.php:203 users.php:101 inc/auth.inc.php:97
+#: edit_user.php:52 install.php:200 users.php:106 inc/auth.inc.php:78
msgid "Password"
msgstr ""
-#: edit_user.php:72 users.php:102
+#: edit_user.php:56 users.php:110
msgid "E-mail"
msgstr ""
-#: edit_user.php:73 users.php:103
+#: edit_user.php:60 users.php:114
msgid "User level"
msgstr ""
-#: edit_user.php:73 inc/config-me.inc.php:84
+#: edit_user.php:63 inc/config-me.inc.php:91
msgid "Normal user"
msgstr ""
-#: edit_user.php:73 inc/config-me.inc.php:85
+#: edit_user.php:64 inc/config-me.inc.php:92
msgid "Administrator"
msgstr ""
-#: edit_user.php:73 inc/config-me.inc.php:86
+#: edit_user.php:65 inc/config-me.inc.php:93
msgid "Administrator w/ user admin rights"
msgstr ""
-#: edit_user.php:74 install.php:206 users.php:104
+#: edit_user.php:70 install.php:203 users.php:124
msgid "Description"
msgstr ""
-#: edit_user.php:75 users.php:105 inc/toolkit.inc.php:270
+#: edit_user.php:76 users.php:128 inc/toolkit.inc.php:251
msgid "Active"
msgstr ""
-#: index.php:82 users.php:49
-msgid "Search records"
-msgstr ""
-
-#: index.php:86
+#: index.php:7
msgid "Welcome"
msgstr ""
-#: index.php:89
-msgid "Your userlevel is"
-msgstr ""
-
-#: index.php:95 users.php:59
-msgid "Error"
-msgstr ""
-
-#: index.php:99
-msgid "Current domains in DNS (click to view or edit)"
-msgstr ""
-
-#: index.php:105
-msgid "Number of domains"
+#: index.php:9 search.php:16 inc/header.inc.php:25
+msgid "Search zones or records"
msgstr ""
-#: index.php:119 search.php:79
-msgid "Records"
-msgstr ""
-
-#: index.php:131
-msgid "No domains in this listing, sorry."
+#: index.php:10 inc/header.inc.php:26
+msgid "List all zones"
msgstr ""
-#: index.php:158
-msgid "You only administer some records of domains marked with an (*)."
-msgstr ""
-
-#: index.php:169
-msgid "Create new domain"
-msgstr ""
-
-#: index.php:171
-msgid "Domain name"
+#: index.php:15 inc/header.inc.php:31
+msgid "List all supermasters"
msgstr ""
-#: index.php:172
-msgid "Web IP"
+#: index.php:16 inc/header.inc.php:32
+msgid "Add master zone"
msgstr ""
-#: index.php:173
-msgid "Mail IP"
-msgstr ""
-
-#: index.php:188
-msgid "Domain type"
-msgstr ""
-
-#: index.php:199
-msgid "Create zone without"
+#: index.php:17 inc/header.inc.php:33
+msgid "Add slave zone"
msgstr ""
-#: index.php:199
-msgid "applying records-template"
-msgstr ""
-
-#: index.php:200
-msgid "Add domain"
+#: index.php:27 inc/header.inc.php:43
+msgid "User administration"
msgstr ""
-#: index.php:209 index.php:214
-msgid "Change password"
+#: index.php:31 inc/header.inc.php:47
+msgid "Logout"
msgstr ""
-#: index.php:211
-msgid "Current password"
-msgstr ""
-
-#: index.php:212 index.php:213
-msgid "New password"
-msgstr ""
-
-#: install.php:63 inc/database.inc.php:31 inc/toolkit.inc.php:149
+#: install.php:63 inc/database.inc.php:10 inc/toolkit.inc.php:131
msgid "Oops! An error occured!"
msgstr ""
-#: install.php:171
+#: install.php:168
msgid "PowerAdmin has succesfully been installed."
msgstr ""
-#: install.php:173
+#: install.php:170
msgid "Remove this file (install.php) from your webdir."
msgstr ""
-#: install.php:174
+#: install.php:171
msgid "WARNING"
msgstr ""
-#: install.php:174
+#: install.php:171
msgid "PowerAdmin will not work until you delete install.php"
msgstr ""
-#: install.php:176
+#: install.php:173
msgid "You can click"
msgstr ""
-#: install.php:176
+#: install.php:173
msgid "to start using PowerAdmin"
msgstr ""
-#: install.php:185
+#: install.php:182
msgid "You didnt fill in one of the required fields!"
msgstr ""
-#: install.php:193 inc/auth.inc.php:86
+#: install.php:190
msgid "PowerAdmin for PowerDNS"
msgstr ""
-#: install.php:195
+#: install.php:192
msgid ""
"This config file will setup your database to be ready for PowerAdmin. Please fill in the next fields which will create an\n"
"administrator login."
msgstr ""
-#: install.php:197
+#: install.php:194
msgid "Fields marked with a"
msgstr ""
-#: install.php:197
+#: install.php:194
msgid "are required."
msgstr ""
+#: install.php:199
+msgid "Login Name"
+msgstr ""
+
#: install.php:202
-msgid "Login Name"
-msgstr ""
-
-#: install.php:205
msgid "Email"
msgstr ""
-#: install.php:207
+#: install.php:204
msgid "Make Account"
msgstr ""
-#: search.php:38
-msgid "Search zones or records"
+#: list_supermasters.php:9
+msgid "Oops!"
+msgstr ""
+
+#: list_supermasters.php:10
+msgid "You are not allowed to add supermasters with your current access level!"
+msgstr ""
+
+#: list_supermasters.php:29
+#, php-format
+msgid "List all %s supermasters"
+msgstr ""
+
+#: list_supermasters.php:44
+msgid "No supermasters in this listing, sorry."
+msgstr ""
+
+#: list_zones.php:11
+msgid "List zones"
msgstr ""
-#: search.php:48
-msgid "Type a hostname or a record in the box below and press search to see if the record exists in the system."
+#: list_zones.php:25 search.php:46
+msgid "Records"
+msgstr ""
+
+#: list_zones.php:44
+msgid "There are no zones."
+msgstr ""
+
+#: list_zones.php:62 search.php:59
+msgid "Edit zone"
msgstr ""
-#: search.php:52
+#: list_zones.php:91
+#, php-format
+msgid "This lists shows all %s zones(s) you have access to."
+msgstr ""
+
+#: list_zones.php:97
+#, php-format
+msgid "This lists shows %s out of %s zones you have access to."
+msgstr ""
+
+#: search.php:21
msgid "Enter a hostname or IP address"
msgstr ""
-#: search.php:57
+#: search.php:26
msgid "Search"
msgstr ""
-#: search.php:73
+#: search.php:41
msgid "Domains found"
msgstr ""
-#: search.php:116
+#: search.php:94
msgid "Records found"
msgstr ""
-#: search.php:173
+#: search.php:151
msgid "Nothing found for query"
msgstr ""
@@ -400,7 +480,7 @@
msgid "Not all tables are ok!"
msgstr ""
-#: test_setup.php:62 inc/toolkit.inc.php:181
+#: test_setup.php:62 inc/toolkit.inc.php:162
msgid "Successful!"
msgstr ""
@@ -416,70 +496,70 @@
msgid "Successful! Everything is set up ok, you can rumble!"
msgstr ""
-#: users.php:36
+#: users.php:16
+msgid "Password length should be at least 8 characters."
+msgstr ""
+
+#: users.php:26
msgid "Usernames can't contain spaces"
msgstr ""
-#: users.php:41
+#: users.php:31
msgid "Please fill in all fields"
msgstr ""
-#: users.php:62
-msgid "Current users (click to edit)"
+#: users.php:42
+msgid "User admin"
msgstr ""
-#: users.php:66
-msgid "Number of users"
+#: users.php:49
+msgid "Current users"
msgstr ""
-#: users.php:72
+#: users.php:58
msgid "Domains"
msgstr ""
-#: users.php:72
+#: users.php:59
msgid "Domain list"
msgstr ""
-#: users.php:72
+#: users.php:60
msgid "Level"
msgstr ""
-#: users.php:72
+#: users.php:61
msgid "Status"
msgstr ""
-#: users.php:97
+#: users.php:87
+msgid "Number of users"
+msgstr ""
+
+#: users.php:94
msgid "Create new user"
msgstr ""
-#: users.php:106
+#: users.php:133
msgid "Add user"
msgstr ""
-#: inc/auth.inc.php:42
+#: inc/auth.inc.php:20
msgid "Session expired, please login again."
msgstr ""
-#: inc/auth.inc.php:69
+#: inc/auth.inc.php:47
msgid "Authentication failed!"
msgstr ""
-#: inc/auth.inc.php:86
-msgid "Please login"
-msgstr ""
-
-#: inc/auth.inc.php:96 inc/auth.inc.php:98
+#: inc/auth.inc.php:68 inc/auth.inc.php:74 inc/auth.inc.php:84
msgid "Login"
msgstr ""
-#: inc/auth.inc.php:113
+#: inc/auth.inc.php:102
msgid "You have logged out."
msgstr ""
-#: inc/database.inc.php:33 inc/toolkit.inc.php:151 inc/toolkit.inc.php:187
-msgid "back"
-msgstr ""
-
#: inc/dns.inc.php:204
msgid "If you specify an MX record it must be a hostname."
msgstr ""
@@ -599,38 +679,46 @@
msgid "The first part of your SOA record does not contain a valid hostname for a DNS Server"
msgstr ""
-#: inc/footer.inc.php:34
-msgid "logout"
+#: inc/footer.inc.php:12
+msgid "credits"
msgstr ""
-#: inc/header.inc.php:28
-msgid "PowerAdmin"
+#: inc/header.inc.php:7 inc/header.inc.php:17
+msgid "Poweradmin"
msgstr ""
-#: inc/toolkit.inc.php:49
+#: inc/header.inc.php:24
+msgid "Index"
+msgstr ""
+
+#: inc/toolkit.inc.php:27
msgid "You have to create a config.inc.php!"
msgstr ""
-#: inc/toolkit.inc.php:54
+#: inc/toolkit.inc.php:32
msgid "You have to remove install.php before this program will run"
msgstr ""
-#: inc/toolkit.inc.php:59
+#: inc/toolkit.inc.php:37
msgid "You have to remove migrator.php before this program will run"
msgstr ""
-#: inc/toolkit.inc.php:91
+#: inc/toolkit.inc.php:74
msgid "Show page"
msgstr ""
-#: inc/toolkit.inc.php:119
+#: inc/toolkit.inc.php:101
msgid "Show domains beginning with:"
msgstr ""
-#: inc/toolkit.inc.php:170
+#: inc/toolkit.inc.php:151
msgid "Success!"
msgstr ""
-#: inc/toolkit.inc.php:266
+#: inc/toolkit.inc.php:168
+msgid "back"
+msgstr ""
+
+#: inc/toolkit.inc.php:247
msgid "Inactive"
msgstr ""
--- a/edit.php Sun Apr 22 16:27:45 2007 +0000
+++ b/edit.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,279 +1,326 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: edit.php,v 1.12 2003/05/10 20:10:47 azurazu Exp $
-//
-
require_once("inc/toolkit.inc.php");
// Assigning records to user: Check for records owned by user
if (isset($_POST["action"]) && $_POST["action"]=="record-user") {
- foreach ($_POST["rowid"] as $x_user => $x_value){
- $x_userid = $db->getOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$x_value."'");
- if (empty($x_userid)) {
- $db->query("INSERT INTO record_owners SET user_id = '".$_POST["userid"]."',record_id='".$x_value."'");
- }
- }
+ foreach ($_POST["rowid"] as $x_user => $x_value){
+ $x_userid = $db->queryOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$x_value."'");
+ if (empty($x_userid)) {
+ $db->query("INSERT INTO record_owners SET user_id = '".$_POST["userid"]."',record_id='".$x_value."'");
+ }
+ }
}
-
-$server_types = array("MASTER", "SLAVE", "NATIVE");
-
+if(isset($_POST['change_slave_master']) && is_numeric($_POST["domain"]) && level(5))
+{
+ change_domain_slave_master($_POST['domain'], $_POST['slave_master']);
+}
if(isset($_POST['type_change']) && in_array($_POST['newtype'], $server_types))
{
- change_domain_type($_POST['newtype'], $_GET['id']);
+ change_domain_type($_POST['newtype'], $_GET['id']);
}
if(isset($_POST["newowner"]) && is_numeric($_POST["domain"]) && is_numeric($_POST["newowner"]))
{
add_owner($_POST["domain"], $_POST["newowner"]);
}
-
if(isset($_POST["del_user"]) && is_numeric($_POST["del_user"]) && level(5))
{
delete_owner($_GET["id"], $_POST["del_user"]);
}
-
+$info = get_domain_info_from_id($_GET["id"]);
include_once("inc/header.inc.php");
+
+if (level(5))
+{
+ if(!isset($info["ownerid"]))
+ {
+ ?>
+ <div class="error"><? echo _('Error'); ?>: <? echo ('There is no owner for this zone, please assign someone.'); ?></div>
+ <?
+ }
+ $domain_type=get_domain_type($_GET['id']);
+ if ($domain_type == "SLAVE" )
+ {
+ $slave_master=get_domain_slave_master($_GET['id']);
+ if ($slave_master == "" )
+ {
?>
-<H2><? echo _('Edit domain'); ?> "<?= get_domain_name_from_id($_GET["id"]) ?>"</H2>
+ <div class="error"><? echo _('Type of this zone is "slave", but there is no IP address for it\'s master given.'); ?></div>
+<?
+ }
+ }
+}
+
+?>
+ <h2><? echo _('Edit zone'); ?> "<? echo get_domain_name_from_id($_GET["id"]) ?>"</h2>
+<?
+
+if (level(5))
+{ ?>
+ <div id="meta">
+ <div id="meta-left">
+ <table>
+ <tr>
+ <th colspan="2"><? echo _('Owner of zone'); ?></th>
+ </tr>
+<?
+ if(isset($info["ownerid"]))
+ {
+ $userRes = get_users_from_domain_id($_GET["id"]);
+ foreach($userRes as $user)
+ { ?>
+ <tr>
+ <form method="post" action="edit.php?id=<? echo $_GET['id']?>">
+ <td>
+ <? echo $user["fullname"]?>
+ </td>
+ <td>
+ <input type="hidden" name="del_user" value="<? echo $user["id"]?>">
+ <input type="submit" class="sbutton" name="co" value="<? echo _('Delete'); ?>">
+ </td>
+ </form>
+ </tr>
+<?
+ }
+ }
+ else
+ {
+?>
+ <tr>
+ <td><? echo _('No owner set or this zone!'); ?></td>
+ </tr>
<?
-$info = get_domain_info_from_id($_GET["id"]);
-if(!isset($info["ownerid"]))
+ }
+}
+ ?>
+ <tr>
+ <form method="post" action="edit.php?id=<? echo $_GET['id']?>">
+ <td>
+ <input type="hidden" name="domain" value="<? echo $_GET["id"] ?>">
+ <select name="newowner">
+ <?
+ $users = show_users();
+ foreach ($users as $u)
+ {
+ unset($add);
+ if ($u["id"] == $info["ownerid"])
+ {
+ $add = " SELECTED";
+ }
+ ?>
+ <option<? echo $add ?> value="<? echo $u["id"] ?>"><? echo $u["fullname"] ?></option><?
+ }
+ ?>
+ </select>
+ </td>
+ <td>
+ <input type="submit" class="sbutton" name="co" value="<? echo _('Add'); ?>">
+ </td>
+ </form>
+ </tr>
+ </table>
+ </div> <? // eo div meta-left ?>
+
+<?
+if (level(5))
{
- ?>
- <P CLASS="warning"><? echo _('This domain isn\'t owned by anyone yet, please assign someone.'); ?></P>
- <?
+ $domain_type=get_domain_type($_GET['id']);
+?>
+ <div id="meta-right">
+ <table>
+ <tr>
+ <th colspan="2"><? echo _('Type of zone'); ?></th>
+ </tr>
+ <form action="<? echo $_SERVER['PHP_SELF']?>?id=<? echo $_GET['id']?>" method="post">
+ <input type="hidden" name="domain" value="<? echo $_GET["id"] ?>">
+ <tr>
+ <td>
+ <select name="newtype">
+<?
+ foreach($server_types as $s)
+ {
+ unset($add);
+ if ($s == $domain_type)
+ {
+ $add = " SELECTED";
+ }
+?>
+ <option<? echo $add ?> value="<? echo $s?>"><? echo $s?></option><?
+ }
+?>
+ </select>
+ </td>
+ <td>
+ <input type="submit" class="sbutton" name="type_change" value="<? echo _('Change'); ?>">
+ </td>
+ </tr>
+ </form>
+
+<?
+ if ($domain_type == "SLAVE" )
+ {
+ $slave_master=get_domain_slave_master($_GET['id']);
+?>
+ <tr>
+ <th colspan="2">
+ <? echo _('IP address of master NS'); ?>
+ </th>
+ </tr>
+ <form action="<? echo $_SERVER['PHP_SELF']?>?&id=<? echo $_GET['id']?>" method="post">
+ <input type="hidden" name="domain" value="<? echo $_GET["id"] ?>">
+ <tr>
+ <td>
+ <input type="text" name="slave_master" value="<? echo $slave_master; ?>" class="input">
+ </td>
+ <td>
+ <input type="submit" class="sbutton" name="change_slave_master" value="<? echo _('Change'); ?>">
+ </td>
+ </tr>
+ </form>
+<?
+ }
}
?>
-
-<TABLE class="text" cellspacing="0" style="width: 280px">
-<? if (level(5))
-{ ?>
- <TR>
- <FORM METHOD="post" ACTION="edit.php?id=<?=$_GET['id']?>">
- <TD CLASS="none" VALIGN="middle" style="width: 250px;">
- <B><? echo _('Add an owner'); ?>:</B>
- <INPUT TYPE="hidden" NAME="domain" VALUE="<?= $_GET["id"] ?>">
- <SELECT NAME="newowner">
- <?
- $users = show_users();
- foreach ($users as $u)
- {
- unset($add);
- if ($u["id"] == $info["ownerid"])
- {
- $add = " SELECTED";
- }
- ?>
- <OPTION<?= $add ?> VALUE="<?= $u["id"] ?>"><?= $u["fullname"] ?></OPTION><?
- }
- ?>
- </SELECT>
- </TD>
- <TD CLASS="none" VALIGN="middle" align="right">
- <INPUT TYPE="submit" CLASS="sbutton" NAME="co" VALUE="<? echo _('Add'); ?>">
- </TD>
- </FORM>
- </TR>
- <TR>
- <TD CLASS="text" COLSPAN="2"> </TD>
- </TR>
-<?
-
-if(isset($info["ownerid"]))
-{?>
- <TR>
- <TD CLASS="text" ALIGN="left" COLSPAN="2" style="width:150px;">
- <B><? echo _('Current listed owners'); ?>:</B>
- </TD>
- </TR>
- <?
- $userRes = get_users_from_domain_id($_GET["id"]);
- foreach($userRes as $user)
- { ?>
- <TR>
- <FORM METHOD="post" ACTION="edit.php?id=<?=$_GET['id']?>">
- <TD CLASS="text" ALIGN="left" style="width:150px;">
- <?=$user["fullname"]?>
- </TD>
- <TD CLASS="text" align="right">
- <INPUT TYPE="hidden" NAME="del_user" VALUE="<?=$user["id"]?>">
- <INPUT TYPE="submit" CLASS="sbutton" NAME="co" VALUE="<? echo _('Delete'); ?>">
- </TD>
- </FORM>
- </TR>
- <? }
-}} ?>
-
-
-<? if(level(5) && $MASTER_SLAVE_FUNCTIONS)
-{
- $domain_type=get_domain_type($_GET['id']);
- // Let the user change the domain type.
+ </table>
+ </div> <? // eo div meta-right ?>
+ </div> <? // eo div meta ?>
+ <div id="meta">
+<?
+ if ($_SESSION[$_GET["id"]."_ispartial"] != 1 && $domain_type != "SLAVE" )
+ {
?>
- <TR>
- <TD CLASS="text" COLSPAN="2"> </TD>
- </TR>
- <TR>
- <TD CLASS="text" COLSPAN="2"><B><? echo _('Type of this domain'); ?>: </B><?=$domain_type?></TD>
- </TR>
- <FORM ACTION="<?=$_SERVER['PHP_SELF']?>?&id=<?=$_GET['id']?>" METHOD="post">
- <TR>
- <TD CLASS="text"><B><? echo _('Change type'); ?>: </B>
- <SELECT NAME="newtype">
- <?
- foreach($server_types as $s)
- {
- unset($add);
- if ($s == $domain_type)
- {
- $add = " SELECTED";
- }
- ?><OPTION<?=$add ?> VALUE="<?=$s?>"><?=$s?></OPTION><?
- }
- ?>
- </SELECT>
- </TD>
- <TD CLASS="text">
- <INPUT TYPE="submit" CLASS="sbutton" NAME="type_change" VALUE="<? echo _('Change'); ?>">
- </TD>
- </TR>
- </FORM>
-<? } ?>
-</TABLE>
-<br />
-<FONT CLASS="nav">
-<A HREF="index.php"><? echo _('DNS Admin'); ?></A> >> <?= get_domain_name_from_id($_GET["id"]) ?>
-</FONT>
-<br /><br /><small><b><? echo _('Number of records'); ?>:</b> <?= $info["numrec"] ?>
-
+ <input type="button" class="button" OnClick="location.href='add_record.php?id=<? echo $_GET["id"] ?>'" value="<? echo _('Add record'); ?>">
+<?
+ }
+ if (level(5))
+ {
+?>
+ <input type="button" class="button" OnClick="location.href='delete_domain.php?id=<? echo $_GET["id"] ?>'" value="<? echo _('Delete zone'); ?>">
+<?
+ }
+?>
+ </div> <? // eo div meta ?>
+ <div class="showmax">
<?
show_pages($info["numrec"],ROWAMOUNT,$_GET["id"]);
?>
-
-<br /><br />
-
-<form action="<?=$_SERVER["PHP_SELF"]?>?id=<?=$_GET["id"]?>" method="post">
-<input type="hidden" name="action" value="record-user" />
-
-<TABLE BORDER="0" CELLSPACING="4">
+ </div> <? // eo div showmax ?>
+ <form action="<? echo $_SERVER["PHP_SELF"]?>?id=<? echo $_GET["id"]?>" method="post">
+ <input type="hidden" name="action" value="record-user">
+ <table>
<?
-
$countinput=0;
-
$rec_result = get_records_from_domain_id($_GET["id"],ROWSTART,ROWAMOUNT);
-
if($rec_result != -1)
{
- ?>
- <TR STYLE="font-weight: Bold;">
- <TD CLASS="tdbg"> </TD>
- <? if (level(10)) { echo "<TD CLASS=\"tdbg\">" . _('Sub-owners') . "</TD>"; } ?>
- <TD CLASS="tdbg"><? echo _('Name'); ?></TD>
- <TD CLASS="tdbg"><? echo _('Type'); ?></TD>
- <TD CLASS="tdbg"><? echo _('Content'); ?></TD>
- <TD CLASS="tdbg"><? echo _('Priority'); ?></TD>
- <TD CLASS="tdbg"><? echo _('TTL'); ?></TD>
- </TR>
- <?
- $recs = sort_zone($rec_result);
- foreach($recs as $r)
- {
- ?><TR><TD CLASS="tdbg"><?
-
- if(level(5) || (!($r["type"] == "SOA" && !$GLOBALS["ALLOW_SOA_EDIT"]) && !($r["type"] == "NS" && !$GLOBALS["ALLOW_NS_EDIT"])))
- {
- // get_name_from_record_id($r["id"]) != get_domain_name_from_id(recid_to_domid($r["id"])) <-- hmm..
- ?>
- <A HREF="edit_record.php?id=<?= $r['id'] ?>&domain=<?= $_GET["id"] ?>"><IMG SRC="images/edit.gif" ALT="[ <? echo _('Edit record'); ?> ]" BORDER="0"></A>
- <A HREF="delete_record.php?id=<?= $r['id'] ?>&domain=<?= $_GET["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ <? echo _('Delete record'); ?> ]" BORDER="0"></A>
- <?
- }
-
-if(level(10)) { ?>
-
-<input type="checkbox" name="rowid[<?=$countinput++?>]" value="<?=$r['id']?>" />
-
-<? }
-
- ?></TD>
-
-<? if (level(10)) { ?>
- <TD STYLE="border: 1px solid #000;width:120px">
+?>
+ <tr>
+ <th> </th>
+<?
+ if (level(10) && $domain_type != "SLAVE")
+ {
+ echo "<th class=\"n\">" . _('Sub-owners') . "</td>";
+ }
+?>
+ <th><? echo _('Name'); ?></th>
+ <th><? echo _('Type'); ?></th>
+ <th><? echo _('Content'); ?></th>
+ <th><? echo _('Priority'); ?></th>
+ <th><? echo _('TTL'); ?></th>
+ </tr>
+<?
+ $recs = sort_zone($rec_result);
+ foreach($recs as $r)
+ {
+?>
+ <tr>
+ <td class="n">
+<?
+ if ($domain_type != "SLAVE" )
+ {
+ if(level(5) || (!($r["type"] == "SOA" && !$GLOBALS["ALLOW_SOA_EDIT"]) && !($r["type"] == "NS" && !$GLOBALS["ALLOW_NS_EDIT"])))
+ {
+?>
+ <a href="edit_record.php?id=<? echo $r['id'] ?>&domain=<? echo $_GET["id"] ?>"><img src="images/edit.gif" alt="[ <? echo _('Edit record'); ?> ]"></a>
+ <a href="delete_record.php?id=<? echo $r['id'] ?>&domain=<? echo $_GET["id"] ?>"><img src="images/delete.gif" ALT="[ <? echo _('Delete record'); ?> ]" BORDER="0"></a>
<?
-$x_result = $db->query("SELECT r.user_id,u.username FROM record_owners as r, users as u WHERE r.record_id='".$r['id']."' AND u.id=r.user_id");
-echo "<select style=\"width:120px;font-size:9px\">";
-while ($x_r = $x_result->fetchRow()) {
- echo "<option>".$x_r["username"]."</option>";
-}
-echo "</select>";
+ }
+ }
+ if(level(10) && $domain_type != "SLAVE")
+ {
+?>
+ <input type="checkbox" name="rowid[<? echo $countinput++?>]" value="<? echo $r['id']?>" />
+<?
+ }
+?>
+ </td>
+<?
+ if (level(10) && $domain_type != "SLAVE")
+ {
?>
- </TD>
-<? } ?>
- <TD STYLE="border: 1px solid #000000;"><?= $r['name'] ?></TD><TD STYLE="border: 1px solid #000000;"><?= $r['type'] ?></TD><TD STYLE="border: 1px solid #000000;"><?= $r['content'] ?></TD><?
- if ($r['prio'] != 0) {
- ?><TD STYLE="border: 1px solid #000000;"><?= $r['prio']; ?></TD><?
- } else {
- ?><TD CLASS="tdbg"></TD><?
- }
- ?><TD STYLE="border: 1px solid #000000;"><?= $r['ttl'] ?></TD></TR>
- <?
+ <td class="n">
+<?
+ $x_result = $db->query("SELECT r.user_id,u.username,u.fullname FROM record_owners as r, users as u WHERE r.record_id='".$r['id']."' AND u.id=r.user_id");
+ echo "<select style=\"width:120px;\">";
+ while ($x_r = $x_result->fetchRow()) {
+ echo "<option value=\"".$x_r["username"]."\">".$x_r["fullname"]."</option>";
+ }
+ echo "</select>";
+?>
+ </td>
+<?
+ }
+?>
+ <td class="y"><? echo $r['name'] ?></td>
+ <td class="y"><? echo $r['type'] ?></td>
+ <td class="y"><? echo $r['content'] ?></td>
+<?
+ if ($r['prio'] != 0)
+ {
+?>
+ <td class="y"><? echo $r['prio']; ?></td>
+<?
+ } else {
+?>
+ <td class="n"></td><?
+ }
+?>
+ <td class="y"><? echo $r['ttl'] ?></td>
+ </tr>
+<?
}
}
else
{
- ?>
- <TR>
- <TD CLASS="tdbg"><DIV CLASS="warning"><? echo _('No records for this domain.'); ?></DIV></TD>
- </TR>
- <?
-}
?>
-
-</TABLE>
-
-<? if (level(10)) { ?>
-<br>
-
-<img src="images/arrow.png" alt="arrow" style="margin-left:47px"/>
-<select name="userid">
-<?
-$users = show_users();
-foreach ($users as $user) {
- echo "<option value=\"".$user[id]."\">".$user[fullname]."</option>";
-}
-?>
-</select>
-
-<input type="submit" class="button" value="<? echo _('Assign to user'); ?>">
-</form>
-<? } ?>
-
-<BR><BR>
-
-<?
-if ($_SESSION[$_GET["id"]."_ispartial"] != 1) {
-?>
-<INPUT TYPE="button" CLASS="button" OnClick="location.href='add_record.php?id=<?= $_GET["id"] ?>'" VALUE="<? echo _('Add record'); ?>">
+ <tr>
+ <td class="n">
+ <div class="warning"><? echo _('No records for this zone.'); ?></div>
+ </td>
+ </tr>
<?
}
?>
+ </table>
-<? if (level(5)) { ?> <INPUT TYPE="button" CLASS="button" OnClick="location.href='delete_domain.php?id=<?= $_GET["id"] ?>'" VALUE="<? echo _('Delete zone'); ?>"><?
+<?
+if ($domain_type != "SLAVE")
+{
+ if (level(10)) { ?>
+ <img src="images/arrow.png" alt="arrow" class="edit-assign-to-user">
+ <select name="userid">
+ <?
+ $users = show_users();
+ foreach ($users as $user) {
+ echo "<option value=\"".$user[id]."\">".$user[fullname]."</option>";
+ }
+ ?>
+ </select>
+ <input type="submit" class="button" value="<? echo _('Assign to user'); ?>">
+ </form>
+<?
+ }
}
include_once("inc/footer.inc.php");
?>
--- a/edit_record.php Sun Apr 22 16:27:45 2007 +0000
+++ b/edit_record.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,22 +1,4 @@
-<?php
-
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: edit_record.php,v 1.9 2003/05/14 22:48:13 azurazu Exp $
-//
+<?
require_once("inc/toolkit.inc.php");
@@ -31,16 +13,6 @@
error(ERR_RECORD_ACCESS_DENIED);
}
-/*
-if($_SESSION["partial_".get_domain_name_from_id($_GET["domain"])] == 1 && !isset($_POST["recordid"]))
-{
- $checkPartial = $db->getOne("SELECT id FROM record_owners WHERE record_id='".$_GET["id"]."' AND user_id='".$_SESSION["userid"]."' LIMIT 1");
- if (empty($checkPartial)) {
- error(ERR_RECORD_ACCESS_DENIED);
- }
-}
-*/
-
if ($_POST["commit"])
{
edit_record($_POST["recordid"], $_POST["domainid"], $_POST["name"], $_POST["type"], $_POST["content"], $_POST["ttl"], $_POST["prio"]);
@@ -52,38 +24,78 @@
error(ERR_RECORD_ACCESS_DENIED);
}
}
-
+include_once("inc/header.inc.php");
+?>
+ <h2><? echo _('Edit record in zone'); ?> "<? echo get_domain_name_from_id($_GET["domain"]) ?>"</h2>
+<?
-include_once("inc/header.inc.php");
-
+$x_result = $db->query("SELECT r.id,u.fullname FROM record_owners as r, users as u WHERE r.record_id='".$_GET['id']."' AND u.id=r.user_id");
+if (level(10) && ($x_result->numRows() > 0))
+{
+?>
+ <div id="meta">
+ <div id="meta-left">
+ <table>
+ <tr>
+ <th><? echo _('Sub-owners'); ?></td>
+ <th> </td>
+ </tr>
+<?
+ while ($x_r = $x_result->fetchRow())
+ {
?>
-<H2><? echo _('Edit record in zone'); ?> "<?= get_domain_name_from_id($_GET["domain"]) ?>"</H2>
-<FONT CLASS="nav"><BR><A HREF="index.php"><? echo _('DNS Admin'); ?></A> >> <A HREF="edit.php?id=<?= $_GET["domain"] ?>"><?= get_domain_name_from_id($_GET["domain"]) ?></A> >> <? echo _('Edit record'); ?><BR><BR></FONT>
-
-<FORM METHOD="post" ACTION="edit_record.php">
-<INPUT TYPE="hidden" NAME="recordid" VALUE="<?= $_GET["id"] ?>">
-<INPUT TYPE="hidden" NAME="domainid" VALUE="<?= $_GET["domain"] ?>">
-<TABLE BORDER="0" CELLSPACING="4">
-<TR STYLE="font-weight: Bold"><TD CLASS="tdbg"><? echo _('Name'); ?></TD><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><? echo _('Type'); ?></TD><TD CLASS="tdbg"><? echo _('Priority'); ?></TD><TD CLASS="tdbg"><? echo _('Content'); ?></TD><TD CLASS="tdbg"><? echo _('TTL'); ?></TD></TR>
-
+ <tr>
+ <td class="tdbg"><? echo $x_r["fullname"]; ?></td>
+ <td class="tdbg"><a href="<? echo $_SERVER["PHP_SELF"]; ?>?id=<? echo $_GET["id"]; ?>&domain=<? echo $_GET["domain"]; ?>&delid=<? echo $x_r["id"]; ?>"><img src="images/delete.gif" alt="trash"></a></td>
+ </tr>
+<?
+ }
+?>
+ </table>
+ </div>
+ </div>
+<?
+}
+?>
+ <form method="post" action="edit_record.php">
+ <input type="hidden" name="recordid" value="<? echo $_GET["id"] ?>">
+ <input type="hidden" name="domainid" value="<? echo $_GET["domain"] ?>">
+ <table>
+ <tr>
+ <th><? echo _('Name'); ?></td>
+ <th> </td>
+ <th><? echo _('Type'); ?></td>
+ <th><? echo _('Priority'); ?></td>
+ <th><? echo _('Content'); ?></td>
+ <th><? echo _('TTL'); ?></td>
+ </tr>
<?
$rec = get_record_from_id($_GET["id"]);
?>
-
-<TR><TD CLASS="tdbg">
-
-<? if ($_SESSION[$_GET["domain"]."_ispartial"] == 1) { ?>
-
-<INPUT TYPE="hidden" NAME="name" VALUE="<?= trim(str_replace(get_domain_name_from_id($_GET["domain"]), '', $rec["name"]), '.')?>" CLASS="input">
+ <tr>
+ <td>
+<?
+if ($_SESSION[$_GET["domain"]."_ispartial"] == 1)
+{
+?>
+ <input type="hidden" name="name" value="<? echo trim(str_replace(get_domain_name_from_id($_GET["domain"]), '', $rec["name"]), '.')?>" class="input">
-<?= trim(str_replace(get_domain_name_from_id($_GET["domain"]), '', $rec["name"]), '.') ?>
-<? } else { ?>
-<INPUT TYPE="text" NAME="name" VALUE="<?= trim(str_replace(get_domain_name_from_id($_GET["domain"]), '', $rec["name"]), '.') ?>" CLASS="input">
-<? } ?>
-.<?= get_domain_name_from_id($_GET["domain"]) ?></TD><TD CLASS="tdbg">IN</TD><TD CLASS="tdbg"><SELECT NAME="type">
-
+<? echo trim(str_replace(get_domain_name_from_id($_GET["domain"]), '', $rec["name"]), '.') ?>
+<?
+}
+else
+{
+?>
+ <input type="text" name="name" value="<? echo trim(str_replace(get_domain_name_from_id($_GET["domain"]), '', $rec["name"]), '.') ?>" class="input">
+<?
+}
+?>
+.<? echo get_domain_name_from_id($_GET["domain"]) ?>
+ </td>
+ <td class="n">IN</td>
+ <td>
+ <select name="type">
<?
-
foreach (get_record_types() as $c)
{
if ($c == $rec["type"])
@@ -95,29 +107,22 @@
$add = "";
}
?>
- <OPTION<?= $add ?> VALUE="<?= $c ?>"><?= $c ?></OPTION><?
+ <option<? echo $add ?> value="<? echo $c ?>"><? echo $c ?></option><?
}
?>
-</SELECT></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="prio" VALUE="<?= $rec["prio"] ?>" CLASS="sinput"></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="content" VALUE="<?= $rec["content"] ?>" CLASS="input"></TD><TD CLASS="tdbg"><INPUT TYPE="text" NAME="ttl" VALUE="<?= $rec["ttl"] ?>" CLASS="sinput"></TD></TR>
-</TABLE>
-<BR><INPUT TYPE="submit" NAME="commit" VALUE="<? echo _('Commit changes'); ?>" CLASS="button"> <INPUT TYPE="reset" NAME="reset" VALUE="<? echo _('Reset changes'); ?>" CLASS="button">
-</FORM>
-
-<?if (level(10)) { ?>
-<table style="width:140px">
-<tr><td CLASS="tdbg"><b><? echo _('Sub-users'); ?></b></td><td CLASS="tdbg"> </td></tr>
+ </select>
+ </td>
+ <td><input type="text" name="prio" value="<? echo $rec["prio"] ?>" class="sinput"></td>
+ <td><input type="text" name="content" value="<? echo $rec["content"] ?>" class="input"></td>
+ <td><input type="text" name="ttl" value="<? echo $rec["ttl"] ?>" class="sinput"></td>
+ </tr>
+ </table>
+ <p>
+ <input type="submit" name="commit" value="<? echo _('Commit changes'); ?>" class="button">
+ <input type="reset" name="reset" value="<? echo _('Reset changes'); ?>" class="button">
+ </p>
+ </form>
<?
-$x_result = $db->query("SELECT r.id,u.username FROM record_owners as r, users as u WHERE r.record_id='".$_GET['id']."' AND u.id=r.user_id");
-while ($x_r = $x_result->fetchRow()) {
- echo "<tr><td CLASS=\"tdbg\">".$x_r["username"]."</td><td CLASS=\"tdbg\">";
- echo "<a href=\"".$_SERVER["PHP_SELF"]."?id=".$_GET["id"]."&domain=".$_GET["domain"]."&delid=".$x_r["id"]."\">";
- echo "<img src=\"images/delete.gif\" alt=\"" . _('trash') . "\" border=\"0\"/></a></td></tr>";
-}
+include_once("inc/footer.inc.php");
?>
-</table>
-<? }
-
-include_once("inc/footer.inc.php");
-
-?>
--- a/edit_user.php Sun Apr 22 16:27:45 2007 +0000
+++ b/edit_user.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,23 +1,5 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: edit_user.php,v 1.6 2002/12/10 01:29:47 azurazu Exp $
-//
-
require_once("inc/toolkit.inc.php");
if($_POST["commit"])
@@ -47,36 +29,59 @@
if (!level(10))
{
- error("You need user level 10 to view this page... How did you get here, anyway?");
+ error("You do not have the required access level.");
}
-
?>
-<H2><? echo _('Edit user'); ?> "<?= get_fullname_from_userid($_GET["id"]) ?>"</H2>
+ <h2><? echo _('Edit user'); ?> "<? echo get_fullname_from_userid($_GET["id"]) ?>"</h2>
<?
-if (level(10))
-{
-?>
-<FONT CLASS="nav"><BR><A HREF="users.php"><? echo _('User admin'); ?></A> >> <? echo _('Edit user'); ?></FONT><BR><BR>
-<?
-}
-
$r = array();
$r = get_user_info($_GET["id"]);
-
?>
-<FORM METHOD="post">
-<TABLE BORDER="0" CELLSPACING="4">
-<TR><TD CLASS="tdbg"><? echo _('User name'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="username" VALUE="<?=$r["username"]?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Full name'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="fullname" VALUE="<?=$r["fullname"]?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Password'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="password" VALUE=""></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('E-mail'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="email" VALUE="<?=$r["email"]?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('User level'); ?>:</TD><TD CLASS="tdbg"><SELECT NAME="level"><OPTION VALUE="1" <? if($r["level"] == 1) { echo "SELECTED"; } ?>>1 (<? echo _('Normal user'); ?>)</OPTION><OPTION VALUE="5" <? if($r["level"] == 5) { echo "SELECTED"; } ?>>5 (<? echo _('Administrator'); ?>)</OPTION><OPTION VALUE="10" <? if($r["level"] == 10) { echo "SELECTED"; } ?>>10 (<? echo _('Administrator w/ user admin rights'); ?>)</OPTION></SELECT></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Description'); ?>:</TD><TD CLASS="tdbg"><TEXTAREA ROWS="6" COLS="30" CLASS="inputarea" NAME="description"><?=$r["description"]?></TEXTAREA></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Active'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="checkbox" NAME="active" VALUE="1" <? if($r["active"]) { ?>CHECKED<? } ?>></TD></TR>
-<TR><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="commit" VALUE="<? echo _('Commit changes'); ?>"></TD></TR>
-<INPUT TYPE="HIDDEN" NAME="number" VALUE="<?= $_GET["id"] ?>">
-</TABLE>
-</FORM>
+ <form method="post">
+ <input type="HIDDEN" name="number" value="<? echo $_GET["id"] ?>">
+ <table>
+ <tr>
+ <td class="n"><? echo _('User name'); ?>:</td>
+ <td class="n"><input type="text" class="input" name="username" value="<? echo $r["username"]?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Full name'); ?>:</td>
+ <td class="n"><input type="text" class="input" name="fullname" value="<? echo $r["fullname"]?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Password'); ?>:</td>
+ <td class="n"><input type="text" class="input" name="password" value=""></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('E-mail'); ?>:</td>
+ <td class="n"><input type="text" class="input" name="email" value="<? echo $r["email"]?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('User level'); ?>:</td>
+ <td class="n">
+ <select name="level">
+ <option value="1" <? if($r["level"] == 1) { echo "selectED"; } ?>>1 (<? echo _('Normal user'); ?>)</option>
+ <option value="5" <? if($r["level"] == 5) { echo "selectED"; } ?>>5 (<? echo _('Administrator'); ?>)</option>
+ <option value="10" <? if($r["level"] == 10) { echo "selectED"; } ?>>10 (<? echo _('Administrator w/ user admin rights'); ?>)</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Description'); ?>:</td>
+ <td class="n">
+ <textarea rows="6" cols="30" class="inputarea" name="description"><? echo $r["description"]?></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Active'); ?>:</td>
+ <td class="n"><input type="checkbox" name="active" value="1" <? if($r["active"]) { ?>CHECKED<? } ?>></td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n"><input type="submit" class="button" name="commit" value="<? echo _('Commit changes'); ?>"></td>
+ </tr>
+ </table>
+ </form>
<?
include_once("inc/footer.inc.php");
--- a/inc/auth.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/auth.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,27 +1,5 @@
<?
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: auth.inc.php
-// Startdate: 26-10-2002
-// Description: file is supposed to validate users and check whether they are authorized.
-// If they are authorized this code handles that they can access stuff.
-//
-// $Id: auth.inc.php,v 1.6 2003/01/13 22:08:52 azurazu Exp $
-//
-
session_start();
if (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] == "logout")
@@ -39,7 +17,7 @@
// Check if the session hasnt expired yet.
if ((isset($_SESSION["userid"])) && ($_SESSION["lastmod"] != "") && ((time() - $_SESSION["lastmod"]) > $EXPIRE))
{
- logout( _('Session expired, please login again.') );
+ logout( _('Session expired, please login again.'),"error");
}
// If the session hasn't expired yet, give our session a fresh new timestamp.
@@ -66,7 +44,7 @@
else
{
//Authentication failed, retry.
- auth( _('Authentication failed!') );
+ auth( _('Authentication failed!'),"error");
}
}
else
@@ -79,24 +57,35 @@
* Print the login form.
*/
-function auth($msg="")
+function auth($msg="",$type="success")
{
include_once('inc/header.inc.php');
- ?>
- <H2><? echo _('PowerAdmin for PowerDNS'); ?></H2><H3><? echo _('Please login'); ?>:</H3>
- <?
- if($msg)
+ if ( $msg )
{
- print "<font class=\"warning\">$msg</font>\n";
-
+ print "<div class=\"$type\">$msg</div>\n";
}
?>
- <FORM METHOD="post" ACTION="<?= $_SERVER["PHP_SELF"] ?>">
- <TABLE BORDER="0">
- <TR><TD STYLE="background-color: #FCC229;"><? echo _('Login'); ?>:</TD><TD STYLE="background-color: #FCC229;"><INPUT TYPE="text" CLASS="input" NAME="username"></TD></TR>
- <TR><TD STYLE="background-color: #FCC229;"><? echo _('Password'); ?>:</TD><TD STYLE="background-color: #FCC229;"><INPUT TYPE="password" CLASS="input" NAME="password"></TD></TR>
- <TR><TD STYLE="background-color: #FCC229;"> </TD><TD STYLE="background-color: #FCC229;"><INPUT TYPE="submit" NAME="authenticate" CLASS="button" VALUE=" <? echo _('Login'); ?> "></TD></TR>
- </TABLE>
+ <h2><? echo _('Login'); ?></h2>
+ <?
+ ?>
+ <form method="post" action="<? echo $_SERVER["PHP_SELF"] ?>">
+ <table border="0">
+ <tr>
+ <td class="n"><? echo _('Login'); ?>:</td>
+ <td class="n"><input type="text" class="input" name="username"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Password'); ?>:</td>
+ <td class="n"><input type="password" class="input" name="password"></td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n">
+ <input type="submit" name="authenticate" class="button" value=" <? echo _('Login'); ?> ">
+ </td>
+ </tr>
+ </table>
+ </form>
<?
include_once('inc/footer.inc.php');
exit;
@@ -110,11 +99,12 @@
function logout($msg="")
{
if ( $msg == "" ) {
- $msg=_('You have logged out.');
+ $msg = _('You have logged out.');
+ $type = "success";
};
session_destroy();
session_write_close();
- auth($msg);
+ auth($msg, $type);
exit;
}
--- a/inc/config-me.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/config-me.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -26,7 +26,6 @@
/* URI Configuration */
-
// $BASE_URL
// This will be the main URI you will use to connect to PowerAdmin.
// For instance: "http://poweradmin.sjeemz.nl"
@@ -37,6 +36,14 @@
// For instance: "/admin/"
$BASE_PATH = "/admin/";
+// $LANG
+// Which language should be used for the web interface?
+$LANG = "en_EN";
+
+// $STYLE
+// Define skin of web frontend. This should be the basename of the CSS file that
+// will be included, it will be used like: "style/$STYLE.css.php".
+$STYLE = "example";
/* DNS Record information */
@@ -88,13 +95,6 @@
// Enable fancy records or not (http://doc.powerdns.com/fancy-records.html)? true/false
$FANCY_RECORDS = true;
-// Master or slave functionality. Set this to either true or false.
-// This field indicates if you are running in a MASTER/SLAVE setup or in a NATIVE setup.
-// By toggling this function you will get some more selection features.
-// Default is false.
-// Use these features with care, they havent been tested much yet.
-$MASTER_SLAVE_FUNCTIONS = false;
-
/* ------------------------------------------ */
/* No need to make changes below this line... */
--- a/inc/database.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/database.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,26 +1,5 @@
<?
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: auth.inc.php
-// Startdate: 26-10-2002
-// Description: Constructs the database class.
-//
-// $Id: database.inc.php,v 1.3 2002/12/27 02:45:08 azurazu Exp $
-//
-
require_once("MDB2.php");
function dbError($msg)
@@ -28,10 +7,10 @@
// General function for printing critical errors.
include_once("header.inc.php");
?>
- <P><TABLE CLASS="error"><TR><TD CLASS="error"><H2><? echo _('Oops! An error occured!'); ?></H2>
- <BR>
- <FONT STYLE="font-weight: Bold"><?= $msg->getDebugInfo(); ?><BR><BR><a href="javascript:history.go(-1)"><< <? echo _('back'); ?></a></FONT><BR></TD></TR></TABLE></P>
- <?
+ <h2><? echo _('Oops! An error occured!'); ?></h2>
+ <p class="error"><? echo $msg->getDebugInfo(); ?></p>
+ <?
+ include_once("footer.inc.php");
die();
}
--- a/inc/error.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/error.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,28 +1,5 @@
<?
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: error.inc.php
-// Startdate: 25-11-2002
-// Description: all error defines should be put in here.
-// All errors have to use an ERR_ prefix to distinguish them from other constants.
-// All errors should be placed in the appropriate group.
-//
-// $Id: error.inc.php,v 1.6 2003/05/04 21:38:37 azurazu Exp $
-//
-
// Added next line to enable i18n on following definitions. Not sure
// if this is the best (or at least a proper) location for this. /RZ.
require_once("inc/i18n.inc.php");
@@ -37,7 +14,7 @@
define("ERR_RECORD_DELETE_TYPE_DENIED", _('You are not allowed to delete %s records'));
/* DOMAIN STUFF */
-define("ERR_DOMAIN_INVALID", _('This is an invalid domain name'));
+define("ERR_DOMAIN_INVALID", _('This is an invalid zone name'));
/* USER STUFF */
define("ERR_USER_EXIST", _('Username exist already, please choose another one'));
--- a/inc/footer.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/footer.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,28 +1,5 @@
<?
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: footer.inc.php
-// Startdate: beginning.
-// Description: simple page footer
-// Closes the database connection.
-//
-// $Id: footer.inc.php,v 1.12 2003/05/14 22:49:56 azurazu Exp $
-//
-
-
global $db;
if(is_object($db))
{
@@ -30,10 +7,15 @@
}
?>
-<BR><BR>
-<FONT CLASS="footer">[ <A HREF="index.php?logout"><? echo _('logout'); ?></A> ] <B>PowerAdmin v1.2.7</B> :: Copyright ©
-<?= date("Y") ?> The PowerAdmin Team :: <a href="http://poweradmin.org" target="_blank">http://poweradmin.org</a>
-</FONT>
-</BODY>
-</HTML>
-
+ </div> <!-- /content -->
+ <div class="footer">
+ <strong>poweradmin</strong> version 1.4.0 - <a href="credits.php"><? echo _('credits'); ?></a>
+ </div>
+<?
+if(file_exists('inc/custom_footer.inc.php'))
+{
+ include('inc/custom_footer.inc.php');
+}
+?>
+ </body>
+</html>
--- a/inc/header.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/header.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,31 +1,56 @@
<?
-
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: error.inc.php
-// Startdate: 25-11-2002
-// Description: simple header defining the page looks.
-//
-// $Id: header.inc.php,v 1.4 2003/02/05 23:23:53 azurazu Exp $
-//
-
+global $STYLE;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE><? echo _('PowerAdmin'); ?></TITLE>
-<LINK REL=StyleSheet HREF="style/style.css.php" TYPE="text/css">
-</HEAD>
-<BODY>
+<html>
+ <head>
+ <title><? echo _('Poweradmin'); ?></title>
+ <link rel=stylesheet href="style/<? echo $STYLE; ?>.inc.php" type="text/css">
+ </head>
+ <body>
+<?
+if(file_exists('inc/custom_header.inc.php'))
+{
+ include('inc/custom_header.inc.php');
+}
+?>
+ <h1><? echo _('Poweradmin'); ?></h1>
+<?
+if (isset($_SESSION["userid"]))
+{
+?>
+
+ <div class="menu">
+ <span class="menuitem"><a href="index.php"><? echo _('Index'); ?></a></span>
+ <span class="menuitem"><a href="search.php"><? echo _('Search zones or records'); ?></a></span>
+ <span class="menuitem"><a href="list_zones.php"><? echo _('List all zones'); ?></a></span>
+ <?
+ if (level(5))
+ {
+ ?>
+ <span class="menuitem"><a href="list_supermasters.php"><? echo _('List all supermasters'); ?></a></span>
+ <span class="menuitem"><a href="add_zone_master.php"><? echo _('Add master zone'); ?></a></span>
+ <span class="menuitem"><a href="add_zone_slave.php"><? echo _('Add slave zone'); ?></a></span>
+ <span class="menuitem"><a href="add_supermaster.php"><? echo _('Add supermaster'); ?></a></span>
+ <?
+ }
+ ?>
+ <span class="menuitem"><a href="change_password.php"><? echo _('Change password'); ?></a></span>
+ <?
+ if (level(10))
+ {
+ ?>
+ <span class="menuitem"><a href="users.php"><? echo _('User administration'); ?></a></span>
+ <?
+ }
+ ?>
+ <span class="menuitem"><a href="index.php?logout"><? echo _('Logout'); ?></a></span>
+
+ </div> <!-- /menu -->
+<?
+}
+?>
+ <div class="content">
+
+
+
--- a/inc/i18n.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/i18n.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,7 +1,10 @@
<?
-$language = "en_EN";
+include_once("inc/config.inc.php");
+
+$language = $LANG;
setlocale(LC_ALL, $language);
$gettext_domain = 'messages';
bindtextdomain($gettext_domain, "./locale");
textdomain($gettext_domain);
+
?>
--- a/inc/record.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/record.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -192,6 +192,76 @@
}
+function add_supermaster($master_ip, $ns_name, $account)
+{
+ global $db;
+ if (!is_valid_ip($master_ip) && !is_valid_ip6($master_ip))
+ {
+ error(sprintf(ERR_INV_ARGC, "add_supermaster", "No or no valid ipv4 or ipv6 address given."));
+ }
+ if (!is_valid_hostname($ns_name))
+ {
+ error(ERR_DNS_HOSTNAME);
+ }
+ if (!validate_account($account))
+ {
+ error(sprintf(ERR_INV_ARGC, "add_supermaster", "given account name is invalid (alpha chars only)"));
+ }
+ if (supermaster_exists($master_ip))
+ {
+ error(sprintf(ERR_INV_ARGC, "add_supermaster", "supermaster already exists"));
+ }
+ else
+ {
+ $db->query("INSERT INTO supermasters VALUES ('$master_ip', '$ns_name', '$account')");
+ return true;
+ }
+}
+
+function delete_supermaster($master_ip)
+{
+ global $db;
+ if (!level(5))
+ {
+ error(ERR_LEVEL_5);
+ }
+ if (is_valid_ip($master_ip) || is_valid_ip6($master_ip))
+ {
+ $db->query("DELETE FROM supermasters WHERE ip = '$master_ip'");
+ return true;
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARGC, "delete_supermaster", "No or no valid ipv4 or ipv6 address given."));
+ }
+}
+
+function get_supermaster_info_from_ip($master_ip)
+{
+ global $db;
+ if (!level(5))
+ {
+ error(ERR_LEVEL_5);
+ }
+ if (is_valid_ip($master_ip) || is_valid_ip6($master_ip))
+ {
+ $result = $db->queryRow("SELECT ip,nameserver,account FROM supermasters WHERE ip = '$master_ip'");
+
+ $ret = array(
+ "master_ip" => $result["ip"],
+ "ns_name" => $result["nameserver"],
+ "account" => $result["account"]
+ );
+
+ return $ret;
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARGC, "get_supermaster_info_from_ip", "No or no valid ipv4 or ipv6 address given."));
+ }
+}
+
+
/*
* Delete a record by a given id.
* return values: true, this function is always succesful.
@@ -248,7 +318,7 @@
* remember to request nextID's from the database to be able to insert record.
* if anything is invalid the function will error
*/
-function add_domain($domain, $owner, $webip, $mailip, $empty, $type)
+function add_domain($domain, $owner, $webip, $mailip, $empty, $type, $slave_master)
{
global $db;
@@ -263,11 +333,12 @@
// empty is given and owner and domain
// OR
// the domain is an arpa record and owner is given
+ // OR
+ // the type is slave, domain, owner and slave_master are given
// THAN
// Continue this function
- if (($domain && $owner && $webip && $mailip) || ($empty && $owner && $domain) || (eregi('in-addr.arpa', $domain) && $owner))
+ if (($domain && $owner && $webip && $mailip) || ($empty && $owner && $domain) || (eregi('in-addr.arpa', $domain) && $owner) || $type=="SLAVE" && $domain && $owner && $slave_master)
{
-
// First insert zone into domain table
$db->query("INSERT INTO domains (name, type) VALUES ('$domain', '$type')");
@@ -280,59 +351,69 @@
// Second, insert into zones tables
$db->query("INSERT INTO zones (domain_id, owner) VALUES ('$iddomain', $owner)");
- // Generate new timestamp. We need this one anyhow.
- $now = time();
-
- if ($empty && $iddomain)
+ if ($type == "SLAVE")
{
- // If we come into this if statement we dont want to apply templates.
- // Retrieve configuration settings.
- $ns1 = $GLOBALS["NS1"];
- $hm = $GLOBALS["HOSTMASTER"];
- $ttl = $GLOBALS["DEFAULT_TTL"];
+ $db->query("UPDATE domains SET master = '$slave_master' WHERE id = '$iddomain';");
+
+ // Done
+ return true;
+ }
+ else
+ {
+ // Generate new timestamp. We need this one anyhow.
+ $now = time();
- // Build and execute query
- $sql = "INSERT INTO records (domain_id, name, content, type, ttl, prio, change_date) VALUES ('$iddomain', '$domain', '$ns1 $hm 1', 'SOA', $ttl, '', '$now')";
- $db->query($sql);
+ if ($empty && $iddomain)
+ {
+ // If we come into this if statement we dont want to apply templates.
+ // Retrieve configuration settings.
+ $ns1 = $GLOBALS["NS1"];
+ $hm = $GLOBALS["HOSTMASTER"];
+ $ttl = $GLOBALS["DEFAULT_TTL"];
- // Done
- return true;
- }
- elseif ($iddomain)
- {
- // If we are here we want to apply templates.
- global $template;
+ // Build and execute query
+ $sql = "INSERT INTO records (domain_id, name, content, type, ttl, prio, change_date) VALUES ('$iddomain', '$domain', '$ns1 $hm 1', 'SOA', $ttl, '', '$now')";
+ $db->query($sql);
- // Iterate over the template and apply it for each field.
- foreach ($template as $r)
+ // Done
+ return true;
+ }
+ elseif ($iddomain)
{
- // Same type of if statement as previous.
- if ((eregi('in-addr.arpa', $domain) && ($r["type"] == "NS" || $r["type"] == "SOA")) || (!eregi('in-addr.arpa', $domain)))
+ // If we are here we want to apply templates.
+ global $template;
+
+ // Iterate over the template and apply it for each field.
+ foreach ($template as $r)
{
- // Parse the template.
- $name = parse_template_value($r["name"], $domain, $webip, $mailip);
- $type = $r["type"];
- $content = parse_template_value($r["content"], $domain, $webip, $mailip);
- $ttl = $r["ttl"];
- $prio = $r["prio"];
-
- // If no ttl is given, use the default.
- if (!$ttl)
+ // Same type of if statement as previous.
+ if ((eregi('in-addr.arpa', $domain) && ($r["type"] == "NS" || $r["type"] == "SOA")) || (!eregi('in-addr.arpa', $domain)))
{
- $ttl = $GLOBALS["DEFAULT_TTL"];
- }
+ // Parse the template.
+ $name = parse_template_value($r["name"], $domain, $webip, $mailip);
+ $type = $r["type"];
+ $content = parse_template_value($r["content"], $domain, $webip, $mailip);
+ $ttl = $r["ttl"];
+ $prio = $r["prio"];
- $sql = "INSERT INTO records (domain_id, name, content, type, ttl, prio, change_date) VALUES ('$iddomain', '$name','$content','$type','$ttl','$prio','$now')";
- $db->query($sql);
+ // If no ttl is given, use the default.
+ if (!$ttl)
+ {
+ $ttl = $GLOBALS["DEFAULT_TTL"];
+ }
+
+ $sql = "INSERT INTO records (domain_id, name, content, type, ttl, prio, change_date) VALUES ('$iddomain', '$name','$content','$type','$ttl','$prio','$now')";
+ $db->query($sql);
+ }
}
- }
- // All done.
- return true;
- }
- else
- {
- error(sprintf(ERR_INV_ARGC, "add_domain", "could not create zone"));
- }
+ // All done.
+ return true;
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARGC, "add_domain", "could not create zone"));
+ }
+ }
}
else
{
@@ -635,7 +716,9 @@
if ($_SESSION[$id."_ispartial"] == 1) {
- $sqlq = "SELECT domains.name AS name,
+ $sqlq = "SELECT
+ domains.type AS type,
+ domains.name AS name,
users.fullname AS owner,
count(record_owners.id) AS aantal
FROM domains, users, record_owners, records
@@ -653,6 +736,7 @@
"name" => $result["name"],
"ownerid" => $_SESSION["userid"],
"owner" => $result["owner"],
+ "type" => $result["type"],
"numrec" => $result["aantal"]
);
@@ -661,7 +745,9 @@
} else{
// Query that retrieves the information we need.
- $sqlq = "SELECT domains.name AS name,
+ $sqlq = "SELECT
+ domains.type AS type,
+ domains.name AS name,
min(zones.owner) AS ownerid,
users.fullname AS owner,
count(records.domain_id) AS aantal
@@ -682,6 +768,7 @@
"name" => $result["name"],
"ownerid" => $result["ownerid"],
"owner" => $result["owner"],
+ "type" => $result["type"],
"numrec" => $result["aantal"]
);
return $ret;
@@ -725,9 +812,58 @@
}
}
+function get_supermasters()
+{
+ global $db;
+ $result = $db->query("SELECT ip, nameserver, account FROM supermasters");
+ $ret = array();
+
+ if($result->numRows() == 0)
+ {
+ return -1;
+ }
+ else
+ {
+ while ($r = $result->fetchRow())
+ {
+ $ret[] = array(
+ "master_ip" => $r["ip"],
+ "ns_name" => $r["nameserver"],
+ "account" => $r["account"],
+ );
+ return $ret;
+ }
+ }
+}
+
+function supermaster_exists($master_ip)
+{
+ global $db;
+ if (!level(5))
+ {
+ error(ERR_LEVEL_5);
+ }
+ if (is_valid_ip($master_ip) || is_valid_ip6($master_ip))
+ {
+ $result = $db->query("SELECT ip FROM supermasters WHERE ip = '$master_ip'");
+ if ($result->numRows() == 0)
+ {
+ return false;
+ }
+ elseif ($result->numRows() >= 1)
+ {
+ return true;
+ }
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARGC, "supermaster_exists", "No or no valid IPv4 or IPv6 address given."));
+ }
+}
+
/*
- * Get all domains from the database.
+ * Get all domains from the database
* This function gets all the domains from the database unless a user id is below 5.
* if a user id is below 5 this function will only retrieve records for that user.
* return values: the array of domains or -1 if nothing is found.
@@ -1097,18 +1233,87 @@
function get_domain_type($id)
{
global $db;
- $type = $db->queryOne("SELECT `type` FROM `domains` WHERE `id` = '".$id."'");
- if($type == "")
+ if (is_numeric($id))
{
- $type = "NATIVE";
- }
- return $type;
-
+ $type = $db->queryOne("SELECT `type` FROM `domains` WHERE `id` = '".$id."'");
+ if($type == "")
+ {
+ $type = "NATIVE";
+ }
+ return $type;
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARG, "get_record_from_id", "no or no valid zoneid given"));
+ }
+}
+
+function get_domain_slave_master($id)
+{
+ global $db;
+ if (is_numeric($id))
+ {
+ $slave_master = $db->queryOne("SELECT `master` FROM `domains` WHERE `type` = 'SLAVE' and `id` = '".$id."'");
+ return $slave_master;
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARG, "get_domain_slave_master", "no or no valid zoneid given"));
+ }
}
function change_domain_type($type, $id)
{
- global $db;
- $result = $db->query("UPDATE `domains` SET `type` = '" .$type. "' WHERE `id` = '".$id."'");
+ global $db;
+ unset($add);
+ if (is_numeric($id))
+ {
+ // It is not really neccesary to clear the master field if a
+ // zone is not of the type "slave" as powerdns will ignore that
+ // fiedl, but it is cleaner anyway.
+ if ($type != "SLAVE")
+ {
+ $add = ", master=''";
+ }
+ $result = $db->query("UPDATE `domains` SET `type` = '" .$type. "'".$add." WHERE `id` = '".$id."'");
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARG, "change_domain_type", "no or no valid zoneid given"));
+ }
+}
+
+function change_domain_slave_master($id, $slave_master)
+{
+ global $db;
+ if (is_numeric($id))
+ {
+ if (is_valid_ip($slave_master) || is_valid_ip6($slave_master))
+ {
+ $result = $db->query("UPDATE `domains` SET `master` = '" .$slave_master. "' WHERE `id` = '".$id."'");
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARGC, "change_domain_slave_master", "This is not a valid IPv4 or IPv6 address: $slave_master"));
+ }
+ }
+ else
+ {
+ error(sprintf(ERR_INV_ARG, "change_domain_type", "no or no valid zoneid given"));
+ }
+}
+
+
+function validate_account($account)
+{
+
+ if(preg_match("/^[A-Z0-9._-]+$/i",$account))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
?>
--- a/inc/toolkit.inc.php Sun Apr 22 16:27:45 2007 +0000
+++ b/inc/toolkit.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,27 +1,5 @@
<?
session_start();
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: toolkit.inc.php
-// Startdate: 26-10-2002
-// Description: general functions needed on a large variety of locations.
-// Kills the db.inc.php.
-// If you include this file you include the whole 'backend'
-//
-// $Id: toolkit.inc.php,v 1.13 2003/02/24 01:46:31 azurazu Exp $
-//
/*************
* Constants *
@@ -64,6 +42,11 @@
require_once("database.inc.php");
// Generates $db variable to access database.
+
+// Array of the available zone types
+$server_types = array("MASTER", "SLAVE", "NATIVE");
+
+
/*************
* Includes *
*************/
@@ -88,7 +71,7 @@
{
if ($amount > $rowamount) {
if (!isset($_GET["start"])) $_GET["start"]=1;
- echo "<br /><br />" . _('Show page') . " ";
+ echo _('Show page') . "<br>";
for ($i=1;$i<=ceil($amount / $rowamount);$i++) {
if ($_GET["start"] == $i) {
echo "[ <b>".$i."</b> ] ";
@@ -98,7 +81,6 @@
echo "\">".$i."</a> ] ";
}
}
- echo "</small>";
}
}
@@ -116,7 +98,7 @@
}
}
- echo _('Show domains beginning with:') . "<br />";
+ echo _('Show zones beginning with:') . "<br>";
if ($letterstart == 1) {
echo "[ <b>0-9</b> ] ";
} elseif ($letter_taken["0"] != 1) {
@@ -127,9 +109,9 @@
foreach (range('a','z') as $letter) {
if ($letterstart === $letter) {
- echo "[ <b>".$letter."</b> ] ";
+ echo "[ <span class=\"lettertaken\">".$letter."</span> ] ";
} elseif ($letter_taken[$letter] != 1) {
- echo "[ <span style=\"color:#999\">".$letter."</span> ] ";
+ echo "[ <span class=\"letternotavailble\">".$letter."</span> ] ";
} else {
echo "[ <a href=\"".$_SERVER["PHP_SELF"]."?letter=".$letter."\">".$letter."</a> ] ";
}
@@ -146,9 +128,8 @@
{
include_once("header.inc.php");
?>
- <P><TABLE CLASS="error"><TR><TD CLASS="error"><H2><? echo _('Oops! An error occured!'); ?></H2>
- <BR>
- <FONT STYLE="font-weight: Bold"><?= nl2br($msg) ?><BR><BR><a href="javascript:history.go(-1)"><< <? echo _('back'); ?></a></FONT><BR></TD></TR></TABLE></P>
+ <p><? echo _('Oops! An error occured!'); ?></p>
+ <p><? echo nl2br($msg) ?></p>
<?
include_once("footer.inc.php");
die();
--- a/index.php Sun Apr 22 16:27:45 2007 +0000
+++ b/index.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,219 +1,36 @@
<?php
session_start();
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-//
-// $Id: index.php,v 1.13 2003/05/10 20:20:05 azurazu Exp $
-//
-
require_once("inc/i18n.inc.php");
require_once("inc/toolkit.inc.php");
-
-if ($_POST["submit"])
-{
- $domain = trim($_POST["domain"]);
- $owner = $_POST["owner"];
- $webip = $_POST["webip"];
- $mailip = $_POST["mailip"];
- $empty = $_POST["empty"];
- $dom_type = isset($_POST["dom_type"]) ? $_POST["dom_type"] : "NATIVE";
- if(!$empty)
- {
- $empty = 0;
- if(!eregi('in-addr.arpa', $domain) && (!is_valid_ip($webip) || !is_valid_ip($mailip)) )
- {
- $error = "Web or Mail ip is invalid!";
- }
- }
- if (!$error)
- {
- if (!is_valid_domain($domain))
- {
- $error = "Domain name is invalid!";
- }
- elseif (domain_exists($domain))
- {
- $error = "Domain already exists!";
- }
- //elseif (isset($mailip) && is_valid_ip(
- else
- {
- add_domain($domain, $owner, $webip, $mailip, $empty, $dom_type);
- clean_page();
- }
- }
-}
-
-if($_POST["passchange"])
-{
- if(strlen($_POST["newpass"]) < 4)
- {
- error('Length of the pass should be at least 4');
- }
- else
- {
- change_user_pass($_POST["currentpass"], $_POST["newpass"], $_POST["newpass2"]);
- }
-}
-
include_once("inc/header.inc.php");
?>
-<H2><? echo _('DNS Admin'); ?></H2>
-
-<P FONT CLASS="nav">
+ <h3><? echo _('Welcome'); ?>, <? echo $_SESSION["name"] ?></h3>
+ <ul>
+ <li><a href="search.php"><? echo _('Search zones or records'); ?></a></li>
+ <li><a href="list_zones.php"><? echo _('List all zones'); ?></a></li>
+<?
+if (level(5))
+{
+?>
+ <li><a href="list_supermasters.php"><? echo _('List all supermasters'); ?></a></li>
+ <li><a href="add_zone_master.php"><? echo _('Add master zone'); ?></a></li>
+ <li><a href="add_zone_slave.php"><? echo _('Add slave zone'); ?></a></li>
+ <li><a href="add_supermaster.php"><? echo _('Add supermaster'); ?></a></li>
+<?
+}
+?>
+ <li><a href="change_password.php"><? echo _('Change password'); ?></a></li>
<?
if (level(10))
{
- ?><A HREF="users.php"><? echo _('User admin'); ?></A> <?
-}
?>
- <A HREF="search.php"><? echo _('Search records'); ?></A>
-</P>
-
-<BR>
-<? echo _('Welcome'); ?>, <?= $_SESSION["name"] ?>.
-<BR>
-
-<? echo _('Your userlevel is'); ?>: <?= $_SESSION["level"] ?> (<?= leveldescription($_SESSION["level"]) ?>)
-<BR><BR>
-
-<?
-if ($error != "")
-{
- ?><H3><FONT COLOR="red"><? echo _('Error'); ?>: <?= $error ?></FONT></H3><?
-}
-?>
-
-<B><? echo _('Current domains in DNS (click to view or edit)'); ?>:</B>
-<BR>
-
-<?
-$doms = get_domains(0);
-$num_domains = count($doms);
-echo "<br /><small><b>" . _('Number of domains') . ": </b>".$num_domains."<br />";
-
-if ($num_domains > ROWAMOUNT) {
- show_letters(LETTERSTART,$doms);
- echo "<br />";
-}
-
-$doms = get_domains(0,LETTERSTART);
-show_pages(count($doms),ROWAMOUNT);
-
-?>
-
-<br />
-<TABLE BORDER="0" CELLSPACING="4">
-<TR STYLE="font-weight: Bold;"><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><? echo _('Name'); ?></TD><TD CLASS="tdbg"><? echo _('Records'); ?></TD><TD CLASS="tdbg"><? echo _('Owner'); ?></TD></TR>
-<?
-
-if ($num_domains < ROWAMOUNT) {
- $doms = get_domains(0,"all",ROWSTART,ROWAMOUNT);
-} else {
- $doms = get_domains(0,LETTERSTART,ROWSTART,ROWAMOUNT);
-}
-
-// If the user doesnt have any domains print a message saying so
-if ($doms < 0)
-{
- ?><TR><TD CLASS="tdbg"> </TD><TD CLASS="tdbg" COLSPAN="4"><b><? echo _('No domains in this listing, sorry.'); ?></b></FONT></TD></TR><?
-}
-
-// If he has domains, dump them (duh)
-else
-{
- foreach ($doms as $c)
- {
- ?><TR><TD CLASS="tdbg">
- <? if (level(5))
- {
- ?>
- <A HREF="delete_domain.php?id=<?= $c["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ <? echo _('Delete zone'); ?> ]" BORDER="0"></A><?
- }
- else
- {
- print " ";
- }
- ?>
- </TD><TD CLASS="tdbg"><A HREF="edit.php?id=<?= $c["id"] ?>"><?= $c["name"] ?></A></TD><TD CLASS="tdbg"><?= $c["numrec"] ?></TD><TD CLASS="tdbg"><?= get_owner_from_id($c["owner"]) ?></TD></TR><?
- print "\n";
- }
-}
-
-?>
-</TABLE>
-
-<small><? echo _('You only administer some records of domains marked with an (*).'); ?></small>
-
-<?
-if (level(5))
-{
- // Get some data.
- $server_types = array("MASTER", "SLAVE", "NATIVE");
- $users = show_users();
- ?>
- <BR><BR>
- <FORM METHOD="post" ACTION="index.php">
- <B><? echo _('Create new domain'); ?>:</B><BR>
- <TABLE BORDER="0" CELLSPACING="4">
- <TR><TD CLASS="tdbg"><? echo _('Domain name'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="domain" VALUE="<? if ($error) print $_POST["domain"]; ?>"></TD></TR>
- <TR><TD CLASS="tdbg"><? echo _('Web IP'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="webip" VALUE="<? if ($error) print $_POST["webip"]; ?>"></TD></TR>
- <TR><TD CLASS="tdbg"><? echo _('Mail IP'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="mailip" VALUE="<? if ($error) print $_POST["mailip"]; ?>"></TD></TR>
- <TR><TD CLASS="tdbg"><? echo _('Owner'); ?>:</TD><TD CLASS="tdbg">
- <SELECT NAME="owner">
- <?
- foreach ($users as $u)
- {
- ?><OPTION VALUE="<?= $u['id'] ?>"><?= $u['fullname'] ?></OPTION><?
- }
- ?>
- </SELECT>
- </TD></TR>
- <?
- if($MASTER_SLAVE_FUNCTIONS == true)
- {
- ?>
- <TR><TD CLASS="tdbg"><? echo _('Domain type'); ?>:</TD><TD CLASS="tdbg">
- <SELECT NAME="dom_type">
- <?
- foreach($server_types as $s)
- {
- ?><OPTION VALUE="<?=$s?>"><?=$s ?></OPTION><?
- }
- ?>
- </SELECT>
- </TD></TR>
- <? } ?>
- <TR><TD CLASS="tdbg"><? echo _('Create zone without'); ?><BR><? echo _('applying records-template'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="checkbox" NAME="empty" VALUE="1"></TD></TR>
- <TR><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="submit" VALUE="<? echo _('Add domain'); ?>"></TD></TR>
- </TABLE>
- </FORM>
+ <li><a href="users.php"><? echo _('User administration'); ?></a></li>
<?
}
?>
+ <li><a href="index.php?logout"><? echo _('Logout'); ?></a></li>
+ </ul>
-<BR><BR>
-<FORM METHOD="post" ACTION="index.php">
-<B><? echo _('Change password'); ?>:</B><BR>
-<TABLE BORDER="0" CELLSPACING="4">
-<TR><TD CLASS="tdbg"><? echo _('Current password'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="currentpass" VALUE=""></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('New password'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="newpass" VALUE=""></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('New password'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="password" CLASS="input" NAME="newpass2" VALUE=""></TD></TR>
-<TR><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="passchange" VALUE="<? echo _('Change password'); ?>"></TD></TR>
-</TABLE>
-</FORM>
<?
include_once("inc/footer.inc.php");
?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/list_supermasters.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,71 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+include_once("inc/header.inc.php");
+
+if (!level(5))
+{
+?>
+ <h3><? echo _('Oops!'); ?></h3>
+ <p><? echo _('You are not allowed to add supermasters with your current access level!'); ?></p>
+<?
+}
+else
+{
+
+ $supermasters = get_supermasters(0);
+ $num_supermasters = count($supermasters);
+ if ($supermasters < 0)
+ {
+ $num_supermasters = "0";
+ }
+ else
+ {
+ $num_supermasters = count($supermasters);
+ }
+
+ ?>
+
+ <h3><? printf(_('List all %s supermasters'), $num_supermasters); ?></h3>
+ <table>
+ <tr>
+ <th> </td>
+ <th><? echo _('IP address of supermaster'); ?></td>
+ <th><? echo _('Hostname in NS record'); ?></td>
+ <th><? echo _('Account'); ?></td>
+ </tr>
+ <?
+ if ($num_supermasters == 0)
+ {
+ ?>
+ <tr>
+ <td class="n"> </td>
+ <td class="n" colspan="3">
+ <? echo _('No supermasters in this listing, sorry.'); ?>
+ </td>
+ </tr>
+ <?
+ }
+ else
+ {
+ foreach ($supermasters as $c)
+ {
+ ?>
+ <tr>
+ <td class="n">
+ <a href="delete_supermaster.php?master_ip=<? echo $c["master_ip"] ?>"><img src="images/delete.gif" title="<? print _('Delete supermaster') . ' ' . $c["master_ip"]; ?>" alt="[ <? echo _('Delete supermaster'); ?> ]"></a>
+ </td>
+ <td class="y"><? echo $c["master_ip"] ?></td>
+ <td class="y"><? echo $c["ns_name"] ?></td>
+ <td class="y"><? echo $c["account"] ?></td>
+ </tr>
+ <?
+ }
+ }
+ ?>
+ </table>
+<?
+}
+
+include_once("inc/footer.inc.php");
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/list_zones.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,109 @@
+<?php
+require_once("inc/i18n.inc.php");
+require_once("inc/toolkit.inc.php");
+include_once("inc/header.inc.php");
+
+$all_doms = get_domains(0);
+$num_all_domains = count($all_doms);
+$doms = get_domains(0,LETTERSTART);
+show_pages(count($doms),ROWAMOUNT);
+?>
+ <h2><? echo _('List zones'); ?></h2>
+<?
+if ($num_all_domains > ROWAMOUNT)
+{
+ echo "<div class=\"showmax\">";
+ show_letters(LETTERSTART,$all_doms);
+ echo "</div>";
+}
+?>
+ <table>
+ <tr>
+ <th> </th>
+ <th><? echo _('Name'); ?></th>
+ <th><? echo _('Type'); ?></th>
+ <th><? echo _('Records'); ?></th>
+ <th><? echo _('Owner'); ?></th>
+ </tr>
+ <tr>
+
+<?
+if ($num_all_domains < ROWAMOUNT) {
+ $doms = get_domains(0,"all",ROWSTART,ROWAMOUNT);
+} else {
+ $doms = get_domains(0,LETTERSTART,ROWSTART,ROWAMOUNT);
+ $num_show_domains = count($doms);
+}
+
+// If the user doesnt have any domains print a message saying so
+if ($doms < 0)
+{
+ ?>
+ <tr>
+ <td> </td>
+ <td colspan="4"><? echo _('There are no zones.'); ?></td>
+ </tr>
+<?
+}
+
+// If he has domains, dump them (duh)
+else
+{
+ foreach ($doms as $c)
+ {
+ ?>
+
+ <tr>
+<?
+if (level(5))
+{
+?>
+ <td>
+ <a href="edit.php?id=<? echo $c["id"] ?>"><img src="images/edit.gif" title="<? echo _('Edit zone') . " " . $c['name']; ?>" alt="[ <? echo _('Edit zone') . " " . $c['name']; ?> ]"></a>
+ <a href="delete_domain.php?id=<? echo $c["id"] ?>"><img src="images/delete.gif" title="<? print _('Delete zone') . " " . $c['name']; ?>" alt="[<? echo _('Delete zone') . " " . $c['name']; ?>]"></a>
+ </td>
+<?
+}
+else
+{
+?>
+ <td class="n">
+
+ </td>
+<?
+}
+?>
+ <td class="y"><? echo $c["name"] ?></td>
+ <td class="y"><? echo strtolower(get_domain_type( $c["id"])) ?></td>
+ <td class="y"><? echo $c["numrec"] ?></td>
+ <td class="y"><? echo get_owner_from_id($c["owner"]) ?></td>
+ </tr><?
+ print "\n";
+ }
+}
+
+?>
+ </table>
+
+<?
+if ($num_all_domains < ROWAMOUNT) {
+?>
+ <p><? printf(_('This lists shows all %s zones(s) you have access to.'), $num_all_domains); ?></p>
+<?
+}
+else
+{
+?>
+ <p><? printf(_('This lists shows %s out of %s zones you have access to.'), $num_show_domains, $num_all_domains); ?></p>
+<?
+}
+?>
+
+
+<? // RZ TODO Check next, does it work?
+// <small> echo _('You only administer some records of domains marked with an (*).'); </small>
+?>
+
+<?
+include_once("inc/footer.inc.php");
+?>
--- a/locale/en_EN/LC_MESSAGES/en.po Sun Apr 22 16:27:45 2007 +0000
+++ b/locale/en_EN/LC_MESSAGES/en.po Mon Jun 04 18:43:11 2007 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-04-21 19:20+0200\n"
+"POT-Creation-Date: 2007-05-01 21:25+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,33 +20,34 @@
msgid "Add record to zone"
msgstr ""
-#: add_record.php:32 edit.php:160 edit_record.php:61 index.php:73
+#: add_record.php:32 edit.php:206 edit_record.php:61 index.php:102
#: search.php:40 users.php:49
msgid "DNS Admin"
msgstr ""
-#: add_record.php:32 add_record.php:53 edit.php:271
+#: add_record.php:32 add_record.php:53 edit.php:322
msgid "Add record"
msgstr ""
-#: add_record.php:37 edit.php:186 edit_record.php:67 index.php:119
+#: add_record.php:37 edit.php:232 edit_record.php:67 index.php:150
#: search.php:78 search.php:121 users.php:72
msgid "Name"
msgstr ""
-#: add_record.php:37 edit.php:187 edit_record.php:67 search.php:122
+#: add_record.php:37 delete_domain.php:44 edit.php:233 edit_record.php:67
+#: index.php:151 search.php:122
msgid "Type"
msgstr ""
-#: add_record.php:37 edit.php:189 edit_record.php:67 search.php:124
+#: add_record.php:37 edit.php:235 edit_record.php:67 search.php:124
msgid "Priority"
msgstr ""
-#: add_record.php:37 edit.php:188 edit_record.php:67 search.php:123
+#: add_record.php:37 edit.php:234 edit_record.php:67 search.php:123
msgid "Content"
msgstr ""
-#: add_record.php:37 edit.php:190 edit_record.php:67 search.php:125
+#: add_record.php:37 edit.php:236 edit_record.php:67 search.php:125
msgid "TTL"
msgstr ""
@@ -54,30 +55,50 @@
msgid "Delete domain"
msgstr ""
-#: delete_domain.php:39 index.php:119 index.php:174 search.php:80
+#: delete_domain.php:42 index.php:153 index.php:213 index.php:253
+#: search.php:80
msgid "Owner"
msgstr ""
-#: delete_domain.php:40
+#: delete_domain.php:45
msgid "Number of records in zone"
msgstr ""
-#: delete_domain.php:41 delete_record.php:38
+#: delete_domain.php:52
+#, php-format
+msgid "You are about to delete a slave domain of which the master nameserver, %s, is a supermaster. Deleting the zone now, will result in temporary removal only. Whenever the supermaster sends a notification for this zone, it will be added again!"
+msgstr ""
+
+#: delete_domain.php:57 delete_record.php:38 delete_supermaster.php:23
msgid "Are you sure?"
msgstr ""
-#: delete_domain.php:42 delete_record.php:39 delete_user.php:103
+#: delete_domain.php:59 delete_record.php:39 delete_supermaster.php:24
+#: delete_user.php:103
msgid "Yes"
msgstr ""
-#: delete_domain.php:42 delete_record.php:39 delete_user.php:103
+#: delete_domain.php:60 delete_record.php:39 delete_supermaster.php:24
+#: delete_user.php:103
msgid "No"
msgstr ""
-#: delete_record.php:31 edit.php:203 search.php:142
+#: delete_record.php:31 edit.php:249 search.php:142
msgid "Delete record"
msgstr ""
+#: delete_supermaster.php:20 index.php:312
+msgid "Delete supermaster"
+msgstr ""
+
+#: delete_supermaster.php:21 index.php:290 index.php:334
+msgid "My hostname in NS record"
+msgstr ""
+
+#: delete_supermaster.php:22 index.php:291 index.php:340
+msgid "Account"
+msgstr ""
+
#: delete_user.php:54 users.php:79
msgid "Delete user"
msgstr ""
@@ -98,63 +119,71 @@
msgid "domain(s), by deleting him you will also delete these domains"
msgstr ""
-#: edit.php:52
+#: edit.php:54
msgid "Edit domain"
msgstr ""
-#: edit.php:58
+#: edit.php:60
msgid "This domain isn't owned by anyone yet, please assign someone."
msgstr ""
-#: edit.php:69
+#: edit.php:72
+msgid "Type of this domain is \"slave\", but there is no IP address for it's master given. Please specify!"
+msgstr ""
+
+#: edit.php:84
msgid "Add an owner"
msgstr ""
-#: edit.php:88
+#: edit.php:103
msgid "Add"
msgstr ""
-#: edit.php:101
+#: edit.php:116
msgid "Current listed owners"
msgstr ""
-#: edit.php:115
+#: edit.php:130
msgid "Delete"
msgstr ""
-#: edit.php:132
+#: edit.php:149
msgid "Type of this domain"
msgstr ""
-#: edit.php:136
+#: edit.php:156
msgid "Change type"
msgstr ""
-#: edit.php:152
+#: edit.php:172 edit.php:193
msgid "Change"
msgstr ""
-#: edit.php:162
+#: edit.php:183
+msgid "IP address of master NS"
+msgstr ""
+
+#: edit.php:208
msgid "Number of records"
msgstr ""
-#: edit.php:185
+#: edit.php:231
msgid "Sub-owners"
msgstr ""
-#: edit.php:202 edit_record.php:61 search.php:141
+#: edit.php:248 edit_record.php:61 search.php:141
msgid "Edit record"
msgstr ""
-#: edit.php:241
+#: edit.php:289
msgid "No records for this domain."
msgstr ""
-#: edit.php:262
+#: edit.php:313
msgid "Assign to user"
msgstr ""
-#: edit.php:276 index.php:143 search.php:91
+#: edit.php:329 index.php:178 search.php:91
msgid "Delete zone"
msgstr ""
@@ -182,7 +211,7 @@
msgid "Edit user"
msgstr ""
-#: edit_user.php:59 index.php:79 search.php:44 users.php:47
+#: edit_user.php:59 index.php:108 search.php:44 users.php:47
msgid "User admin"
msgstr ""
@@ -190,11 +219,11 @@
msgid "User name"
msgstr ""
-#: edit_user.php:70 install.php:204 users.php:100
+#: edit_user.php:70 install.php:201 users.php:100
msgid "Full name"
msgstr ""
-#: edit_user.php:71 install.php:203 users.php:101 inc/auth.inc.php:97
+#: edit_user.php:71 install.php:200 users.php:101 inc/auth.inc.php:97
msgid "Password"
msgstr ""
@@ -206,165 +235,193 @@
msgid "User level"
msgstr ""
-#: edit_user.php:73 inc/config-me.inc.php:84
+#: edit_user.php:73 inc/config-me.inc.php:88
msgid "Normal user"
msgstr ""
-#: edit_user.php:73 inc/config-me.inc.php:85
+#: edit_user.php:73 inc/config-me.inc.php:89
msgid "Administrator"
msgstr ""
-#: edit_user.php:73 inc/config-me.inc.php:86
+#: edit_user.php:73 inc/config-me.inc.php:90
msgid "Administrator w/ user admin rights"
msgstr ""
-#: edit_user.php:74 install.php:206 users.php:104
+#: edit_user.php:74 install.php:203 users.php:104
msgid "Description"
msgstr ""
-#: edit_user.php:75 users.php:105 inc/toolkit.inc.php:270
+#: edit_user.php:75 users.php:105 inc/toolkit.inc.php:275
msgid "Active"
msgstr ""
-#: index.php:82 users.php:49
+#: index.php:111 users.php:49
msgid "Search records"
msgstr ""
-#: index.php:86
+#: index.php:115
msgid "Welcome"
msgstr ""
-#: index.php:89
+#: index.php:118
msgid "Your userlevel is"
msgstr ""
-#: index.php:95 users.php:59
+#: index.php:124 users.php:59
msgid "Error"
msgstr ""
-#: index.php:99
+#: index.php:128
msgid "Current domains in DNS (click to view or edit)"
msgstr ""
-#: index.php:105
+#: index.php:134
msgid "Number of domains"
msgstr ""
-#: index.php:119 search.php:79
+#: index.php:152 search.php:79
msgid "Records"
msgstr ""
-#: index.php:131
+#: index.php:166
msgid "No domains in this listing, sorry."
msgstr ""
-#: index.php:158
+#: index.php:198
msgid "You only administer some records of domains marked with an (*)."
msgstr ""
-#: index.php:169
-msgid "Create new domain"
+#: index.php:208
+msgid "Create new master domain"
msgstr ""
-#: index.php:171
+#: index.php:210 index.php:241
msgid "Domain name"
msgstr ""
-#: index.php:172
+#: index.php:211
msgid "Web IP"
msgstr ""
-#: index.php:173
+#: index.php:212
msgid "Mail IP"
msgstr ""
-#: index.php:188
+#: index.php:223
msgid "Domain type"
msgstr ""
-#: index.php:199
+#: index.php:229
msgid "Create zone without"
msgstr ""
-#: index.php:199
+#: index.php:229
msgid "applying records-template"
msgstr ""
-#: index.php:200
+#: index.php:230 index.php:268
msgid "Add domain"
msgstr ""
-#: index.php:209 index.php:214
+#: index.php:238
+msgid "Create new slave domain"
+msgstr ""
+
+#: index.php:247
+msgid "IP of master NS"
+msgstr ""
+
+#: index.php:284
+msgid "Current supermasters"
+msgstr ""
+
+#: index.php:285
+msgid "Number of supermasters"
+msgstr ""
+
+#: index.php:289 index.php:328
+msgid "IP address of supermaster"
+msgstr ""
+
+#: index.php:300
+msgid "No supermasters in this listing, sorry."
+msgstr ""
+
+#: index.php:325 index.php:348
+msgid "Add supermaster"
+msgstr ""
+
+#: index.php:359 index.php:364
msgid "Change password"
msgstr ""
-#: index.php:211
+#: index.php:361
msgid "Current password"
msgstr ""
-#: index.php:212 index.php:213
+#: index.php:362 index.php:363
msgid "New password"
msgstr ""
-#: install.php:63 inc/database.inc.php:31 inc/toolkit.inc.php:149
+#: install.php:63 inc/database.inc.php:31 inc/toolkit.inc.php:154
msgid "Oops! An error occured!"
msgstr ""
+#: install.php:168
+msgid "PowerAdmin has succesfully been installed."
+msgstr ""
+
+#: install.php:170
+msgid "Remove this file (install.php) from your webdir."
+msgstr ""
+
#: install.php:171
-msgid "PowerAdmin has succesfully been installed."
-msgstr ""
-
-#: install.php:173
-msgid "Remove this file (install.php) from your webdir."
-msgstr ""
-
-#: install.php:174
msgid "WARNING"
msgstr ""
-#: install.php:174
+#: install.php:171
msgid "PowerAdmin will not work until you delete install.php"
msgstr ""
-#: install.php:176
+#: install.php:173
msgid "You can click"
msgstr ""
-#: install.php:176
+#: install.php:173
msgid "to start using PowerAdmin"
msgstr ""
-#: install.php:185
+#: install.php:182
msgid "You didnt fill in one of the required fields!"
msgstr ""
-#: install.php:193 inc/auth.inc.php:86
+#: install.php:190 inc/auth.inc.php:86
msgid "PowerAdmin for PowerDNS"
msgstr ""
-#: install.php:195
+#: install.php:192
msgid ""
"This config file will setup your database to be ready for PowerAdmin. Please fill in the next fields which will create an\n"
"administrator login."
msgstr ""
-#: install.php:197
+#: install.php:194
msgid "Fields marked with a"
msgstr ""
-#: install.php:197
+#: install.php:194
msgid "are required."
msgstr ""
+#: install.php:199
+msgid "Login Name"
+msgstr ""
+
#: install.php:202
-msgid "Login Name"
-msgstr ""
-
-#: install.php:205
msgid "Email"
msgstr ""
-#: install.php:207
+#: install.php:204
msgid "Make Account"
msgstr ""
@@ -400,7 +457,7 @@
msgid "Not all tables are ok!"
msgstr ""
-#: test_setup.php:62 inc/toolkit.inc.php:181
+#: test_setup.php:62 inc/toolkit.inc.php:186
msgid "Successful!"
msgstr ""
@@ -476,7 +533,7 @@
msgid "You have logged out."
msgstr ""
-#: inc/database.inc.php:33 inc/toolkit.inc.php:151 inc/toolkit.inc.php:187
+#: inc/database.inc.php:33 inc/toolkit.inc.php:156 inc/toolkit.inc.php:192
msgid "back"
msgstr ""
@@ -619,18 +676,18 @@
msgid "You have to remove migrator.php before this program will run"
msgstr ""
-#: inc/toolkit.inc.php:91
+#: inc/toolkit.inc.php:96
msgid "Show page"
msgstr ""
-#: inc/toolkit.inc.php:119
+#: inc/toolkit.inc.php:124
msgid "Show domains beginning with:"
msgstr ""
-#: inc/toolkit.inc.php:170
+#: inc/toolkit.inc.php:175
msgid "Success!"
msgstr ""
-#: inc/toolkit.inc.php:266
+#: inc/toolkit.inc.php:271
msgid "Inactive"
msgstr ""
Binary file locale/nl_NL/LC_MESSAGES/message.mo has changed
--- a/locale/nl_NL/LC_MESSAGES/nl.po Sun Apr 22 16:27:45 2007 +0000
+++ b/locale/nl_NL/LC_MESSAGES/nl.po Mon Jun 04 18:43:11 2007 +0000
@@ -1,348 +1,381 @@
-# poweradmin dutch translation
-# Copyright (C) 2007, Rejo Zenger
+# poweradmin 1.4.0 dutch translation
+# Copyright (C) 2007 Rejo Zenger
# This file is distributed under the same license as the poweradmin package.
# Rejo Zenger <rejo@zenger.nl>, 2007.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: poweradmin 1.2.7-patched\n"
-"Report-Msgid-Bugs-To: rejo@zenger.nl\n"
-"POT-Creation-Date: 2007-04-21 19:20+0200\n"
-"PO-Revision-Date: 2007-04-21 20:47+0200\n"
+"Project-Id-Version: poweradmin 1.4.0\n"
+"Report-Msgid-Bugs-To: Rejo Zenger <rejo@zenger.nl>\n"
+"POT-Creation-Date: 2007-05-28 09:33+0200\n"
+"PO-Revision-Date: 2007-05-28 09:33+0200\n"
"Last-Translator: Rejo Zenger <rejo@zenger.nl>\n"
-"Language-Team: Dutch\n"
+"Language-Team: poweradmin dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: add_record.php:31
+#: add_record.php:16
msgid "Add record to zone"
-msgstr "Toevoegen record aan zone"
-
-#: add_record.php:32 edit.php:160 edit_record.php:61 index.php:73
-#: search.php:40 users.php:49
-msgid "DNS Admin"
-msgstr "DNS Admin"
+msgstr "Record toevoegen aan zone"
-#: add_record.php:32 add_record.php:53 edit.php:271
-msgid "Add record"
-msgstr "Toevoegen record"
+#: add_record.php:22 edit.php:226 edit_record.php:65 list_zones.php:23
+#: search.php:45 search.php:99 users.php:57
+msgid "Name"
+msgstr "Naam"
-#: add_record.php:37 edit.php:186 edit_record.php:67 index.php:119
-#: search.php:78 search.php:121 users.php:72
-msgid "Name"
-msgstr "Label"
-
-#: add_record.php:37 edit.php:187 edit_record.php:67 search.php:122
+#: add_record.php:24 delete_domain.php:26 edit.php:227 edit_record.php:67
+#: list_zones.php:24 search.php:100
msgid "Type"
msgstr "Type"
-#: add_record.php:37 edit.php:189 edit_record.php:67 search.php:124
+#: add_record.php:25 edit.php:229 edit_record.php:68 search.php:102
msgid "Priority"
msgstr "Priority"
-#: add_record.php:37 edit.php:188 edit_record.php:67 search.php:123
+#: add_record.php:26 edit.php:228 edit_record.php:69 search.php:101
msgid "Content"
msgstr "Content"
-#: add_record.php:37 edit.php:190 edit_record.php:67 search.php:125
+#: add_record.php:27 edit.php:230 edit_record.php:70 search.php:103
msgid "TTL"
msgstr "TTL"
-#: delete_domain.php:38 users.php:87
-msgid "Delete domain"
-msgstr "Verwijderen zone"
+#: add_record.php:55 edit.php:193
+msgid "Add record"
+msgstr "Toevoegen record"
+
+#: add_supermaster.php:19
+msgid "Given master IP address is not valid IPv4 or IPv6."
+msgstr "Het opgegeven master IP adres is geen valid IP4 of IPv6 adres."
+
+#: add_supermaster.php:23
+msgid "Given hostname for NS record not valid."
+msgstr "De opgegeven hostname voor het NS record is niet valide."
+
+#: add_supermaster.php:27
+msgid "Account name is not valid (may contain only alpha chars)."
+msgstr "De opgegeven accountnaam is niet valide (enkel alpha characters zijn toegestaan)."
+
+#: add_supermaster.php:33
+msgid "Successfully added supermaster."
+msgstr "Sucesvol supermaster toegevoegd"
+
+#: add_supermaster.php:43 add_zone_master.php:50 add_zone_slave.php:45
+#: edit.php:39
+msgid "Error"
+msgstr "Fout"
+
+#: add_supermaster.php:55 list_supermasters.php:33
+msgid "IP address of supermaster"
+msgstr "IP adres van de supermaster"
+
+#: add_supermaster.php:61 delete_supermaster.php:22 list_supermasters.php:34
+msgid "Hostname in NS record"
+msgstr "Hostname in NS record"
+
+#: add_supermaster.php:67 delete_supermaster.php:23 list_supermasters.php:35
+msgid "Account"
+msgstr "Account"
+
+#: add_supermaster.php:75 index.php:18 inc/header.inc.php:34
+msgid "Add supermaster"
+msgstr "Toevoegen supermaster"
+
+#: add_zone_master.php:41
+msgid "Successfully added master zone."
+msgstr "Succesvol master zone toegevoegd."
+
+#: add_zone_master.php:69 add_zone_slave.php:59
+msgid "Zone name"
+msgstr "Zone naam"
+
+#: add_zone_master.php:75
+msgid "Web IP"
+msgstr "IP adres van webserver"
-#: delete_domain.php:39 index.php:119 index.php:174 search.php:80
+#: add_zone_master.php:81
+msgid "Mail IP"
+msgstr "IP adres van mailserver"
+
+#: add_zone_master.php:87 add_zone_slave.php:71 delete_domain.php:24
+#: list_zones.php:26 search.php:47
msgid "Owner"
-msgstr "Beheerder"
+msgstr "Eigenaar"
+
+#: add_zone_master.php:100
+msgid "Zone type"
+msgstr "Zone type"
+
+#: add_zone_master.php:113
+msgid "Create zone without applying records-template"
+msgstr "Zone aanmaken zonder het records-template te gebruiken"
+
+#: add_zone_master.php:119 add_zone_slave.php:86
+msgid "Add zone"
+msgstr "Toevoegen zone"
+
+#: add_zone_slave.php:35
+msgid "Successfully added slave zone."
+msgstr "Sucesvol slave zone toegevoegd."
+
+#: add_zone_slave.php:55
+msgid "Add slave zone"
+msgstr "Toevoegen slave zone"
-#: delete_domain.php:40
+#: add_zone_slave.php:65
+msgid "IP of master NS"
+msgstr "IP van master NS"
+
+#: change_password.php:23
+msgid "Current password"
+msgstr "Huidig wachtwoord"
+
+#: change_password.php:27 change_password.php:31
+msgid "New password"
+msgstr "Nieuw wachtwoord"
+
+#: change_password.php:37 index.php:22 inc/header.inc.php:38
+msgid "Change password"
+msgstr "Wijzig wachtwoord"
+
+#: credits.php:5
+msgid "Credits"
+msgstr "Credits"
+
+#: delete_domain.php:20 users.php:77
+msgid "Delete zone"
+msgstr "Verwijder zone"
+
+#: delete_domain.php:27
msgid "Number of records in zone"
msgstr "Aantal records in zone"
-#: delete_domain.php:41 delete_record.php:38
+#: delete_domain.php:34
+#, php-format
+msgid "You are about to delete a slave zone of which the master nameserver, %s, is a supermaster. Deleting the zone now, will result in temporary removal only. Whenever the supermaster sends a notification for this zone, it will be added again!"
+msgstr "U wilt een slave zone verwijderen waarvan de master nameserver, %s, een supermaster is. Verwijdering van de zone zal enkel tot tijdelijke verwijdering leiden. Zodra de supermaster een notificatie stuurt, wordt deze zone opnieuw toegevoegd."
+
+#: delete_domain.php:39 delete_record.php:22 delete_supermaster.php:24
msgid "Are you sure?"
msgstr "Weet u het zeker?"
-#: delete_domain.php:42 delete_record.php:39 delete_user.php:103
+#: delete_domain.php:41 delete_record.php:23 delete_supermaster.php:25
+#: delete_user.php:94
msgid "Yes"
msgstr "Ja"
-#: delete_domain.php:42 delete_record.php:39 delete_user.php:103
+#: delete_domain.php:42 delete_record.php:24 delete_supermaster.php:26
+#: delete_user.php:94
msgid "No"
msgstr "Nee"
-#: delete_record.php:31 edit.php:203 search.php:142
+#: delete_record.php:15 edit.php:246 search.php:120
msgid "Delete record"
-msgstr "Verwijderen record"
+msgstr "Verwijder record"
+
+#: delete_record.php:20
+msgid "You are trying to delete a record that is needed for this zone to work."
+msgstr "U gaat een record verwijderen dat nodig is voor de werking van deze zone."
-#: delete_user.php:54 users.php:79
+#: delete_supermaster.php:21 list_supermasters.php:56
+msgid "Delete supermaster"
+msgstr "Verwijder supermaster"
+
+#: delete_user.php:37 users.php:69
msgid "Delete user"
-msgstr "Verwijderen gebruiker"
+msgstr "Verwijder gebruiker"
-#: delete_user.php:60
-msgid "This user has access to the following domain(s)"
-msgstr "Deze gebruiker heeft rechten voor de volgende zone(s)"
+#: delete_user.php:43
+msgid "This user has access to the following zone(s)"
+msgstr "Deze gebruiker heeft toegang tot de volgende zone(s)"
-#: delete_user.php:93
+#: delete_user.php:84
msgid "You are going to delete this user, are you sure?"
msgstr "U gaat deze gebruiker verwijderen, wilt u dat inderdaad?"
-#: delete_user.php:96
+#: delete_user.php:87
msgid "This user has access to "
-msgstr "Deze gebruiker heeft rechten voor "
+msgstr "Deze gebruiker heeft toegang tot"
-#: delete_user.php:96
-msgid "domain(s), by deleting him you will also delete these domains"
-msgstr "zone(s). Met het verwijderen van de gebruiker verwijdert u ook deze zone(s)"
-
-#: edit.php:52
-msgid "Edit domain"
-msgstr "Wijzigen zone"
+#: delete_user.php:87
+msgid " zones, by deleting him you will also delete these zones."
+msgstr " zones. Met het verwijderen van de gebruiker verwijdert u ook deze zones."
-#: edit.php:58
-msgid "This domain isn't owned by anyone yet, please assign someone."
-msgstr "Deze zone wordt door niemand beheerd, wijst u een beheerder aan."
-
-#: edit.php:69
-msgid "Add an owner"
-msgstr "Toevoegen beheerder"
+#: edit.php:49
+msgid "Type of this domain is \"slave\", but there is no IP address for it's master given."
+msgstr "Het type van deze zone is \"slave\", maar er is geen IP adres voor de master opgegeven."
-#: edit.php:88
-msgid "Add"
-msgstr "Toevoegen"
+#: edit.php:56
+msgid "Edit zone"
+msgstr "Wijzig zone"
-#: edit.php:101
-msgid "Current listed owners"
-msgstr "Huidige beheerders"
+#: edit.php:65
+msgid "Owner of zone"
+msgstr "Eigenaar van de zone"
-#: edit.php:115
+#: edit.php:80
msgid "Delete"
msgstr "Verwijderen"
-#: edit.php:132
-msgid "Type of this domain"
+#: edit.php:91
+msgid "No owner set or this zone!"
+msgstr "Er is geen beheerder voor deze zone!"
+
+#: edit.php:118
+msgid "Add"
+msgstr "Toevoegen"
+
+#: edit.php:133
+msgid "Type of zone"
msgstr "Type zone"
-#: edit.php:136
-msgid "Change type"
-msgstr "Wijzig type"
-
-#: edit.php:152
+#: edit.php:155 edit.php:177
msgid "Change"
msgstr "Wijzigen"
-#: edit.php:162
-msgid "Number of records"
-msgstr "Aantal records"
+#: edit.php:167
+msgid "IP address of master NS"
+msgstr "IP adres van de master NS"
-#: edit.php:185
+#: edit.php:223 edit_record.php:40
msgid "Sub-owners"
msgstr "Sub-beheerders"
-#: edit.php:202 edit_record.php:61 search.php:141
+#: edit.php:245 search.php:119
msgid "Edit record"
-msgstr "Wijzig records"
+msgstr "Wijzigen record"
-#: edit.php:241
-msgid "No records for this domain."
+#: edit.php:299
+msgid "No records for this zone."
msgstr "Geen records in deze zone."
-#: edit.php:262
+#: edit.php:320
msgid "Assign to user"
msgstr "Selecteer beheerder"
-#: edit.php:276 index.php:143 search.php:91
-msgid "Delete zone"
-msgstr "Verwijderen zone"
-
-#: edit_record.php:60
+#: edit_record.php:29
msgid "Edit record in zone"
msgstr "Wijzig record in zone"
-#: edit_record.php:104 edit_user.php:76
+#: edit_record.php:122 edit_user.php:81
msgid "Commit changes"
msgstr "Wijzigingen doorvoeren"
-#: edit_record.php:104
+#: edit_record.php:123
msgid "Reset changes"
-msgstr "Herstellen"
+msgstr "Wijzigingen herstellen"
-#: edit_record.php:109
-msgid "Sub-users"
-msgstr "Sub-beheerders"
-
-#: edit_record.php:115
-msgid "trash"
-msgstr "Verwijderen"
-
-#: edit_user.php:54 edit_user.php:59
+#: edit_user.php:35
msgid "Edit user"
msgstr "Wijzigen gebruiker"
-#: edit_user.php:59 index.php:79 search.php:44 users.php:47
-msgid "User admin"
-msgstr "Gebruikersbeheer"
-
-#: edit_user.php:69 users.php:99
+#: edit_user.php:44 users.php:98
msgid "User name"
msgstr "Gebruikersnaam"
-#: edit_user.php:70 install.php:204 users.php:100
+#: edit_user.php:48 install.php:201 users.php:102
msgid "Full name"
msgstr "Volledige naam"
-#: edit_user.php:71 install.php:203 users.php:107 inc/auth.inc.php:97
+#: edit_user.php:52 install.php:200 users.php:106 inc/auth.inc.php:78
msgid "Password"
msgstr "Wachtwoord"
-#: edit_user.php:72 users.php:102
+#: edit_user.php:56 users.php:110
msgid "E-mail"
-msgstr "E-mailadres"
+msgstr "E-mail"
-#: edit_user.php:73 users.php:103
+#: edit_user.php:60 users.php:114
msgid "User level"
msgstr "Gebruikersnivo"
-#: edit_user.php:73 inc/config.inc.php:84
+#: edit_user.php:63 inc/config-me.inc.php:91
msgid "Normal user"
-msgstr "Normale gebruiker"
+msgstr "Zone beheerder"
-#: edit_user.php:73 inc/config.inc.php:85
+#: edit_user.php:64 inc/config-me.inc.php:92
msgid "Administrator"
-msgstr "Site beheerder"
+msgstr "Server beheerder"
-#: edit_user.php:73 inc/config.inc.php:86
+#: edit_user.php:65 inc/config-me.inc.php:93
msgid "Administrator w/ user admin rights"
-msgstr "Site beheerder met gebruikersbeheer rechten"
+msgstr "Server beheerder met gebruikersbeheer rechten"
-#: edit_user.php:74 install.php:206 users.php:104
+#: edit_user.php:70 install.php:203 users.php:124
msgid "Description"
msgstr "Omschrijving"
-#: edit_user.php:75 users.php:105 inc/toolkit.inc.php:270
+#: edit_user.php:76 users.php:128 inc/toolkit.inc.php:251
msgid "Active"
msgstr "Actief"
-#: index.php:82 users.php:49
-msgid "Search records"
-msgstr "Zoek records"
-
-#: index.php:86
+#: index.php:7
msgid "Welcome"
msgstr "Welkom"
-#: index.php:89
-msgid "Your userlevel is"
-msgstr "Uw gebruikersnivo is"
-
-#: index.php:95 users.php:59
-msgid "Error"
-msgstr "Fout"
+#: index.php:9 search.php:16 inc/header.inc.php:25
+msgid "Search zones or records"
+msgstr "Zone en records zoeken"
-#: index.php:99
-msgid "Current domains in DNS (click to view or edit)"
-msgstr "Huidige zones in DNS (aanklikken om in te zien of te wijzigen)"
-
-#: index.php:105
-msgid "Number of domains"
-msgstr "Aantal zones"
+#: index.php:10 inc/header.inc.php:26
+msgid "List zones"
+msgstr "Overzicht zones"
-#: index.php:119 search.php:79
-msgid "Records"
-msgstr "Records"
-
-#: index.php:131
-msgid "No domains in this listing, sorry."
-msgstr "Er zijn geen zones om te tonen."
+#: index.php:15 inc/header.inc.php:31
+msgid "List supermasters"
+msgstr "Overzicht supermasters"
-#: index.php:158
-msgid "You only administer some records of domains marked with an (*)."
-msgstr "U beheert enkel een deel van de records in zones gemarkeerd met een (*)."
-
-#: index.php:169
-msgid "Create new domain"
-msgstr "Toevoegen nieuwe zone"
-
-#: index.php:171
-msgid "Domain name"
-msgstr "Naam van de zone"
+#: index.php:16 inc/header.inc.php:32
+msgid "Add master zone"
+msgstr "Toevoegen master zone"
-#: index.php:172
-msgid "Web IP"
-msgstr "IP adres webserver"
-
-#: index.php:173
-msgid "Mail IP"
-msgstr "IP adres mailserver"
+#: index.php:27 inc/header.inc.php:43
+msgid "User administration"
+msgstr "Gebruikersbeheer"
-#: index.php:188
-msgid "Domain type"
-msgstr "Type zone"
-
-#: index.php:199
-msgid "Create zone without"
-msgstr "Zone aanmaken zonder"
-
-#: index.php:199
-msgid "applying records-template"
-msgstr "het record template te gebruiken"
+#: index.php:31 inc/header.inc.php:47
+msgid "Logout"
+msgstr "Uitloggen"
-#: index.php:200
-msgid "Add domain"
-msgstr "Toevoegen zone"
-
-#: index.php:209 index.php:214
-msgid "Change password"
-msgstr "Wijzig wachtwoord"
+#: install.php:63 inc/database.inc.php:10 inc/toolkit.inc.php:131
+msgid "Oops! An error occured!"
+msgstr "Oops! Er ging iets fout!"
-#: index.php:211
-msgid "Current password"
-msgstr "Huidige wachtwoord"
+#: install.php:168
+msgid "PowerAdmin has succesfully been installed."
+msgstr "Poweadmin is succesvol geinstalleerd."
-#: index.php:212 index.php:213
-msgid "New password"
-msgstr "Nieuwe wachtwoord"
-
-#: install.php:63 inc/database.inc.php:31 inc/toolkit.inc.php:149
-msgid "Oops! An error occured!"
-msgstr "Oops! Er is iets fout gegaan!"
+#: install.php:170
+msgid "Remove this file (install.php) from your webdir."
+msgstr "Verwijder install.php uit de directory van poweradmin."
#: install.php:171
-msgid "PowerAdmin has succesfully been installed."
-msgstr "Poweradmin is succesvol geïnstalleerd"
+msgid "WARNING"
+msgstr "Waarschuwing"
+
+#: install.php:171
+msgid "PowerAdmin will not work until you delete install.php"
+msgstr "Poweradmin werkt niet tot install.php is verwijderd."
#: install.php:173
-msgid "Remove this file (install.php) from your webdir."
-msgstr "Verwijder deze file (install.php) uit de webdir."
-
-#: install.php:174
-msgid "WARNING"
-msgstr "LET OP"
-
-#: install.php:174
-msgid "PowerAdmin will not work until you delete install.php"
-msgstr "Zolang install.php niet verwijderd is, werkt Poweradmin niet."
+msgid "You can click"
+msgstr "U kunt"
-#: install.php:176
-msgid "You can click"
-msgstr "U kunt klikken"
-
-#: install.php:176
+#: install.php:173
msgid "to start using PowerAdmin"
-msgstr "om met Poweradmin te starten"
+msgstr "klikken om Poweradmin te starten."
-#: install.php:185
+#: install.php:182
msgid "You didnt fill in one of the required fields!"
-msgstr "U heeft niet alle verplichte velden ingevuld!"
+msgstr "U heeft niet alle vereiste velden ingevuld!"
-#: install.php:193 inc/auth.inc.php:86
+#: install.php:190
msgid "PowerAdmin for PowerDNS"
msgstr "Poweradmin voor PowerDNS"
-#: install.php:195
+#: install.php:192
msgid ""
"This config file will setup your database to be ready for PowerAdmin. Please fill in the next fields which will create an\n"
"administrator login."
@@ -350,137 +383,164 @@
"Deze configuratie file zal uw database voorbereiden voor Poweradmin. Vult u alstublief alle onderstaande velden in om een\n"
"beheerdersaccount aan te maken."
-#: install.php:197
+#: install.php:194
msgid "Fields marked with a"
-msgstr "De velden gemarkeerd met een"
+msgstr "Velden gemarkeerd met een"
-#: install.php:197
+#: install.php:194
msgid "are required."
-msgstr "zijn verplicht."
+msgstr "zijn vereist."
-#: install.php:202
+#: install.php:199
msgid "Login Name"
msgstr "Gebruikersnaam"
-#: install.php:205
+#: install.php:202
msgid "Email"
msgstr "E-mail"
-#: install.php:207
+#: install.php:204
msgid "Make Account"
msgstr "Aanmaken account"
-#: search.php:38
-msgid "Search zones or records"
-msgstr "Zones of records zoeken"
+#: list_supermasters.php:9
+msgid "Oops!"
+msgstr "Oops!"
+
+#: list_supermasters.php:10
+msgid "You are not allowed to add supermasters with your current access level!"
+msgstr "U mag met uw huidige gebruikersnivo geen supermasters toevoegen!"
+
+#: list_supermasters.php:29
+#, php-format
+msgid "List all %s supermasters"
+msgstr "Overzicht van alle %s supermasters"
+
+#: list_supermasters.php:44
+msgid "No supermasters in this listing, sorry."
+msgstr "Er zijn geen supermasters om weer te geven."
-#: search.php:48
-msgid "Type a hostname or a record in the box below and press search to see if the record exists in the system."
-msgstr "Geef een hostname of record op in het zoekveld hieronder om te zien of er records voor bekend zijn in de database."
+#: list_zones.php:25 search.php:46
+msgid "Records"
+msgstr "Records"
+
+#: list_zones.php:44
+msgid "There are no zones."
+msgstr "Er zijn geen zones."
-#: search.php:52
+#: list_zones.php:91
+#, php-format
+msgid "This lists shows all %s zones(s) you have access to."
+msgstr "Dit overzicht toont alle %s zone(s) waar u toegang toe heeft."
+
+#: list_zones.php:97
+#, php-format
+msgid "This lists shows %s out of %s zones you have access to."
+msgstr "Dit overzicht toont %s van de %s zones waar u toegang toe heeft."
+
+#: search.php:21
msgid "Enter a hostname or IP address"
-msgstr "Geef een hostname of een IP adres"
+msgstr "Geef een hostname of IP adres"
-#: search.php:57
+#: search.php:26
msgid "Search"
msgstr "Zoek"
-#: search.php:73
+#: search.php:41
msgid "Domains found"
-msgstr "Zones gevonden"
+msgstr "Gevonden zones"
-#: search.php:116
+#: search.php:94
msgid "Records found"
-msgstr "Records gevonden"
+msgstr "Gevonden records"
-#: search.php:173
+#: search.php:151
msgid "Nothing found for query"
-msgstr "Niets gevonden voor criterium"
+msgstr "Niets gevonden voor deze zoekopdracht"
#: test_setup.php:58
msgid "Not all tables are ok!"
-msgstr "Niet alle tabellen zijn op orde!"
+msgstr "Er is iets mis met enkele tables!"
-#: test_setup.php:62 inc/toolkit.inc.php:181
+#: test_setup.php:62 inc/toolkit.inc.php:162
msgid "Successful!"
-msgstr "Gelukt!"
+msgstr "Sucesvol!"
#: test_setup.php:70
msgid "Sorry, but there are error(s) found in the following table(s):"
-msgstr "Er zijn fouten gevonden in de volgende tabel(len):"
+msgstr "Er zijn enkele fouten gevonden in de volgende tabel(len):"
#: test_setup.php:75
msgid "Please fix these errors and run the script again."
-msgstr "Vriendelijk verzoek deze fouten te herstellen en script nog eens uit te voeren."
+msgstr "Corrigeer deze fouten, voer daarna dit script opnieuw uit."
#: test_setup.php:79
msgid "Successful! Everything is set up ok, you can rumble!"
-msgstr "Gelukt! Voorbereiding is volledig uitgevoerd. You can rumble!"
+msgstr "Sucesvol! Alles is correct opgezet."
-#: users.php:36
+#: users.php:16
+msgid "Password length should be at least 8 characters."
+msgstr "Lengte van het wachtwoord moet minimaal 8 characters zijn."
+
+#: users.php:26
msgid "Usernames can't contain spaces"
-msgstr "Gebruikersnaam mag geen spaties bevatten"
-
-#: users.php:41
-msgid "Please fill in all fields"
-msgstr "u dient alle velden in te vullen"
+msgstr "De gebruikersnaam mag geen spaties bevatten."
-#: users.php:62
-msgid "Current users (click to edit)"
-msgstr "Huidige gebruikers (aanklikken om te wijzigen)"
+#: users.php:31
+msgid "Please fill in all fields"
+msgstr "Vul alle velden in."
-#: users.php:66
-msgid "Number of users"
-msgstr "Aantal gebruikers"
+#: users.php:42
+msgid "User admin"
+msgstr "Gebruikersbeheer"
-#: users.php:72
+#: users.php:49
+msgid "Current users"
+msgstr "Huidige gebruikers"
+
+#: users.php:58
msgid "Domains"
msgstr "Zones"
-#: users.php:72
-msgid "Domain list"
-msgstr "Zone overzicht"
+#: users.php:59
+msgid "Zone list"
+msgstr "Overzicht van zones"
-#: users.php:72
+#: users.php:60
msgid "Level"
msgstr "Gebruikersnivo"
-#: users.php:72
+#: users.php:61
msgid "Status"
msgstr "Status"
-#: users.php:97
+#: users.php:87
+msgid "Number of users"
+msgstr "Aantal gebruikers"
+
+#: users.php:94
msgid "Create new user"
msgstr "Toevoegen nieuwe gebruiker"
-#: users.php:106
+#: users.php:133
msgid "Add user"
msgstr "Toevoegen gebruiker"
-#: inc/auth.inc.php:42
+#: inc/auth.inc.php:20
msgid "Session expired, please login again."
msgstr "Sessie is verlopen, u dient opnieuw in te loggen."
-#: inc/auth.inc.php:69
+#: inc/auth.inc.php:47
msgid "Authentication failed!"
msgstr "Authenticatie mislukt!"
-#: inc/auth.inc.php:86
-msgid "Please login"
-msgstr "Inloggen"
-
-#: inc/auth.inc.php:113
-msgid "You have logged out."
-msgstr "U bent uitgelogd."
-
-#: inc/auth.inc.php:96 inc/auth.inc.php:98
+#: inc/auth.inc.php:68 inc/auth.inc.php:74 inc/auth.inc.php:84
msgid "Login"
msgstr "Inloggen"
-#: inc/database.inc.php:33 inc/toolkit.inc.php:151 inc/toolkit.inc.php:187
-msgid "back"
-msgstr "terug"
+#: inc/auth.inc.php:102
+msgid "You have logged out."
+msgstr "U bent uitgelogd."
#: inc/dns.inc.php:204
msgid "If you specify an MX record it must be a hostname."
@@ -488,11 +548,11 @@
#: inc/error.inc.php:31
msgid "You need user level 5 for this operation"
-msgstr "U heeft minimaal gebruiksnivo 5 nodig voor deze handeling"
+msgstr "U heeft minimaal gebruiksnivo 5 nodig voor deze handeling."
#: inc/error.inc.php:32
msgid "You need user level 10 for this operation"
-msgstr "U heeft minimaal gebruiksnivo 10 nodig voor deze handeling"
+msgstr "U heeft gebruiksnivo 10 nodig voor deze handeling"
#: inc/error.inc.php:35
msgid "Your content field is empty"
@@ -500,16 +560,16 @@
#: inc/error.inc.php:36
msgid "Access denied, you do not have access to that record"
-msgstr "Toegang geweigerd, u heeft onvoldoende rechten voor dat record"
+msgstr "U heeft onvoldoende rechten voor dat record."
#: inc/error.inc.php:37
#, php-format
msgid "You are not allowed to delete %s records"
-msgstr "U heeft onnvoldoende rechten voor verwijderen van %s records."
+msgstr "U heeft onvoldoende rechten voor verwijderen van %s records."
#: inc/error.inc.php:40
msgid "This is an invalid domain name"
-msgstr "This is een ongeldige domeinnaam"
+msgstr "Dit is een ongeldige zone naam."
#: inc/error.inc.php:43
msgid "Username exist already, please choose another one"
@@ -521,11 +581,11 @@
#: inc/error.inc.php:45
msgid "You didnt enter the correct current password"
-msgstr "U heeft niet het correcte wachtwoord gegeven."
+msgstr "U heeft niet het correcte wachtwoord opgegeven."
#: inc/error.inc.php:46
msgid "The two new password fields do not match"
-msgstr "De twee wachtwoorden waren niet identiek."
+msgstr "De twee nieuwe wachtwoorden waren niet identiek."
#: inc/error.inc.php:47
msgid "Error editting user"
@@ -595,44 +655,52 @@
#: inc/error.inc.php:67
msgid "You can only have 5 numeric fields"
-msgstr "Er kunnen enkel 5 numerieke velden voorkomen in het SOA record"
+msgstr "Er kunnen enkel 5 numerieke velden voorkomen in het SOA record."
#: inc/error.inc.php:68
msgid "The first part of your SOA record does not contain a valid hostname for a DNS Server"
msgstr "Het eerste deel van het SOA record bevat niet een valide hostname voor een DNS server."
-#: inc/footer.inc.php:34
-msgid "logout"
-msgstr "Uitloggen"
+#: inc/footer.inc.php:12
+msgid "credits"
+msgstr "credits"
-#: inc/header.inc.php:28
-msgid "PowerAdmin"
-msgstr "PowerAdmin"
+#: inc/header.inc.php:7 inc/header.inc.php:17
+msgid "Poweradmin"
+msgstr "Poweradmin"
-#: inc/toolkit.inc.php:49
+#: inc/header.inc.php:24
+msgid "Index"
+msgstr "Voorpagina"
+
+#: inc/toolkit.inc.php:27
msgid "You have to create a config.inc.php!"
msgstr "U dient een config.inc.php file aan te maken!"
-#: inc/toolkit.inc.php:54
+#: inc/toolkit.inc.php:32
msgid "You have to remove install.php before this program will run"
msgstr "U dient install.php te verwijderen alvorens u deze applicatie kunt gebruiken."
-#: inc/toolkit.inc.php:59
+#: inc/toolkit.inc.php:37
msgid "You have to remove migrator.php before this program will run"
msgstr "U dient migrator.php te verwijderen alvorens u deze applicatie kunt gebruiken."
-#: inc/toolkit.inc.php:91
+#: inc/toolkit.inc.php:74
msgid "Show page"
msgstr "Toon pagina"
-#: inc/toolkit.inc.php:119
+#: inc/toolkit.inc.php:101
msgid "Show domains beginning with:"
-msgstr "Toon zones die beginnen met:"
+msgstr "Toon zones beginnend met:"
-#: inc/toolkit.inc.php:170
+#: inc/toolkit.inc.php:151
msgid "Success!"
-msgstr "Gelukt!"
+msgstr "Succesvol!"
-#: inc/toolkit.inc.php:266
+#: inc/toolkit.inc.php:168
+msgid "back"
+msgstr "Terug."
+
+#: inc/toolkit.inc.php:247
msgid "Inactive"
msgstr "Inactief"
--- a/search.php Sun Apr 22 16:27:45 2007 +0000
+++ b/search.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,65 +1,33 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-
-// Filename: search.php
-// Startdate: 9-01-2003
-// Searches the database for corresponding records or domains.
-//
-// The sourecode for this program was donated by DeViCeD, THANKS!
-//
-// $Id: search.php,v 1.1 2003/01/09 23:23:39 azurazu Exp $
-//
-
+require_once("inc/i18n.inc.php");
require_once('inc/toolkit.inc.php');
if (isset($_POST['s_submit']) || isset($_POST['q']))
{
- $submitted = true;
- $search_result = search_record($_POST['q']);
+ $submitted=true;
+ $search_result=search_record($_POST['q']);
}
-
// we will continue after the search form ...
include_once('inc/header.inc.php');
?>
-<P><H2><? echo _('Search zones or records'); ?></H2></P>
-<P CLASS="nav">
-<A HREF="index.php"><? echo _('DNS Admin'); ?></A>
-<?
-if (level(10))
-{
- ?><A HREF="users.php"><? echo _('User admin'); ?></A> <?
-}
-?>
-</P><BR>
-<? echo _('Type a hostname or a record in the box below and press search to see if the record exists in the system.'); ?>
- <table border = "0" cellspacing = "4">
- <form method = "post" action="<?=$_SERVER['PHP_SELF']?>">
- <tr>
- <td class = "tdbg"><b><? echo _('Enter a hostname or IP address'); ?></b></td>
- <td width = "510" class = "tdbg"><input type = "text" class = "input" name = "q"></td>
- </tr>
- <tr>
- <td class = "tdbg"> </td>
- <td class = "tdbg"><input type = "submit" class = "button" name = "s_submit" value = "<? echo _('Search'); ?>"></td>
- </tr>
- </form>
- </table>
-
+ <h2><? echo _('Search zones or records'); ?></h2>
+ <h3>Query</h3>
+ <table>
+ <form method="post" action="<? echo $_SERVER['PHP_SELF']?>">
+ <tr>
+ <td class="n"><? echo _('Enter a hostname or IP address'); ?></td>
+ <td class="n"><input type="text" class="input" name="q"></td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n"><input type="submit" class="button" name="s_submit" value="<? echo _('Search'); ?>"></td>
+ </tr>
+ </form>
+ </table>
+
<?php
// results
if ($submitted)
@@ -70,36 +38,42 @@
if (count($search_result) == 2 && count($search_result['domains']))
{
?>
- <b><? echo _('Domains found'); ?>:</b>
- <p>
- <table border = "0" cellspacing = "4">
- <tr style = "font-weight: Bold;">
- <td class = "tdbg"> </td>
- <td class = "tdbg"><? echo _('Name'); ?></td>
- <td class = "tdbg"><? echo _('Records'); ?></td>
- <td class = "tdbg"><? echo _('Owner'); ?></td>
- </tr>
- <?php
- foreach($search_result['domains'] as $d)
- {
- ?>
- <tr>
- <td class = "tdbg">
- <?php
- if (level(5))
- {
- echo '<a href = "delete_domain.php?id='.$d['id'].'"><img src = "images/delete.gif" alt = "[ ' . _('Delete zone') . ' ]" border = "0"></a>';
- }
- else
- {
- echo ' ';
- }
- ?>
- </td>
- <td class = "tdbg"><a href = "edit.php?id=<?=$d['id']?>"><?=$d['name']?></a></td>
- <td class = "tdbg"><?=$d['numrec']?></td>
- <td class = "tdbg"><?=get_owner_from_id($d['owner'])?></td>
- </tr>
+ <h4><? echo _('Zones found'); ?>:</h4>
+ <table>
+ <tr>
+ <th> </th>
+ <th><? echo _('Name'); ?></th>
+ <th><? echo _('Records'); ?></th>
+ <th><? echo _('Owner'); ?></th>
+ </tr>
+<?php
+foreach($search_result['domains'] as $d)
+{
+?>
+ <tr>
+<?
+ if (level(5))
+ {
+ ?>
+ <td class="n">
+ <a href="edit.php?id=<? echo $d["id"] ?>"><img src="images/edit.gif" title="<? echo _('Edit zone') . " " . $d['name']; ?>" alt="[ <? echo _('Edit zone') . " " . $d['name']; ?> ]"></a>
+ <a href="delete_domain.php?id=<? echo $d["id"] ?>"><img src="images/delete.gif" title="<? print _('Delete zone') . " " . $d['name']; ?>" alt="[<? echo _('Delete zone') . " " . $d['name']; ?>]"></a>
+ </td>
+<?
+}
+else
+{
+?>
+ <td class="n">
+
+ </td>
+<?
+}
+?>
+ <td class="y"><? echo $d['name']?></td>
+ <td class="y"><? echo $d['numrec']?></td>
+ <td class="y"><? echo get_owner_from_id($d['owner'])?></td>
+ </tr>
<?php
} // end foreach ...
?>
@@ -108,6 +82,10 @@
<?php
} // end if
+
+
+
+
// any records ?!
if(count($search_result['records']))
@@ -115,21 +93,21 @@
?>
<b><? echo _('Records found'); ?>:</b>
<p>
- <table border = "0" cellspacing = "4">
- <tr style = "font-weight: Bold;">
- <td class = "tdbg"> </td>
- <td class = "tdbg"><? echo _('Name'); ?></td>
- <td class = "tdbg"><? echo _('Type'); ?></td>
- <td class = "tdbg"><? echo _('Content'); ?></td>
- <td class = "tdbg"><? echo _('Priority'); ?></td>
- <td class = "tdbg"><? echo _('TTL'); ?></td>
+ <table>
+ <tr>
+ <td class="n"> </td>
+ <td class="n"><? echo _('Name'); ?></td>
+ <td class="n"><? echo _('Type'); ?></td>
+ <td class="n"><? echo _('Content'); ?></td>
+ <td class="n"><? echo _('Priority'); ?></td>
+ <td class="n"><? echo _('TTL'); ?></td>
</tr>
<?php
foreach($search_result['records'] as $r)
{
?>
<tr>
- <td class = "tdbg">
+ <td class="n">
<?php
if (($r["type"] != "SOA" && $r["type"] != "NS") ||
($GLOBALS["ALLOW_SOA_EDIT"] && $r["type"] == "SOA") ||
@@ -138,25 +116,25 @@
$GLOBALS["ALLOW_NS_EDIT"] != 1))
{
?>
- <a href = "edit_record.php?id=<?=$r['id']?>&domain=<?=$r['domain_id']?>"><img src = "images/edit.gif" alt = "[ <? echo _('Edit record'); ?> ]" border = "0"></a>
- <a href = "delete_record.php?id=<?=$r['id']?>&domain=<?=$r['domain_id']?>"><img src = "images/delete.gif" alt = "[ <? echo _('Delete record'); ?> ]" border = "0"></a>
+ <a href="edit_record.php?id=<? echo $r['id']?>&domain=<? echo $r['domain_id']?>"><img src="images/edit.gif" alt="[ <? echo _('Edit record'); ?> ]" border="0"></a>
+ <a href="delete_record.php?id=<? echo $r['id']?>&domain=<? echo $r['domain_id']?>"><img src="images/delete.gif" alt="[ <? echo _('Delete record'); ?> ]" border="0"></a>
<?php
} // big if ;-)
?>
</td>
- <td style = "border: 1px solid #000000;"><?=$r['name']?></td>
- <td style = "border: 1px solid #000000;"><?=$r['type']?></td>
- <td style = "border: 1px solid #000000;"><?=$r['content']?></td>
+ <td class="y"><? echo $r['name']?></td>
+ <td class="y"><? echo $r['type']?></td>
+ <td class="y"><? echo $r['content']?></td>
<?php
if ($r['prio'] != 0)
{
- ?><td style = "border: 1px solid #000000;"><?=$r['prio']?></td><?php
+ ?><td class="y"><? echo $r['prio']?></td><?php
}
else
{
- ?><td class = "tdbg"></td><?php
+ ?><td class="n"></td><?php
} // else
- ?><td style = "border: 1px solid #000000;"><?=$r['ttl']?></td>
+ ?><td class="y"><? echo $r['ttl']?></td>
</tr>
<?php
} // foreach
@@ -167,10 +145,10 @@
if(count($search_result['domains']) == 0 && count($search_result['records']) == 0)
{
?>
- <table border = "0" cellspacing = "4">
+ <table border="0" cellspacing="4">
<tr>
- <td width = "510" class = "tdbg">
- <? echo _('Nothing found for query'); ?> "<?=$_POST['q']?>"
+ <td width="510" class="n">
+ <? echo _('Nothing found for query'); ?> "<? echo $_POST['q']?>"
</td>
</tr>
</table>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/style/example.inc.php Mon Jun 04 18:43:11 2007 +0000
@@ -0,0 +1,152 @@
+
+/* RZ TODO: cleanup code */
+
+body {
+ padding-left: 5%;
+ padding-right: 5%;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 85%;
+ text-align: left;
+ vertical-align: top;
+ background: #f4f4f4;
+}
+
+h1, h2, table, .menu, .footer {
+ border: 1px solid #000000;
+ padding: 3px;
+ background: #ddeeff;
+}
+
+p {
+ padding: 3px;
+}
+
+table {
+ width: 100%;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 90%;
+ text-align: left;
+ vertical-align: top;
+}
+
+img {
+ border: 0px;
+}
+img .edit-assign-to-user {
+ margin-left: 47px;
+}
+
+#meta {
+ width: 100%;
+ clear: left;
+}
+
+#meta .button {
+ margin 0px 5px 0px 0px;
+}
+
+#meta-left {
+ float: left;
+ width: 49%;
+}
+
+#meta-right {
+ float: right;
+ width: 49%;
+}
+
+td {
+ padding: 0px 2px 0px 2px;
+ vertical-align: top;
+}
+
+td.y {
+ background: #ffffff;
+ border: 1px solid #000000;
+}
+
+.menu {
+ font-size: 80%;
+}
+
+.error {
+ background: #ff0000;
+ color: #ffffff;
+ padding: 3px;
+ font-size: 90%;
+
+}
+
+.success {
+ background: #00cc33;
+ padding: 3px;
+ font-size: 90%;
+}
+
+.showmax {
+ font-size: 80%;
+ margin: 5px 0px 5px 0px;
+ text-align: center;
+}
+
+.lettertaken {
+ color: #000000;
+ font-weight: bold;
+}
+
+.letternotavailable {
+ color: #999999;
+}
+
+a:link {
+ color: #000000;
+}
+
+a:visited {
+ color: #000000;
+}
+
+a:active {
+ color: #000000;
+}
+
+a:hover {
+ text-decoration: none;
+}
+
+.footer {
+ font-size: 70%;
+ margin-top: 5px;
+}
+
+
+
+
+.sbutton {
+ border: #999999 1px solid;
+}
+
+.button {
+ border: #999999 1px solid;
+}
+.input {
+ border: #999999 1px solid;
+}
+.sinput {
+ border: #999999 1px solid;
+}
+
+
+
+
+
+
+
+
+
+
+
+<?
+include_once("../inc/config.inc.php");
+?>
+
--- a/users.php Sun Apr 22 16:27:45 2007 +0000
+++ b/users.php Mon Jun 04 18:43:11 2007 +0000
@@ -1,22 +1,5 @@
<?php
-// +--------------------------------------------------------------------+
-// | PowerAdmin |
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team |
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal |
-// | program PowerAdmin as found on http://poweradmin.sf.net |
-// | The PowerAdmin program falls under the QPL License: |
-// | http://www.trolltech.com/developer/licensing/qpl.html |
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl> |
-// | Sjeemz <sjeemz <AT> sjeemz <DOT> nl> |
-// +--------------------------------------------------------------------+
-//
-// $Id: users.php,v 1.11 2003/02/05 23:22:33 azurazu Exp $
-//
-
require_once("inc/toolkit.inc.php");
if($_POST["submit"]
@@ -28,9 +11,16 @@
{
if(substr_count($_POST["username"], " ") == 0)
{
- add_user($_POST["username"], $_POST["password"], $_POST["fullname"], $_POST["email"], $_POST["level"], $_POST["description"], $_POST["active"]);
- clean_page($BASE_URL . $BASE_PATH . "users.php");
- }
+ if(strlen($_POST["password"]) < 8)
+ {
+ $error = _('Password length should be at least 8 characters.');
+ }
+ else
+ {
+ add_user($_POST["username"], $_POST["password"], $_POST["fullname"], $_POST["email"], $_POST["level"], $_POST["description"], $_POST["active"]);
+ clean_page($BASE_URL . $BASE_PATH . "users.php");
+ }
+ }
else
{
$error = _('Usernames can\'t contain spaces');
@@ -41,71 +31,109 @@
$error = _('Please fill in all fields');
}
-// Dirty hack, maybe revise?
include_once("inc/header.inc.php");
+if ($error != "")
+{
?>
-<H2><? echo _('User admin'); ?></H2>
-<P CLASS="nav">
-<A HREF="index.php"><? echo _('DNS Admin'); ?></A> <A HREF="search.php"><? echo _('Search records'); ?></A></P><BR><?
-// End
-
+ <div class="error"><? echo $error ; ?></div>
+<?
+}
+?>
+ <h2><? echo _('User admin'); ?></h2>
+<?
if (!level(10))
{
error(ERR_LEVEL_10);
}
-
-if ($error != "")
-{
- ?><H3><FONT COLOR="red"><? echo _('Error'); ?>: <?= $error ?></FONT></H3><?
-}
-
-echo "<B>" . _('Current users (click to edit)') . ":</B>";
-
+?>
+ <h3><? echo _('Current users'); ?></h3>
+<?
$users = show_users('');
-
-echo "<br /><br /><small><b>" . _('Number of users') . ":</b> ".count($users);
+?>
-show_pages(count($users),ROWAMOUNT);
-?>
-
-<br /><br /><TABLE BORDER="0" CELLSPACING="4">
-<TR STYLE="font-weight: Bold;"><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><? echo _('Name'); ?></TD><TD CLASS="tdbg"><? echo _('Domains'); ?></TD><TD CLASS="tdbg"><? echo _('Domain list'); ?></TD><TD CLASS="tdbg"><? echo _('Level'); ?></TD><TD CLASS="tdbg"><? echo _('Status'); ?></TD></TR>
+ <table>
+ <tr>
+ <th> </th>
+ <th><? echo _('Name'); ?></th>
+ <th><? echo _('Zones'); ?></th>
+ <th><? echo _('Zone list'); ?></th>
+ <th><? echo _('Level'); ?></th>
+ <th><? echo _('Status'); ?></th>
+ </tr>
<?
$users = show_users('',ROWSTART,ROWAMOUNT);
foreach ($users as $c)
{
- ?>
- <TR>
- <TD VALIGN="top" CLASS="tdbg"><A HREF="delete_user.php?id=<?= $c["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ <? echo _('Delete user'); ?> ]" BORDER="0"></A></TD>
- <TD VALIGN="top" CLASS="tdbg"><A HREF="edit_user.php?id=<?= $c["id"] ?>"><?= $c["fullname"] ?></A> (<?= $c["username"] ?>)</TD>
- <TD VALIGN="top" CLASS="tdbg"><?= $c["numdomains"] ?></TD>
- <TD VALIGN="top" CLASS="tdbg">
+?>
+ <tr>
+ <td class="n"><a href="delete_user.php?id=<? echo $c["id"] ?>"><img src="images/delete.gif" alt="[ <? echo _('Delete user'); ?> ]"></a></td>
+ <td class="n"><a href="edit_user.php?id=<? echo $c["id"] ?>"><? echo $c["fullname"] ?></A> (<? echo $c["username"] ?>)</td>
+ <td class="n"><? echo $c["numdomains"] ?></td>
+ <td class="n">
<?
$domains = get_domains_from_userid($c["id"]);
foreach ($domains as $d)
{
- ?><A HREF="delete_domain.php?id=<?= $d["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ <? echo _('Delete domain'); ?> ]" BORDER="0"></A> <A HREF="edit.php?id=<?= $d["id"] ?>"><?= $d["name"] ?></A><BR><?
+ ?><a href="delete_domain.php?id=<? echo $d["id"] ?>"><img src="images/delete.gif" alt="[ <? echo _('Delete domain'); ?> ]"></a> <a href="edit.php?id=<? echo $d["id"] ?>"><? echo $d["name"] ?></a><br><?
}
- ?></TD><TD VALIGN="top" CLASS="tdbg"><?= $c["level"] ?></TD><TD VALIGN="top" CLASS="tdbg"><?= get_status($c["active"]) ?></TD></TR><?
+ ?></td>
+ <td class="n"><? echo $c["level"] ?></td>
+ <td class="n"><? echo get_status($c["active"]) ?></td>
+ </tr><?
print "\n";
}
?>
-</TABLE>
-<BR><BR>
+ </table>
+ <p><? echo _('Number of users') ;?>: <? echo count($users); ?>.</p>
+ <div class="showmax">
+<?
+show_pages(count($users),ROWAMOUNT);
+?>
+ </div> <? // eo div showmax ?>
-<FORM METHOD="post" action="users.php">
-<B><? echo _('Create new user'); ?>:</B><BR>
-<TABLE BORDER="0" CELLSPACING="4">
-<TR><TD CLASS="tdbg"><? echo _('User name'); ?>:</TD><TD WIDTH="510" CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="username" VALUE="<? if ($error) print $_POST["username"]; ?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Full name'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="fullname" VALUE="<? if ($error) print $_POST["fullname"]; ?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Password'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="password" VALUE="<? if ($error) print $_POST["password"]; ?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('E-mail'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="text" CLASS="input" NAME="email" VALUE="<? if ($error) print $_POST["email"]; ?>"></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('User level'); ?>:</TD><TD CLASS="tdbg"><SELECT NAME="level"><OPTION VALUE="1">1 (<?= leveldescription(1) ?>)</OPTION><OPTION VALUE="5">5 (<?= leveldescription(5) ?>)</OPTION><OPTION VALUE="10">10 (<?= leveldescription(10) ?>)</OPTION></SELECT></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Description'); ?>:</TD><TD CLASS="tdbg"><TEXTAREA ROWS="6" COLS="30" CLASS="inputarea" NAME="description"><? if ($error) print $_POST["description"]; ?></TEXTAREA></TD></TR>
-<TR><TD CLASS="tdbg"><? echo _('Active'); ?>:</TD><TD CLASS="tdbg"><INPUT TYPE="checkbox" NAME="active" VALUE="1" CHECKED></TD></TR>
-<TR><TD CLASS="tdbg"> </TD><TD CLASS="tdbg"><INPUT TYPE="submit" CLASS="button" NAME="submit" VALUE="<? echo _('Add user'); ?>"></TD></TR>
-</TABLE>
-</FORM>
+ <h3><? echo _('Create new user'); ?></h3>
+ <form method="post" action="users.php">
+ <table>
+ <tr>
+ <td class="n"><? echo _('User name'); ?>:</td>
+ <td class="n"><input type="text" class="input" name="username" value="<? if ($error) print $_POST["username"]; ?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Full name'); ?>:</td>
+ <td class="n"><input type="text" class="input" NAME="fullname" VALUE="<? if ($error) print $_POST["fullname"]; ?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Password'); ?>:</td>
+ <td class="n"><input type="text" class="input" NAME="password" VALUE="<? if ($error) print $_POST["password"]; ?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('E-mail'); ?>:</td>
+ <td class="n"><input type="text" class="input" NAME="email" VALUE="<? if ($error) print $_POST["email"]; ?>"></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('User level'); ?>:</td>
+ <td class="n">
+ <select name="level">
+ <option value="1">1 (<? echo leveldescription(1) ?>)</option>
+ <option value="5">5 (<? echo leveldescription(5) ?>)</option>
+ <option value="10">10 (<? echo leveldescription(10) ?>)</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Description'); ?>:</td>
+ <td class="n"><textarea rows="6" cols="30" class="inputarea" name="description"><? if ($error) print $_POST["description"]; ?></textarea></td>
+ </tr>
+ <tr>
+ <td class="n"><? echo _('Active'); ?>:</td>
+ <td class="n"><input type="checkbox" name="active" value="1" checked></td>
+ </tr>
+ <tr>
+ <td class="n"> </td>
+ <td class="n"><input type="submit" class="button" name="submit" value="<? echo _('Add user'); ?>"></td>
+ </tr>
+ </table>
+ </form>
<?
include_once("inc/footer.inc.php");
?>