<?php
/**
 *  api.php API入口
 *
 * @copyright			(C) 2005-2010 NewsTeng Inc.
 * @license				This is NOT a freeware, use is subject to license terms
 * @lastmodify			2010-12-16
   $Id: api.php 2 2010-12-16 10:59:13Z xuchao $
 */
define('XTCMS_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
include './source/base.php';
$param = base::load_sys_class('param');

$op = isset($_GET['op']) && trim($_GET['op']) ? trim($_GET['op']) : exit('Operation can not be empty');
if (!preg_match('/([^a-z_]+)/i',$op) && file_exists('api'.DIRECTORY_SEPARATOR.$op.'.php')) {
	include 'api'.DIRECTORY_SEPARATOR.$op.'.php';
} else {
	exit('API handler does not exist');
}
?>