Location: PHPKode > projects > TinyCMS > index.php
<?php
/**************************
* TinyCMS.net
* TinyCMS - Simple, quick CMS
**************************/

include("inc/config.php");
include("inc/functions.php");
include("inc/custom_conf.php");

  if ($_GET['view'] == "admin"){
    include("admin/admin.php");
  } else {
  
    if(!isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
    	ob_start();
    	@include 'tpl/wsl.tpl';
    	$page_content = ob_get_contents();
    	ob_end_clean();
    
    	echo $page_content;
    }
    else {
    	header('content-type: application/json; charset=utf-8');
    
    	$page_data = array('pageName' => $_GET['page'], 'content' => '');
    
    	ob_start();
    	@include 'tpl/' . $_GET['page'] . '.html';
    	$page_data['content'] = ob_get_contents();
    	ob_end_clean();
    
    	echo json_encode($page_data);
    }
  
  }

?>
Return current item: TinyCMS