本文整理汇总了PHP中validateSession函数的典型用法代码示例。如果您正苦于以下问题:PHP validateSession函数的具体用法?PHP validateSession怎么用?PHP validateSession使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了validateSession函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: AdminMain
function AdminMain()
{
global $txt, $context, $scripturl, $modSettings, $settings, $sourcedir, $options, $boarddir, $backend_subdir;
// Load the language and templates....
loadLanguage('Admin');
loadAdminTemplate('Admin');
$context['robot_no_index'] = true;
require_once $sourcedir . '/lib/Subs-Menu.php';
// Some preferences.
$context['admin_preferences'] = !empty($options['admin_preferences']) ? unserialize($options['admin_preferences']) : array();
// Define all the menu structure - see Subs-Menu.php for details!
$admin_areas = array('forum' => array('title' => $txt['admin_main'], 'permission' => array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'), 'areas' => array('index' => array('label' => $txt['admin_center'], 'function' => 'AdminHome', 'icon' => 'administration.gif'), 'credits' => array('label' => $txt['support_credits_title'], 'function' => 'AdminHome', 'icon' => 'support.gif'), 'news' => array('label' => $txt['news_title'], 'file' => $backend_subdir . '/ManageNews.php', 'function' => 'ManageNews', 'icon' => 'news.gif', 'permission' => array('edit_news', 'send_mail', 'admin_forum'), 'subsections' => array('editnews' => array($txt['admin_edit_news'], 'edit_news'), 'mailingmembers' => array($txt['admin_newsletters'], 'send_mail'), 'settings' => array($txt['settings'], 'admin_forum'))), 'packages' => array('label' => $txt['package'], 'file' => $backend_subdir . '/Packages.php', 'function' => 'Packages', 'permission' => array('admin_forum'), 'icon' => 'packages.gif', 'subsections' => array('browse' => array($txt['browse_packages']), 'packageget' => array($txt['download_packages'], 'url' => $scripturl . '?action=admin;area=packages;sa=packageget;get'), 'installed' => array($txt['installed_packages']), 'perms' => array($txt['package_file_perms']), 'options' => array($txt['package_settings']))), 'plugins' => array('label' => $txt['plugins_title'], 'file' => $backend_subdir . '/Plugins.php', 'function' => 'PluginsMain', 'permission' => array('admin_forum'), 'icon' => 'packages.gif', 'subsections' => array('browse' => array($txt['browse_plugins']), 'hooks' => array($txt['browse_hooks']))), 'search' => array('function' => 'AdminSearch', 'permission' => array('admin_forum'), 'select' => 'index'))), 'config' => array('title' => $txt['admin_config'], 'permission' => array('admin_forum'), 'areas' => array('corefeatures' => array('label' => $txt['core_settings_title'], 'file' => $backend_subdir . '/ManageSettings.php', 'function' => 'ModifyCoreFeatures', 'icon' => 'corefeatures.gif'), 'featuresettings' => array('label' => $txt['modSettings_title'], 'file' => $backend_subdir . '/ManageSettings.php', 'function' => 'ModifyFeatureSettings', 'icon' => 'features.gif', 'subsections' => array('basic' => array($txt['mods_cat_features']), 'layout' => array($txt['mods_cat_layout']), 'sig' => array($txt['signature_settings_short']), 'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])))), 'securitysettings' => array('label' => $txt['admin_security_moderation'], 'file' => $backend_subdir . '/ManageSettings.php', 'function' => 'ModifySecuritySettings', 'icon' => 'security.gif', 'subsections' => array('general' => array($txt['mods_cat_security_general']), 'spam' => array($txt['antispam_title']), 'moderation' => array($txt['moderation_settings_short'], 'enabled' => substr($modSettings['warning_settings'], 0, 1) == 1))), 'languages' => array('label' => $txt['language_configuration'], 'file' => $backend_subdir . '/ManageServer.php', 'function' => 'ManageLanguages', 'icon' => 'languages.gif', 'subsections' => array('edit' => array($txt['language_edit']), 'add' => array($txt['language_add']), 'settings' => array($txt['language_settings']))), 'serversettings' => array('label' => $txt['admin_server_settings'], 'file' => $backend_subdir . '/ManageServer.php', 'function' => 'ModifySettings', 'icon' => 'server.gif', 'subsections' => array('general' => array($txt['general_settings']), 'database' => array($txt['database_paths_settings']), 'cookie' => array($txt['cookies_sessions_settings']), 'cache' => array($txt['caching_settings']), 'loads' => array($txt['load_balancing_settings']))), 'relatedtopics' => array('label' => $txt['admin_related_topic'], 'file' => $backend_subdir . '/RelatedTopics.php', 'function' => 'RelatedTopicsAdmin', 'subsections' => array('settings' => array($txt['admin_related_topics_settings']), 'methods' => array($txt['admin_related_topics_methods']))), 'current_theme' => array('label' => $txt['theme_current_settings'], 'file' => $backend_subdir . '/Themes.php', 'function' => 'ThemesMain', 'custom_url' => $scripturl . '?action=admin;area=theme;sa=settings;th=' . $settings['theme_id'], 'icon' => 'current_theme.gif'), 'theme' => array('label' => $txt['theme_admin'], 'file' => $backend_subdir . '/Themes.php', 'function' => 'ThemesMain', 'custom_url' => $scripturl . '?action=admin;area=theme;sa=admin', 'icon' => 'themes.gif', 'subsections' => array('admin' => array($txt['themeadmin_admin_title']), 'list' => array($txt['themeadmin_list_title']), 'reset' => array($txt['themeadmin_reset_title']), 'edit' => array($txt['themeadmin_edit_title']))), 'modsettings' => array('label' => $txt['admin_modifications'], 'file' => $backend_subdir . '/ManageSettings.php', 'function' => 'ModifyModSettings', 'icon' => 'modifications.gif', 'related' => array($txt['admin_related_topic']), 'subsections' => array('general' => array($txt['mods_cat_modifications_misc']))), 'socialsettings' => array('label' => $txt['admin_social'], 'file' => $backend_subdir . '/ManageSettings.php', 'function' => 'ModifySocialSettings', 'subsections' => array('general' => array($txt['socialsettings_general']), 'astream' => array($txt['socialsettings_astream']))))), 'layout' => array('title' => $txt['layout_controls'], 'permission' => array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum'), 'areas' => array('manageboards' => array('label' => $txt['admin_boards'], 'file' => $backend_subdir . '/ManageBoards.php', 'function' => 'ManageBoards', 'icon' => 'boards.gif', 'permission' => array('manage_boards'), 'subsections' => array('main' => array($txt['boardsEdit']), 'newcat' => array($txt['mboards_new_cat']), 'settings' => array($txt['settings'], 'admin_forum'))), 'postsettings' => array('label' => $txt['manageposts'], 'file' => $backend_subdir . '/ManagePosts.php', 'function' => 'ManagePostSettings', 'permission' => array('admin_forum'), 'icon' => 'posts.gif', 'subsections' => array('posts' => array($txt['manageposts_settings']), 'bbc' => array($txt['manageposts_bbc_settings']), 'censor' => array($txt['admin_censored_words']), 'topics' => array($txt['manageposts_topic_settings']), 'prefixes' => array($txt['manageposts_prefix_settings']), 'tags' => array($txt['manageposts_tag_settings']), 'ratings' => array($txt['karma']))), 'managecalendar' => array('label' => $txt['manage_calendar'], 'file' => $backend_subdir . '/ManageCalendar.php', 'function' => 'ManageCalendar', 'icon' => 'calendar.gif', 'permission' => array('admin_forum'), 'enabled' => in_array('cd', $context['admin_features']), 'subsections' => array('holidays' => array($txt['manage_holidays'], 'admin_forum', 'enabled' => !empty($modSettings['cal_enabled'])), 'settings' => array($txt['calendar_settings'], 'admin_forum'))), 'managesearch' => array('label' => $txt['manage_search'], 'file' => $backend_subdir . '/ManageSearch.php', 'function' => 'ManageSearch', 'icon' => 'search.gif', 'permission' => array('admin_forum'), 'subsections' => array('weights' => array($txt['search_weights']), 'method' => array($txt['search_method']), 'settings' => array($txt['settings']), 'managesphinx' => array($txt['search_managesphinx']))), 'smileys' => array('label' => $txt['smileys_manage'], 'file' => $backend_subdir . '/ManageSmileys.php', 'function' => 'ManageSmileys', 'icon' => 'smiley.gif', 'permission' => array('manage_smileys'), 'subsections' => array('editsets' => array($txt['smiley_sets']), 'addsmiley' => array($txt['smileys_add'], 'enabled' => !empty($modSettings['smiley_enable'])), 'editsmileys' => array($txt['smileys_edit'], 'enabled' => !empty($modSettings['smiley_enable'])), 'setorder' => array($txt['smileys_set_order'], 'enabled' => !empty($modSettings['smiley_enable'])), 'editicons' => array($txt['icons_edit_message_icons'], 'enabled' => !empty($modSettings['messageIcons_enable'])), 'settings' => array($txt['settings']))), 'manageattachments' => array('label' => $txt['attachments_avatars'], 'file' => $backend_subdir . '/ManageAttachments.php', 'function' => 'ManageAttachments', 'icon' => 'attachment.gif', 'permission' => array('manage_attachments'), 'subsections' => array('browse' => array($txt['attachment_manager_browse']), 'attachments' => array($txt['attachment_manager_settings']), 'avatars' => array($txt['attachment_manager_avatar_settings']), 'maintenance' => array($txt['attachment_manager_maintenance']))))), 'members' => array('title' => $txt['admin_manage_members'], 'permission' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'manage_permissions', 'admin_forum'), 'areas' => array('viewmembers' => array('label' => $txt['admin_users'], 'file' => $backend_subdir . '/ManageMembers.php', 'function' => 'ViewMembers', 'icon' => 'members.gif', 'permission' => array('moderate_forum'), 'subsections' => array('all' => array($txt['view_all_members']), 'search' => array($txt['mlist_search']))), 'membergroups' => array('label' => $txt['admin_groups'], 'file' => $backend_subdir . '/ManageMembergroups.php', 'function' => 'ModifyMembergroups', 'icon' => 'membergroups.gif', 'permission' => array('manage_membergroups'), 'subsections' => array('index' => array($txt['membergroups_edit_groups'], 'manage_membergroups'), 'add' => array($txt['membergroups_new_group'], 'manage_membergroups'), 'settings' => array($txt['settings'], 'admin_forum'))), 'permissions' => array('label' => $txt['edit_permissions'], 'file' => $backend_subdir . '/ManagePermissions.php', 'function' => 'ModifyPermissions', 'icon' => 'permissions.gif', 'permission' => array('manage_permissions'), 'subsections' => array('index' => array($txt['permissions_groups'], 'manage_permissions'), 'board' => array($txt['permissions_boards'], 'manage_permissions'), 'profiles' => array($txt['permissions_profiles'], 'manage_permissions'), 'postmod' => array($txt['permissions_post_moderation'], 'manage_permissions', 'enabled' => $modSettings['postmod_active']), 'settings' => array($txt['settings'], 'admin_forum'))), 'regcenter' => array('label' => $txt['registration_center'], 'file' => $backend_subdir . '/ManageRegistration.php', 'function' => 'RegCenter', 'icon' => 'regcenter.gif', 'permission' => array('admin_forum', 'moderate_forum'), 'subsections' => array('register' => array($txt['admin_browse_register_new'], 'moderate_forum'), 'agreement' => array($txt['registration_agreement'], 'admin_forum'), 'reservednames' => array($txt['admin_reserved_set'], 'admin_forum'), 'settings' => array($txt['settings'], 'admin_forum'))), 'ban' => array('label' => $txt['ban_title'], 'file' => $backend_subdir . '/ManageBans.php', 'function' => 'Ban', 'icon' => 'ban.gif', 'permission' => 'manage_bans', 'subsections' => array('list' => array($txt['ban_edit_list']), 'add' => array($txt['ban_add_new']), 'browse' => array($txt['ban_trigger_browse']), 'log' => array($txt['ban_log']))), 'paidsubscribe' => array('label' => $txt['paid_subscriptions'], 'enabled' => in_array('ps', $context['admin_features']), 'file' => $backend_subdir . '/ManagePaid.php', 'icon' => 'paid.gif', 'function' => 'ManagePaidSubscriptions', 'permission' => 'admin_forum', 'subsections' => array('view' => array($txt['paid_subs_view']), 'settings' => array($txt['settings']))), 'sengines' => array('label' => $txt['search_engines'], 'enabled' => in_array('sp', $context['admin_features']), 'file' => $backend_subdir . '/ManageSearchEngines.php', 'icon' => 'engines.gif', 'function' => 'SearchEngines', 'permission' => 'admin_forum', 'subsections' => array('stats' => array($txt['spider_stats']), 'logs' => array($txt['spider_logs']), 'spiders' => array($txt['spiders']), 'settings' => array($txt['settings']))))), 'maintenance' => array('title' => $txt['admin_maintenance'], 'permission' => array('admin_forum'), 'areas' => array('maintain' => array('label' => $txt['maintain_title'], 'file' => $backend_subdir . '/ManageMaintenance.php', 'icon' => 'maintain.gif', 'function' => 'ManageMaintenance', 'subsections' => array('routine' => array($txt['maintain_sub_routine'], 'admin_forum'), 'database' => array($txt['maintain_sub_database'], 'admin_forum'), 'members' => array($txt['maintain_sub_members'], 'admin_forum'), 'topics' => array($txt['maintain_sub_topics'], 'admin_forum'))), 'scheduledtasks' => array('label' => $txt['maintain_tasks'], 'file' => $backend_subdir . '/ManageScheduledTasks.php', 'icon' => 'scheduled.gif', 'function' => 'ManageScheduledTasks', 'subsections' => array('tasks' => array($txt['maintain_tasks'], 'admin_forum'), 'tasklog' => array($txt['scheduled_log'], 'admin_forum'))), 'mailqueue' => array('label' => $txt['mailqueue_title'], 'file' => $backend_subdir . '/ManageMail.php', 'function' => 'ManageMail', 'icon' => 'mail.gif', 'subsections' => array('browse' => array($txt['mailqueue_browse'], 'admin_forum'), 'settings' => array($txt['mailqueue_settings'], 'admin_forum'))), 'reports' => array('enabled' => in_array('rg', $context['admin_features']), 'label' => $txt['generate_reports'], 'file' => 'Reports.php', 'function' => 'ReportsMain', 'icon' => 'reports.gif'), 'logs' => array('label' => $txt['logs'], 'function' => 'AdminLogs', 'icon' => 'logs.gif', 'subsections' => array('errorlog' => array($txt['errlog'], 'admin_forum', 'enabled' => !empty($modSettings['enableErrorLogging']), 'url' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc'), 'adminlog' => array($txt['admin_log'], 'admin_forum', 'enabled' => in_array('ml', $context['admin_features'])), 'modlog' => array($txt['moderation_log'], 'admin_forum', 'enabled' => in_array('ml', $context['admin_features'])), 'banlog' => array($txt['ban_log'], 'manage_bans'), 'spiderlog' => array($txt['spider_logs'], 'admin_forum', 'enabled' => in_array('sp', $context['admin_features'])), 'tasklog' => array($txt['scheduled_log'], 'admin_forum'), 'pruning' => array($txt['pruning_title'], 'admin_forum'))), 'repairboards' => array('label' => $txt['admin_repair'], 'file' => $backend_subdir . '/RepairBoards.php', 'function' => 'RepairBoards', 'select' => 'maintain', 'hidden' => true))));
if (!$modSettings['tags_active']) {
unset($admin_areas['layout']['areas']['postsettings']['subsections']['tags']);
}
if (empty($modSettings['karmaMode'])) {
unset($admin_areas['layout']['areas']['postsettings']['subsections']['ratings']);
}
// Any files to include for administration?
if (!empty($modSettings['integrate_admin_include'])) {
$admin_includes = explode(',', $modSettings['integrate_admin_include']);
foreach ($admin_includes as $include) {
$include = strtr(trim($include), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir, '$themedir' => $settings['theme_dir']));
if (file_exists($include)) {
require_once $include;
}
}
}
// Let them modify admin areas easily.
HookAPI::callHook('integrate_admin_areas', array(&$admin_areas));
SimpleSEF::adminAreas($admin_areas);
// Make sure the administrator has a valid session...
validateSession();
// Actually create the menu!
$admin_include_data = createMenu($admin_areas);
unset($admin_areas);
// Nothing valid?
if ($admin_include_data == false) {
fatal_lang_error('no_access', false);
}
// Build the link tree.
$context['linktree'][] = array('url' => $scripturl . '?action=admin', 'name' => $txt['admin_center']);
if (isset($admin_include_data['current_area']) && $admin_include_data['current_area'] != 'index') {
$context['linktree'][] = array('url' => $scripturl . '?action=admin;area=' . $admin_include_data['current_area'] . ';' . $context['session_var'] . '=' . $context['session_id'], 'name' => $admin_include_data['label']);
}
if (!empty($admin_include_data['current_subsection']) && $admin_include_data['subsections'][$admin_include_data['current_subsection']][0] != $admin_include_data['label']) {
$context['linktree'][] = array('url' => $scripturl . '?action=admin;area=' . $admin_include_data['current_area'] . ';sa=' . $admin_include_data['current_subsection'] . ';' . $context['session_var'] . '=' . $context['session_id'], 'name' => $admin_include_data['subsections'][$admin_include_data['current_subsection']][0]);
}
// Make a note of the Unique ID for this menu.
$context['admin_menu_id'] = $context['max_menu_id'];
$context['admin_menu_name'] = 'menu_data_' . $context['admin_menu_id'];
// Why on the admin are we?
$context['admin_area'] = $admin_include_data['current_area'];
// Now - finally - call the right place!
if (isset($admin_include_data['file'])) {
require_once $sourcedir . '/' . $admin_include_data['file'];
}
$admin_include_data['function']();
}
开发者ID:norv,项目名称:EosAlpha,代码行数:59,代码来源:Admin.php
示例2: ModerationMain
/**
* Entry point for the moderation center.
*
* @param bool $dont_call = false
*/
function ModerationMain($dont_call = false)
{
global $txt, $context, $scripturl, $sc, $modSettings, $user_info, $settings, $sourcedir, $options, $smcFunc;
// Don't run this twice... and don't conflict with the admin bar.
if (isset($context['admin_area'])) {
return;
}
$context['can_moderate_boards'] = $user_info['mod_cache']['bq'] != '0=1';
$context['can_moderate_groups'] = $user_info['mod_cache']['gq'] != '0=1';
$context['can_moderate_approvals'] = $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']);
// Everyone using this area must be allowed here!
if (!$context['can_moderate_boards'] && !$context['can_moderate_groups'] && !$context['can_moderate_approvals']) {
isAllowedTo('access_mod_center');
}
// We're gonna want a menu of some kind.
require_once $sourcedir . '/Subs-Menu.php';
// Load the language, and the template.
loadLanguage('ModerationCenter');
loadTemplate(false, 'admin');
$context['admin_preferences'] = !empty($options['admin_preferences']) ? unserialize($options['admin_preferences']) : array();
$context['robot_no_index'] = true;
// This is the menu structure - refer to Subs-Menu.php for the details.
$moderation_areas = array('main' => array('title' => $txt['mc_main'], 'areas' => array('index' => array('label' => $txt['moderation_center'], 'function' => 'ModerationHome'), 'settings' => array('label' => $txt['mc_settings'], 'function' => 'ModerationSettings'), 'modlogoff' => array('label' => $txt['mc_logoff'], 'function' => 'ModEndSession', 'enabled' => empty($modSettings['securityDisable_moderate'])), 'notice' => array('file' => 'ModerationCenter.php', 'function' => 'ShowNotice', 'select' => 'index'))), 'logs' => array('title' => $txt['mc_logs'], 'areas' => array('modlog' => array('label' => $txt['modlog_view'], 'enabled' => !empty($modSettings['modlog_enabled']) && $context['can_moderate_boards'], 'file' => 'Modlog.php', 'function' => 'ViewModlog'), 'warnings' => array('label' => $txt['mc_warnings'], 'enabled' => in_array('w', $context['admin_features']) && $modSettings['warning_settings'][0] == 1 && $context['can_moderate_boards'], 'function' => 'ViewWarnings', 'subsections' => array('log' => array($txt['mc_warning_log']), 'templates' => array($txt['mc_warning_templates'], 'issue_warning'))))), 'posts' => array('title' => $txt['mc_posts'], 'enabled' => $context['can_moderate_boards'] || $context['can_moderate_approvals'], 'areas' => array('postmod' => array('label' => $txt['mc_unapproved_posts'], 'enabled' => $context['can_moderate_approvals'], 'file' => 'PostModeration.php', 'function' => 'PostModerationMain', 'custom_url' => $scripturl . '?action=moderate;area=postmod', 'subsections' => array('posts' => array($txt['mc_unapproved_replies']), 'topics' => array($txt['mc_unapproved_topics']))), 'attachmod' => array('label' => $txt['mc_unapproved_attachments'], 'enabled' => $context['can_moderate_approvals'], 'file' => 'PostModeration.php', 'function' => 'PostModerationMain', 'custom_url' => $scripturl . '?action=moderate;area=attachmod;sa=attachments'), 'reports' => array('label' => $txt['mc_reported_posts'], 'enabled' => $context['can_moderate_boards'], 'file' => 'ModerationCenter.php', 'function' => 'ReportedPosts', 'subsections' => array('open' => array($txt['mc_reportedp_active']), 'closed' => array($txt['mc_reportedp_closed']))))), 'groups' => array('title' => $txt['mc_groups'], 'enabled' => $context['can_moderate_groups'], 'areas' => array('userwatch' => array('label' => $txt['mc_watched_users_title'], 'enabled' => in_array('w', $context['admin_features']) && $modSettings['warning_settings'][0] == 1 && $context['can_moderate_boards'], 'function' => 'ViewWatchedUsers', 'subsections' => array('member' => array($txt['mc_watched_users_member']), 'post' => array($txt['mc_watched_users_post']))), 'groups' => array('label' => $txt['mc_group_requests'], 'file' => 'Groups.php', 'function' => 'Groups', 'custom_url' => $scripturl . '?action=moderate;area=groups;sa=requests'), 'viewgroups' => array('label' => $txt['mc_view_groups'], 'file' => 'Groups.php', 'function' => 'Groups'))));
// Make sure the administrator has a valid session...
validateSession('moderate');
// I don't know where we're going - I don't know where we've been...
$menuOptions = array('action' => 'moderate', 'disable_url_session_check' => true);
$mod_include_data = createMenu($moderation_areas, $menuOptions);
unset($moderation_areas);
// We got something - didn't we? DIDN'T WE!
if ($mod_include_data == false) {
fatal_lang_error('no_access', false);
}
// Retain the ID information in case required by a subaction.
$context['moderation_menu_id'] = $context['max_menu_id'];
$context['moderation_menu_name'] = 'menu_data_' . $context['moderation_menu_id'];
// What a pleasant shortcut - even tho we're not *really* on the admin screen who cares...
$context['admin_area'] = $mod_include_data['current_area'];
// Build the link tree.
$context['linktree'][] = array('url' => $scripturl . '?action=moderate', 'name' => $txt['moderation_center']);
if (isset($mod_include_data['current_area']) && $mod_include_data['current_area'] != 'index') {
$context['linktree'][] = array('url' => $scripturl . '?action=moderate;area=' . $mod_include_data['current_area'], 'name' => $mod_include_data['label']);
}
if (!empty($mod_include_data['current_subsection']) && $mod_include_data['subsections'][$mod_include_data['current_subsection']][0] != $mod_include_data['label']) {
$context['linktree'][] = array('url' => $scripturl . '?action=moderate;area=' . $mod_include_data['current_area'] . ';sa=' . $mod_include_data['current_subsection'], 'name' => $mod_include_data['subsections'][$mod_include_data['current_subsection']][0]);
}
// Now - finally - the bit before the encore - the main performance of course!
if (!$dont_call) {
if (isset($mod_include_data['file'])) {
require_once $sourcedir . '/' . $mod_include_data['file'];
}
$mod_include_data['function']();
}
}
开发者ID:Glyph13,项目名称:SMF2.1,代码行数:59,代码来源:ModerationCenter.php
示例3: prepareModcenter
/**
* Prepare menu, make checks, load files, and create moderation menu.
* This can be called from the class, or from outside, to
* set up moderation menu.
*/
public function prepareModcenter()
{
global $txt, $context, $scripturl, $modSettings, $user_info, $options;
// Don't run this twice... and don't conflict with the admin bar.
if (isset($context['admin_area'])) {
return;
}
$context['can_moderate_boards'] = $user_info['mod_cache']['bq'] != '0=1';
$context['can_moderate_groups'] = $user_info['mod_cache']['gq'] != '0=1';
$context['can_moderate_approvals'] = $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']);
// Everyone using this area must be allowed here!
if (!$context['can_moderate_boards'] && !$context['can_moderate_groups'] && !$context['can_moderate_approvals']) {
isAllowedTo('access_mod_center');
}
// We're gonna want a menu of some kind.
require_once SUBSDIR . '/Menu.subs.php';
// Load the language, and the template.
loadLanguage('ModerationCenter');
loadTemplate(false, 'admin');
$context['admin_preferences'] = !empty($options['admin_preferences']) ? unserialize($options['admin_preferences']) : array();
$context['robot_no_index'] = true;
// Moderation counts for things that this moderator can take care of
require_once SUBSDIR . '/Moderation.subs.php';
$mod_counts = loadModeratorMenuCounts();
// This is the menu structure - refer to subs/Menu.subs.php for the details.
$moderation_areas = array('main' => array('title' => $txt['mc_main'], 'areas' => array('index' => array('label' => $txt['moderation_center'], 'controller' => 'ModerationCenter_Controller', 'function' => 'action_moderationHome', 'icon' => 'transparent.png', 'class' => 'admin_img_home'), 'settings' => array('label' => $txt['mc_settings'], 'controller' => 'ModerationCenter_Controller', 'function' => 'action_moderationSettings', 'icon' => 'transparent.png', 'class' => 'admin_img_features'), 'modlogoff' => array('label' => $txt['mc_logoff'], 'controller' => 'ModerationCenter_Controller', 'function' => 'action_modEndSession', 'enabled' => empty($modSettings['securityDisable_moderate']), 'icon' => 'transparent.png', 'class' => 'admin_img_exit'), 'notice' => array('controller' => 'ModerationCenter_Controller', 'function' => 'action_showNotice', 'select' => 'index', 'icon' => 'transparent.png', 'class' => 'admin_img_news'))), 'logs' => array('title' => $txt['mc_logs'], 'areas' => array('modlog' => array('label' => $txt['modlog_view'], 'enabled' => !empty($modSettings['modlog_enabled']) && $context['can_moderate_boards'], 'file' => 'Modlog.controller.php', 'dir' => ADMINDIR, 'controller' => 'Modlog_Controller', 'function' => 'action_log', 'icon' => 'transparent.png', 'class' => 'admin_img_logs'), 'warnings' => array('label' => $txt['mc_warnings'], 'enabled' => in_array('w', $context['admin_features']) && !empty($modSettings['warning_enable']) && $context['can_moderate_boards'], 'controller' => 'ModerationCenter_Controller', 'function' => 'action_viewWarnings', 'icon' => 'transparent.png', 'class' => 'admin_img_reports', 'subsections' => array('log' => array($txt['mc_warning_log']), 'templates' => array($txt['mc_warning_templates'], 'issue_warning'))))), 'posts' => array('title' => $txt['mc_posts'] . (!empty($mod_counts['pt_total']) ? ' [' . $mod_counts['pt_total'] . ']' : ''), 'enabled' => $context['can_moderate_boards'] || $context['can_moderate_approvals'], 'areas' => array('postmod' => array('label' => $txt['mc_unapproved_posts'] . (!empty($mod_counts['postmod']) ? ' [' . $mod_counts['postmod'] . ']' : ''), 'enabled' => $context['can_moderate_approvals'], 'file' => 'PostModeration.controller.php', 'controller' => 'PostModeration_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_posts', 'custom_url' => $scripturl . '?action=moderate;area=postmod', 'subsections' => array('posts' => array($txt['mc_unapproved_replies']), 'topics' => array($txt['mc_unapproved_topics']))), 'emailmod' => array('label' => $txt['mc_emailerror'] . (!empty($mod_counts['emailmod']) ? ' [' . $mod_counts['emailmod'] . ']' : ''), 'enabled' => !empty($modSettings['maillist_enabled']) && allowedTo('approve_emails'), 'file' => 'ManageMaillist.controller.php', 'dir' => ADMINDIR, 'function' => 'UnapprovedEmails', 'icon' => 'transparent.png', 'class' => 'admin_img_mail', 'custom_url' => $scripturl . '?action=admin;area=maillist;sa=emaillist'), 'attachmod' => array('label' => $txt['mc_unapproved_attachments'] . (!empty($mod_counts['attachments']) ? ' [' . $mod_counts['attachments'] . ']' : ''), 'enabled' => $context['can_moderate_approvals'], 'file' => 'PostModeration.controller.php', 'controller' => 'PostModeration_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_attachment', 'custom_url' => $scripturl . '?action=moderate;area=attachmod;sa=attachments'), 'reports' => array('label' => $txt['mc_reported_posts'] . (!empty($mod_counts['reports']) ? ' [' . $mod_counts['reports'] . ']' : ''), 'enabled' => $context['can_moderate_boards'], 'controller' => 'ModerationCenter_Controller', 'function' => 'action_reportedPosts', 'icon' => 'transparent.png', 'class' => 'admin_img_reports', 'subsections' => array('open' => array($txt['mc_reportedp_active'] . (!empty($mod_counts['reports']) ? ' [' . $mod_counts['reports'] . ']' : '')), 'closed' => array($txt['mc_reportedp_closed']))))), 'groups' => array('title' => $txt['mc_groups'] . (!empty($mod_counts['mg_total']) ? ' [' . $mod_counts['mg_total'] . ']' : ''), 'enabled' => $context['can_moderate_groups'], 'areas' => array('userwatch' => array('label' => $txt['mc_watched_users_title'], 'enabled' => in_array('w', $context['admin_features']) && !empty($modSettings['warning_enable']) && $context['can_moderate_boards'], 'controller' => 'ModerationCenter_Controller', 'function' => 'action_viewWatchedUsers', 'icon' => 'transparent.png', 'class' => 'admin_img_permissions', 'subsections' => array('member' => array($txt['mc_watched_users_member']), 'post' => array($txt['mc_watched_users_post']))), 'groups' => array('label' => $txt['mc_group_requests'] . (!empty($mod_counts['groupreq']) ? ' [' . $mod_counts['groupreq'] . ']' : ''), 'file' => 'Groups.controller.php', 'controller' => 'Groups_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_regcenter', 'custom_url' => $scripturl . '?action=moderate;area=groups;sa=requests'), 'members' => array('enabled' => allowedTo('moderate_forum'), 'label' => $txt['mc_member_requests'] . (!empty($mod_counts['memberreq']) ? ' [' . $mod_counts['memberreq'] . ']' : ''), 'file' => 'ManageMembers.controller.php', 'controller' => 'ManageMembers_Controller', 'function' => 'action_approve', 'icon' => 'transparent.png', 'class' => 'admin_img_members', 'custom_url' => $scripturl . '?action=admin;area=viewmembers;sa=browse;type=approve'), 'viewgroups' => array('label' => $txt['mc_view_groups'], 'file' => 'Groups.controller.php', 'controller' => 'Groups_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_membergroups'))));
// Make sure the administrator has a valid session...
validateSession('moderate');
// I don't know where we're going - I don't know where we've been...
$menuOptions = array('action' => 'moderate', 'hook' => 'moderation', 'disable_url_session_check' => true, 'default_include_dir' => CONTROLLERDIR);
$mod_include_data = createMenu($moderation_areas, $menuOptions);
unset($moderation_areas);
// We got something - didn't we? DIDN'T WE!
if ($mod_include_data == false) {
fatal_lang_error('no_access', false);
}
// Retain the ID information in case required by a subaction.
$context['moderation_menu_id'] = $context['max_menu_id'];
$context['moderation_menu_name'] = 'menu_data_' . $context['moderation_menu_id'];
$context[$context['moderation_menu_name']]['tab_data'] = array('title' => $txt['moderation_center'], 'help' => '', 'description' => sprintf($txt['mc_description'], $context['user']['name'], $scripturl . '?action=moderate;area=settings'));
// What a pleasant shortcut - even tho we're not *really* on the admin screen who cares...
$context['admin_area'] = $mod_include_data['current_area'];
// Build the link tree.
$context['linktree'][] = array('url' => $scripturl . '?action=moderate', 'name' => $txt['moderation_center']);
if (isset($mod_include_data['current_area']) && $mod_include_data['current_area'] != 'index') {
$context['linktree'][] = array('url' => $scripturl . '?action=moderate;area=' . $mod_include_data['current_area'], 'name' => $mod_include_data['label']);
}
if (!empty($mod_include_data['current_subsection']) && $mod_include_data['subsections'][$mod_include_data['current_subsection']][0] != $mod_include_data['label']) {
$context['linktree'][] = array('url' => $scripturl . '?action=moderate;area=' . $mod_include_data['current_area'] . ';sa=' . $mod_include_data['current_subsection'], 'name' => $mod_include_data['subsections'][$mod_include_data['current_subsection']][0]);
}
// Finally, store this, so that if we're called from the class, it can use it.
$this->_mod_include_data = $mod_include_data;
}
开发者ID:KeiroD,项目名称:Elkarte,代码行数:58,代码来源:ModerationCenter.controller.php
示例4: pre_dispatch
/**
* Set up the context for the announce topic function (action=announce).
* This function is called before the flow is redirected to action_selectgroup() or action_send().
*
* checks the topic announcement permissions and loads the announcement template.
* requires the announce_topic permission.
* uses the Announce template and Post language file.
*/
public function pre_dispatch()
{
global $context, $txt, $topic;
isAllowedTo('announce_topic');
validateSession();
if (empty($topic)) {
fatal_lang_error('topic_gone', false);
}
loadLanguage('Post');
loadTemplate('Announce');
$context['page_title'] = $txt['announce_topic'];
}
开发者ID:KeiroD,项目名称:Elkarte,代码行数:20,代码来源:Announce.controller.php
示例5: isValidSession
/**
* @param $session_db array('user_id' => id, 'current' => 'hash_of_current_time_on_db', 'expire' => 'hash_of_expire_at_on_db')
* @param $current_time String of current DateTime
* @return True if session between has_current_time and $hash_expire_at
*/
public function isValidSession($session_db, $current_time)
{
if (session_status() !== PHP_SESSION_ACTIVE) {
session_start();
}
if (validateSession($user_id, $current_time, $expire_at, $hash_expire_at)) {
return true;
} else {
session_destroy();
return false;
}
}
开发者ID:Hismahil,项目名称:PHPAuth,代码行数:17,代码来源:UserSessionHelper.php
示例6: action_index
/**
* The main admin handling function.
*
* What it does:
* - It initialises all the basic context required for the admin center.
* - It passes execution onto the relevant admin section.
* - If the passed section is not found it shows the admin home page.
* - Accessed by ?action=admin.
*/
public function action_index()
{
global $txt, $context, $scripturl, $modSettings, $settings;
// Make sure the administrator has a valid session...
validateSession();
// Load the language and templates....
loadLanguage('Admin');
loadTemplate('Admin', 'admin');
loadJavascriptFile('admin.js', array(), 'admin_script');
// The Admin functions require Jquery UI ....
$modSettings['jquery_include_ui'] = true;
// No indexing evil stuff.
$context['robot_no_index'] = true;
// Need these to do much
require_once SUBSDIR . '/Menu.subs.php';
require_once SUBSDIR . '/Action.class.php';
// Define the menu structure - see subs/Menu.subs.php for details!
$admin_areas = array('forum' => array('title' => $txt['admin_main'], 'permission' => array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'), 'areas' => array('index' => array('label' => $txt['admin_center'], 'controller' => 'Admin_Controller', 'function' => 'action_home', 'icon' => 'transparent.png', 'class' => 'admin_img_administration'), 'credits' => array('label' => $txt['support_credits_title'], 'controller' => 'Admin_Controller', 'function' => 'action_credits', 'icon' => 'transparent.png', 'class' => 'admin_img_support'), 'maillist' => array('label' => $txt['mail_center'], 'file' => 'ManageMaillist.controller.php', 'controller' => 'ManageMaillist_Controller', 'function' => 'action_index', 'icon' => 'mail.png', 'class' => 'admin_img_mail', 'permission' => array('approve_emails', 'admin_forum'), 'enabled' => in_array('pe', $context['admin_features']), 'subsections' => array('emaillist' => array($txt['mm_emailerror'], 'approve_emails'), 'emailfilters' => array($txt['mm_emailfilters'], 'admin_forum'), 'emailparser' => array($txt['mm_emailparsers'], 'admin_forum'), 'emailtemplates' => array($txt['mm_emailtemplates'], 'approve_emails'), 'emailsettings' => array($txt['mm_emailsettings'], 'admin_forum'))), 'news' => array('label' => $txt['news_title'], 'file' => 'ManageNews.controller.php', 'controller' => 'ManageNews_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_news', 'permission' => array('edit_news', 'send_mail', 'admin_forum'), 'subsections' => array('editnews' => array($txt['admin_edit_news'], 'edit_news'), 'mailingmembers' => array($txt['admin_newsletters'], 'send_mail'), 'settings' => array($txt['settings'], 'admin_forum'))), 'packages' => array('label' => $txt['package'], 'file' => 'Packages.controller.php', 'controller' => 'Packages_Controller', 'function' => 'action_index', 'permission' => array('admin_forum'), 'icon' => 'transparent.png', 'class' => 'admin_img_packages', 'subsections' => array('browse' => array($txt['browse_packages']), 'installed' => array($txt['installed_packages']), 'perms' => array($txt['package_file_perms']), 'options' => array($txt['package_settings']), 'servers' => array($txt['download_packages']), 'upload' => array($txt['upload_packages']))), 'packageservers' => array('label' => $txt['package_servers'], 'file' => 'PackageServers.controller.php', 'controller' => 'PackageServers_Controller', 'function' => 'action_index', 'permission' => array('admin_forum'), 'icon' => 'transparent.png', 'class' => 'admin_img_packages', 'hidden' => true), 'search' => array('controller' => 'Admin_Controller', 'function' => 'action_search', 'permission' => array('admin_forum'), 'select' => 'index'), 'adminlogoff' => array('controller' => 'Admin_Controller', 'function' => 'action_endsession', 'label' => $txt['admin_logoff'], 'enabled' => empty($modSettings['securityDisable']), 'icon' => 'transparent.png', 'class' => 'admin_img_exit'))), 'config' => array('title' => $txt['admin_config'], 'permission' => array('admin_forum'), 'areas' => array('corefeatures' => array('label' => $txt['core_settings_title'], 'file' => 'CoreFeatures.controller.php', 'controller' => 'CoreFeatures_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_corefeatures'), 'featuresettings' => array('label' => $txt['modSettings_title'], 'file' => 'ManageFeatures.controller.php', 'controller' => 'ManageFeatures_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_features', 'subsections' => array('basic' => array($txt['mods_cat_features']), 'layout' => array($txt['mods_cat_layout']), 'pmsettings' => array($txt['personal_messages']), 'karma' => array($txt['karma'], 'enabled' => in_array('k', $context['admin_features'])), 'likes' => array($txt['likes'], 'enabled' => in_array('l', $context['admin_features'])), 'mention' => array($txt['mention']), 'sig' => array($txt['signature_settings_short']), 'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])))), 'serversettings' => array('label' => $txt['admin_server_settings'], 'file' => 'ManageServer.controller.php', 'controller' => 'ManageServer_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_server', 'subsections' => array('general' => array($txt['general_settings']), 'database' => array($txt['database_paths_settings']), 'cookie' => array($txt['cookies_sessions_settings']), 'cache' => array($txt['caching_settings']), 'loads' => array($txt['load_balancing_settings']), 'phpinfo' => array($txt['phpinfo_settings']))), 'securitysettings' => array('label' => $txt['admin_security_moderation'], 'file' => 'ManageSecurity.controller.php', 'controller' => 'ManageSecurity_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_security', 'subsections' => array('general' => array($txt['mods_cat_security_general']), 'spam' => array($txt['antispam_title']), 'badbehavior' => array($txt['badbehavior_title']), 'moderation' => array($txt['moderation_settings_short'], 'enabled' => !empty($modSettings['warning_enable'])))), 'theme' => array('label' => $txt['theme_admin'], 'file' => 'ManageThemes.controller.php', 'controller' => 'ManageThemes_Controller', 'function' => 'action_index', 'custom_url' => $scripturl . '?action=admin;area=theme', 'icon' => 'transparent.png', 'class' => 'admin_img_themes', 'subsections' => array('admin' => array($txt['themeadmin_admin_title']), 'list' => array($txt['themeadmin_list_title']), 'reset' => array($txt['themeadmin_reset_title']), 'themelist' => array($txt['themeadmin_edit_title'], 'active' => array('edit', 'browse')), 'edit' => array($txt['themeadmin_edit_title'], 'enabled' => false), 'browse' => array($txt['themeadmin_edit_title'], 'enabled' => false))), 'current_theme' => array('label' => $txt['theme_current_settings'], 'file' => 'ManageThemes.controller.php', 'controller' => 'ManageThemes_Controller', 'function' => 'action_index', 'custom_url' => $scripturl . '?action=admin;area=theme;sa=list;th=' . $settings['theme_id'], 'icon' => 'transparent.png', 'class' => 'admin_img_current_theme'), 'languages' => array('label' => $txt['language_configuration'], 'file' => 'ManageLanguages.controller.php', 'controller' => 'ManageLanguages_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_languages', 'subsections' => array('edit' => array($txt['language_edit']), 'settings' => array($txt['language_settings']))), 'addonsettings' => array('label' => $txt['admin_modifications'], 'file' => 'AddonSettings.controller.php', 'controller' => 'AddonSettings_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_modifications', 'subsections' => array('general' => array($txt['mods_cat_modifications_misc']))))), 'layout' => array('title' => $txt['layout_controls'], 'permission' => array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum'), 'areas' => array('manageboards' => array('label' => $txt['admin_boards'], 'file' => 'ManageBoards.controller.php', 'controller' => 'ManageBoards_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_boards', 'permission' => array('manage_boards'), 'subsections' => array('main' => array($txt['boardsEdit']), 'newcat' => array($txt['mboards_new_cat']), 'settings' => array($txt['settings'], 'admin_forum'))), 'postsettings' => array('label' => $txt['manageposts'], 'file' => 'ManagePosts.controller.php', 'controller' => 'ManagePosts_Controller', 'function' => 'action_index', 'permission' => array('admin_forum'), 'icon' => 'transparent.png', 'class' => 'admin_img_posts', 'subsections' => array('posts' => array($txt['manageposts_settings']), 'bbc' => array($txt['manageposts_bbc_settings']), 'censor' => array($txt['admin_censored_words']), 'topics' => array($txt['manageposts_topic_settings']))), 'smileys' => array('label' => $txt['smileys_manage'], 'file' => 'ManageSmileys.controller.php', 'controller' => 'ManageSmileys_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_smiley', 'permission' => array('manage_smileys'), 'subsections' => array('editsets' => array($txt['smiley_sets']), 'addsmiley' => array($txt['smileys_add'], 'enabled' => !empty($modSettings['smiley_enable'])), 'editsmileys' => array($txt['smileys_edit'], 'enabled' => !empty($modSettings['smiley_enable'])), 'setorder' => array($txt['smileys_set_order'], 'enabled' => !empty($modSettings['smiley_enable'])), 'editicons' => array($txt['icons_edit_message_icons'], 'enabled' => !empty($modSettings['messageIcons_enable'])), 'settings' => array($txt['settings']))), 'manageattachments' => array('label' => $txt['attachments_avatars'], 'file' => 'ManageAttachments.controller.php', 'controller' => 'ManageAttachments_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_attachment', 'permission' => array('manage_attachments'), 'subsections' => array('browse' => array($txt['attachment_manager_browse']), 'attachments' => array($txt['attachment_manager_settings']), 'avatars' => array($txt['attachment_manager_avatar_settings']), 'attachpaths' => array($txt['attach_directories']), 'maintenance' => array($txt['attachment_manager_maintenance']))), 'managesearch' => array('label' => $txt['manage_search'], 'file' => 'ManageSearch.controller.php', 'controller' => 'ManageSearch_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_search', 'permission' => array('admin_forum'), 'subsections' => array('weights' => array($txt['search_weights']), 'method' => array($txt['search_method']), 'managesphinx' => array($txt['search_sphinx']), 'settings' => array($txt['settings']))), 'managecalendar' => array('label' => $txt['manage_calendar'], 'file' => 'ManageCalendar.controller.php', 'controller' => 'ManageCalendar_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_calendar', 'permission' => array('admin_forum'), 'enabled' => in_array('cd', $context['admin_features']), 'subsections' => array('holidays' => array($txt['manage_holidays'], 'admin_forum', 'enabled' => !empty($modSettings['cal_enabled'])), 'settings' => array($txt['calendar_settings'], 'admin_forum'))), 'managedrafts' => array('label' => $txt['manage_drafts'], 'file' => 'ManageDrafts.controller.php', 'controller' => 'ManageDrafts_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_logs', 'permission' => array('admin_forum'), 'enabled' => in_array('dr', $context['admin_features'])))), 'members' => array('title' => $txt['admin_manage_members'], 'permission' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'manage_permissions', 'admin_forum'), 'areas' => array('viewmembers' => array('label' => $txt['admin_users'], 'file' => 'ManageMembers.controller.php', 'controller' => 'ManageMembers_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_members', 'permission' => array('moderate_forum'), 'subsections' => array('all' => array($txt['view_all_members']), 'search' => array($txt['mlist_search']))), 'membergroups' => array('label' => $txt['admin_groups'], 'file' => 'ManageMembergroups.controller.php', 'controller' => 'ManageMembergroups_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_membergroups', 'permission' => array('manage_membergroups'), 'subsections' => array('index' => array($txt['membergroups_edit_groups'], 'manage_membergroups'), 'add' => array($txt['membergroups_new_group'], 'manage_membergroups'), 'settings' => array($txt['settings'], 'admin_forum'))), 'permissions' => array('label' => $txt['edit_permissions'], 'file' => 'ManagePermissions.controller.php', 'controller' => 'ManagePermissions_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_permissions', 'permission' => array('manage_permissions'), 'subsections' => array('index' => array($txt['permissions_groups'], 'manage_permissions'), 'board' => array($txt['permissions_boards'], 'manage_permissions'), 'profiles' => array($txt['permissions_profiles'], 'manage_permissions'), 'postmod' => array($txt['permissions_post_moderation'], 'manage_permissions', 'enabled' => $modSettings['postmod_active']), 'settings' => array($txt['settings'], 'admin_forum'))), 'ban' => array('label' => $txt['ban_title'], 'file' => 'ManageBans.controller.php', 'controller' => 'ManageBans_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_ban', 'permission' => 'manage_bans', 'subsections' => array('list' => array($txt['ban_edit_list']), 'add' => array($txt['ban_add_new']), 'browse' => array($txt['ban_trigger_browse']), 'log' => array($txt['ban_log']))), 'regcenter' => array('label' => $txt['registration_center'], 'file' => 'ManageRegistration.controller.php', 'controller' => 'ManageRegistration_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_regcenter', 'permission' => array('admin_forum', 'moderate_forum'), 'subsections' => array('register' => array($txt['admin_browse_register_new'], 'moderate_forum'), 'agreement' => array($txt['registration_agreement'], 'admin_forum'), 'reservednames' => array($txt['admin_reserved_set'], 'admin_forum'), 'settings' => array($txt['settings'], 'admin_forum'))), 'sengines' => array('label' => $txt['search_engines'], 'enabled' => in_array('sp', $context['admin_features']), 'file' => 'ManageSearchEngines.controller.php', 'controller' => 'ManageSearchEngines_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_engines', 'permission' => 'admin_forum', 'subsections' => array('stats' => array($txt['spider_stats']), 'logs' => array($txt['spider_logs']), 'spiders' => array($txt['spiders']), 'settings' => array($txt['settings']))), 'paidsubscribe' => array('label' => $txt['paid_subscriptions'], 'enabled' => in_array('ps', $context['admin_features']), 'file' => 'ManagePaid.controller.php', 'controller' => 'ManagePaid_Controller', 'icon' => 'transparent.png', 'class' => 'admin_img_paid', 'function' => 'action_index', 'permission' => 'admin_forum', 'subsections' => array('view' => array($txt['paid_subs_view']), 'settings' => array($txt['settings']))))), 'maintenance' => array('title' => $txt['admin_maintenance'], 'permission' => array('admin_forum'), 'areas' => array('maintain' => array('label' => $txt['maintain_title'], 'file' => 'Maintenance.controller.php', 'controller' => 'Maintenance_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_maintain', 'subsections' => array('routine' => array($txt['maintain_sub_routine'], 'admin_forum'), 'database' => array($txt['maintain_sub_database'], 'admin_forum'), 'members' => array($txt['maintain_sub_members'], 'admin_forum'), 'topics' => array($txt['maintain_sub_topics'], 'admin_forum'), 'hooks' => array($txt['maintain_sub_hooks_list'], 'admin_forum'), 'attachments' => array($txt['maintain_sub_attachments'], 'admin_forum'))), 'logs' => array('label' => $txt['logs'], 'file' => 'AdminLog.controller.php', 'controller' => 'AdminLog_Controller', 'function' => 'action_index', 'icon' => 'transparent.png', 'class' => 'admin_img_logs', 'subsections' => array('errorlog' => array($txt['errlog'], 'admin_forum', 'enabled' => !empty($modSettings['enableErrorLogging']), 'url' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc'), 'adminlog' => array($txt['admin_log'], 'admin_forum', 'enabled' => in_array('ml', $context['admin_features'])), 'modlog' => array($txt['moderation_log'], 'admin_forum', 'enabled' => in_array('ml', $context['admin_features'])), 'banlog' => array($txt['ban_log'], 'manage_bans'), 'spiderlog' => array($txt['spider_logs'], 'admin_forum', 'enabled' => in_array('sp', $context['admin_features'])), 'tasklog' => array($txt['scheduled_log'], 'admin_forum'), 'badbehaviorlog' => array($txt['badbehavior_log'], 'admin_forum', 'enabled' => !empty($modSettings['badbehavior_enabled']), 'url' => $scripturl . '?action=admin;area=logs;sa=badbehaviorlog;desc'), 'pruning' => array($txt['pruning_title'], 'admin_forum'))), 'scheduledtasks' => array('label' => $txt['maintain_tasks'], 'file' => 'ManageScheduledTa
|
请发表评论