include("funciones.php"); include("../mantenimiento/conecta.php"); // desconectado temporalmente // include 'http://www.bqhoteles.com/Estadistica/include.inc'; // EscribeEstadistica('ES', $code); //PREPARAR DATOS DE LA OFERTA $sql='select oferta_titulo, oferta_texto, oferta_titulo_en, oferta_texto_en, oferta_titulo_de, oferta_texto_de, oferta_desde, oferta_hasta from bq_datos_oferta'; $res = send_sql($db,$sql); $datos = mysql_fetch_array($res); $desde = $datos[6]; $hasta = $datos[7]; // variables de idioma: 2=castellà, 3=anglès, 4=alemany, 5=francès if ($idioma==3){ $reservar="CLIC HERE TO RESERVE"; $validez="OFFER BEEN WORTH FOR RESERVATIONS DONE BEFORE "; $descuento="DISCOUNT"; $txtoferta="OFFER"; $imatge="Offers_Ncristalcitybanner.jpg"; $titulo = $datos[2]; $texto = $datos[3]; } else if ($idioma==2){ $reservar="PULSE AQUÍ PARA APROVECHAR LA OFERTA"; $validez="OFERTA VÁLIDA PARA RESERVAS HECHAS ANTES DE "; $descuento="DESCUENTO"; $txtoferta="OFERTA"; $imatge="Ofertas_Ncristalcitybanner.jpg"; $titulo = $datos[0]; $texto = $datos[1]; } else { $reservar="Klick Sie hier zur Reservieren"; $validez="Gültiges Angebot für die Reservierung erfolgt vor "; $descuento="Rabatt"; $txtoferta="Angebot"; //$imatge="Ofertasde_Ncristalcitybanner.jpg"; $imatge="Angebote_Ncristalcitybanner.jpg"; $titulo = $datos[4]; $texto = $datos[5]; } ?>
|
![]() |
|
// PREPARAR ARRAY DE HOTELES
$hoteles=array();
$oferta=array();
// $prepay=array();
// lista de hoteles que tienen ofertas
$sql="select datos_id,datos_oferta,datos_porcentaje from bq_datos_hotel where datos_oferta!=''";
$res = send_sql($db,$sql);
$num = mysql_num_rows($res);
for ($i=0;$i<$num;$i++){
$row = mysql_fetch_array($res);
$hoteles[count($hoteles)]=$row[0];
$oferta[count($oferta)]=$row[1]; // Descuento aplicable a la oferta
//$prepay[count($prepay)]=$row[2]; // Porcentaje de prepago
$prepay=$row[2];
}
// nombres de los hoteles que tienen oferta
for ($i=0;$i<$num;$i++){
$sql='select hotel from hoteles where id='.$hoteles[$i];
$res = send_sql($db,$sql);
$row = mysql_fetch_array($res);
echo "".$txtoferta.": ".$oferta[$i]."% ".$descuento." "; echo "".$reservar." "; } // Separar texto por puntos $textsep=explode(".",$texto); $numparraf=count($textsep)-1; ?> |
for ($i=0;$i<$numparraf;$i++){
//echo $texto." ".$prepay;
echo $textsep[$i].".
"; } echo $textsep[$i]." ".$prepay."%."; ?>
|
![]() |