<?php

define('WAPINDEX',1);
define('WAPMOBAN','default');

include('../comm/dd.config55.php');
include (DDROOT.'/comm/checkpostandget.php');
include (DDROOT . '/wap/header.act.php');

define('TPLPATH',DDROOT.'/wap/template/'.WAPMOBAN);
define('TPLURL',SITEURL.'/template/'.WAPMOBAN);
setcookie('mobile', 'yes');
$mod_act_arr = array (
	'index' => array (
		'index',
	),
	'jump' => array (
		'shop'
	),
	'tao' => array (
		'list',
		'view'
	),
	'category'=>array(
		'index',
	),
	'user' => array (
		'index',
		'login',
		'register',
		'info',
		'msg',
		'account',
		'order',
		'submsg',
		'tixian',
		'pwd',
		'exit',
	),
	'data'=>array(
		'index',
		'slides',
		'gy',
		'index_cat',
		'dazhe_q',
		'sj',
	),
	'update'=>array(
		'check',
	),
);

if(!in_array(ACT,$mod_act_arr[MOD])){
	dd_exit('miss mod act!网站升级中。。。预计完成时间2016.5.4日早8点！');
}

$file_name=MOD.'.mod.php';
include(DDROOT.'/wap/'.$file_name);



$mod_name=mod_name($mod,$act);


if (is_file(DDROOT . '/wap/template/' . WAPMOBAN . '/' . $mod_name . '.tpl.php')) {
	$tpl_dir_name=DDROOT . '/wap/template/' . WAPMOBAN . '/' . $mod_name . '.tpl.php';
	include ($tpl_dir_name); //引入模板
}


if(MOD=='user'){ //user模块特别处理
	if($act=='login' || $act=='register' || $act=='getpassword' || $act=='jihuo'){
	    if($_COOKIE['userlogininfo']!=''){
            jump('index.php','您已经在登陆状态');
        }
	}
	else{
	    if($_COOKIE['userlogininfo']==''){
            jump(u('user','login'),'您还没有登陆或登录超时');
        }
	}
}


$duoduo->close();
unset($duoduo);
unset($ddTaoapi);
unset($webset);
exit;
?>