Пример #1
0
 /**
  * get_thumbnails function.
  * 
  * @access private
  * @param string $thumbnails. (default: "")
  * @return void
  */
 private function get_thumbnails($thumbnails = "", $link = "")
 {
     $thumbs = unserialize($thumbnails);
     //debug::print_d($thumbs);
     $img_html = "";
     if (is_array($thumbs)) {
         foreach ($thumbs as $key => $value) {
             if (!stristr($value, "thumbnail")) {
                 $im1 = explode("scrape", $value);
                 //debug::print_d($im1);
                 //$im1['1']=str_ireplace(".jpg",".jpg",$im1['1']);
                 $scraper_url = SCRAPER_URL;
                 $img_html .= '<li  class="span3"><a  class="thumbnail" href="' . SCRAPER_URL . class_divers::make_ausgabe($link) . '"> <img src="' . $scraper_url . $im1['1'] . '" /></a></li>';
             }
         }
     }
     return $img_html;
 }
Пример #2
0
 /**
  * class_divers::lese_dir_rec()
  * 
  * @param string $dir
  * @param string $ext
  * @return
  */
 function lese_dir_rec($dir = "", $ext = "")
 {
     #echo PAPOO_ABS_PFAD .$dir;
     if (empty($dir)) {
         return false;
     } else {
         if (is_dir(ABS_PFAD . $dir)) {
             $handle = @opendir(ABS_PFAD . $dir);
             $i = 0;
             while (false !== ($file = @readdir($handle))) {
                 if ($file == '.' or $file == '..' or $file == '.DS_Store' or $file == '.svn') {
                     continue;
                 }
                 if (!empty($ext)) {
                     #echo "-".$file."x";
                     if (!stristr($file, $ext)) {
                         # echo "NO";echo "<br />";
                         continue;
                     }
                 }
                 echo $file;
                 if (is_dir(ABS_PFAD . $dir . "/" . $file)) {
                     $result[$file][$i] = class_divers::lese_dir_rec($file);
                 } else {
                     $result[$i]['name'] = $file;
                 }
                 // if (empty($file))echo "e";
                 // if (is_writeable(PAPOO_ABS_PFAD.$dir."/".$file))echo "W";
                 $result[$i]['schreib'] = is_writeable(ABS_PFAD . $dir . "/" . $file);
                 $i++;
             }
             // print_r($result);
             @usort($result, array("diverse_class", "cmp"));
             return $result;
         }
     }
 }