// Only be executed on login procedure!
function CHECK_ADMIN_LOGIN ($admin_login, $password) {
// By default no admin is found
- $ret = "404";
+ $ret = '404';
// Get admin id
$aid = GET_ADMIN_ID($admin_login);
$salt = __SALT;
// Check if password is same
- //* DEBUG: */ echo "*".$ret.",".$data['password'].",".$password.",".$salt."*<br >\n";
+ //* DEBUG: */ echo "*".$ret.','.$data['password'].','.$password.','.$salt."*<br >\n";
if (($ret == 'pass') && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == $password)) {
// Re-hash the plain passord with new random salt
$data['password'] = generateHash($password);
// Only be executed on cookie checking
function CHECK_ADMIN_COOKIES ($admin_login, $password) {
// By default no admin cookies are found
- $ret = "404"; $pass = '';
+ $ret = '404'; $pass = '';
// Get hash
$pass = GET_ADMIN_HASH(GET_ADMIN_ID($admin_login));
- if ($pass != "-1") $ret = 'pass';
+ if ($pass != '-1') $ret = 'pass';
- //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass)."(".strlen($pass).")/".$password."(".strlen($password).")<br />\n";
+ //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />\n";
// Check if password matches
if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass)))) {
// Walk through all files
foreach ($menuArray as $file) {
// Is this a PHP script?
- if ((!isDirectory($file)) && (strpos($file, "".$type.'-') > -1) && (strpos($file, ".php") > 0)) {
+ if ((!isDirectory($file)) && (strpos($file, "".$type.'-') > -1) && (strpos($file, '.php') > 0)) {
// Then test if the file is readable
$test = sprintf("%sinc/modules/%s/%s", constant('PATH'), $menu, $file);
} // END - if
// Add id number
- $idList .= $id.",";
+ $idList .= $id . ',';
} // END - foreach
// Run the query