// Try to login the admin by setting some session/cookie variables
function doAdminLogin ($adminLogin, $passHash) {
// Reset failure counter on matching admins version
- if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) {
+ if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) {
// Reset counter on out-dated sql_patches version
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `login_failures`=0, `last_failure`='0000-00-00 00:00:00' WHERE `login`='%s' LIMIT 1",
array($adminLogin), __FUNCTION__, __LINE__);
// Now set all session variables and return the result
return ((
- setSession('admin_md5', generatePassString($passHash))
+ setSession('admin_md5', generatePassString(generateHash($passHash, '', false)))
) && (
setSession('admin_login', $adminLogin)
) && (
$pass = getAdminHash($admin);
if ($pass != '-1') $ret = 'pass';
- //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />");
+ //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />");
// Check if password matches
if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass))) && (isAdmin())) {
}
// Get action value
- $action = getModeAction(getModule(), $what);
+ $action = getActionFromModuleWhat(getModule(), $what);
// Define admin login name and id number
$content['login'] = getSession('admin_login');
// Do we have entries?
if (SQL_NUMROWS($result_main) > 0) {
- $OUT = '<div style="height:7px" class="seperator"> </div>';
$OUT .= '<ul class="admin_menu_main">';
// @TODO Rewrite this to $content = SQL_FETCHARRAY()
while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) {
$OUT .= '</ul>
</li>';
} // END - if
-
- $OUT .= '<li style="height:7px" class="seperator"> </li>';
} // END - if
} // END - while
convertSelectionsToTimestamp($postData, $tableData, $id, $skip);
// Shall we process this id? It muss not be empty, of course
- if (($skip === false) && (!empty($id)) && (!isset($GLOBALS['skip_config'][$id]))) {
+ if (($skip === false) && (!empty($id)) && ((!isset($GLOBALS['skip_config'][$id]))) || ($tableName != '_config')) {
// Translate the value? (comma to dot!)
if ((is_array($translateComma)) && (in_array($id, $translateComma))) {
// Then do it here... :)
// Should be admin!
if (!isAdmin()) {
// Not an admin so redirect better
- redirectToUrl('index.php');
+ redirectToUrl('modules.php?module=index');
} // END - if
// Is the id not set, then we need a backtrace here... :(