<?php
//定义回调URL通用的URL
define('URL_CALLBACK', 'http://'.$_SERVER['SERVER_NAME'].'/index.php?m=account&a=qq_callback&type=');
require_once './data/db.php';
require_once './data/site.php';
return array(
	//'配置项'=>'配置值'
	'TMPL_L_DELIM'=>'{feimao.',
	'TMPL_R_DELIM'=>'}',
	'DEFAULT_MODULE'     => 'Index', //默认模块
    'URL_MODEL'          => '0', //URL模式
    'SESSION_AUTO_START' => true, //是否开启session
    'USER_CONFIG'        => array(
        'USER_AUTH' => true,
        'USER_TYPE' => 2,
    ),
	'APP_GROUP_LIST' => 'Home,wap', //项目分组设定
	'DEFAULT_GROUP'  => 'Home', //默认分组
	'MODULE_ALLOW_LIST' => array('Home'),
	'adminrand'  => 'fengmaodefeimaosoft', //后台登录生成token的依据
	'logint'  => 3600*24, //后台登录生成token的依据
	'adminpagesize'	=> '15',
	'domain'	=> $domain,
	'mobile_domain'	=> $mobile_domain,
	'softname'	=> '飞猫笑话系统',
	'hct_password'	=> '1234567',//火车头发布密码
	'version'	=> '2.0',
	'store_imgsize'	=>	'3145728',		  //图片上传最大size限制
	'store_imgthumb_width'	=>	'50,200', //商品图片缩略图宽度
	'store_imgthumb_height'	=>	'50,200', //商品图片缩略图高度
	'store_imgthumb_prefix' =>	't_,s_',//商品图片缩略图前缀
	'store_default_time' =>	'365',//店铺默认开通天数
	'description_length' => '100',//文章内容描述截取长度
	'default_tpl'   => 'default', //当前模板
	'DB_TYPE'   => 'mysql', // 数据库类型
    'DB_HOST'   => $db_host, // 服务器地址
    'DB_NAME'   => $db_database, // 数据库名
    'DB_USER'   => $db_user, // 用户名
    'DB_PWD'    => $db_password, // 密码
    'DB_PORT'   => $db_port, // 端口
    'DB_PREFIX' => $db_prefix, // 数据库表前缀
	'URL_ROUTER_ON'   => true, //开启路由
	'URL_ROUTE_RULES' => array( //定义路由规则
	//'/ceshi.html'=>'/Index/ceshi.html',
	//'/^Search\/(\w+)$/'=>'Search/index?domain=:1', 
	'/^article\/(.*)$/'          => 'article/view?id=:1',
	'/^list\/(.*)$/'          => 'goods/list?id=:1',
	'/^h24$/'          => 'Index/h24',
	'/^history$/'          => 'Index/history',
	'/^history\/(.*)\/(.*)$/'          => 'Index/history?token=:1&p=:2',
	'/^h24\/(.*)$/'          => 'Index/h24?p=:1',
	'/^p\/(.*)$/'          => 'Index/index?p=:1',
	'/^add$/'          => 'account/add',
	'/^user\/(.*)\/(.*)$/'          => 'user/index?id=:1&app=:2',
	'/^user\/(.*)$/'          => 'user/index?id=:1',
	'/^pic\/(.*)$/'          => 'pic/index?p=:1',
	'/^pic$/'          => 'pic/index',
	'/^pichot\/(.*)$/'          => 'pic/pichot?p=:1',
	'/^pichot$/'          => 'pic/pichot',
	'/^text\/(.*)$/'          => 'text/index?p=:1',
	'/^text$/'          => 'text/index',
	'/^texthot\/(.*)$/'          => 'text/texthot?p=:1',
	'/^texthot$/'          => 'text/texthot',
	'/^video\/(.*)$/'          => 'video/index?p=:1',
	'/^video$/'          => 'video/index',
	'/^videohot\/(.*)$/'          => 'video/videohot?p=:1',
	'/^videohot$/'          => 'video/videohot',
	'/^tags\/(.*)$/'          => 'tags/index?p=:1',
	'/^tags$/'          => 'tags/index',
	'/^tag\/(.*)$/'          => 'tag/index?t=:1',
	), 
	'APP_SUB_DOMAIN_DEPLOY'=>1,// 开启子域名配置
	'APP_SUB_DOMAIN_RULES'    =>    array(   
    $mobile_domain  => array('wap/'),  // admin.domain1.com域名指向Admin模块
	),
	/*子域名配置 
    *格式如: '子域名'=>array('分组名/[模块名]','var1=a&var2=b'); 
    */ 
	'cookie_t_admin' => 'feimao_',//后台cookie前缀
	'cookie_t_home' => 'feimao_xiaohua_',//前台cookie前缀
	//'TMPL_ACTION_ERROR'     =>  'App/Tpl/Public/error.html', // 默认错误跳转对应的模板文件
	//'TMPL_ACTION_SUCCESS'   =>  'App/Tpl/Public/success.html', // 默认成功跳转对应的模板文件
	//'TMPL_EXCEPTION_FILE'   =>  'App/Tpl/Public/exception.html',// 异常页面的模板文件
    //更多配置参数
    //...
	//腾讯QQ登录配置
	'THINK_SDK_QQ' => array(
		'APP_KEY'    => $qq_app_key, //应用注册成功后分配的 APP ID
		'APP_SECRET' => $qq_app_secret, //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'qq',
	),
	//腾讯微博配置
	'THINK_SDK_TENCENT' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'tencent',
	),
	//新浪微博配置
	'THINK_SDK_SINA' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'sina',
	),
	//网易微博配置
	'THINK_SDK_T163' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 't163',
	),
	//人人网配置
	'THINK_SDK_RENREN' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'renren',
	),
	//360配置
	'THINK_SDK_X360' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'x360',
	),
	//豆瓣配置
	'THINK_SDK_DOUBAN' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'douban',
	),
	//Github配置
	'THINK_SDK_GITHUB' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'github',
	),
	//Google配置
	'THINK_SDK_GOOGLE' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'google',
	),
	//MSN配置
	'THINK_SDK_MSN' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'msn',
	),
	//点点配置
	'THINK_SDK_DIANDIAN' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'diandian',
	),
	//淘宝网配置
	'THINK_SDK_TAOBAO' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'taobao',
	),
	//百度配置
	'THINK_SDK_BAIDU' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'baidu',
	),
	//开心网配置
	'THINK_SDK_KAIXIN' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'kaixin',
	),
	//搜狐微博配置
	'THINK_SDK_SOHU' => array(
		'APP_KEY'    => '', //应用注册成功后分配的 APP ID
		'APP_SECRET' => '', //应用注册成功后分配的KEY
		'CALLBACK'   => URL_CALLBACK . 'sohu',
	),
);
?>