<?php
session_start();
foreach($_GET  as $key => $value){${$key}=trim($value);$_PARAMS[$key]=${$key};}  
foreach($_POST as $key => $value){${$key}=trim($value);$_PARAMS[$key]=${$key};}

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);
$empr0=data_maes('empr',$empr);

$newid=clon_docu($docu1,$idnum1);

$docu1=data_docu($docu1,$newid);

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

$response=$dom->appendChild($dom->createElement("response"));
$msgswal=$response->appendChild($dom->createElement("msgswal")); 
     $msgswal->setAttribute("id","msgswal");


          $msgswal->appendChild($dom->createElement("icon","question")); 
//           $msgswal->appendChild($dom->createElement("title","Documento Copiado")); 
          $msgswal->appendChild($dom->createElement("title","Nuevo : ".$docu1['docu'].' - '.$docu1['numero'])); 
//           $msgswal->appendChild($dom->createElement("text","Se Creó el Documento : ".$docu1['docu'].' - '.$docu1['numer
          $msgswal->appendChild($dom->createElement("text","Desea Editarlo ? ")); 
          $msgswal->appendChild($dom->createElement("confirmButtonText","Editar Ahora!")); 
          $msgswal->appendChild($dom->createElement("denyButtonText","Después")); 
          $msgswal->appendChild($dom->createElement("showDenyButton","true")); 

// echo '*/*/*/'.$_FILES['xfile']['type'];

echo $dom->saveXML();

     
?>