コード例 #1
0
ファイル: cms.php プロジェクト: erico-deh/ocPortal
 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_code('templates_donext');
     require_code('menus');
     require_all_lang();
     if ((!has_specific_permission(get_member(), 'avoid_simplified_adminzone_look') || $GLOBALS['FORUM_DRIVER']->is_super_admin(get_member())) && num_staff_icons() < MIN_STAFF_ICONS_BEFORE_COLLAPSE) {
         return do_next_manager_admin_simplified();
     }
     return do_next_manager_hooked('CMS_ZONE', 'DOC_CMS', 'cms', 'MODULE_TRANS_NAME_cms');
 }
コード例 #2
0
/**
 * Get the tempcode for a simplified admin do next manager.
 *
 * @return tempcode		The do next manager
 */
function do_next_manager_admin_simplified()
{
    breadcrumb_set_self(do_lang_tempcode('CMS'));
    $sections = new ocp_tempcode();
    $sections->attach(do_next_manager_hooked('CMS', NULL, 'cms'));
    $sections->attach(do_next_manager_hooked('STRUCTURE', NULL, 'structure'));
    $sections->attach(do_next_manager_hooked('USAGE', NULL, 'usage'));
    $sections->attach(do_next_manager_hooked('STYLE', NULL, 'style'));
    $sections->attach(do_next_manager_hooked('SETUP', NULL, 'setup'));
    $sections->attach(do_next_manager_hooked('TOOLS', NULL, 'tools'));
    $sections->attach(do_next_manager_hooked('SECURITY', NULL, 'security'));
    $GLOBALS['HELPER_PANEL_TEXT'] = do_lang_tempcode('SIMPLIFIED_STAFF_ADMIN');
    return do_template('DO_NEXT_SCREEN', array('INTRO' => '', 'QUESTION' => do_lang_tempcode('WHAT_NEXT'), 'TITLE' => get_page_title(has_zone_access(get_member(), 'adminzone') ? 'ADMIN_ZONE' : 'CMS'), 'SECTIONS' => $sections));
}
コード例 #3
0
ファイル: admin.php プロジェクト: erico-deh/ocPortal
 /**
  * Standard modular run function.
  *
  * @return tempcode	The result of execution.
  */
 function run()
 {
     require_code('templates_donext');
     require_code('menus');
     require_all_lang();
     $type = get_param('type', 'misc');
     if ((!has_specific_permission(get_member(), 'avoid_simplified_adminzone_look') || $GLOBALS['FORUM_DRIVER']->is_super_admin(get_member())) && num_staff_icons() < MIN_STAFF_ICONS_BEFORE_COLLAPSE) {
         if ($type == 'misc') {
             return do_next_manager_admin_simplified();
         }
     }
     // Warning about whether the Setup Wizard still needs running
     if (get_param_integer('cancel_sw_warn', 0) == 1 || !addon_installed('setupwizard')) {
         set_value('setup_wizard_completed', '1');
     } else {
         $_done_sw_once = get_value('setup_wizard_completed');
         $done_sw_once = !is_null($_done_sw_once);
         if (!$done_sw_once && get_param('page', '') != 'admin_setupwizard' && has_actual_page_access(get_member(), 'admin_setupwizard')) {
             $setup_wizard_url = build_url(array('page' => 'admin_setupwizard'), get_module_zone('admin_setupwizard'));
             $cancel_sw_url = get_self_url(false, false, array('cancel_sw_warn' => 1));
             attach_message(do_lang_tempcode('SETUP_WIZARD_NOT_RUN', escape_html($setup_wizard_url->evaluate()), escape_html($cancel_sw_url->evaluate())), 'notice');
         }
     }
     switch ($type) {
         case 'misc':
             return do_next_manager_hooked('ADMIN_ZONE', 'DOC_ADMIN_ZONE', '');
         case 'structure':
             return do_next_manager_hooked('STRUCTURE', 'DOC_STRUCTURE', 'structure');
         case 'usage':
             return do_next_manager_hooked('USAGE', 'DOC_USAGE', 'usage');
         case 'style':
             return do_next_manager_hooked('STYLE', 'DOC_STYLE', 'style');
         case 'setup':
             return do_next_manager_hooked('SETUP', 'DOC_SETUP', 'setup');
         case 'tools':
             return do_next_manager_hooked('TOOLS', 'DOC_TOOLS', 'tools');
         case 'security':
             return do_next_manager_hooked('SECURITY', 'DOC_SECURITY', 'security');
         case 'search':
             return $this->search();
     }
     return new ocp_tempcode();
 }