update($_GET['act']);
if ( !$session->sess_info['user_id'] ) {
$functions->redir_to_login();
} else {
//
// Include the page header
//
require(ROOT_PATH.'sources/page_head.php');
switch ( $_GET['act'] ) {
case 'subscriptions':
$location = $lang['Subscriptions'];
break;
case 'editprofile':
$location = $lang['EditProfile'];
break;
case 'editoptions':
$location = $lang['EditOptions'];
break;
case 'editpwd':
$location = $lang['EditPasswd'];
break;
}
$template->add_breadcrumb($lang['YourPanel'], array('panel.php'));
if ( $_GET['act'] != 'panel_home' )
$template->add_breadcrumb($location);
$template->parse('menu', 'panel', array(
'panel_home' => '' . ( ( $_GET['act'] != 'panel_home' ) ? $lang['PanelHome'] : ''.$lang['PanelHome'].'' ) . '',
'panel_subscriptions' => '' . ( ( $_GET['act'] != 'subscriptions' ) ? $lang['Subscriptions'] : ''.$lang['Subscriptions'].'' ) . '',
'view_profile' => ''.$lang['ViewProfile'].'',
'panel_profile' => '' . ( ( $_GET['act'] != 'editprofile' ) ? $lang['EditProfile'] : ''.$lang['EditProfile'].'' ) . '',
'panel_options' => '' . ( ( $_GET['act'] != 'editoptions' ) ? $lang['EditOptions'] : ''.$lang['EditOptions'].'' ) . '',
'panel_passwd' => '' . ( ( $_GET['act'] != 'editpwd' ) ? $lang['EditPasswd'] : ''.$lang['EditPasswd'].'' ) .''
));
if ( !empty($_SESSION['panel_msg']) ) {
$template->parse('msgbox', 'global', array(
'box_title' => $lang['Note'],
'content' => $_SESSION['panel_msg']
));
unset($_SESSION['panel_msg']);
}
switch ( $_GET['act'] ) {
case 'panel_home':
require(ROOT_PATH.'sources/panel_home.php');
break;
case 'editprofile':
require(ROOT_PATH.'sources/panel_profile.php');
break;
case 'editoptions':
require(ROOT_PATH.'sources/panel_options.php');
break;
case 'editpwd':
require(ROOT_PATH.'sources/panel_editpwd.php');
break;
case 'subscriptions':
require(ROOT_PATH.'sources/panel_subscriptions.php');
break;
}
//
// Include the page footer
//
require(ROOT_PATH.'sources/page_foot.php');
}
} else {
$functions->redirect('index.php');
}
?>