| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:19:23 2008 ] | [ PBS Helpdesk 0.93 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <? // image.php3 2 include "init.php3"; 3 include "environment.php3"; 4 include "$language.php3"; 5 6 $filename1=$filename; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 7 8 $command = "select type from pictures where id=$pictureid"; 9 10 11 $res1 = mysql_query_wrap($command); 12 13 $Rows = mysql_num_rows($res1); 14 15 if($Rows<1){ 16 // no image matches this query 17 } 18 else{ 19 // at least one image has this title 20 //$getPicture = mysql_fetch_object($res1); 21 $filename = $pbs_uploaddir."/".$pictureid; 22 $fd = fopen ($filename, "r"); 23 $contents = fread ($fd, filesize ($filename)); 24 fclose ($fd); 25 $ptype = mysql_fetch_row($res1); 26 //echo "Content-type: $ptype[0]"; 27 // and send the correct header to the browser 28 header("Content-type: $ptype[0]"); 29 //header("Content-type: xx"); //xx eintagen, wenn filetyp nicht erkannt 30 header("Content-Disposition: attachment; filename=$filename1"); 31 //echo "Type=$Type<p>"; 32 // now send the image 33 // $Body = $getPicture->content; 34 echo $contents; 35 flush(); 36 } 37 ?> 38
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |