<?php
/*
 * 乐兔淘购物分享系统_核心文件
 * @copyright (c) 2010-2015 Tuntron All Rights Reserved
 * @Email:70020765@qq.com
 */
defined('IN_TS') or die('Access Denied.');
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
@set_magic_quotes_runtime(0);

session_start();

//前台用户基本数据,$TS_USER数组
$TS_USER = array(
	'user'		=> isset($_SESSION['tsuser']) ? $_SESSION['tsuser'] : '',
	'admin'		=> isset($_SESSION['tsadmin']) ? $_SESSION['tsadmin'] : '',
);
//加载基础函数
require_once LETUTAO.'/fun.base.php';
//开始处理url路由
reurl();

//处理过滤
if (!get_magic_quotes_gpc()) {     
	Add_S($_POST);
	Add_S($_GET);
}

function Add_S(&$array){
	if (is_array($array)) {        
		foreach ($array as $key => $value) {             
			if (!is_array($value)) {                 
				$array[$key] = addslashes($value);             
			} else {                 
				Add_S($array[$key]);             
			}        
		}
	} 
}


$app = empty($_GET['app']) ? 'faxian' :$_GET['app'];
$ac = empty($_GET['ac']) ?  'index':$_GET['ac'];

$subcate = _get('subcate','h','');
	if(!IsUTF8($subcate)){
		$subcate = mb_convert_encoding($subcate,'utf-8','gbk');
	}

//安装
$install = empty($_GET['install']) ? 'index' :  $_GET['install'];

$ts	= empty($_GET['ts']) ? '' :$_GET['ts'];
$le = empty($_GET['le']) ? '':$_GET['le'];
//Admin管理专用
$mg	= isset($_GET['mg']) ? $_GET['mg'] : 'index';
//Api专用
$api	= isset($_GET['api']) ? $_GET['api'] : 'index';

//plugin专用
$plugin = isset($_GET['plugin']) ? $_GET['plugin'] : '';
//plugin专用
$in = isset($_GET['in']) ? $_GET['in'] : '';

//语言包专用
$hl = isset($_GET['hl']) ? $_GET['hl'] : 'zh_cn';

header('Content-Type: text/html; charset=UTF-8');

//加载软件信息
$TS_SOFT['info'] = array(
	'name'	=>	'乐兔淘',
	'version'	=>	'2.3',
	'url'		=>	'http://www.letushuo.com/',
	'email'	=>	'70020765@qq.com',
	'copyright' =>	'letutao',
	'year'		=>	'2013 - 2014',
	'author'	=>	'Chengzi',
);