Ejemplo n.º 1
0
Archivo: index.php Proyecto: mmr/b1n
require b1n_PATH_LIB . '/crypt.lib.php';
// Crypto Library
require b1n_PATH_LIB . '/permission.lib.php';
// Login Library
require b1n_PATH_LANG . '/lang.lib.php';
// Language Configuration
require b1n_PATH_LIB . '/session.lib.php';
// Session Management
// Includes
$inc = array();
//------------------------------------------
// Getting vars from $_REQUEST
b1n_getVar('page', $data['page']);
b1n_getVar('action', $data['action']);
// Checking if the player is already logged in
if (b1n_isLogged()) {
    // Yes, the player is logged in, show the MENU along with the asked page
    // If none was asked, show map page
    $inc[] = b1n_PATH_INC . '/menu.inc.php';
    switch ($data['page']) {
        case 'player':
        case 'map':
        case 'history':
        case 'help':
            $inc[] = $data['page'] . '/index.php';
            break;
        case 'logout':
            b1n_logOut();
            $inc = array(b1n_PATH_INC . '/login.inc.php');
            break;
        default:
Ejemplo n.º 2
0
Archivo: index.php Proyecto: mmr/b1n
require b1n_LIBPATH . '/debug.lib.php';
// Debug System
$sql = new sqlLink();
$inc = '';
$ret_msgs = array();
$logging = false;
$page0_title = '';
$page1_title = '';
b1n_getVar('page0', $page0);
b1n_getVar('page1', $page1);
b1n_getVar('action0', $action0);
b1n_getVar('action1', $action1);
session_start();
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
if (!b1n_isLogged() && !b1n_doLogin($sql, $ret_msgs, $logging)) {
    $inc = b1n_INCPATH . '/login.inc.php';
} else {
    switch ($page0) {
        case 'admin':
        case 'itinerary':
        case 'agent':
        case 'pax':
        case 'data':
        case 'bookmark':
        case 'docs':
            $inc = $page0 . '/index.php';
            break;
        case 'init':
        case 'topmenu':
        case 'footer':