<?php 
session_start();
foreach($_GET as $campo => $valor){${$campo}=trim($valor);} 
foreach($_POST as $campo => $valor){${$campo}=trim($valor);} 

include_once('lib_main.php');
if(!empty($empr)){$link_data=msql_connect('','','',$empr); $cfg_empr=$empr;}
$user_codigo=$_SESSION['user_codigo'];
$user0=data_maes('user',$user_codigo);

if (date('d') > 10 and date('d') < 18)
    $zqui = 1;
else
    $zqui = 2;

$ztabla='pers';
$zid='cedula_dl';
include('ele_datalist.php');

$dom = new DOMDocument();
     $dom->encoding = 'utf-8';
     $dom->xmlVersion = '1.0';
     $dom->formatOutput = true;

     $src='//'.$domain.'/_lib/nomi_perso.js'.$js_version;
     $script=$dom->appendChild($dom->createElement("script"," "));
     $script->setAttribute("src",$src);
echo $dom->saveXML();


$dom = new DOMDocument();
     $dom->encoding = 'utf-8';
     $dom->xmlVersion = '1.0';
     $dom->formatOutput = true;

$divp = $dom->createElement("div", "");
$dom->appendChild($divp);
$divp->setAttribute("id","dato_rol");

$divc = $dom->createElement("div", "");
$dom->appendChild($divc);
$divc->setAttribute("id","divc");
$divc->setAttribute("style","position:relative;");
$divc->setAttribute("class","noprint");

$zdom   = $dom;
$zele   = $divc;
$zobj = 2;
$zid ='quince' ;
$zlabel ='Cálculo' ;
$zwidth=3;
$zmaxlen=2;
$zvalue = $zqui;
$zdefa = $zqui;
$zoptions = "-,Elejir;1,Primera;2,Segunda;3,Bono Escolar;4,Bono Navideño;5,Otros";
include('ele_select.php');

$zdom   = $dom;
$zele   = $divc;
$zid    = 'proceso' ;
$zlabel = 'Proceso' ;
$zwidth = 2;
$ztype  = 'month';
include('ele_input.php');

$zdom   = $dom;
$zele   = $divc;
$zobj = 2;
$zid ='cia' ;
$zlabel ='Empresa' ;
$ztabla="empr" ;
include('ele_select.php');

$divd = $dom->createElement("div", "");
$dom->appendChild($divd);
$divd->setAttribute("id","dato_emple");
$divd->setAttribute("style","position:relative;");
$divd->setAttribute("class","noprint");

$zdom   = $dom;
$zele   = $divd;


$zdom   = $dom;
$zele   = $divd;
$zobj   = 2;
$zid    = 'cedula' ;
$zlabel = "Cédula";
$ztabla='pers';
$zlist="cedula_dl";
include('ele_input.php');

$zdom   = $dom;
$zele   = $divd;
$zobj   = 2;
$zid    = 'nove' ;
$zlabel = "Novedad";
$ztabla='nove';
include('ele_select.php');

$zdom   = $dom;
$zele   = $divd;
$zobj   = 2;
$zid    = 'valnov' ;
$zclass ='numeric-dec' ;
include('ele_input.php');

$div3 = $dom->createElement("div", "");
$dom->appendChild($div3);
$div3->setAttribute("id","div3");
$div3->setAttribute("style","float:right;");
$div3->setAttribute("class","noprint");

$zdom=$dom;
$zele=$div3;
$zobj = 2;
$zid ='grabar' ;
$zlabel="GRABAR";
$zonclick="{graba_nove();}";
include('ele_button.php');

$zdom=$dom;
$zele=$div3;
$zobj = 2;
$zid ='calcula' ;
$zlabel="CALCULAR";
$zonclick="{calcula_rol();}";
include('ele_button.php');

$zdom=$dom;
$zele=$div3;
//$zobj = 2;
$zid ='imprimir' ;
$zlabel="IMPRIMIR";
$zonclick="{imprimir_rol();}";
include('ele_button.php');

$zdom=$dom;
$zele=$div3;
$zobj = 2;
$zid ='limpiar' ;
$zlabel="CANCELAR";
$zonclick="{limpia_emple();}";
include('ele_button.php');

echo $dom->saveXML();

//Formas = ele_select, ele_input, ele_button,  ele_title
$xtitulo = "Calculos";
?>
<div id="result"></div>
<script>document.title="<?php echo $xtitulo;?>"</script>
<script type="text/javascript">imprimir_rol();</script>