KodExplorer/controller/desktop.class.php

36 lines
912 B
PHP
Raw Normal View History

2016-12-21 08:01:06 +00:00
<?php
2015-03-22 20:54:54 +00:00
/*
* @link http://www.kalcaddle.com/
* @author warlee | e-mail:kalcaddle@qq.com
* @copyright warlee 2014.(Shanghai)Co.,Ltd
* @license http://kalcaddle.com/tools/licenses/license.txt
*/
class desktop extends Controller{
2016-12-21 08:01:06 +00:00
function __construct() {
parent::__construct();
$this->tpl = TEMPLATE.'desktop/';
}
public function index() {
2017-01-05 10:47:25 +00:00
$wap = is_wap() && (!isset($_COOKIE['forceWap']) || $_COOKIE['forceWap'] == '1');
if($wap){
header("location:./index.php?explorer");
exit;
}
2016-12-21 08:01:06 +00:00
$wall = $this->config['user']['wall'];
if(strlen($wall)>3){
$this->assign('wall',$wall);
}else{
$this->assign('wall',STATIC_PATH.'images/wall_page/'.$wall.'.jpg');
}
2016-12-30 15:55:50 +00:00
2017-04-07 13:11:01 +00:00
$desktop = iconv_system(HOME.DESKTOP_FOLDER.'/');
if($GLOBALS['is_root'] == 1){
$desktop = iconv_system(MYHOME.DESKTOP_FOLDER.'/');
2016-12-21 08:01:06 +00:00
}
2017-04-07 13:11:01 +00:00
mk_dir($desktop);
2016-12-21 08:01:06 +00:00
$this->display('index.php');
}
2015-03-22 20:54:54 +00:00
}