Vergleich admin/modules/home/module_meta.php - 1.8.3 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 14Zeile 14
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}


	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}


 
/**
* @return bool true
*/

function home_meta()
{
global $page, $lang, $plugins;

function home_meta()
{
global $page, $lang, $plugins;

Zeile 21Zeile 24
	$sub_menu = array();
$sub_menu['10'] = array("id" => "dashboard", "title" => $lang->dashboard, "link" => "index.php?module=home-dashboard");
$sub_menu['20'] = array("id" => "preferences", "title" => $lang->preferences, "link" => "index.php?module=home-preferences");

	$sub_menu = array();
$sub_menu['10'] = array("id" => "dashboard", "title" => $lang->dashboard, "link" => "index.php?module=home-dashboard");
$sub_menu['20'] = array("id" => "preferences", "title" => $lang->preferences, "link" => "index.php?module=home-preferences");

	$sub_menu['30'] = array("id" => "docs", "title" => $lang->mybb_documentation, "link" => "http://docs.mybb.com");
$sub_menu['40'] = array("id" => "credits", "title" => $lang->mybb_credits, "link" => "index.php?module=home-credits");

	$sub_menu['30'] = array("id" => "docs", "title" => $lang->mybb_documentation, "link" => "https://docs.mybb.com");
$sub_menu['40'] = array("id" => "credits", "title" => $lang->mybb_credits, "link" => "https://mybb.com/credits");

	$sub_menu = $plugins->run_hooks("admin_home_menu", $sub_menu);

$page->add_menu_item($lang->home, "home", "index.php", 1, $sub_menu);

	$sub_menu = $plugins->run_hooks("admin_home_menu", $sub_menu);

$page->add_menu_item($lang->home, "home", "index.php", 1, $sub_menu);

Zeile 30Zeile 33
	return true;
}


	return true;
}


 
/**
* @param string $action
*
* @return string
*/

function home_action_handler($action)
{
global $page, $db, $lang, $plugins;

function home_action_handler($action)
{
global $page, $db, $lang, $plugins;

Zeile 38Zeile 46

$actions = array(
'preferences' => array('active' => 'preferences', 'file' => 'preferences.php'),


$actions = array(
'preferences' => array('active' => 'preferences', 'file' => 'preferences.php'),

		'credits' => array('active' => 'credits', 'file' => 'credits.php'),

 
		'version_check' => array('active' => 'version_check', 'file' => 'version_check.php'),
'dashboard' => array('active' => 'dashboard', 'file' => 'index.php')
);

		'version_check' => array('active' => 'version_check', 'file' => 'version_check.php'),
'dashboard' => array('active' => 'dashboard', 'file' => 'index.php')
);

Zeile 58Zeile 65
	{
// Quick Access
$sub_menu = array();

	{
// Quick Access
$sub_menu = array();

		$sub_menu['10'] = array("id" => "add_forum", "title" => $lang->add_new_forum, "link" => "index.php?module=forum-management&action=add");
$sub_menu['20'] = array("id" => "search", "title" => $lang->search_for_users, "link" => "index.php?module=user-users&action=search");
$sub_menu['30'] = array("id" => "themes", "title" => $lang->themes, "link" => "index.php?module=style-themes");
$sub_menu['40'] = array("id" => "templates", "title" => $lang->templates, "link" => "index.php?module=style-templates");
$sub_menu['50'] = array("id" => "plugins", "title" => $lang->plugins, "link" => "index.php?module=config-plugins");
$sub_menu['60'] = array("id" => "backupdb", "title" => $lang->database_backups, "link" => "index.php?module=tools-backupdb");









		$sub_menu['10'] = array("id" => "add_forum", "title" => $lang->add_new_forum, "link" => "index.php?module=forum-management&action=add", "module" => "forum", "action" => "management");
$sub_menu['20'] = array("id" => "search", "title" => $lang->search_for_users, "link" => "index.php?module=user-users&action=search", "module" => "user", "action" => "users");
$sub_menu['30'] = array("id" => "themes", "title" => $lang->themes, "link" => "index.php?module=style-themes", "module" => "style", "action" => "themes");
$sub_menu['40'] = array("id" => "templates", "title" => $lang->templates, "link" => "index.php?module=style-templates", "module" => "style", "action" => "templates");
$sub_menu['50'] = array("id" => "plugins", "title" => $lang->plugins, "link" => "index.php?module=config-plugins", "module" => "config", "action" => "plugins");
$sub_menu['60'] = array("id" => "backupdb", "title" => $lang->database_backups, "link" => "index.php?module=tools-backupdb", "module" => "tools", "action" => "backupdb");

foreach($sub_menu as $id => $sub)
{
if(!check_admin_permissions(array("module" => $sub['module'], "action" => $sub['action']), false))
{
unset($sub_menu[$id]);
}
}


$sub_menu = $plugins->run_hooks("admin_home_menu_quick_access", $sub_menu);



$sub_menu = $plugins->run_hooks("admin_home_menu_quick_access", $sub_menu);


		$sidebar = new SidebarItem($lang->quick_access);
$sidebar->add_menu_items($sub_menu, $page->active_action);

$page->sidebar .= $sidebar->get_markup();



		if(!empty($sub_menu))
{
$sidebar = new SidebarItem($lang->quick_access);
$sidebar->add_menu_items($sub_menu, $page->active_action);
$page->sidebar .= $sidebar->get_markup();
}


// Online Administrators in the last 30 minutes
$timecut = TIME_NOW-60*30;


// Online Administrators in the last 30 minutes
$timecut = TIME_NOW-60*30;

Zeile 148Zeile 165
					$class = "";
}
$ip_address = my_inet_ntop($db->unescape_binary($user['ip']));

					$class = "";
}
$ip_address = my_inet_ntop($db->unescape_binary($user['ip']));

				$online_users .= "<li title=\"{$lang->ipaddress} {$ip_address}\"{$class}>".build_profile_link($user['username'].' ('.$ip_address.')', $user['uid'], "_blank")."</li>";

				$online_users .= "<li title=\"{$lang->ipaddress} {$ip_address}\"{$class}>".build_profile_link(htmlspecialchars_uni($user['username']).' ('.$ip_address.')', $user['uid'], "_blank")."</li>";

				$done_users["{$user['uid']}.{$user['ip']}"] = 1;
}
}

				$done_users["{$user['uid']}.{$user['ip']}"] = 1;
}
}