diff -r 7be4525290cc -r 2ff220cfde13 index.php
--- 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 @@
trancer nl> |
-// | Sjeemz sjeemz 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");
?>
- echo _('DNS Admin'); ?>
-
-
+
echo _('Welcome'); ?>, echo $_SESSION["name"] ?>
+
-
-
- echo _('Welcome'); ?>, = $_SESSION["name"] ?>.
-
-
- echo _('Your userlevel is'); ?>: = $_SESSION["level"] ?> (= leveldescription($_SESSION["level"]) ?>)
-
-
-
-if ($error != "")
-{
- ?> echo _('Error'); ?>: = $error ?>
-}
-?>
-
- echo _('Current domains in DNS (click to view or edit)'); ?>:
-
-
-
-$doms = get_domains(0);
-$num_domains = count($doms);
-echo "
" . _('Number of domains') . ": ".$num_domains."
";
-
-if ($num_domains > ROWAMOUNT) {
- show_letters(LETTERSTART,$doms);
- echo "
";
-}
-
-$doms = get_domains(0,LETTERSTART);
-show_pages(count($doms),ROWAMOUNT);
-
-?>
-
-
-
- | echo _('Name'); ?> | echo _('Records'); ?> | echo _('Owner'); ?> |
-
-
-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)
-{
- ?> | echo _('No domains in this listing, sorry.'); ?> |
-}
-
-// If he has domains, dump them (duh)
-else
-{
- foreach ($doms as $c)
- {
- ?>
- if (level(5))
- {
- ?>
- ">
- }
- else
- {
- print " ";
- }
- ?>
- | ">= $c["name"] ?> | = $c["numrec"] ?> | = get_owner_from_id($c["owner"]) ?> |
- print "\n";
- }
-}
-
-?>
-
-
- echo _('You only administer some records of domains marked with an (*).'); ?>
-
-
-if (level(5))
-{
- // Get some data.
- $server_types = array("MASTER", "SLAVE", "NATIVE");
- $users = show_users();
- ?>
-
-
+ echo _('User administration'); ?>
}
?>
+ echo _('Logout'); ?>
+
-
-
include_once("inc/footer.inc.php");
?>