english english flag
 
facebook utvs
 
úřední deska utvs
 Hlavní stránka 
 
 
 

 

Nepodařilo se vybrat data z databáze.

'); $line = mysql_fetch_row($result); $_GET['gale_name'] = fine_url($line[0]); } $result = mysql_query('SELECT id_gale, text, file, date, name FROM gale ORDER BY date') or die('
Nepodařilo se vybrat data z databáze.
'); while ($line = mysql_fetch_row($result)){ if (fine_url($line[4])==$_GET['gale_name']) { $chec = true; break; } } if (!$chec){ echo 'CHYBA!
Požadovaná galerie neexistuje. Vyberte prosím galerii z levého menu.
'; include('incl_foot.php'); exit; } echo $line[4].'' .$line[1].'
 '; echo '
'; $dir = 'gallery/'.$line[2].'/'; $adr=Dir($dir); //load dirs/files while ($file=@$adr->Read()){ if ($file!="."&&$file!=".."&&!StrStr($file,'t_')){ //pokud file=neco jineho nez fotky, pak nic $files[]=$file; } } sort($files); foreach($files as $phot){ $thumbWidth = 100; $thumbHeight = 75; if(!file_exists($dir.'t_'.$phot)){ //create thumbnail $pathToImages = $dir; $fname = $phot; // parse path for the extension $info = pathinfo($pathToImages . $fname); // load image and get image size $img = imagecreatefromjpeg( "{$pathToImages}{$fname}" ); $width = imagesx( $img ); $height = imagesy( $img ); // calculate thumbnail size if ($width>=((4/3)*$height)) { $new_width = $thumbWidth; $new_height = floor($height*($thumbWidth/$width)); } else { $new_height = $thumbHeight; $new_width = floor($width*($thumbHeight/$height)); } // create a new temporary image $tmp_img = imagecreatetruecolor( $new_width, $new_height ); // copy and resize old image into new image ImageCopyResampled( $tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); // save thumbnail into a file imagejpeg( $tmp_img, $pathToImages.'t_'.$fname ); } if(file_exists($dir.'t_'.$phot)){ list($widt, $heig) = getimagesize($dir.'t_'.$phot); } else { $widt=100; $heig=75; } echo '
'.$line[4].'
'; } ?>
 
 
 
 
Ústav tělesné výchovy a sportu ČVUT v Praze | Pod Juliskou 4 | 160 00 Praha 6 | Tel.: (+420) 22435 1881/2 | Fax.: (+420) 233 337 353 | Email: sekretariat@utvs.cvut.cz
RSS
None