<?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);

$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_hora");

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

$zdom   = $dom;
$zele   = $divc;
$zobj = 2;
$zid ='quince' ;
$zlabel ='Cálculo' ;
$zwidth=3;
$zmaxlen=2;
$zvalue = 2;
$zdefa = 2;
$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');

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

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


$divh = $dom->createElement("div", "");
$dom->appendChild($divh);
$divh->setAttribute("id","dato_trabajo");
$divh->setAttribute("style","position:relative;");

$zdom = $dom;
$zele = $divh;
$zlabel ='Horas' ;
$zid ='horas' ;
$zmax = 240;
$zwidth=2;
$zmaxlen= 3;
$zvalue = 240;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 1;
$zid ='h25';
$zclass ='numeric-dec' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 1;
$zid ='h50' ;
$zclass ='numeric-dec' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 1;
$zid ='h100' ;
$zclass ='numeric-dec' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 1;
$zid ='enfer' ;
$zclass ='numeric-dec' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 1;
$zid ='licensin' ;
$zclass ='numeric-dec' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 1;
$zid ='licencon' ;
$zclass ='numeric-dec' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
$zonblur="{suma_horas();}";
include('ele_input.php');

$zdom = $dom;
$zele = $divh;
$zobj = 2;
$zid ='THoras' ;
$zclass ='numeric-dec' ;
$zlabel ='Total Horas' ;
$zwidth=3;
$zmaxlen=6;
$zvalue = 0.00;
include('ele_input.php');

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

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

$zdom=$dom;
$zele=$div3;
$zobj = 2;
$zid ='consulta' ;
$zlabel="CONSULTAR";
$zonclick="{consu_hora();}";
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 = "Horas";
?>
<div id="result"> </div>
<script>document.title="<?php echo $xtitulo;?>"</script>
<script type="text/javascript">consu_hora();</script>