<?php

/**
 *--------------------------------------
 * api demo
 *--------------------------------------
 * @project		: api
 * @author		: cblee
 * @created		: 2014-05-14
 * @copyright	: (c)2014 AsThis
 *--------------------------------------
 */

exit; // remove this line
define('APP_NAME', 'api');
define('APP_PATH', dirname(dirname(__FILE__)).'/_app');
define('PFA_PATH', dirname(dirname(__FILE__)).'/_pfa');

define('ROOT_PATH', dirname(dirname(__FILE__))); // the main app path
define('APP_ROOT', '/'); // the main app root url

require(PFA_PATH.'/pfa.php');

/* App */
new App();
$app = A();

$timeKey = NOW_TIME;
$_TK = array('timeKey' => $timeKey, 'token' => substr(md5(UUID.AServer::get_clientId().$timeKey), 8, 8));
$app->assign('_TK', $_TK);

$app->assign('_SITE',get_varSite());
$app->assign('_G', get_varG());
$app->assign('_LS', get_langset());
$app->assign('_PS', get_platformset());

/* do something */
// header("Content-type:text/html;charset=utf-8");

?>