* -------------------------------------------------------------------- *
* Kurzbeschreibung : Administrationsmodul *
* -------------------------------------------------------------------- *
- * $Revision:: 856 $ *
- * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ *
+ * $Revision:: $ *
+ * $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
- * $Author:: stelzi $ *
+ * $Author:: $ *
* Needs to be in all Files and every File needs "svn propset *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
// Yet-another "Notice" fix
if ((IS_FORM_SENT()) && (REQUEST_POST('ok') == "***")) {
// No login entered?
- if (!REQUEST_ISSET_POST(('login'))) $MSG1 = getMessage('ADMIN_NO_LOGIN');
+ if (!REQUEST_ISSET_POST(('login'))) $loginMessage = getMessage('ADMIN_NO_LOGIN');
// An error comes back from registration?
- if (!empty($ret)) $MSG1 = $ret;
+ if (!empty($ret)) $loginMessage = $ret;
// No password entered?
- if (!REQUEST_ISSET_POST(('pass'))) $MSG2 = getMessage('ADMIN_NO_PASS');
+ if (!REQUEST_ISSET_POST(('pass'))) $passwdMessage = getMessage('ADMIN_NO_PASS');
// Or password too short?
- if (strlen(REQUEST_POST('pass')) < 4) $MSG2 = getMessage('ADMIN_SHORT_PASS');
+ if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS');
// Output error messages
- define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1));
- define('__MSG_PASS', LOAD_TEMPLATE("admin_login_msg", true, $MSG2));
+ define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $loginMessage));
+ define('__MSG_PASS', LOAD_TEMPLATE("admin_login_msg", true, $passwdMessage));
// Reset variables
- $MSG1 = ""; $MSG2 = "";
- } else {
+ $loginMessage = ""; $passwdMessage = "";
+ } else {
// Reset values to nothing
define('__MSG_LOGIN', "");
define('__MSG_PASS' , "");
}
+ // Output message in seperate template
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NOT_REGISTERED'));
+
// Load register template
LOAD_TEMPLATE("admin_reg_form");
}
// Add data to URL
if (!empty($GLOBALS['what'])) $URL .= "what=".$GLOBALS['what'];
elseif (!empty($GLOBALS['action'])) $URL .= "action=".$GLOBALS['action'];
- elseif (REQUEST_ISSET_GET(('area'))) $URL .= "area=".REQUEST_GET('area');
+ elseif (REQUEST_ISSET_GET('area')) $URL .= "area=".REQUEST_GET('area');
// Load URL
LOAD_URL($URL);
} // END - if
// Error detected?
+ // @TODO Rewrite all these constants
if ($ret != "done") {
if (REQUEST_ISSET_POST(('login'))) {
define('__LOGIN_VALUE', REQUEST_POST('login'));
if (IS_FORM_SENT()) {
// Set messages to zero
- $MSG1 = ""; $MSG2 = "";
+ $loginMessage = ""; $passwdMessage = "";
// No login entered?
- if (!REQUEST_ISSET_POST(('login'))) $MSG1 = getMessage('ADMIN_NO_LOGIN');
+ if (!REQUEST_ISSET_POST(('login'))) $loginMessage = getMessage('ADMIN_NO_LOGIN');
// An error comes back from login?
- if ((!empty($ret)) && (REQUEST_POST('ok') == "404")) $MSG1 = $ret;
+ if ((!empty($ret)) && (REQUEST_POST('ok') == "404")) $loginMessage = $ret;
// No password entered?
- if (!REQUEST_ISSET_POST(('pass'))) $MSG2 = getMessage('ADMIN_NO_PASS');
+ if (!REQUEST_ISSET_POST(('pass'))) $passwdMessage = getMessage('ADMIN_NO_PASS');
// Or password too short?
- if (strlen(REQUEST_POST('pass')) < 4) $MSG2 = getMessage('ADMIN_SHORT_PASS');
+ if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS');
// An error comes back from login?
- if ((!empty($ret)) && (REQUEST_POST('ok') == "pass")) $MSG2 = $ret;
+ if ((!empty($ret)) && (REQUEST_POST('ok') == "pass")) $passwdMessage = $ret;
// Load message template
- define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1));
- define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $MSG2));
+ define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $loginMessage));
+ define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $passwdMessage));
// Reset variables
- $MSG1 = ""; $MSG2 = "";
- } else {
+ unset($loginMessage);
+ unset($passwdMessage);
+ } else {
// Set constants to empty for hiding them
define('__MSG_LOGIN', "");
define('__MSG_PASS' , "");
// Set default values
$content = array('target' => "action", 'value' => "login");
}
- } elseif (REQUEST_ISSET_GET(('area'))) {
+ } elseif (REQUEST_ISSET_GET('area')) {
// Restore old area value
$content = array('target' => "area", 'value' => REQUEST_GET('area'));
} else {
// Special logout redirect for installation of given extension
LOAD_TEMPLATE(sprintf("admin_logout_%s_install", $register));
- } elseif (REQUEST_ISSET_GET(('remove'))) {
+ } elseif (REQUEST_ISSET_GET('remove')) {
// Secure input
- $remove = REQUEST_GET(('remove'));
+ $remove = REQUEST_GET('remove');
// Special logout redirect for removal of given extension
LOAD_TEMPLATE(sprintf("admin_logout_%s_remove", $remove));
$area = "entrance";
// Check for similar URL variable
- if (REQUEST_ISSET_GET(('area'))) $area = REQUEST_GET(('area'));
+ if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area');
// Load "logical-area menu-system" file
LOAD_INC_ONCE("inc/modules/admin/lasys-inc.php");
ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
} else {
// This little call constructs the whole default old and lacky menu system
- // on left side
+ // on left side. It also renders the content on right side
ADMIN_DO_ACTION($GLOBALS['what']);
}
break;