|
require_once('_codigohotel.php');
include_once("settings.inc.php");
$conexion=mysql_connect(SQL_HOST, SQL_USER, SQL_PWD);
$sqlorden="SELECT clavehotel, clavehabitacion, activo, orden FROM habitacionesporhotel WHERE clavehotel=$clavehotel and activo='s' ORDER by orden";
mysql_select_db(SQL_DB);
$rsorden=mysql_query($sqlorden) or die(mysql_error());
?>
while($roworden=mysql_fetch_array($rsorden)) {
$ordenx=$roworden['clavehabitacion'];
?>
Plan |
Periodo |
SGL |
DBL |
TPL |
QPL |
MENOR 1 |
MENOR 2 |
$fechainicio = date('Y-m-d');
$fecha07 = strtotime( "$fechainicio +1 DAY");
$fecha07 = date("Y-m-d",$fecha07);
$sqllinks="SELECT t.precioSGL, t.precioDBL, t.precioTPL, t.precioQPL, t.precioMENOR1, t.precioMENOR2, t.fecha, t.activo, t.habitacion, t.hotel, h.clavehabitacion, h.descripcion, h.clavehotel, t.descuento, t.habitacion FROM tarifas as t, habitacionesporhotel as h WHERE (t.hotel=$clavehotel and t.fecha>='$fechainicio' and t.activo='s' and t.habitacion=$ordenx) and h.clavehotel=$clavehotel and h.clavehabitacion=t.habitacion ORDER by t.habitacion, t.fecha";
mysql_select_db(SQL_DB);
$rstarifas=mysql_query($sqllinks) or die(mysql_error());
$rowtarifas=mysql_fetch_array($rstarifas);
$fecha1=$rowtarifas['fecha'];
$fecha2=$rowtarifas['fecha'];
$plan1=$rowtarifas['descripcion'];
$tarifa1=$rowtarifas['precioSGL'];
$tarifa2=$rowtarifas['precioDBL'];
$tarifa3=$rowtarifas['precioTPL'];
$tarifa4=$rowtarifas['precioQPL'];
$tarifa5=$rowtarifas['precioMENOR1'];
$tarifa6=$rowtarifas['precioMENOR2'];
$descuento=$rowtarifas['descuento'];
while($rowtarifas=mysql_fetch_array($rstarifas)) {
if ($tarifa1==$rowtarifas['precioSGL'] and $tarifa2==$rowtarifas['precioDBL'] and $tarifa3==$rowtarifas['precioTPL'] and $tarifa4==$rowtarifas['precioQPL'] and $tarifa5==$rowtarifas['precioMENOR1'] and $tarifa6==$rowtarifas['precioMENOR2'] and $descuento==$rowtarifas['descuento'] and $fecha07==$rowtarifas['fecha'] and $plan1==$rowtarifas['descripcion']) {
$fecha2=$rowtarifas['fecha'];
$fecha07=strtotime( "$fecha2 +1 DAY");
$fecha07=date("Y-m-d",$fecha07);
} else {
?>
echo $plan1; ?> |
echo substr($fecha1, 8, 2)."/".substr($fecha1, 5, 2)."/".substr($fecha1, 0, 4); ?> - echo substr($fecha2, 8, 2)."/".substr($fecha2, 5, 2)."/".substr($fecha2, 0, 4); ?> |
$ echo number_format($tarifa1, 2 , "." , ","); ?> |
$ echo number_format($tarifa2, 2 , "." , ","); ?> |
$ echo number_format($tarifa3, 2 , "." , ","); ?> |
$ echo number_format($tarifa4, 2 , "." , ","); ?> |
$ echo number_format($tarifa5, 2 , "." , ","); ?> |
$ echo number_format($tarifa6, 2 , "." , ","); ?> |
$fecha1=$rowtarifas['fecha'];
$fecha07=strtotime( "$fecha1 +1 DAY");
$fecha07=date("Y-m-d",$fecha07);
$plan1=$rowtarifas['descripcion'];
$tarifa1=$rowtarifas['precioSGL'];
$tarifa2=$rowtarifas['precioDBL'];
$tarifa3=$rowtarifas['precioTPL'];
$tarifa4=$rowtarifas['precioQPL'];
$tarifa5=$rowtarifas['precioMENOR1'];
$tarifa6=$rowtarifas['precioMENOR2'];
$descuento=$rowtarifas['descuento'];
}
}
?>
echo $plan1; ?> |
echo substr($fecha1, 8, 2)."/".substr($fecha1, 5, 2)."/".substr($fecha1, 0, 4); ?> - echo substr($fecha2, 8, 2)."/".substr($fecha2, 5, 2)."/".substr($fecha2, 0, 4); ?> |
$ echo number_format($tarifa1, 2 , "." , ","); ?> |
$ echo number_format($tarifa2, 2 , "." , ","); ?> |
$ echo number_format($tarifa3, 2 , "." , ","); ?> |
$ echo number_format($tarifa4, 2 , "." , ","); ?> |
$ echo number_format($tarifa5, 2 , "." , ","); ?> |
$ echo number_format($tarifa6, 2 , "." , ","); ?> |
} ?>
$sqcierre="SELECT t.fecha, t.activo FROM tarifas as t WHERE t.hotel=$clavehotel and t.fecha>='$fechainicio' and t.activo='' Group by t.fecha ORDER by t.fecha";
mysql_select_db(SQL_DB);
$rscierre=mysql_query($sqcierre) or die(mysql_error());
$totalregistros=mysql_num_rows($rscierre);
if ($totalregistros<>0) {
$cierre="";
while($rowcierre=mysql_fetch_array($rscierre)) {
$cierre="$cierre ".substr($rowcierre['fecha'], 8, 2)."/".substr($rowcierre['fecha'], 5, 2)."/".substr($rowcierre['fecha'], 0, 4)." ";
}
?>
Cierre de Fechas: echo $cierre; ?> |
} ?> |
|