/*
$topr=0;
$topmedia_qw = mysql_query("SELECT * FROM hotels ORDER BY ovmedia DESC, name ASC");
while($tmed_qw = mysql_fetch_array($topmedia_qw))
{
$check_loc_qw_1 = mysql_num_rows(mysql_query("SELECT * FROM hotels_locations WHERE idlocations='".IDLOC."' AND idhotels='".$tmed_qw['ID']."'"));
if((LOCVIEWTYPE == 1 || $check_loc_qw_1 > 0))
{
$list_tr[$tmed_qw['ovmedia']] = $tmed_qw['ID'];
//print "media = ".$tmed_qw['ovmedia']." / id hotel = ".$tmed_qw['ID']."
";
$topr++;
}
}
if($topr > 0)
{
?>
MOST VOTED HOTELS
on =ucwords(strtolower(SITENAME))?>
$j=0;
$limit = 10;
foreach($list_tr as $md=>$idht)
{
if($j < $limit)
{
$hotel_name = mysql_fetch_row(mysql_query("SELECT name,resort_id FROM hotels WHERE ID='".$idht."'"));
?>
- =$hotel_name[0]?> (=$md?>)
$j++;
}
}
?>
}
*/
$promo_hotels = mysql_query("SELECT * FROM promo_hotels WHERE idlocations='".IDLOC."'");
if(mysql_num_rows($promo_hotels) > 0)
{
?>
EDITORS CHOICE
on =ucwords(strtolower(SITENAME))?>
$prhot = mysql_fetch_array($promo_hotels);
for($p=1; $p <= 10; $p++)
{
$codenums = array();
$hotnum = 'idhotels_'.$p;
$percode = mysql_query("SELECT DISTINCT(codenum) FROM `periods2` WHERE idhotels='".$prhot[$hotnum]."' AND pday>='".date("Y-m-d",time())."' ORDER BY ID DESC");
while($prihot = mysql_fetch_row($percode))
{
$codenums[] = $prihot[0];
}
$allcode = implode("','",$codenums);
$prices_2 = mysql_fetch_row(mysql_query("SELECT MIN(adult_price_2) FROM `prices2` WHERE idhotels='".$prhot[$hotnum]."' AND period_codenum IN ('".$allcode."') AND adult_price_2 >'0' ORDER BY adult_price_2 ASC"));
//print "SELECT MIN(adult_price_2) FROM `prices2` WHERE idhotels='".$prhot[$hotnum]."' AND period_codenum IN ('".$allcode."') AND adult_price_2 >'0' ORDER BY adult_price_2 ASC
";
$price_off_2 = sprintf("%.2f",$prices_2[0]/2);
$dethot = mysql_fetch_row(mysql_query("SELECT name,codename,stars,idacc_type,main_image,resort_id FROM hotels WHERE ID='".$prhot[$hotnum]."'"));
$acc_type = mysql_fetch_row(mysql_query("SELECT name FROM acc_type WHERE ID='".$dethot[3]."'"));
if($dethot[0] != '')
{
?>
=$dethot[0]?>
if($dethot[2] > 0)
print str_repeat('
',$dethot[2]);
?>
starting from €=$price_off_2?>
}
}
?>
}
?>
EARLYBOOKING HOTELS
on =ucwords(strtolower(SITENAME))?>
$earlybook = mysql_query("SELECT * FROM early_booking WHERE eb_perc>'0' AND eb_date>='".date("Y-m-d",time())."' ORDER BY eb_perc DESC");
if(mysql_num_rows($earlybook) > 0)
{
$ebx = 0;
while($eab = mysql_fetch_array($earlybook))
{
$htdet = mysql_fetch_row(mysql_query("SELECT name,codename,stars,idacc_type,resort_id FROM hotels WHERE ID='".$eab['idhotels']."'"));
$acc_type = mysql_fetch_row(mysql_query("SELECT name FROM acc_type WHERE ID='".$htdet[3]."'"));
$check_loc = mysql_num_rows(mysql_query("SELECT * FROM hotels_locations WHERE idlocations='".IDLOC."' AND idhotels='".$eab['idhotels']."'"));
//print "B) SELECT * FROM hotels_locations WHERE idlocations='".IDLOC."' AND idhotels='".$eab['idhotels']."'
";
//print "$eab[idhotels] = $check_loc
";
if($htdet[1] != "" && $ebx < 10 && (LOCVIEWTYPE == 1 || $check_loc>0))
{
$season = mysql_fetch_row(mysql_query("SELECT codenum FROM periods2 WHERE idhotels='".$eab['idhotels']."' AND pday='".date("Y-m-d",time())."'"));
$prices = mysql_fetch_row(mysql_query("SELECT MIN(adult_price_2) FROM prices2 WHERE idhotels='".$eab['idhotels']."' ORDER BY ID DESC"));
?>
=$htdet[0]?>
if($htdet[2] > 0)
print str_repeat('
',$htdet[2]);
?>
Reserve within =date("d-m-Y",strtotime($eab['eb_date']))?> : -=$eab['eb_perc']?>%
$ebx++;
}
}
}
?>