403Webshell
Server IP : 192.169.170.185  /  Your IP : 216.73.216.97
Web Server : Apache
System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64
User : akhilnew ( 1712764)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/akhilnew/www/gastroenterojournal.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/akhilnew/www/gastroenterojournal.com/generate_receipt.php
<?php
require_once('inc/config.php');
require_once(INC.'functions.php');
require_once(INC.'MPDF53/mpdf.php');

$stmt = $mysqli->prepare("SELECT websitename, websiteemail FROM settings ORDER BY settingsid DESC LIMIT 1") or die('An error occurred. Please try after some time.');
$stmt->execute();
$stmt->bind_result($websitename, $websiteemail);
$stmt->fetch();
$stmt->close();

if(($_SERVER['REQUEST_METHOD'] === 'POST')):
	$txnid = strip_tags(remspace(sanitize(escape($_POST['txnid']))));
	$email = strip_tags(urldecode(remspace(sanitize(escape($_POST['email'])))));

	$stmt = $mysqli->prepare("SELECT fullname, email, phone, address, country, amount, currency, refnumber, title, status, creation FROM transactions WHERE (txnid = ? AND email = ?)") or die('An error occurred. Please try after some time.');
	$stmt->bind_param('ss', $txnid, $email);
	$stmt->execute();
	$stmt->store_result();
	$count_rows = $stmt->num_rows();
	$stmt->bind_result($fullname, $email, $phone, $address, $country, $amount, $currency, $refnumber, $title, $status, $creation);
	$stmt->fetch();
	$stmt->close();
	if($count_rows == 1):
		$fullname = htmlentities($fullname);
		$title = htmlentities($title);
		$currencies = array('INR' => 'Rs. ', 'USD' => '$ ');
		$currency = (array_key_exists($currency, $currencies)) ? $currencies[$currency] : '';
		$statuslist = array('success' => 'successful', 'failed' => 'failed');
		$status = (array_key_exists($status, $statuslist)) ? $statuslist[$status] : '';
		$creation = date('d/m/Y', strtotime($creation));

$html = <<<EOJ
<html><body style="background:#fff"><div style="width:7.5in;height:10.9in;background:#fcfbf2;border:2px solid #000;margin:0 auto;font-size:11px;color:#000"><div style="float:left;width:100%;height:auto;margin-top:20px;text-align:center"><img src="https://www.akinik.com/images/akiniklogo.png" alt="{$websitename}" height="60" /><br clear="all"><br clear="all"><h1 style="margin:0;font-size:22px;font-style:italic">{$websitename}</h1></div><div style="float:left;width:100%;height:auto;margin-top:20px;text-align:center"><h1 style="margin:0;font-size:18px">Payment Receipt</h1></div><div style="float:left;width:100%;height:auto;margin-top:40px;padding:0 35px"><table border="0" cellpadding="0" cellspacing="0" style="float:left;width:100%;height:auto;border-collapse:collapse"><tr><td style="width:45%" colspan="2" rowspan="3" valign="top"><h2>Paid Online</h2></td><td style="width:21%;border:1px solid #000;padding:5px" valign="top"><b>Date:</b> {$creation}</td><td style="width:34%;border:1px solid #000;padding:5px" valign="top"><b>TXN ID.:</b> {$txnid}</td></tr><tr><td style="width:50%;border:1px solid #000;border-bottom:none;padding:5px" valign="top" colspan="2"><b>Name:</b> {$fullname}</td></tr></table><table border="0" cellpadding="0" cellspacing="0" style="float:left;width:100%;height:auto;border-collapse:collapse"><tr><td style="width:9%;border:1px solid #000;padding:5px" align="center" valign="top"><b>S. No.</b></td><td style="width:71%;border:1px solid #000;padding:5px" colspan="2" valign="top"><b>Description</b></td><td style="width:20%;border:1px solid #000;padding:5px" align="center" valign="top"><b>Price</b></td></tr><tr><td style="width:8%;height:500px;border:1px solid #000;padding:5px" align="center" valign="top">1.</td><td style="width:72%;height:500px;border:1px solid #000;padding:5px" colspan="2" valign="top"><b>Journal:</b> {$websitename}<br><br><b>Article Ref. No.:</b> {$refnumber}<br><br><b>Article Title:</b> {$title}</td><td style="width:20%;height:500px;border:1px solid #000;padding:5px" align="center" valign="top">{$currency} {$amount}</td></tr><tr><td style="width:80%;border:1px solid #000;padding:5px" colspan="3" align="right" valign="top"><b>Total</b></td><td style="width:20%;border:1px solid #000;padding:5px" align="center" valign="top">{$currency} {$amount}</td></tr></table></div><div style="float:left;width:100%;height:auto;margin-top:10px;padding:0 35px"><b>Terms &amp; Conditions</b><br><br>1. Order can be cancelled within 3 days<br>2. All disputes are to be settled in Delhi Courts only<br>3. There is no refund policy</div></div></body></html>
EOJ;

$foot  = '<div style="float:left;width:100%;color:#777;font-size:9px;text-align:center">'.$websitename.'<br>C-11/169, Sector-3, Rohini, Delhi, India<br>Email: '.$websiteemail.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Website: '.ltrim(rtrim($baseurl, '/'), 'http://').'</div>';

		$mpdf = new mPDF('UTF-8', 'A4', '', 'Georgia', 12, 12, 10, 0, 0, 15);
		$mpdf->SetDisplayMode('fullpage');
		$mpdf->WriteHTML($html);
		$mpdf->SetHTMLFooter($foot);
		$mpdf->Output($txnid.'.pdf');

		header('Content-Description: File Transfer');
		header('Content-Type: application/octet-stream');
		header('Content-Disposition: attachment; filename='.basename($txnid.'.pdf'));
		header('Content-Transfer-Encoding: binary');
		header('Expires: 0');
		header('Cache-Control: must-revalidate');
		header('Pragma: public');
		header('Content-Length: '.filesize($txnid.'.pdf'));
		ob_clean();
		flush();
		readfile($txnid.'.pdf');
		@unlink($txnid.'.pdf');
		exit();
	else:
		header('location:'.$baseurl);
		exit();
	endif;
else:
	header('location:'.$baseurl);
	exit();
endif;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit