コード例 #1
0
 $file["fullpath"] = $startdir . '/' . $entry;
 $file["fullurl"] = $starturl . '/' . $entry;
 $file["ext"] = strtolower(substr($entry, strrpos($entry, ".")));
 $file["isdir"] = is_dir($file["fullpath"]);
 if (!$file["isdir"]) {
     if ($type == "image") {
         if ($file["ext"] != ".jpeg" && $file["ext"] != ".jpg" && $file["ext"] != ".gif" && $file["ext"] != ".png") {
             continue;
         } else {
             $file["isimage"] = "1";
         }
         if ($filepickerstyle != "filename") {
             if ($this->GetPreference("showthumbnailfiles") == '1') {
                 $file["thumbnail"] = microtiny_utils::GetThumbnailFile(str_replace("thumb_", "", $entry), $startdir, $starturl);
             } else {
                 $file["thumbnail"] = microtiny_utils::GetThumbnailFile($entry, $startdir, $starturl);
             }
         }
         $imgsize = @getimagesize($file["fullpath"]);
         if ($imgsize) {
             $file["dimensions"] = $imgsize[0] . "x" . $imgsize[1];
         } else {
             $file["dimensions"] = " ";
         }
     }
 }
 if ($fmmodule) {
     $file["fileicon"] = $fmmodule->GetFileIcon($file["ext"], $file["isdir"]);
 }
 if (!$file["isdir"]) {
     $info = @stat($file["fullpath"]);
コード例 #2
0
 $file["fullpath"] = $thisdir . $entry;
 $file["fullurl"] = $thisurl . $entry;
 $file["ext"] = strtolower(substr($entry, strrpos($entry, ".")));
 $file["isdir"] = is_dir($file["fullpath"]);
 if (!$file["isdir"]) {
     if ($_GET["type"] == "image") {
         if ($file["ext"] != ".jpeg" && $file["ext"] != ".jpg" && $file["ext"] != ".gif" && $file["ext"] != ".png") {
             continue;
         } else {
             $file["isimage"] = "1";
         }
         if ($filepickerstyle != "filename") {
             if ($tiny->GetPreference("showthumbnailfiles") == "1") {
                 $file["thumbnail"] = microtiny_utils::GetThumbnailFile(str_replace("thumb_", "", $entry), $thisdir, $thisurl);
             } else {
                 $file["thumbnail"] = microtiny_utils::GetThumbnailFile($entry, $thisdir, $thisurl);
             }
         }
         $imgsize = @getimagesize($file["fullpath"]);
         if ($imgsize) {
             $file["dimensions"] = $imgsize[0] . "x" . $imgsize[1];
         } else {
             $file["dimensions"] = " ";
         }
     }
 }
 if ($fmmodule) {
     $file["fileicon"] = $fmmodule->GetFileIcon($file["ext"], $file["isdir"]);
 }
 if (!$file["isdir"]) {
     $info = @stat($file["fullpath"]);