no domtype doc + code formatting on adm_login

This commit is contained in:
Benjamin Sonntag 2011-03-27 13:43:36 +00:00
parent 041ee5dc9a
commit 0f9d936596
2 changed files with 28 additions and 34 deletions

View File

@ -39,7 +39,7 @@ include_once("head.php");
?> ?>
<h3><?php __("Manage domains type"); ?></h3> <h3><?php __("Manage domains type"); ?></h3>
<hr id="topbar" /> <hr id="topbar" />
<p><?php __("If you don't know what this page is about, don't touch anything."); ?></p> <p><?php __("If you don't know what this page is about, don't touch anything, and read AlternC documentation about domain types"); ?></p>
<br /> <br />
<?php <?php

View File

@ -40,26 +40,25 @@ if ($oldid) {
die('Error : bad IP address'); die('Error : bad IP address');
} }
if (!$mem->setid($oldid)) if (!$mem->setid($oldid)) {
{
$oldid=null; $oldid=null;
$error=$err->errstr(); $error=$err->errstr();
include("index.php"); include("index.php");
exit(); exit();
} }
$oldid=null; $oldid=null;
include_once("main.php"); include_once("main.php");
exit(); exit();
} }
if (!$admin->enabled) { if (!$admin->enabled) {
__("This page is restricted to authorized staff"); __("This page is restricted to authorized staff");
exit(); exit();
} }
$fields = array ( $fields = array (
"id" => array ("request", "integer", 0), "id" => array ("request", "integer", 0),
); );
getFields($fields); getFields($fields);
$subadmin=variable_get("subadmin_restriction"); $subadmin=variable_get("subadmin_restriction");
@ -69,22 +68,18 @@ if ($subadmin==0 && !$admin->checkcreator($id)) {
exit(); exit();
} }
if (!$r=$admin->get($id)) if (!$r=$admin->get($id)) {
{ $error=$err->errstr();
$error=$err->errstr(); } else {
}
else
{
setcookie('oldid',$cuid,0,'/admin/'); setcookie('oldid',$cuid,0,'/admin/');
if (!$mem->setid($id)) if (!$mem->setid($id)) {
{ $error=$err->errstr();
$error=$err->errstr(); include("index.php");
include("index.php"); exit();
exit(); }
}
include_once("main.php"); include_once("main.php");
exit(); exit();
} }
include_once("head.php"); include_once("head.php");
@ -93,11 +88,10 @@ include_once("head.php");
<h3><?php __("Member login"); ?></h3> <h3><?php __("Member login"); ?></h3>
<?php <?php
if ($error) if ($error) {
{ echo "<p class=\"error\">$error</p>";
echo "<p class=\"error\">$error</p>"; include_once("foot.php");
include_once("foot.php"); exit();
exit(); }
}
?> ?>
<?php include_once("foot.php"); ?> <?php include_once("foot.php"); ?>