khanat-code-old/code/ryzom/tools/server/ryzom_ams/www/html/index.php

36 lines
872 B
PHP
Raw Normal View History

2013-06-17 14:03:24 +00:00
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'on');
2013-06-17 14:03:24 +00:00
require( '../config.php' );
require( '../../ams_lib/libinclude.php' );
//default page
$page = 'login';
2013-06-17 14:03:24 +00:00
2013-06-17 14:03:24 +00:00
if ( isset( $_POST["function"] ) ){
require( "inc/" . $_POST["function"] . ".php" );
$tempReturn = $_POST["function"]();
}
2013-06-17 14:03:24 +00:00
function loadpage ( $page ){
require_once( 'autoload/' . $page . '.php' );
}
if ( isset( $_GET["page"] ) ){
$page = $_GET["page"];
}
//Page Handling
if($page == 'login' || $page == 'register'){
$no_visible_elements = 'TRUE';
}
if ( isset($functionReturn) ){
$return = array_merge(array( 'permission' => 1, 'no_visible_elements' => $no_visible_elements ),$functionReturn);
}else{
$return = array( 'permission' => 1, 'no_visible_elements' => $no_visible_elements );
}
//print_r($return);
2013-06-17 14:03:24 +00:00
helpers :: loadTemplate( $page , $return );