//----------------- 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 .='
'.$desc.'
'; $temp_pack_count=str_replace("","",onpage_package_count($lang,$hotelid)); if ($temp_pack_count!=''){ $gal .='
'.$temp_pack_count.'

'; } // $gal .='

'; $gal .=''; $gal .=''; $gal .=''; $gal .=''; $gal .=''; $gal .='
'; if ($prev>=0){ // van elozo kep $htmprev = str_replace($ext,'',$pic_adat[$prev]['path']); $htmprev.='.'.$code[0].'.html'; $gal .='<-'; } // $gal .=''; $gal .=' '.$alt.' - '.$name.' '; $gal .=''; if ($next<=$max){ // van kovetkezo $htmnext = str_replace($ext,'',$pic_adat[$next]['path']); $htmnext.='.'.$code[0].'.html'; $gal .='->'; } $gal .='
';