Exemplo n.º 1
0
 /**
  * look
  * 
  * @param string $current
  * @param string $itype
  * @param string $down
  * @return string
  */
 public function look($current = '', $itype = '', $down = '')
 {
     if (self::$_instance->is_link($current)) {
         $link = self::$_instance->readlink($current);
         $current = $link[1] . '/';
     }
     if (!self::$_instance->is_dir($current)) {
         return ListData::getListNotFoundData();
     }
     if (!self::$_instance->is_readable($current)) {
         return ListData::getListDenyData();
     }
     $add = isset($_GET['add_archive']) ? $_GET['add_archive'] : '';
     $pg = isset($_GET['pg']) ? $_GET['pg'] : 1;
     $html = ListData::getListData($current, $itype, $down, $pg, $add);
     if ($html) {
         if ($itype == 'time') {
             $out = '&time';
         } elseif ($itype == 'type') {
             $out = '&type';
         } elseif ($itype == 'size') {
             $out = '&size';
         } elseif ($itype == 'chmod') {
             $out = '&chmod';
         } elseif ($itype == 'uid') {
             $out = '&uid';
         } elseif ($itype == 'gid') {
             $out = '&gid';
         } else {
             $out = '';
         }
         $out .= $down ? '&down' : '&up';
         return $html . Paginator::get($pg, ListData::$getListCountPages, '&c=' . $current . $out . $add);
     } else {
         return ListData::getListEmptyData();
     }
 }