Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: index.php 5621 2011-09-26 18:35:54Z ralgith $
| * $Id: index.php 5757 2012-03-09 15:11:56Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 80 | Zeile 80 |
---|
$fail_check = 0; $post_verify = true;
|
$fail_check = 0; $post_verify = true;
|
if($mybb->input['action'] == "logout") { // Delete session from the database $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); my_setcookie("adminsid", ""); $logged_out = true; } elseif($mybb->input['action'] == "unlock")
| if($mybb->input['action'] == "unlock")
|
{ $user = array(); if($mybb->input['username']) { $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
|
{ $user = array(); if($mybb->input['username']) { $query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
|
$user = $db->fetch_array($query);
| $user = $db->fetch_array($query);
|
if(!$user['uid']) { $error[] = $lang->error_invalid_username;
|
if(!$user['uid']) { $error[] = $lang->error_invalid_username;
|
}
| }
|
} else if($mybb->input['uid']) {
| } else if($mybb->input['uid']) {
|
Zeile 106 | Zeile 99 |
---|
if(!$user['uid']) { $error[] = $lang->error_invalid_uid;
|
if(!$user['uid']) { $error[] = $lang->error_invalid_uid;
|
}
| }
|
} // Do we have the token? If so let's process it
| } // Do we have the token? If so let's process it
|
Zeile 125 | Zeile 118 |
---|
else { $error[] = $lang->error_invalid_token;
|
else { $error[] = $lang->error_invalid_token;
|
} }
| } }
|
$default_page->show_lockout_unlock(); }
| $default_page->show_lockout_unlock(); }
|
Zeile 158 | Zeile 151 |
---|
"ip" => $db->escape_string(get_ip()), "dateline" => TIME_NOW, "lastactive" => TIME_NOW,
|
"ip" => $db->escape_string(get_ip()), "dateline" => TIME_NOW, "lastactive" => TIME_NOW,
|
"data" => "",
| "data" => serialize(array()),
|
); $db->insert_query("adminsessions", $admin_session);
|
); $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); my_setcookie("adminsid", $sid); my_setcookie('acploginattempts', 0); $post_verify = false; $mybb->request_method = "get";
|
$db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='".intval($mybb->user['uid'])."'", 1); my_setcookie("adminsid", $sid); my_setcookie('acploginattempts', 0); $post_verify = false; $mybb->request_method = "get";
|
|
|
if(!empty($mybb->input['module'])) { // $query_string should contain the module
| if(!empty($mybb->input['module'])) { // $query_string should contain the module
|
Zeile 244 | Zeile 238 |
---|
} $fail_check = 1;
|
} $fail_check = 1;
|
} } else {
| } } else {
|
// No admin session - show message on the login screen if(!isset($mybb->cookies['adminsid'])) {
| // No admin session - show message on the login screen if(!isset($mybb->cookies['adminsid'])) {
|
Zeile 318 | Zeile 312 |
---|
} }
|
} }
|
if(!$mybb->user['usergroup'])
| if($mybb->input['action'] == "logout" && $mybb->user) { if(verify_post_check($mybb->input['my_post_key'])) { $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); my_setcookie("adminsid", ""); $logged_out = true; } }
if(!$mybb->user['usergroup'])
|
{ $mybbgroups = 1;
|
{ $mybbgroups = 1;
|
}
| }
|
else { $mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups']; } $mybb->usergroup = usergroup_permissions($mybbgroups);
|
else { $mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups']; } $mybb->usergroup = usergroup_permissions($mybbgroups);
|
|
|
if($mybb->usergroup['cancp'] != 1 || !$mybb->user['uid']) { $db->delete_query("adminsessions", "uid='".intval($mybb->user['uid'])."'");
| if($mybb->usergroup['cancp'] != 1 || !$mybb->user['uid']) { $db->delete_query("adminsessions", "uid='".intval($mybb->user['uid'])."'");
|
Zeile 408 | Zeile 412 |
---|
$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)
|
Zeile 422 | Zeile 428 |
---|
$has_permission = false; if(function_exists($module."_admin_permissions")) {
|
$has_permission = false; if(function_exists($module."_admin_permissions")) {
|
if(isset($mybb->admin['permissions'][$module]))
| if(isset($mybb->admin['permissions'][$module]) || $is_super_admin == true)
|
{ $has_permission = true; }
| { $has_permission = true; }
|