<?
include("../../conexion/class-sb-conexion.php");
include("../../funciones/joda-func.php");

//	Autorización
	$id_empresa = $_SESSION['ss_empresa'];
	$id_user = $_SESSION['ss_user'];
	$id_autoriza=78;
	include("../../../conex.php");
	include("../../../autoriza.php");

	if($evento=='inst'){
		//$id_autoriza=78;
		//include("../../../conex.php");
		//include("../../../seguridad/autoriza.php");
		if ($crear==0)  
		{
		echo "<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		echo "No Autorizado";
		echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		exit();
		}
	}
	 
	 if($evento=='upda'){
		//$id_autoriza=78;
		//include("../../../conex.php");
		//include("../../../seguridad/autoriza.php");
		if ($editar==0)  
		{
		echo "<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		echo "No Autorizado";
		echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		exit();
		}
	}
	



	$dbx = new sb_mysql();   
	//$db->pagina=$pagina;
	//$db->registros=11;
	if($evento=='upda'){
	$consulta = $dbx->consulta_free("select Id, anual, mes, factor from sb_renta_factores where Id=".$id);
	$registro = $dbx->sb_array($consulta);
    }

?>
<form name="form" action="tb_mant_renta_guardar.php" target="guardar" method="get">
<table  border="0" cellpadding="0" cellspacing="3" style="font-size:18px" align="center" >
  <caption style="color:#21426B; font-weight:bold">
  Factores Renta
  </caption>
  
  <tr style="color:#21426B;">
  	<th style="background-color:threedface; color:#21426B;" scope="row" align="right">
    	&nbsp;Codigo:
    </th>
    <td align="left">&nbsp;
    	<?=$registro['Id']?>
        <input name="evento" type="hidden" value="<?=$evento?>" />
        <input name="id" type="hidden" value="<?=$id?>" />
     
    </td>
  </tr>
  <tr style="color:#21426B;">
    <th style="background-color:threedface" scope="row" align="right">&nbsp;Año:</th>
    <td align="left" >
    	&nbsp;
        <input name="campo['anual']" type="text" size="30" value="<?=$registro['anual']?>" />
    </td>   
  </tr>
  <tr style="color:#21426B;">
    <th style="background-color:threedface" scope="row" align="right">Mes:</th>
    <td align="left" >
    	&nbsp;
        <input style="text-align:right" name="campo['mes']" type="text" size="10" value="<?=$registro['mes']?>" />
    </td>   
  </tr>
  <tr style="color:#21426B;">
    <th style="background-color:threedface" scope="row" align="right">Factor:</th>
    <td align="left" >
    	&nbsp;
        <input style="text-align:right" name="campo['factor']" type="text" size="10" value="<?=$registro['factor']?>" />
    </td>   
  </tr>
<tr><td colspan="4"><input type="submit" value="Guardar" /></td></tr> 
  
</table><iframe name="guardar" width="0" height="0" ></iframe>
</form>


