<?php
session_start();
include_once('lib_main.php');
$ptabla='enti'; include('ele_datalist.php');
$ptcells=0;
$dom = new DOMDocument();
     $dom->encoding = 'utf-8';
     $dom->xmlVersion = '1.0';
     $dom->formatOutput = true;
$Conte=$dom->appendChild($dom->createElement("div"));
     $Conte->setAttribute("id","ContDato"); 
     $Conte->setAttribute("align","center"); 

$Tabla=$dom->appendChild($dom->createElement("table"));
     $Tabla->setAttribute("id","datos"); 
     $Tabla->setAttribute("align","center"); 
     $Tabla->setAttribute("border","0");
     $Tabla->setAttribute("size120"," ");

     $trow=$Tabla->appendChild($dom->createElement("theader"));

     $trow=$Tabla->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("th","Registro de Personal"));
               $tcell->setAttribute("colspan","2");
               $tcell->setAttribute("bold"," ");
               $tcell->setAttribute("style","font-size:150%");

     $trow=$Tabla->appendChild($dom->createElement("tbody"));

     $trow=$Tabla->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("td"));
               $pdom=$dom;$pele=$tcell;
               $ptabla='enti'; 
               $plabel='Identificación'; $pid='codigo'; $pobj=1; $pwidth=0; $psize=1.5; $palign="center";include('ele_input.php');

     $trow=$Tabla->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("td"));
               $pdom=$dom;$pele=$tcell;
               $pid='descri'; $pobj=3; $pvalue=''; $pclass=''; $preado=0; $pmaxlen=20; $ptype='text'; $psize=1; $plabel="Nombre";include('ele_input.php');

     $trow=$Tabla->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("td"));
               $pdom=$dom;$pele=$tcell;
               $pid='celular'; $pobj=3; $pvalue=''; $pclass=''; $preado=0; $pmaxlen=10; $pwidth=''; $ptype='number'; $psize=1; $plabel="Ceular";include('ele_input.php');

     $trow=$Tabla->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("td"));
               $pdom=$dom;$pele=$tcell;
               $pid='placa'; $pobj=3; $pvalue=''; $pclass=''; $preado=0; $pmaxlen=7; $pwidth=''; $ptype='text'; $psize=1; $plabel="Placa";include('ele_input.php');

     $trow=$Tabla->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:1.5em;");


     $trow=$Tabla->appendChild($dom->createElement("tr"));
               $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("td"));
               $tcell->setAttribute("width","50%");
               $pdom=$dom;$pele=$tcell;
               $plabel='Grabar'; $ponclick="libxvr();"; $pwidth='100%'; $psize=1; $palign="center"; $pcolor=$empr0['empr_color2']; include('ele_button.php'); 

          $tcell=$trow->appendChild($dom->createElement("td"));
               $tcell->setAttribute("width","50%");
               $pdom=$dom;$pele=$tcell;
               $plabel='Cancelar'; $ponclick='{alert(1)}';  $pwidth='100%'; $psize=1; $palign="center"; $Xpcolor=$empr0['empr_color2']; include('ele_button.php');

$link_data=msql_connect('','','',$empr);
$sql_query ='select * from enti0 ';
$sql_query.='order by enti_descri ';
$res_query=msql_query($sql_query,$link_data);
$personal=msql_result($res_query,0,'enti_codigo');


$ContP=$dom->appendChild($dom->createElement("div"));
     $ContP->setAttribute("id","ContPerso"); 
     $ContP->setAttribute("align","center"); 

$TablaP=$dom->appendChild($dom->createElement("table"));
     $TablaP->setAttribute("id","persona"); 
     $TablaP->setAttribute("align","center"); 
     $TablaP->setAttribute("border","0");
     $TablaP->setAttribute("size120"," ");
     $trow=$TablaP->appendChild($dom->createElement("theader"));

     $trow=$TablaP->appendChild($dom->createElement("tr"));
          $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("th","Personal Registrado"));
               $tcell->setAttribute("colspan","4");
               $tcell->setAttribute("bold"," ");
               $tcell->setAttribute("style","font-size:150%");

     $trow=$TablaP->appendChild($dom->createElement("tbody"));
     $trow=$TablaP->appendChild($dom->createElement("tr"));
               $trow->setAttribute("style","height:4em;");
          $tcell=$trow->appendChild($dom->createElement("td", "Identificación"));
               $tcell->setAttribute("width","20%");
               $tcell->setAttribute("align","center");
          $tcell=$trow->appendChild($dom->createElement("td", "Nombre"));
               $tcell->setAttribute("width","30%");
               $tcell->setAttribute("align","center");
          $tcell=$trow->appendChild($dom->createElement("td", "Celular"));
               $tcell->setAttribute("width","10%");
               $tcell->setAttribute("align","center");
          $tcell=$trow->appendChild($dom->createElement("td", "Placa"));
               $tcell->setAttribute("width","10%");
               $tcell->setAttribute("align","center");
          $tcell=$trow->appendChild($dom->createElement("td", "Foto 1"));
               $tcell->setAttribute("width","15%");
               $tcell->setAttribute("align","center");
          $tcell=$trow->appendChild($dom->createElement("td", "Foto 2"));
               $tcell->setAttribute("width","15%");
               $tcell->setAttribute("align","center");


echo $dom->saveXML();
?>
<script>
function libxvr()
{
     var data=new_FormData('ContDato');
     data.append('script','libxvr');
     exe_ajax(data,'','');
}
</script>