2016-12-21 08:01:06 +00:00
|
|
|
<?php
|
2015-03-22 20:54:54 +00:00
|
|
|
/*
|
2017-08-23 19:40:27 +00:00
|
|
|
* @link http://kodcloud.com/
|
|
|
|
* @author warlee | e-mail:kodcloud@qq.com
|
2015-03-22 20:54:54 +00:00
|
|
|
* @copyright warlee 2014.(Shanghai)Co.,Ltd
|
2017-08-23 19:40:27 +00:00
|
|
|
* @license http://kodcloud.com/tools/license/license.txt
|
2015-03-22 20:54:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class desktop extends Controller{
|
2016-12-21 08:01:06 +00:00
|
|
|
function __construct() {
|
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
public function index() {
|
2017-01-05 10:47:25 +00:00
|
|
|
$wap = is_wap() && (!isset($_COOKIE['forceWap']) || $_COOKIE['forceWap'] == '1');
|
2017-08-23 19:40:27 +00:00
|
|
|
$desktopApps = include(DATA_PATH.'system/desktop_app.php');
|
2016-12-21 08:01:06 +00:00
|
|
|
$wall = $this->config['user']['wall'];
|
2018-07-05 13:50:52 +00:00
|
|
|
if( !strstr($wall,'/') ){
|
2017-08-23 19:40:27 +00:00
|
|
|
$wall = STATIC_PATH.'images/wall_page/'.$wall.'.jpg';
|
2016-12-21 08:01:06 +00:00
|
|
|
}
|
2016-12-30 15:55:50 +00:00
|
|
|
|
2017-04-07 13:11:01 +00:00
|
|
|
$desktop = iconv_system(HOME.DESKTOP_FOLDER.'/');
|
2017-08-23 19:40:27 +00:00
|
|
|
if($GLOBALS['isRoot'] == 1){
|
2017-04-07 13:11:01 +00:00
|
|
|
$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);
|
2017-08-23 19:40:27 +00:00
|
|
|
|
|
|
|
$this->assign('wall',$wall);
|
|
|
|
$this->assign('desktopApps',$desktopApps);
|
|
|
|
$this->display('index.html');
|
2016-12-21 08:01:06 +00:00
|
|
|
}
|
2015-03-22 20:54:54 +00:00
|
|
|
}
|