2013-06-17 06:13:38 +00:00
|
|
|
<?php
|
2013-06-15 14:01:11 +00:00
|
|
|
|
2013-06-17 06:13:38 +00:00
|
|
|
require( '../config.php' );
|
|
|
|
require( '../../ams_lib/libinclude.php' );
|
2013-06-15 14:01:11 +00:00
|
|
|
|
2013-06-17 06:13:38 +00:00
|
|
|
if ( isset( $_POST["function"] ) ){
|
|
|
|
require( "inc/" . $_POST["function"] . ".php" );
|
|
|
|
$return = $_POST["function"]();
|
|
|
|
}
|
2013-06-15 14:01:11 +00:00
|
|
|
|
2013-06-17 06:13:38 +00:00
|
|
|
function loadpage ( $page ){
|
|
|
|
require_once( 'autoload/' . $page . '.php' );
|
|
|
|
}
|
2013-06-15 14:01:11 +00:00
|
|
|
|
2013-06-17 14:29:20 +00:00
|
|
|
$page = 'login';
|
2013-06-17 06:13:38 +00:00
|
|
|
if ( isset( $_GET["page"] ) ){
|
|
|
|
$page = $_GET["page"];
|
|
|
|
}
|
2013-06-15 14:01:11 +00:00
|
|
|
|
2013-06-17 14:29:20 +00:00
|
|
|
//Page Handling
|
|
|
|
if($page == 'login' || $page == 'register'){
|
|
|
|
$no_visible_elements = 'TRUE';
|
|
|
|
}
|
|
|
|
// temporary set permission to 2 which = admin mode
|
|
|
|
$return = array( 'permission' => 1, 'no_visible_elements' => $no_visible_elements );
|
2013-06-15 14:01:11 +00:00
|
|
|
|
2013-06-17 06:13:38 +00:00
|
|
|
helpers :: loadTemplate( $page , $return );
|