Gamla bildarkiv
 
Klicka på någon av bilderna nedan för att visa alla bilderna i aktuellt arkiv
0) { //die('No files where found :-('); // seed random function: //mt_srand((double)microtime()*1000000); // get an random index: $rand = mt_rand(0, count($files)-1); // check again: if (!isset($files[$rand])) { die('Array index was not found! very strange!'); } // return the random file: return $folder.$files[$rand]; } else { return ""; } } $ArrayDir=array(); $path=realpath("./")."/"; $indexpage="index.html"; clearstatcache(); if (file_exists($path)) { $dir_handle = @opendir($path) or die("Unable to open $path"); while ($file = readdir($dir_handle)) { if($file!="." && $file!=".." && $file!="cgi-bin" && is_dir($file)) { $PathFilename=$path.$file."/"; if (file_exists($PathFilename)) { $ArrayDir[sizeof($ArrayDir)+1]=$file."/"; } } } } sort($ArrayDir); for($i=0; $i", "", $contents); $TitleTxt=""; if ($title!="") { //$TitleTxt=htmlentities(mb_convert_encoding($title, 'UTF-8', mb_list_encodings()), ENT_QUOTES, 'ISO-8859-1')."
"; $TitleTxt=mb_convert_encoding($title, 'UTF-8', mb_list_encodings())."
"; $TitleImg=""; if (file_exists($PathFilenameThumbs)) { $JPGfile=RandomFile($PathFilenameThumbs, "jpg"); if (file_exists($JPGfile)) { list($width, $height, $type, $attr) = getimagesize($JPGfile); $TitleImg='Klicka på bilden för att visa samtliga bilderna i valt arkiv'; } } if ($TitleImg!="" && $TitleTxt!="") { echo '
"; } } } else { $htmfile=""; $htmfile=RandomFile($PathFilename, "html"); if ($htmfile=="") { $htmfile=RandomFile($PathFilename, "htm"); } if ($htmfile!="") { $contents=""; $title=""; $fd=fopen($htmfile, "r"); while($buffer = fread ($fd, 1024)){ $contents.=$buffer; } $title=my_strip("", "", $contents); $TitleTxt=""; if ($title!="") { //$TitleTxt=htmlentities(mb_convert_encoding($title, 'UTF-8', mb_list_encodings()), ENT_QUOTES, 'ISO-8859-1')."
"; $TitleTxt=mb_convert_encoding($title, 'UTF-8', mb_list_encodings())."
"; $TitleTxt=html_entity_decode($TitleTxt); $TitleImg=""; $JPGfile=RandomFile($PathFilename, "jpg"); if (file_exists($JPGfile)) { list($width, $height, $type, $attr) = getimagesize($JPGfile); $max_width=124; $max_height=124; $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if( ($width <= $max_width) && ($height <= $max_height) ){ $tn_width = $width; $tn_height = $height; } elseif (($x_ratio * $height) < $max_height){ $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; } else { $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $TitleImg='Klicka på bilden för att visa samtliga bilderna i valt arkiv'; } } if ($TitleImg!="" && $TitleTxt!="") { echo ' "; } } } } ?>
 
'; echo ($TitleTxt!="") ? ''.$TitleTxt.'' : ""; echo ($TitleImg!="") ? ''.$TitleImg.'' : ""; echo "
 
'; echo ($TitleTxt!="") ? ''.$TitleTxt.'' : ""; echo ($TitleImg!="") ? ''.$TitleImg.'' : ""; echo "
 
Klicka här för att stänga fönstret