From 0f9d9365960c7ffe72e1a968e9f3c1fdedf9fc99 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sun, 27 Mar 2011 13:43:36 +0000 Subject: [PATCH] no domtype doc + code formatting on adm_login --- bureau/admin/adm_domstype.php | 2 +- bureau/admin/adm_login.php | 60 ++++++++++++++++------------------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/bureau/admin/adm_domstype.php b/bureau/admin/adm_domstype.php index 219dcd7e..7f47f25a 100644 --- a/bureau/admin/adm_domstype.php +++ b/bureau/admin/adm_domstype.php @@ -39,7 +39,7 @@ include_once("head.php"); ?>


-

+


setid($oldid)) - { + if (!$mem->setid($oldid)) { $oldid=null; - $error=$err->errstr(); - include("index.php"); - exit(); - } + $error=$err->errstr(); + include("index.php"); + exit(); + } $oldid=null; - include_once("main.php"); - exit(); + include_once("main.php"); + exit(); } if (!$admin->enabled) { - __("This page is restricted to authorized staff"); - exit(); + __("This page is restricted to authorized staff"); + exit(); } $fields = array ( - "id" => array ("request", "integer", 0), -); + "id" => array ("request", "integer", 0), + ); getFields($fields); $subadmin=variable_get("subadmin_restriction"); @@ -69,22 +68,18 @@ if ($subadmin==0 && !$admin->checkcreator($id)) { exit(); } -if (!$r=$admin->get($id)) -{ - $error=$err->errstr(); -} -else -{ +if (!$r=$admin->get($id)) { + $error=$err->errstr(); +} else { setcookie('oldid',$cuid,0,'/admin/'); - if (!$mem->setid($id)) - { - $error=$err->errstr(); - include("index.php"); - exit(); - } - - include_once("main.php"); - exit(); + if (!$mem->setid($id)) { + $error=$err->errstr(); + include("index.php"); + exit(); + } + + include_once("main.php"); + exit(); } include_once("head.php"); @@ -93,11 +88,10 @@ include_once("head.php");

$error

"; - include_once("foot.php"); - exit(); - } +if ($error) { + echo "

$error

"; + include_once("foot.php"); + exit(); +} ?>