//----------------- galeria elozo kovetkezo $commvalt = "select id, path, idx from hotel_pic where hotel = $hotelid and type = 'g' order by idx"; $resuvalt = ( mysql_query( $commvalt )); $counter=0; while ($pic_valt = mysql_fetch_array( $resuvalt )) { $pic_adat[$counter]=$pic_valt; $counter++; } $aktual=0; foreach ($pic_adat as $key => $value){ if ($pic_adat[$key]['id']==$picid){ $aktual=$key; } } $min=0; $prev=$aktual-1; $next=$aktual+1; $max=$key; $ext = array('-png','-jpg'); //----------------- $gal .=getakcio($hotelid,$lang,1); $gal .='
'; $gal .='