Академический Документы
Профессиональный Документы
Культура Документы
php
session_start();
if($_SESSION["usuario"]){
$con = mysql_connect("localhost","root","");
mysql_select_db("lavanderia",$con);
$fi=$_POST["fechaInicinal"];
$ff=$_POST["fechaFinal"];
//$ambiente=$_POST["ambiente"];//
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Reporte General</title>
<style type="text/css">
body {
background-color: #CFC;
}
.titulo {font-size: 36px;
font-weight: bold;
color: #06F;
text-align: center;
}
#apDiv3 {
position: absolute;
width: 575px;
height: 80px;
z-index: 13;
left: 336px;
top: 18px;
}
#apDiv1 {
position: absolute;
width: 198px;
height: 24px;
z-index: 14;
left: 547px;
top: 248px;
background-color: #FFFF99;
}
</style>
</head>
<body>
<p><a href="menu.php">Menu</a></p>
<div id="apDiv3">
<p class="titulo">Irotama - Lavanderia</p>
<p class="titulo">Reporte General de los Ambientes</p>
</div>
<?php echo "<a href='pdfReporteGeneral.php?fi=$fi&ff=$ff'> Ver en PDF</a>" ?>
<p><a href="salir.php">Cerrar Sesion</a></p>
<p> </p>
<p> </p>
<p> </p>
<p>
</p>
<div id="apDiv1"> <?php echo $fi; echo " - &n
bsp;"; echo $ff; ?></div>
<p> </p>
<p> </p>
<p>
<?php
$noServilletas=$noManteles=$noTapamanchas=$noFaldellines=$noFaldon60=$noFaldon80
=$noCajitas=$noFaldonRectangular=$noMantelRedondo=$noForrosCojin=$noDescartes=$n
oFaldonRedondo=0;
$noServilletas2=$noMantele2=$noTapamanchas2=$noFaldellines2=$noFaldon602=$noFald
on802=$noCajitas2=$noFaldonRectangular2=$noMantelRedondo2=$noForrosCojin2=$noDes
cartes2=$noFaldonRedondo2=0;
$resultado=mysql_query("select * from ambiente");
while ($fila = mysql_fetch_assoc($resultado)) {
$resultado2 = mysql_query("select * from ambiente join solicitudmanteleria o
n solicitudmanteleria.Ambiente_idAmbiente=ambiente.idAmbiente join elementomante
leria on (elementomanteleria.idSolicitud=solicitudmanteleria.idSolicitud) where
idAmbiente=".$fila['idAmbiente']." and fechaEntrega between '".$fi."' and '".$ff
."'"); //piso16
while ($fila2=mysql_fetch_assoc($resultado2)) {
switch ($fila2['idAmbiente']) {
case '1':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '2':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$noServilletas
+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '3':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '4':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '8':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '9':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '15':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 60'){ $noFaldon60=$noFald
on60+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON 80'){ $noFaldon80=$noFal
don80+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='CAJITAS'){ $noCajitas=$noCajitas
+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON RECTANGULAR'){$noFaldonRe
ctangular=$noFaldonRectangular+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FALDON REDONDO'){ $noFaldonRedon
do=$noFaldonRedondo+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTEL REDONDO'){ $noMantelRedo
ndo=$noMantelRedondo+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='FORROS DE COJIN'){ $noForrosCoji
n=$noForrosCojin+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='DESCARTES'){ $noDescartes=$noDes
cartes+$fila2["cantidadElementoM"];}
break;
case '16':
if($fila2["descripcionElementoM"]=='SERVILLETAS'){ $noServilletas=$n
oServilletas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='MANTELES'){ $noManteles=$noMante
les+$fila2["cantidadElementoM"];}
if($fila2["descripcionElementoM"]=='TAPAMANCHAS'){ $noTapamanchas=$n
oTapamanchas+$fila2["cantidadElementoM"]; }
if($fila2["descripcionElementoM"]=='FALDELLINES'){ $noFaldellines=$n
oFaldellines+$fila2["cantidadElementoM"];}
$piso16=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFaldell
ines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRectang
ular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)+($n
oDescartes*400));
$rescarreta=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFal
dellines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRec
tangular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)
+($noDescartes*400));
$central=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFaldel
lines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRectan
gular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)+($
noDescartes*400));
$chica=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFaldelli
nes*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRectangu
lar*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)+($no
Descartes*400));
$resmasinga=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFal
dellines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRec
tangular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)
+($noDescartes*400));
$almacen=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFaldel
lines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRectan
gular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)+($
noDescartes*400));
$seguridad=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFald
ellines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRect
angular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)+
($noDescartes*400));
$sistemas=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFalde
llines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRecta
ngular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)+(
$noDescartes*400));
$resluruaco=(($noServilletas*140)+($noManteles*400)+($noTapamanchas*150)+($noFal
dellines*150)+($noFaldon60*440)+($noFaldon80*440)+($noCajitas*440)+($noFaldonRec
tangular*440)+($noFaldonRedondo*440)+($noMantelRedondo*400)+($noForrosCojin*440)
+($noDescartes*400));
?>
</p>
<table width="500" border="1" align="center">
<tr bgcolor="#DDDDDD">
<th colspan="5" scope="col">Reporte General de Todos los Ambientes</th>
</tr>
<tr bgcolor="#DDDDDD">
<th width="340" scope="col">Ambiente</th>
<th width="350" scope="col">Subtotal</th>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="1" align="center">Restaurante Piso 12</td>
<td colspan="1" align="center">$<?php echo ($piso12);?></td>
</tr>
<tr bgcolor="#FFFFFF">