Zeile 179 | Zeile 179 |
---|
); $db->insert_query("adminsessions", $admin_session); $admin_session['data'] = array();
|
); $db->insert_query("adminsessions", $admin_session); $admin_session['data'] = array();
|
$db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='".intval($mybb->user['uid'])."'", 1);
| $db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='".intval($mybb->user['uid'])."'");
|
my_setcookie("adminsid", $sid); my_setcookie('acploginattempts', 0); $post_verify = false;
| my_setcookie("adminsid", $sid); my_setcookie('acploginattempts', 0); $post_verify = false;
|
Zeile 242 | Zeile 242 |
---|
if($login_user['uid'] > 0) {
|
if($login_user['uid'] > 0) {
|
$db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='".intval($login_user['uid'])."'", 1, true);
| $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='".intval($login_user['uid'])."'", '', true);
|
}
$loginattempts = login_attempt_check_acp($login_user['uid'], true);
| }
$loginattempts = login_attempt_check_acp($login_user['uid'], true);
|
Zeile 253 | Zeile 253 |
---|
// Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) {
|
// Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) {
|
$db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+(intval($mybb->settings['loginattemptstimeout'])*60)), "uid='".intval($login_user['uid'])."'", 1);
| $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+(intval($mybb->settings['loginattemptstimeout'])*60)), "uid='".intval($login_user['uid'])."'");
|
}
// Did we hit lockout for the first time? Send the unlock email to the administrator
| }
// Did we hit lockout for the first time? Send the unlock email to the administrator
|
Zeile 371 | Zeile 371 |
---|
} $mybb->usergroup = usergroup_permissions($mybbgroups);
|
} $mybb->usergroup = usergroup_permissions($mybbgroups);
|
if($mybb->usergroup['cancp'] != 1 || !$mybb->user['uid'])
| $is_super_admin = is_super_admin($mybb->user['uid']);
if($mybb->usergroup['cancp'] != 1 && !$is_super_admin || !$mybb->user['uid'])
|
{ $uid = 0; if(isset($mybb->user['uid']))
| { $uid = 0; if(isset($mybb->user['uid']))
|
Zeile 381 | Zeile 383 |
---|
$db->delete_query("adminsessions", "uid = '{$uid}'"); unset($mybb->user); my_unsetcookie('adminsid');
|
$db->delete_query("adminsessions", "uid = '{$uid}'"); unset($mybb->user); my_unsetcookie('adminsid');
|
}
| }
|
if($mybb->user['uid']) { $query = $db->simple_select("adminoptions", "*", "uid='".$mybb->user['uid']."'");
| if($mybb->user['uid']) { $query = $db->simple_select("adminoptions", "*", "uid='".$mybb->user['uid']."'");
|
Zeile 424 | Zeile 426 |
---|
if(!class_exists($style_name)) { eval("class {$style_name} extends {$default_name} { }");
|
if(!class_exists($style_name)) { eval("class {$style_name} extends {$default_name} { }");
|
} }
| } }
|
$page = new Page; $page->style = $cp_style;
| $page = new Page; $page->style = $cp_style;
|
Zeile 436 | Zeile 438 |
---|
if($logged_out == true) { $page->show_login($lang->success_logged_out);
|
if($logged_out == true) { $page->show_login($lang->success_logged_out);
|
}
| }
|
elseif($fail_check == 1) { $page->show_login($lang->error_invalid_username_password, "error");
| elseif($fail_check == 1) { $page->show_login($lang->error_invalid_username_password, "error");
|
Zeile 456 | Zeile 458 |
---|
$page->add_breadcrumb_item($lang->home, "index.php");
// Begin dealing with the modules
|
$page->add_breadcrumb_item($lang->home, "index.php");
// Begin dealing with the modules
|
$is_super_admin = is_super_admin($mybb->user['uid']);
| |
$modules_dir = MYBB_ADMIN_DIR."modules"; $dir = opendir($modules_dir); while(($module = readdir($dir)) !== false)
| $modules_dir = MYBB_ADMIN_DIR."modules"; $dir = opendir($modules_dir); while(($module = readdir($dir)) !== false)
|