input->clean_array_gpc('r', array('redirect' => TYPE_NOHTML)); # Not sure where this comes from
if (!empty($vbulletin->GPC['redirect']))
{
define('CP_REDIRECT', $vbulletin->GPC['redirect']);
print_stop_message('redirecting_please_wait');
}
// #############################################################################
// ############################### LOG OUT OF CP ###############################
// #############################################################################
if ($_REQUEST['do'] == 'cplogout')
{
vbsetcookie('cpsession', '', false, true, true);
$db->query_write("DELETE FROM " . TABLE_PREFIX . "cpsession WHERE userid = " . $vbulletin->userinfo['userid'] . " AND hash = '" . $db->escape_string($vbulletin->GPC[COOKIE_PREFIX . 'cpsession']) . "'");
if (!empty($vbulletin->session->vars['sessionurl_js']))
{
exec_header_redirect('index.php?' . $vbulletin->session->vars['sessionurl_js']);
}
else
{
exec_header_redirect('index.php');
}
}
if (empty($_REQUEST['do']))
{
$_REQUEST['do'] = 'frames';
}
if ($_REQUEST['do'] == 'frames')
{
$vbulletin->input->clean_array_gpc('r', array(
'loc' => TYPE_NOHTML
));
$navframe = '\n";
$headframe = '\n";
$mainframe = '\n";
?>

\n\n
\n";
construct_nav_spacer();
// *************************************************
if (can_moderate(0, 'canannounce'))
{
construct_nav_option($vbphrase['post_new_announcement'], 'announcement.php?do=add');
construct_nav_option($vbphrase['forum_manager'], 'forum.php?do=modify');
construct_nav_group($vbphrase['announcements']);
construct_nav_spacer();
}
// *************************************************
$canmoderate = false;
if (can_moderate(0, 'canmoderateposts'))
{
$canmoderate = true;
construct_nav_option($vbphrase['moderate_threads'], 'moderate.php?do=posts');
construct_nav_option($vbphrase['moderate_posts'], 'moderate.php?do=posts#posts');
}
if (can_moderate(0, 'canmoderateattachments'))
{
$canmoderate = true;
construct_nav_option($vbphrase['moderate_attachments'], 'moderate.php?do=attachments');
}
if (can_moderate_calendar())
{
$canmoderate = true;
construct_nav_option($vbphrase['moderate_events'], 'moderate.php?do=events');
}
if (can_moderate(0, 'canmoderatevisitormessages'))
{
$canmoderate = true;
construct_nav_option($vbphrase['moderate_visitor_messages'], 'moderate.php?do=messages');
}
if ($canmoderate)
{
construct_nav_group($vbphrase['moderation']);
construct_nav_spacer();
}
// *************************************************
$canuser = false;
if (can_moderate(0, 'canunbanusers') OR can_moderate(0, 'canbanusers') OR can_moderate(0, 'canviewprofile') OR can_moderate(0, 'caneditsigs') OR can_moderate(0, 'caneditavatar'))
{
$canuser = true;
construct_nav_option($vbphrase['search_for_users'],'user.php?do=find');
}
if (can_moderate(0, 'canbanusers'))
{
$canuser = true;
construct_nav_option($vbphrase['ban_user'], 'banning.php?do=banuser');
}
if (can_moderate(0, 'canunbanusers') OR can_moderate(0, 'canbanusers'))
{
$canuser = true;
construct_nav_option($vbphrase['view_banned_users'], 'banning.php?do=modify');
}
if (can_moderate(0, 'canviewips'))
{
$canuser = true;
construct_nav_option($vbphrase['search_ip_addresses'], 'user.php?do=doips');
}
if ($canuser)
{
construct_nav_group($vbphrase['users']);
construct_nav_spacer();
}
// *************************************************
if ($groupleader = $db->query_first("SELECT userid FROM " . TABLE_PREFIX . "usergroupleader WHERE userid = " . $vbulletin->userinfo['userid']) OR ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']))
{
construct_nav_option($vbphrase['join_requests'], 'user.php?do=viewjoinrequests');
construct_nav_group($vbphrase['usergroups']);
construct_nav_spacer();
}
// *************************************************
$canmass = false;
if (can_moderate(0, 'canmassmove'))
{
$canmass = true;
construct_nav_option($vbphrase['move'], 'thread.php?do=move');
}
if (can_moderate(0, 'canmassprune'))
{
$canmass = true;
construct_nav_option($vbphrase['prune'], 'thread.php?do=prune');
}
if ($canmass)
{
construct_nav_group($vbphrase['thread']);
construct_nav_spacer();
}
($hook = vBulletinHook::fetch_hook('mod_index_navigation')) ? eval($hook) : false;
print_nav_panel();
echo "
\n";
// *************************************************
define('NO_CP_COPYRIGHT', true);
unset($DEVDEBUG);
print_cp_footer();
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 11:41, Wed Jan 13th 2010
|| # CVS: $RCSfile$ - $Revision: 1268 $ 32878
|| ####################################################################
\*======================================================================*/
?>