public function pathList()
 {
     load_class('history');
     session_start();
     //re start
     $session = isset($_SESSION['history']) ? $_SESSION['history'] : false;
     $user_path = $this->in['path'];
     if (is_array($session)) {
         $hi = new history($session);
         if ($user_path == "") {
             $user_path = $hi->getFirst();
         } else {
             $hi->add($user_path);
             $_SESSION['history'] = $hi->getHistory();
         }
     } else {
         $hi = new history(array(), 20);
         if ($user_path == "") {
             $user_path = '/';
         }
         $hi->add($user_path);
         $_SESSION['history'] = $hi->getHistory();
     }
     //回收站不记录前进后退
     if ($this->in['path'] != '*recycle*/' && (!isset($this->in['type']) || $this->in['type'] !== 'desktop')) {
         $_SESSION['this_path'] = $user_path;
     }
     $list = $this->path($this->path);
     $list['history_status'] = array('back' => $hi->isback(), 'next' => $hi->isnext());
     show_json($list);
 }
예제 #2
0
 public function pathList()
 {
     load_class('history');
     session_start();
     //re start
     $session = $_SESSION['history'];
     $user_path = $this->in['path'];
     if (is_array($session)) {
         $hi = new history($session);
         if ($user_path == "") {
             $user_path = $hi->getFirst();
         } else {
             $hi->add($user_path);
             $_SESSION['history'] = $hi->getHistory();
         }
     } else {
         $hi = new history(array(), 20);
         if ($user_path == "") {
             $user_path = '/';
         }
         $hi->add($user_path);
         $_SESSION['history'] = $hi->getHistory();
     }
     $_SESSION['this_path'] = $user_path;
     $list = $this->path($this->path);
     $list['history_status'] = array('back' => $hi->isback(), 'next' => $hi->isnext());
     show_json($list);
 }