<?php
/*-------------------------------------
	版权所有：南京牛昆网络科技有限公司（TEL-15896098989）
	程序版本：1.0
	更新日期：2015-05-10  
-------------------------------------*/
class api
{
	private $apipath;

	function __construct()
	{
		global $la_site,$LA;

		$this->apipath=SYSTEM_ROOT.'api/';
		$alls=glob($this->apipath.'*');
		$files=glob($this->apipath.'*.*');
		$results=array_diff($alls,$files);
		foreach($results as $path)
		{
			$langname=basename($path).'lang';
			global $$langname;

			if(is_file($path.'/lang/'.$la_site['lang'].'.lang.php'))
			{
				include $path.'/lang/'.$la_site['lang'].'.lang.php';
			}
			else if(is_file($path.'/lang/cn.lang.php'))
			{
				include $path.'/lang/cn.lang.php';
			}

			if(is_file($path.'/api.php'))
			{
				include $path.'/api.php';
			}
		}
	}
}
?>
