<?php
 
session_start();
include("DMMYSQLG.php");

?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>

<body>
<?php
 
$ayuda = 'DX1000A_AG.php';
include("DYAYUDA.php");
?>

<form name="frm1"  id="frm1"method="post" action="">
  <table width="847"  align="center">
    <tr>
      <th colspan="11" class=\"titulo\"><div align="center">AGREGAR OPERADORES  </div></th>
    </tr>
    <tr>
      <td colspan="2"><strong>USUARIO.</strong></td>
      <td colspan="5"><input name="t1" type="text" id="t1" tabindex="1"
	  <?php
 
	  if(isset($_POST['t1'])){
	  	echo 'value ="' . $_POST['t1'] . '"';
	  }
	  ?>
	  ></td>
      <td colspan="2"><strong>CONTRASE&Ntilde;A.</strong></td>
      <td colspan="2"><input name="t2" type="password" id="t2" tabindex="2"
	  <?php
 
	  if(isset($_POST['t2'])){
	  	echo 'value ="' . $_POST['t2'] . '"';
	  }
	  ?>
	  ></td>
    </tr>
    <tr>
      <td colspan="2" nowrap><strong>NOMBRE.</strong></td>
      <td colspan="2" nowrap><input name="t3" type="text" id="t3" tabindex="3"
	  <?php
 
	  if(isset($_POST['t3'])){
	  	echo 'value ="' . $_POST['t3'] . '"';
	  }
	  ?>
	  ></td>
      <td width="86" nowrap><strong>APELLIDO PATERNO.</strong></td>
      <td colspan="3" nowrap><input name="t4" type="text" id="t4" tabindex="4"
	  <?php
 
	  if(isset($_POST['t4'])){
	  	echo 'value ="' . $_POST['t4'] . '"';
	  }
	  ?>
	  ></td>
      <td width="82" nowrap><strong>APELLIDO MATERNO.</strong> </td>
      <td colspan="2" nowrap><input name="t5" type="text" id="t5" tabindex="5"
	  <?php
 
	  if(isset($_POST['t5'])){
	  	echo 'value ="' . $_POST['t5'] . '"';
	  }
	  ?>
	  ></td>
    </tr>
    <tr>
      <td colspan="2"><strong>SELECCIONA EMPRESA.</strong> </td>
      <td colspan="5"><select name="t6" id="t6" tabindex="6"  onChange="sel_emp_sn()" onclick="sel_emp_sn()">
        <?php
 
		if(isset($_POST['t6']) and $_POST['t6']==1){
			echo '<option value="1" selected>SI</option>';
		}else{
			echo '<option value="1">SI</option>';
		}
	   	if(isset($_POST['t6']) and $_POST['t6']==0){
			echo '<option value="0" selected>NO</option>';
		}else{
			echo '<option value="0">NO</option>';
		} 
	  ?>
      </select></td>
      <td colspan="2"><strong>ACCESO RESTRINGIDO.</strong> </td>
      <td colspan="2"><select name="t9" id="t9" tabindex="9">
        <?php
 
	  	if($_POST['t9']==1){
			echo '<option value="1" selected>SI</option>';
		}else{
			echo '<option value="1">SI</option>';
		}
		if($_POST['t9']==0){
			echo '<option value="0" selected>NO</option>';
		}else{
			echo '<option value="0">NO</option>';
		}
		
	  ?>
      </select></td>
    </tr>
    <tr>
      <td colspan="2"><strong>EMPRESA.</strong></td>
      <td colspan="5"><select name="t7" id="t7" tabindex="7" onChange="javascript: document.getElementById('frm1').submit()" 
<?php
 
if($_POST['t6']==1 or !isset($_POST['t7'])){
	echo 'disabled="disabled"';
} 
 ?>	  
	  >
	  <option></option>
        <?php
 
if(isset($_POST['t7'])){
	$em = $_POST['t7'];
}
@$sql2=mysqli_query($con ,"select * from dxempres");
	while (@$reg2 = mysqli_fetch_array($sql2))
	{
		if($reg2['cla_emp'] == $em){
			echo '<option value="'.$reg2['cla_emp'].'" selected>'.$reg2['siglas'].'</option>';
		}else{
			echo '<option value="'.$reg2['cla_emp'].'">'.$reg2['siglas'].'</option>';
		}
	}
?>
      </select></td>
      <td colspan="2"><input type="checkbox" name="manual" value="1" id="manual">
      <strong>TARIFA MANUAL</strong></td>
      <td colspan="2"><label>
        <input type="checkbox" name="negativo" value="1" id="negativo">
        <strong>NEGATIVO</strong>
      </label></td>
    </tr>
    <tr>
      <tH colspan="11">OPCIONES</tH>
    </tr>
    <tr>
      <td class="thcons"><input name="c1" type="checkbox" id="c1" tabindex="10" value="1"></td>
      <td colspan="10" class="thcons"><div align="left"><strong>ALMACEN.</strong></div></td>
    </tr>
    <tr>
      <td width="20"><input name="ad1" type="checkbox" id="ad1" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos.</span></td>
    </tr>
    <!--tr>
      <td><input name="ad5" type="checkbox" id="ad5" tabindex="10" value="1"></td>
      <td><span class="Estilo17">Departamentos.</span></td>
      <td><input name="ad6" type="checkbox" id="ad6" tabindex="10" value="1"></td>
      <td colspan="3"><span class="Estilo17">Agrupadores.</span></td>
      <td><input name="ad7" type="checkbox" id="ad7" tabindex="10" value="1"></td>
      <td colspan="4"><span class="Estilo17">Stocks.</span></td>
    </tr>
    <tr>
      <td><input name="ad9" type="checkbox" id="ad9" tabindex="10" value="1"></td>
      <td><span class="Estilo17">Proveedores.</span></td>
      <td><input name="ad10" type="checkbox" id="ad10" tabindex="10" value="1"></td>
      <td colspan="3"><span class="Estilo17">Articulos.</span></td>
      <td colspan="5">&nbsp;</td>
    </tr-->
    <tr>
      <td class="thcons"><label>
        <input type="checkbox" name="co1" value="1" id="co1">
      </label></td>
      <td colspan="10" class="thcons"><div align="left"><strong>COSTOS.</strong></div></td>
    </tr>
    <tr>
      <td><input name="ad2" type="checkbox" id="ad2" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos. </span></td>
    </tr>
    <tr>
      <td class="thcons"><label>
        <input type="checkbox" name="pun" value="1" id="pun">
      </label></td>
      <td colspan="10" class="thcons"><div align="left"><strong>PUNTO DE VENTA. </strong></div></td>
    </tr>
    <tr>
      <td><input name="ad4" type="checkbox" id="ad4" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos. </span></td>
    </tr>
    <tr>
      <td class="thcons"><label>
        <input type="checkbox" name="btq" value="1" id="btq">
      </label></td>
      <td colspan="10" class="thcons"><div align="left"><strong>BOUTIQUE. </strong></div></td>
    </tr>
    <tr>
      <td><input name="ad5" type="checkbox" id="ad5" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos. </span></td>
    </tr>
	    <tr>
      <td class="thcons"><label>
        <input type="checkbox" name="min" value="1" id="min">
      </label></td>
      <td colspan="10" class="thcons"><div align="left"><strong>SERVI BAR. </strong></div></td>
    </tr>
    <tr>
      <td><input name="ad6" type="checkbox" id="ad6" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos. </span></td>
    </tr>	
	<tr>
      <td class="thcons"><label>
        <input type="checkbox" name="uti" value="1" id="uti">
      </label></td>
      <td colspan="10" class="thcons"><div align="left"><strong>UTILERIAS. </strong></div></td>
    </tr>
    <tr>
      <td><input name="ad8" type="checkbox" id="ad8" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos. </span></td>
    </tr>	
    <tr>
      <td class="thcons"><label>
        <input type="checkbox" name="fo1" value="1" id="fo1">
      </label></td>
      <td colspan="10" class="thcons"><div align="left"><strong>FRONT OFFICE. </strong></div></td>
    </tr>
    <!--tr>
      <td class="thcons"><input name="ad20" type="checkbox" id="ad20" tabindex="10" value="1"  onClick="sel_em(ad20.checked)"></td>
      <td colspan="10" class="thcons"><div align="left">Ordenes</div></td>
    </tr-->
    <tr>
      <td><input name="ad3" type="checkbox" id="ad3" tabindex="10" value="1"></td>
      <td colspan="10"><span class="Estilo17">Seleccionar Permisos. </span></td>
    </tr>
    <!--tr>
      <td class="thcons"><input name="ad19" type="checkbox" id="ad19" tabindex="10" value="1"></td>
      <td colspan="5" class="thcons"><div align="left">Comedores</div></td>
      <td class="thcons"><input name="ad18" type="checkbox" id="ad18" tabindex="10" value="1"></td>
      <td colspan="4" class="thcons"><div align="left">Punto de Venta </div></td>
    </tr-->
    <tr>
      <td style="#0099FF"></td>
      <td width="150" style="#0099FF"></td>
      <td width="20" style="#0099FF"></td>
      <td width="130" style="#0099FF"></td>
      <td style="#0099FF"></td>
      <td width="21" style="#0099FF"></td>
      <td style="#0099FF"></td>
      <td width="100" style="#0099FF"></td>
      <td style="#0099FF"></td>
      <td width="28" style="#0099FF"></td>
      <td width="164" style="#0099FF"></td>
    </tr>
    <tr>
      <td colspan="11" style="#FFFFFF"><div align="center">
          &nbsp;
          <input type="button" name="Submit2" value="Guardar" accesskey="G" onClick="openpage('DX10000_AC.php','_self')"/>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="button" name="Submit2" value="Regresar" onClick="openpage('DX10000_PR.php','_self')"/>
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
