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


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

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


//echo '<div id="filtros">';
$dom = new DOMDocument();
     $dom->encoding = 'utf-8';
     $dom->xmlVersion = '1.0';
     $dom->formatOutput = true;

$div = $dom->createElement("div", "");
$dom->appendChild($div);
$div->setAttribute("id","dato_perso");
$div->setAttribute("style","position:relative;float: left;  padding: 10px; height:200px;with:300px;");
 
$forma = $dom->createElement("input", "");
$dom->appendChild($forma);
$forma->setAttribute("id","format_btn");


$zid ='lstPersona' ;
$ztabla = "enti" ;
include('ele_datalist.php');

$zobj = 3;
$zid ='identifica' ;
$zlist ='lstPersona' ;
$zwidth=8;
$zmaxlen = 13 ;
$ztabla = "enti" ;
include('ele_input.php');

$zobj = 2;
$zlabel ='Dirección Matriz' ;
$zid ='matriz' ;
$zreado = 1 ;
//$zwidth=12;
$zmaxlen = 25 ;
include('ele_input.php');

$zobj = 2;
$zlabel ='Principal' ;
$zid ='calle1' ;
$zwidth=15;
$zmaxlen = 25 ;
include('ele_input.php');

$zobj = 2;
$zlabel ='Número' ;
$zid ='callen' ;
$zwidth=6;
$zmaxlen = 10 ;
include('ele_input.php');

$zobj = 2;
$zlabel ='Intersección' ;
$zid ='calle2' ;
$zwidth=15;
$zmaxlen = 25 ;
include('ele_input.php');

$zobj = 2;
$zlabel ='Referencia' ;
$zid ='calle3' ;
$zwidth=15;
$zmaxlen = 25 ;
include('ele_input.php');

$zobj = 2;
$zid ='grabar' ;
$zlabel="Grabar";
include('ele_button.php');

$zobj = 2;
$zid ='consultar' ;
$zlabel="Consultar";
include('ele_button.php');

echo $dom->saveXML;


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

$div = $domx->createElement("div", "");
       $domx->appendChild($div);

$tabla = $domx->createElement("table", "");
       $div->appendChild($tabla);
       $tabla->setAttribute("border","1");
  
$tablahd = $domx->createElement("thead","");
       $tabla->appendChild($tablahd);

$tablatr = $domx->createElement("tr","");
       $tablahd->appendChild($tablatr);

$tablath = $domx->createElement("th","Identificación");
       $tablahd->appendChild($tablath);

echo $domx->saveXML;

//Formas = ele_select, ele_input, ele_button,  ele_title
$xtitulo = "Dirección Entidad";
?>

<script>document.title="<?php echo $xtitulo;?>"</script>
<script  type="text/javascript">
function inicio(){
 
    const contenedor = document.getElementById("resultado");
 
    const tabla = document.createElement("table");
    tabla.setAttribute("border", "1");
 
    let tr = document.createElement("tr");
 
    let th = document.createElement("th");
    let thText = document.createTextNode("Columna 1");
    th.appendChild(thText);
    tr.appendChild(th);
 
    th = document.createElement("th");
    thText = document.createTextNode("Columna 2");
    th.appendChild(thText);
    tr.appendChild(th);
 
    th = document.createElement("th");
    thText = document.createTextNode("Columna 3");
    th.appendChild(thText);
    tr.appendChild(th);
 
    tabla.appendChild(tr);
 
    tr = document.createElement("tr");
 
    td = document.createElement("td");
    tdText = document.createTextNode("Valor 1");
    td.appendChild(tdText);
    tr.appendChild(td);
 
    td = document.createElement("td");
    tdText = document.createTextNode("Valor 2");
    td.appendChild(tdText);
    tr.appendChild(td);
 
    td = document.createElement("td");
    tdText = document.createTextNode("Valor 3");
    td.appendChild(tdText);
    tr.appendChild(td);
 
    tabla.appendChild(tr);
 
    tr = document.createElement("tr");
 
    td = document.createElement("td");
    tdText = document.createTextNode("Valor 1");
    td.appendChild(tdText);
    tr.appendChild(td);
 
    td = document.createElement("td");
    tdText = document.createTextNode("Valor 2");
    td.appendChild(tdText);
    tr.appendChild(td);
 
    td = document.createElement("td");
    tdText = document.createTextNode("Valor 3");
    td.appendChild(tdText);
    tr.appendChild(td);
 
    tabla.appendChild(tr);
 
    contenedor.appendChild(tabla);
 
}
</script>

<script>
window.onload = inicio;
</script>
<?php ?>
<div id="resultado" style="position:realtive;float: left;margin: 0px 0px 0px 10px; padding: 10px; ">
</div>


