예제 #1
0
파일: navbar.php 프로젝트: 0hyeah/yurivn
 /**
  * Renders the navigation tabs & links.
  */
 protected function getNavigation()
 {
     global $vbulletin;
     $root = '';
     $root_tab = $roots['vbtab_forum'];
     $tabs = build_navigation_menudata();
     $roots = get_navigation_roots(build_navigation_list());
     $request_tab = intval($_REQUEST['tabid']);
     $script_tab = get_navigation_tab_script();
     $hook_tabid = $tabid = 0;
     ($hook = vBulletinHook::fetch_hook('set_navigation_tab_vbview')) ? eval($hook) : false;
     if ($root) {
         $tabid = $roots[$root];
     }
     /* Tab setting logic, using above choices. Preference order
     		is (low > high) root > script > hookroot > hookid > request */
     $current_tab = $script_tab ? $script_tab : $root_tab;
     $current_tab = $tabid ? $tabid : $current_tab;
     $current_tab = $hook_tabid ? $hook_tabid : $current_tab;
     $current_tab = $request_tab ? $request_tab : $current_tab;
     $tabid = set_navigation_tab($current_tab, $tabs);
     $view = new vB_View('navbar_tabs');
     $view->tabs = $tabs;
     $view->selected = $tabid;
     return $view->render();
 }
예제 #2
0
// ############################# LOG ACTION ###############################
$vbulletin->input->clean_array_gpc('r', array('navid' => TYPE_UINT, 'tabid' => TYPE_UINT));
if (empty($_REQUEST['do'])) {
    $_REQUEST['do'] = 'list';
}
log_admin_action('navid = ' . $vbulletin->GPC['navid'] . ', tabid = ' . $vbulletin->GPC['tabid']);
require_once DIR . '/includes/adminfunctions_language.php';
if ($_REQUEST['do'] == 'list') {
    $navlist = build_navigation_list(true, $vbulletin->GPC['tabid']);
    if ($vbulletin->GPC_exists['tabid']) {
        if (!$navlist[$vbulletin->GPC['tabid']]) {
            print_stop_message('invalid_tabid');
        }
    }
} else {
    $navlist = build_navigation_list(false, $vbulletin->GPC['tabid']);
    if ($vbulletin->GPC_exists['navid']) {
        $navelement = $navlist[$vbulletin->GPC['navid']];
        if (!$navelement['navid']) {
            print_stop_message('invalid_navid');
        } else {
            expand_navigation_state($navelement);
        }
    }
}
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
print_cp_header($vbphrase['navigation_manager']);
($hook = vBulletinHook::fetch_hook('navigation_admin_start')) ? eval($hook) : false;
if ($_REQUEST['do'] == 'list') {
예제 #3
0
function debug_navigation_array($bypass = false)
{
    $navlist = build_navigation_list($bypass);
    foreach ($navlist as $navdata) {
        if ($navdata) {
            if ($navdata['navtype'] == 'tab') {
                echo str_repeat('-', 30) . '<br />';
            }
            echo str_repeat('-----', $navdata['level']);
            echo strtoupper($navdata['navtype']) . ': ';
            echo $navdata['navid'] . ': ';
            echo $navdata['text'] . ': URL = ';
            echo $navdata['url'] . '<br />';
        }
    }
    vbstop('End of Navlist Data', 0, 0);
}
예제 #4
0
파일: forum.php 프로젝트: 0hyeah/yurivn
define('CSRF_SKIP_LIST', '');
define('VB_ENTRY', 'forum.php');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('activitystream', 'holiday');
// get special data templates from the datastore
$specialtemplates = array('userstats', 'birthdaycache', 'maxloggedin', 'iconcache', 'eventcache', 'mailqueue', 'activeblocks');
// pre-cache templates used by all actions
$globaltemplates = array('ad_board_after_forums', 'ad_board_below_whats_going_on', 'block_activitystream', 'block_blogentries', 'block_cmsarticles', 'block_newposts', 'block_sgdiscussions', 'block_tagcloud', 'block_threads', 'block_html', 'FORUMHOME', 'forumhome_event', 'forumhome_subforums', 'forumhome_forumbit_level1_nopost', 'forumhome_forumbit_level1_post', 'forumhome_forumbit_level2_nopost', 'forumhome_forumbit_level2_post', 'forumhome_lastpostby', 'tag_cloud_link');
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once './global.php';
// Redirect if required
if (VB_REDIRECT === true) {
    $tabid = get_navigation_default(build_navigation_list(), false);
    if ($url = get_navigation_url($tabid)) {
        exec_header_redirect($url);
    }
}
require_once DIR . '/includes/functions_bigthree.php';
require_once DIR . '/includes/functions_forumlist.php';
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
verify_forum_url($vbulletin->options['forumhome']);
($hook = vBulletinHook::fetch_hook('forumhome_start')) ? eval($hook) : false;
// get permissions to view forumhome
if (!($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])) {
    print_no_permission();
}