=1){ $rs_check=mysql_query("SELECT bild FROM cc_galerie WHERE head_nr='".$_GET["show_galerie"]."' ORDER BY id"); $hoehe=0; for ($i=0; $i$hoehe){$hoehe=$gr[1];} } } $hoehe+=22; $rs=mysql_query("SELECT * FROM cc_galerie WHERE head_nr='".$_GET["show_galerie"]."' ORDER BY id"); $rs_2=mysql_query("SELECT head FROM cc_galerie_heads WHERE id='".$_GET["show_galerie"]."'"); while ($zeile=mysql_fetch_array($rs)) { $id[] = $zeile["id"]; $bild[]= $zeile["bild"]; $txt[]= $zeile["txt"]; } $anzahl= count($id); if ($anzahl<=0){ echo("Für die Galerie "".mysql_result($rs_2,0,"head")."" ist noch kein Bild vorhanden."); }else{ //echo("
"); echo("

".mysql_result($rs_2,0,"head")."

"); $counter=0; for ($i=0; $i<$anzahl; $i++){ $counter++; echo("
"); if ($txt[$i]<>""){ $title=$txt[$i]; }else{ $title=" "; } if (is_file("./data_gallery/thumb/$bild[$i]")){ echo("
"); echo(""); echo(""); echo(""); echo("
"); } echo("
"); if ($counter==5){ $counter=0; echo("\n

 

\n"); } } //echo("
"); echo("\n

 

\n"); echo("zurück"); } }else{ ?>  
Es sind noch keine Galerien angelegt."); }else{ ?>
ddddd
"); echo(""); echo(""); $zaehler=0; for ($i=0; $i<$anzahl; $i++){ $zaehler++; $rs_2=mysql_query("SELECT bild FROM cc_galerie WHERE head_nr='".$id[$i]."'"); $anzahl_rs=mysql_num_rows($rs_2); if ($anzahl_rs>=1){ srand(microtime()*1000000); $zufall = rand(1,$anzahl_rs)-1; $bild = mysql_result($rs_2,$zufall,"bild"); if (is_file("./data_gallery/thumb/$bild")){ $gr=getimagesize("./data_gallery/thumb/$bild"); } //$breite=$gr[0]; //$hoehe=$gr[1]; $breite=$gr[2]; if ($zaehler==1){echo("");} echo(""); if ($zaehler==2){ echo(""); //echo(""); $zaehler=0; } } } if ($zaehler<>0 && $anzahl>0){ echo(""); } echo("
Foto-Alben
"); echo(""); echo(""); echo("
"); echo("
"); echo(""); if (is_file("./data_gallery/thumb/$bild")){ echo(""); } echo(""); echo("
"); echo("
"); echo(""); echo("$head[$i]"); echo(""); echo("
"); echo("
 
 
") ?>