You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<?php
|
|
|
|
|
namespace Site\Controller;
|
|
|
|
|
|
|
|
|
|
use Think\Controller;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 前台公共控制器
|
|
|
|
|
* 为防止多分组Controller名称冲突,公共Controller名称统一使用分组名称
|
|
|
|
|
*/
|
|
|
|
|
class SiteController extends Controller {
|
|
|
|
|
|
|
|
|
|
/* 空操作,用于输出404页面 */
|
|
|
|
|
public function _empty(){
|
|
|
|
|
$this->redirect('Index/index');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected function _initialize(){
|
|
|
|
|
|
|
|
|
|
if (is_mobile_request()) {
|
|
|
|
|
|
|
|
|
|
C('DEFAULT_THEME','wap');
|
|
|
|
|
|
|
|
|
|
$device = get_devices_type();
|
|
|
|
|
|
|
|
|
|
define('DEVICES', $device ? $device : 1 );
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
define('DEVICES', '');
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct(){
|
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
|
|
$this->assign('download_url',str_replace('site.php','site.php',$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].U('Down/index',array('account'=>I('account')))));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|