Пример #1
0
 public function index()
 {
     if ($this->in['path'] != '') {
         $dir = $_GET['path'];
     } else {
         if (isset($_SESSION['this_path'])) {
             $dir = $_SESSION['this_path'];
         } else {
             $dir = '/';
             //首次进入系统,不带参数
             if ($GLOBALS['is_root']) {
                 $dir = WEB_ROOT;
             }
         }
     }
     $dir = rtrim($dir, '/') . '/';
     $is_frame = false;
     //是否以iframe方式打开
     if ($this->in['type'] == 'iframe') {
         $is_frame = true;
     }
     //
     $upload_max = get_post_max();
     $this->assign('upload_max', $upload_max);
     $this->assign('is_frame', $is_frame);
     $this->assign('dir', $dir);
     $this->display('index.php');
 }
Пример #2
0
 /**
  * 首页
  */
 public function index()
 {
     $wall = $this->config['user']['wall'];
     if (strlen($wall) > 3) {
         $this->assign('wall', $wall);
     } else {
         $this->assign('wall', STATIC_PATH . 'images/wall_page/' . $wall . '.jpg');
     }
     $upload_max = get_post_max();
     $this->assign('upload_max', $upload_max);
     $this->display('index.php');
 }
Пример #3
0
 public function index()
 {
     $wall = $this->config['user']['wall'];
     if (strlen($wall) > 3) {
         $this->assign('wall', $wall);
     } else {
         $this->assign('wall', STATIC_PATH . 'images/wall_page/' . $wall . '.jpg');
     }
     if (!is_dir(MYHOME . 'desktop/') && is_writable(MYHOME)) {
         mkdir(MYHOME . 'desktop/');
     }
     $upload_max = get_post_max();
     $this->assign('upload_max', $upload_max);
     $this->display('index.php');
 }
Пример #4
0
 public function common_js()
 {
     $basic_path = BASIC_PATH;
     if (!$GLOBALS['is_root']) {
         $basic_path = '/';
         //对非root用户隐藏所有地址
     }
     $the_config = array('lang' => LANGUAGE_TYPE, 'is_root' => $GLOBALS['is_root'], 'user_name' => $this->user['name'], 'web_root' => $GLOBALS['web_root'], 'web_host' => HOST, 'static_path' => STATIC_PATH, 'basic_path' => $basic_path, 'version' => KOD_VERSION, 'app_host' => APPHOST, 'office_server' => OFFICE_SERVER, 'myhome' => MYHOME, 'upload_max' => get_post_max(), 'json_data' => "", 'theme' => $this->config['user']['theme'], 'list_type' => $this->config['user']['list_type'], 'sort_field' => $this->config['user']['list_sort_field'], 'sort_order' => $this->config['user']['list_sort_order'], 'musictheme' => $this->config['user']['musictheme'], 'movietheme' => $this->config['user']['movietheme']);
     $js = 'LNG=' . json_encode($GLOBALS['L']) . ';';
     $js .= 'AUTH=' . json_encode($GLOBALS['auth']) . ';';
     $js .= 'G=' . json_encode($the_config) . ';';
     header("Content-Type:application/javascript");
     echo $js;
 }