<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Creacion de Planta para Sistema de Prefrio</title>
<style type="text/css">
<!--
input { font-family: Tahoma, Verdana, Arial; font-size: 11px; color: #FFFFFF; background-color: #6699CC; border: #000099; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
select { font-family: Tahoma, Verdana, Arial; font-size: 11px; color: #FFFFFF; background-color: #6699CC; border: #000099; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
-->
</style>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /></head>

<body>
<?
$arrp=array();
$clave=@$_REQUEST["clave"];
if ($clave=="ats475ats475") {
?>
<form method="POST" action="pf_creacion2.php">
<form method="post" action="pf_creacion1.php">
<font face='tahoma' size="2">
<b>Ats Intech</b></font>
<hr />
<font face='tahoma' size="1">

<p><br />
</p>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    <th scope="col">&nbsp;</th>
    <th scope="col" colspan="4">Posicion</th>
    <th scope="col">&nbsp;</th>
    <th scope="col" colspan="6">Sensores</th>
    <th scope="col" colspan="3">Otros</th>
	
  </tr>
  <tr>
    <th scope="col">Id</th>
    <th scope="col" width=150px >Nombre Camara</th>
    <th scope="col">Posicion Puerta</th>
    <th scope="col">X</th>
    <th scope="col">Y</th>
    <th scope="col">Ancho</th>
    <th scope="col">Alto</th>
    <th scope="col">Max Pallets</th>
    <th scope="col">Temp Inicial</th>
    <th scope="col">Temp Final</th>
    <th scope="col">Ambiente Inicial</th>
    <th scope="col">Ambiente Final</th>
    <th scope="col">Otro Inicial</th>
    <th scope="col">Otro Final</th>
	<th scope="col">Tipo Camara</th>
	<th scope="col">Panel Direccion</th>
	<th scope="col">Rotacion Direccion</th>
  </tr>  
<?


$num_camara=@$_REQUEST["numcamaras"]+0;
$xp=-100;
$yp=100;
$contx=0;
  for ($i=1;$i<=$num_camara;$i++) {
  $contx++;
  if ($contx>3) {
	$contx=0;
	echo "<tr></<tr>\n";
  }
echo "<tr>\n";
echo "<th scope='row'>$i</th>\n";
echo "<td><input autocomplete='off' type='text' name='nombre_".$i."' style='width:100%; border:none' /></td>\n";
echo "<td><select autocomplete='off' name='posicion_".$i."' style='width:100%; border:none'>\n";
echo "<option value='Abajo' selected='selected'>Abajo</option>\n";
echo "<option value='AbajoCentro'>AbajoCentro</option>\n";
echo "<option value='AbajoCompleto'>AbajoCompleto</option>\n";
echo "<option value='AbajoDer'>AbajoDer</option>\n";
echo "<option value='AbajoIzq'>AbajoIzq</option>\n";
echo "<option value='Arriba'>Arriba</option>\n";
echo "<option value='ArribaAbajo'>ArribaAbajo</option>\n";
echo "<option value='ArribaCentro'>ArribaCentro</option>\n";
echo "<option value='ArribaCompleto'>ArribaCompleto</option>\n";
echo "<option value='ArribaDer'>ArribaDer</option>\n";
echo "<option value='ArribaIzq'>ArribaIzq</option>\n";
echo "<option value='Completo'>Completo</option>\n";
echo "<option value='DerAbajo'>DerAbajo</option>\n";
echo "<option value='DerArriba'>DerArriba</option>\n";
echo "<option value='DerCentro'>DerCentro</option>\n";
echo "<option value='DerCompleto'>DerCompleto</option>\n";
echo "<option value='IzqAbajo'>IzqAbajo</option>\n";
echo "<option value='IzqArriba'>IzqArriba</option>\n";
echo "<option value='IzqCentro'>IzqCentro</option>\n";
echo "<option value='IzqCompleto'>IzqCompleto</option>\n";
echo "<option value='Lado'>Lado</option>\n";
echo "</select></td>\n";
$xp+=120;
if ($xp>1000) {
$xp=0;
$yp+=200;
}
$arrp[$i]["name"]="";
$arrp[$i]["x"]=$xp;
$arrp[$i]["y"]=$yp;
$arrp[$i]["w"]=120;
$arrp[$i]["h"]=150;

echo "<td><input autocomplete='off' type='text' name='x_".$i."' style='width:100%; border:none' value='$xp'/></td>\n";
echo "<td><input autocomplete='off' type='text' name='y_".$i."' style='width:100%; border:none' value='$yp'/></td>\n";
echo "<td><input autocomplete='off' type='text' name='ancho_".$i."' style='width:100%; border:none'  value='120'/></td>\n";
echo "<td><input autocomplete='off' type='text' name='alto_".$i."' style='width:100%; border:none' value='150' /></td>\n";
echo "<td><input autocomplete='off' type='text' name='maxpallet_".$i."' style='width:100%; border:none' value='100'/></td>\n";
echo "<td><input autocomplete='off' type='text' name='tempi_".$i."' style='width:100%; border:none' value='0' /></td>\n";
echo "<td><input autocomplete='off' type='text' name='tempf_".$i."' style='width:100%; border:none' value='0' /></td>\n";
echo "<td><input autocomplete='off' type='text' name='ambi_".$i."' style='width:100%; border:none' value='0' /></td>\n";
echo "<td><input autocomplete='off' type='text' name='ambf_".$i."' style='width:100%; border:none' value='0' /></td>\n";
echo "<td><input autocomplete='off' type='text' name='otroi_".$i."' style='width:100%; border:none' value='0'/></td>\n";
echo "<td><input autocomplete='off' type='text' name='otrof_".$i."' style='width:100%; border:none' value='0' /></td>\n";

echo "<td><select autocomplete='off' name='tipo_".$i."' style='width:100%; border:none'>\n";
echo "<option value='PREF' selected='selected'>Prefrio</option>\n";
echo "<option value='PANE'>Panel</option>\n";
echo "<option value='FUMI'>Fumigacion (No usar)</option>\n";
echo "</select></td>\n";



echo "<td><input autocomplete='off' type='text' name='paneld_".$i."' style='width:100%; border:none' value='0' /></td>\n";
echo "<td><input autocomplete='off' type='text' name='ventd_".$i."' style='width:100%; border:none' value='0' /></td>\n";

echo "</tr>\n";
}
?>
</table>
<br />
<!--
Usa Correlativo:<input autocomplete='off' type='checkbox' name="correlativo" value=1 />
Al usar correlativos, el sensor 1 -5 de la primera camara sera :1-5, y el sensor 1-5 de la segunda camara sera = 6-10.-->
<div id="divelem" style='width:100%; height:1500px; border:thin; border-color:#0C9; overflow:scroll;'>
<?
for ($i=1;$i<=$num_camara;$i++) {



}

?>

</div>
<p align="center">
<input autocomplete='off' name="Boton" type="submit" value="Crear Planta" />
</p>
<input autocomplete='off' type='hidden' name='nombre_planta' value='<? echo @$_REQUEST["nombre_planta"]; ?>'/>
<input autocomplete='off' type='hidden' name='nombre_planta2' value='<? echo @$_REQUEST["nombre_planta2"]; ?>'/>
<input autocomplete='off' type='hidden' name='pulpanombre' value='<? echo @$_REQUEST["pulpanombre"]; ?>'/>
<input autocomplete='off' type='hidden' name='ambientenombre' value='<? echo @$_REQUEST["ambientenombre"]; ?>'/>
<input autocomplete='off' type='hidden' name='otronombre' value='<? echo @$_REQUEST["otronombre"]; ?>'/>

</form>
<br /><br /><br />
<hr />
<font size="1">
<p align='center' style="line-height:100%; margin-top:0; margin-bottom:0;">Ats Intech 2008 Marķa Luisa Santander 0475 - Providencia - Santiago - Chile</p>
<p align='center' style="line-height:100%; margin-top:0; margin-bottom:0;">(56 -2 ) 341 12 71 fax (56-2) 341 12 75 ventas@atsintech.cl - Casilla 3425</p>

</font>
<?
} // clave
?>
</body>
</html>
