<?php
 
session_start();
$com = "A";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>

<body onLoad="document.getElementById('tip_cli').focus()">
<?php
 
$ayuda = 'DP16000_AG.php';
include("DYAYUDA.php");
?>

<form name="frm1" id="frm1" method="post" action="">
  <table   align="center">
    <tr>
      <th colspan="4"><span class="Estilo2">AGREGAR NIVEL </span></th>
    </tr>
   
    <tr>
      <td style="#FFFFFF">Tipo de Cliente: </td>
      <td style="#6699CC"><label>
        <select name="tip_cli" id="tip_cli" tabindex="1"><?php

		require_once("DG71200_CL.php");
		$tipoCliente=new TipCli($data);
		$sq_tipcli=$tipoCliente->listaCompleta();
		if(!isset($_REQUEST['tip_cli'])){
			if(mysqli_num_rows($sq_tipcli)>0){
				$dt_tipcli=mysqli_fetch_array($sq_tipcli);
				mysqli_data_seek($sq_tipcli,0);
			}	
			$selTipCli=$dt_tipcli['id_tipcli'];
		}else{
			$selTipCli=$_REQUEST['tip_cli'];
		}
		while($dt_tipcli=mysqli_fetch_array($sq_tipcli)){
			if($selTipCli==$dt_tipcli['id_tipcli']) 
				echo "<option value=\"$dt_tipcli['id_tipcli']\" selected>$dt_tipcli['des_tipcli']</option>";
			else 
				echo "<option value=\"$dt_tipcli['id_tipcli']\">$dt_tipcli['des_tipcli']</option>";			
		}
		?></select>
      </label></td>
      <td>Nivel:</td>
      <td style="#6699CC"><input name="num_niv" type="text" id="num_niv" size="5" tabindex="3" value="<?php
echo $_REQUEST['num_niv'];?>"></td>
    </tr>
    <tr>
      <td style="#FFFFFF"><div align="left">%Comision:</div></td>
      <td colspan="3" style="#6699CC"><input name="por_com" type="text" id="por_com" size="20" tabindex="4" value="<?php
echo $_REQUEST['por_com'];?>"></td>
    </tr>
    <tr>
      <td colspan="4"><div align="center" class="inputcodigo">
         
        <input type="button" name="Submit" value="Guardar" onClick="openpage('DG71300_AC.php','_self')" tabindex="5"/>
        &nbsp;&nbsp;&nbsp;
		 
		<input type="button" name="Submit2" value="Regresar" onClick="openpage('DG71300_PR.php','_self')" tabindex="6"/>
		
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
