|
include("include/menu_1n.php"); ?>
include("include/menu_3.php"); ?>
include("include/menu_5.php"); ?>
|
|
include("include/menu_2.php"); ?>
include("include/menu_4.php"); ?>
|
|
include("include/menu_9.php"); ?>
|
if ($k=='hp'){
// description
echo "
";
// 3 adv from links
$nome = $l."_nome";
$sintesi = $l."_sintesi";
$url = $l."_url";
if (!empty($adv_links)){
$sql = "select * from $tbl_links where id_link in ($adv_links) order by rand() limit 3 ";
}else{
$sql = "select * from $tbl_links where sezione='i' and id_nazione='$n' and menulinks='s' and $url!='' and stato='A' order by rand() limit 3 ";
}
$result = mysql_db_query($db_db,$sql);
$num_rows = mysql_num_rows($result);
if ($num_rows>0){
?>
| Selected sponsors
|
$i = 0;
$box = 0;
while ($i<$num_rows){
$id = mysql_result($result, $i, id_link);
$tl = mysql_result($result, $i, "tipolink");
reset($links);
while (list ($key, $val) = each ($links)) {
if ($tl==$key){ $tip = $val; }
}
$tipou = mysql_result($result, $i, "tipou");
$urlgo = stripslashes(mysql_result($result, $i, $url));
$targo = "";
if (strtolower($tipou)=='i'){
$urlgo = "go.php?l=".$l."&url=".$urlgo;
}
if (strtolower($tipou)=='w'){
$targo = " target=link";
}
$immagine = "media/links/".substr("00000".$id,-5)."s.jpg";
$is = "";
if (is_readable($immagine)){
$is = " ";
}else{
$is = " ";
}
$cit = mysql_result($result, $i, id_citta);
$sql = "select $nome from $tbl_citta where id_citta='$cit'";
$result2 = mysql_db_query($db_db,$sql);
$citta = stripslashes(mysql_result($result2, 0, $nome));
$naz = mysql_result($result, $i, id_nazione);
$sql = "select $nome from $tbl_nazioni where id_nazione='$naz'";
$result2 = mysql_db_query($db_db,$sql);
$nazione = stripslashes(mysql_result($result2, 0, $nome));
$denominazione = stripslashes(mysql_result($result, $i, $nome));
$den = "";
//$sin = stripslashes(mysql_result($result, $i, $sintesi));
$sin = nl2br(strip_tags(stripslashes(mysql_result($result, $i, $sintesi))));
$box++;
if (($box-1)%3==0){ ?> } ?>
| echo $tip; ?> |
echo $is; ?> echo $den; ?> echo $citta." ".$nazione; ?> echo $sin; ?> |
|
|
if (($box-1)%3==0 or ($box-1)%3==1){ ?> | }
$i++;
}
?>
} // num_rows>0
// 3 adv from accommodation
if (!empty($adv_strutture)){
$sql = "select * from $tbl_strutture where id_struttura in ($adv_strutture) order by rand() limit 3 ";
}else{
$sql = "select * from $tbl_strutture where id_nazione='$n' and stato='A' and attivo='s' order by rand() limit 3 ";
}
}else{
// accommodation (on 3 cols)
//$sql = "select * from $tbl_strutture where id_nazione='$n' and tipostruttura='$k' and stato='A' and attivo='s' order by denominazione";
$sql = "select * from $tbl_strutture where id_nazione='$n' and tipostruttura='$k' and stato='A' and attivo='s' order by rand() limit 30";
} // fine hp
$result = mysql_db_query($db_db,$sql);
$num_rows = mysql_num_rows($result);
//echo $n."-".$c."-".$sql;
if ($num_rows>0){
?>
if ($k=='hp'){ ?>
| Random accommodation
|
} ?>
$nome = $l."_nome";
$sintesi = $l."_sintesi";
$urlprenotazione = $l."_urlprenotazione";
$i = 0;
$box = 0;
while ($i<$num_rows){
$id = mysql_result($result, $i, id_struttura);
$immagine = "media/pic/".substr("00000".$id,-5)."_0.jpg";
$is = "";
if (is_readable($immagine)){
$is = " ";
}else{
$is = " ";
}
$citta = mysql_result($result, $i, comune);
if (empty($citta)){
$cit = mysql_result($result, $i, id_citta);
$sql = "select $nome,progressivo from $tbl_citta where id_citta='$cit'";
$result2 = mysql_db_query($db_db,$sql);
$citta = stripslashes(mysql_result($result2, 0, $nome));
$progressivo = mysql_result($result2, 0, 'progressivo');
if ($progressivo==999){ $citta = $regione; }
}
$naz = mysql_result($result, $i, id_nazione);
$sql = "select $nome from $tbl_nazioni where id_nazione='$naz'";
$result2 = mysql_db_query($db_db,$sql);
$nazione = stripslashes(mysql_result($result2, 0, $nome));
$tipostruttura = mysql_result($result, $i, 'tipostruttura');
reset($ricettivita);
while (list ($key, $val) = each ($ricettivita)) {
if ($tipostruttura==$key){ $tip = $val; }
}
$tipoup = mysql_result($result, $i, "tipoup");
$urlp = stripslashes(mysql_result($result, $i, $urlprenotazione));
if ($urlp=="http://") $urlp = "";
if (!empty($urlp) and substr($urlp,0,7)!="http://") $urlp = "http://".$urlp;
$denominazione = stripslashes(mysql_result($result, $i, 'denominazione'));
$den = "";
//$sin = nl2br(stripslashes(mysql_result($result, $i, $sintesi)));
$sin = nl2br(strip_tags(stripslashes(mysql_result($result, $i, $sintesi))));
$postiletto = mysql_result($result, $i, "postiletto");
$camere = mysql_result($result, $i, "camere");
if (($tipostruttura=='3' or $tipostruttura=='5') and (!empty($postiletto) or !empty($camere))){
$sin .= " --- Sleeps: ".$postiletto." - Bedrooms: ".$camere;
}
$box++;
if (($box-1)%3==0){ ?> } ?>
| echo $tip; ?> |
echo $is; ?> echo $den; ?> echo $citta." ".$nazione; ?> echo $sin; ?> |
if (!empty($urlp)){
if (strtolower($tipoup)=='d'){
?>
 |
}else{ ?>
 |
}
}
?>
|
|
if (($box-1)%3==0 or ($box-1)%3==1){ ?> | }
$i++;
}
?>
} // num_rows>0
?>
|