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/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/akhilnew/public_html//chapter.php
<?php
session_start();
if(file_exists('inc/config.php')): require_once('inc/config.php'); else: die('Required file doesn\'t exist.'); endif;

$files_inc = array('encryptions', 'functions', 'sendmail', 'csrf.class', 'gateway.class', 'txn.class', 'MPDF53/mpdf');
foreach($files_inc as $file_inc):
	if(file_exists(SEC.$file_inc.'.php')): require_once(SEC.$file_inc.'.php'); else: die('Required file doesn\'t exist.'); endif;
endforeach;

$stmt = $mysqli->prepare("SELECT websitename, websiteemail, fromname, fromemail, replyname, replyemail, mailer, bookchapterprice, signature FROM settings ORDER BY settingsid DESC LIMIT 1") or die('An error occurred. Please try after some time.');
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($websitename, $websiteemail, $fromname, $fromemail, $replyname, $replyemail, $mailer, $bookchapterprice, $signature);
$stmt->fetch();
$stmt->close();
$chapterprice = number_format($bookchapterprice, 0);

$decryptedtoken = isset($_POST['token']) ? strip_tags($en->decrypt($fn->sanitize($fn->escape($_POST['token'])))) : '';
$decryptedfocus = isset($_POST['focus']) ? strip_tags($en->decrypt($fn->sanitize($fn->escape($_POST['focus'])))) : '';

if(($_SERVER['REQUEST_METHOD'] === 'POST') && ($decryptedtoken === '[PHPSESSID]=[GEN_TOKEN]') && ($decryptedfocus === '[MAKE_CHAPTER_PAYMENT]')):
	function output($stat, $text, $type = 'text'){
		return json_encode(array('stat' => $stat, $type => $text));
	}
	if($csrf->check_valid('post')):
		function gCAPTCHA($reCAPTCHA){
			$secret = '6Le7txAUAAAAANs5mHnrGCEitKJwCbQhCSf81fP5';
			$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$reCAPTCHA);
			return json_decode($verifyResponse);
		}
		if(file_exists('inc/chapter.php')):
			require_once('inc/chapter.php');
			exit();
		else:
			die(output(false, 'Required file is missing.'));
		endif;
	else:
		die(output(false, 'Submission not allowed.'));
	endif;
endif;

function countries(){
	global $mysqli;$html = '';
	$stmt = $mysqli->prepare("SELECT TRIM(nicename) FROM country ORDER BY TRIM(nicename) ASC") or die('An error occurred. Please try after some time.');
	$stmt->execute();
	$stmt->store_result();
	if($stmt->num_rows() > 0):
		$stmt->bind_result($country);
		while($stmt->fetch()):
			$html .= ($country) ? '<option value="'.$country.'">'.$country.'</option>' : '';
		endwhile;
		$stmt->close();
	endif;
	return $html;
}
$countries = countries();

$type = isset($_GET['type']) ? strip_tags($fn->remaspace($fn->sanitize($fn->escape($_GET['type'])))) : '';
$option1 = isset($_GET['option1']) ? strip_tags($fn->remaspace($fn->sanitize($fn->escape($_GET['option1'])))) : '';
$option2 = isset($_GET['option2']) ? strip_tags($fn->remaspace($fn->sanitize($fn->escape($_GET['option2'])))) : '';
$option3 = isset($_GET['option3']) ? strip_tags($fn->remaspace($fn->sanitize($fn->escape($_GET['option3'])))) : '';

$types = array('payment' => 'Make Payment', 'response' => 'Payment Response');
$title = (array_key_exists($type, $types)) ? $types[$type] : '';

echo <<<EOJ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$title}</title>
EOJ;
?>
<link rel="shortcut icon" href="<?php echo $imageurl;?>favicon.ico" />
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet">
<style type="text/css">
*{margin:0px;padding:0px;box-sizing:border-box;outline:none}html,body{width:100%;height:100%}
body{background-color:#2874f0;color:#333;font-size:12px;font-family:'Roboto', sans-serif;overflow-y:scroll}

a,a:focus,a:hover{text-decoration:none}h3,b,label{font-weight:500}button,input,select,textarea{font-family:'Roboto', sans-serif}

.fluid,.header,.holder,.form,.head,.body,.foot,.row,.flex,.label,.loader,.output,.cards{float:left;width:100%;height:auto}

.holder{margin-top:20px}.wrap{width:400px;margin:0px auto}

.header{padding:5px 10px;background-color:#fff;box-shadow:0px 1px 1px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 1px rgba(0,0,0,0.3)}
.header img{float:left;height:26px}
.header a{float:right;padding:7px 10px 6px;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#2874f0;font-size:11px;font-weight:500;text-transform:uppercase;text-decoration:none;transition:0.4s;-moz-transition:0.4s;-webkit-transition:0.4s}
.header a:hover{background-color:#eee}
.header a:active{background-color:#ddd;transition:0s;-moz-transition:0s;-webkit-transition:0s}

.form{background-color:#eee;box-shadow:0px 1px 1px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 1px rgba(0,0,0,0.3)}
.form .head{padding:12px 0px 10px;border-bottom:1px solid #e5e5e5;color:#000;font-size:16px;text-align:center;text-transform:uppercase;text-decoration:none;text-shadow:0px 1px 1px #fff}
.form .body{padding:20px 25px 15px}
.form .body .row{margin-bottom:15px}
.form .body .row .label{font-size:11px;text-transform:uppercase}
.form .body .row .label span{float:right;color:#f00}
.form .body .row .field:focus{border-color:#2874f0}
.form .body .row .flex{display:flex}
.form .body .row .flex label{float:left;height:30px;line-height:29px;background-color:#fff;border:1px solid #d9d9d9;border-radius:25px;-moz-border-radius:25px;-webkit-border-radius:25px;font-size:11px;text-align:center;text-transform:uppercase;flex:1;position:relative}
.form .body .row .flex label.checked{border-color:#2874f0}
.form .body .row .flex input{float:left;position:absolute;top:0;left:0;opacity:0}

.field,.button{float:left;width:100%;height:30px;padding:5px;background-color:#fff;border:1px solid #d9d9d9;border-top-color:#c0c0c0;color:#000;font-size:13px;font-family:'Roboto', sans-serif}
.field:disabled{background-color:#ebebe4}

.button,.output{height:32px;background-color:#2874f0;border:none;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-shadow:0px 1px 1px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 1px rgba(0,0,0,0.3);color:#fff;font-size:13px;font-family:'Roboto', sans-serif;text-align:center;text-transform:uppercase;cursor:pointer;transition:0.4s;-moz-transition:0.4s;-webkit-transition:0.4s}
.button:active{background-color:#236ade}

.loader{width:100%;height:100%;background-color:rgba(255,255,255,0.8);position:fixed;top:0px;bottom:0px;left:0px;right:0px;z-index:99;display:none}
.loading{width:200px;height:60px;line-height:58px;background:#fff url('<?php echo $imageurl;?>loader.gif') 15px center no-repeat;border-top:1px solid #eee;box-shadow:0px 1px 1px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 1px rgba(0,0,0,0.3);cursor:default;color:#000;font-size:18px;text-align:left;text-indent:55px;position:fixed;top:40%;left:0px;right:0px;margin:auto;z-index:999}

.output{height:42px;line-height:42px;margin-top:10px;background-color:#212121;text-transform:none;display:none}

.cards{height:36px;margin:10px 0px;background:url('<?php echo $imageurl;?>pm-sprite.png') center center no-repeat;background-size:contain}

.noscript{display:none}

.msg{width:400px;height:auto;margin:0px auto;padding:50px 10px;background-color:#fff;border-top:1px solid #eee;font-size:11px;font-weight:500;text-align:center;text-transform:uppercase;vertical-align:middle;box-shadow:0px 1px 2px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3)}
.msg.s h3,.msg.s b{color:#1fb25a}
.msg.e h3,.msg.e b,.msg.e a{color:#ff4949}.msg.s a{color:#1fb25a}.msg a:hover{text-decoration:underline}

.msg .button{float:none;width:auto;height:auto;padding:8px 12px 9px;background-color:#1fb25a}
.msg .button:active{background-color:#149a4b}

@media (max-width:480px){
.holder{width:100%;margin:0px}form{margin:0px}
}
@media (max-width:360px){
form .body{padding:10px 15px 5px}
form .fl,form .fr{width:100% !important}form .fr{margin-top:10px}
}
</style>
<!--[if IE]>
<style type="text/css">
body{font-family:Arial, Helvetica, sans-serif;font-size:12px}
.noscript{display:block}
.holder{display:none}
</style>
<![endif]-->
</head>
<body>
<?php
$s_svg = '<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="48px" height="48px" viewBox="0 0 48 48" enable-background="new 0 0 48 48" xml:space="preserve"><image id="image0" width="48" height="48" x="0" y="0" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA8FBMVEVHcEwfslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslofslohs1wWr1Mis10TrlEPrE4RrU8js10NrEwAoji8583F6tMApD0Kq0qZ3LP///+t4sEAoDKi37oAoTaV2rAPq0ue3bey48Ugs1sAp0JxzZV/0p8csVhQwnxZxYOQ2KxkyYtcxoXd8+YAnS0cr1VCvHGo4L4ktF7U79/Z8ePm9uwYyNNSAAAAJXRSTlMAHlaFr8/s8opbJBFsw8p0kft8L0pnaSnV4KIHGJzb9bXlljZCi05VigAAAAFiS0dENKmx6f0AAAAHdElNRQfiBhwBDS3zZEWhAAACRElEQVRIx42WaWOaQBCGFy800Xol2hySNnZQzoqi0lhMTGtMq23//78p5zJci+8XrucdZpbdWQhJiiuVK9Uaz9eqlXrjghTostmCmD60Lxk4V69BSnwn9zXtLmSrl4lftCBX1X6av+oCS40kfw0Fasf5QRGfcFwV8wAlNJzdcwwwpIaPZ/FwQ8f/PB6gHEwHNiVOJmJ4znmGDpOfSrKiqMHFrcvfMStWNf3rzJiHDncmNpn5KPrCNJfU0SsYIlVZrU1HS11Tw4G6Z+XvxfcchuJXPiQNVj7WNzPQ7Gni3RuQOiMfaxPy5nfZN4xIhVEvjW9udMlPqYVqtsXt1rZRvQvKL6zwUwiEpzxYzy/6zs6Kb8jTgKqRh4h/Nc0fK98hStZPyq8tOfxw8BAabFi9ug/3nmMay0dX6GRyDDyK7+rN2tmipKP44UcLUhK8407bh8DbSpyscD4K4p2iP3nHyfxAkf07qndtaFPEO8PqT25b+xU5fj/T06OF8/E+XDA1TtunP2ZKG12OxQdoEi44OxnK3yR/1BPxAZwWKAB9xyHJy0n+M24Bp60Sy+qYqNdV3V2i9Opk4Hcs0/kA3LuLehQ5UOXrLL7idQ205qLKo2WMFWwtZcDvOOTmA49h67vBDrfyY2b8Gu2tQ3TXyerfTM/iYRy17xJ2zE87OYu/xhtEDz1QZSmLL8e3oB4UKMETVn9yNUhvo2NGzxS+ZO7UuT2tc5fzK9AfZbX+2zHJF1dOJCbUC39o+oNRS3B/f4TWqJkO/h8VxyITTnKMTwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0wNi0yOFQwMToxMzo0NS0wNzowMJMaOusAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMDYtMjhUMDE6MTM6NDUtMDc6MDDiR4JXAAAAAElFTkSuQmCC" /></svg>';
$e_svg = '<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="48px" height="48px" viewBox="0 0 48 48" enable-background="new 0 0 48 48" xml:space="preserve"><image id="image0" width="48" height="48" x="0" y="0" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABTVBMVEVHcEz/SEj/SUn/S0v/S0v/Skr/R0f/SUn/Skr/R0f/SEj/SUn/QkL/QkL/SEj/SEj/SUn/SUn/SUn/SUn/S0v/TEz/R0f/SEj/Skr/Rkb/TU3/Pj7/Tk7/Pz//UVH/UlL/NDT/PDz/R0f/Vlb/UVH/Nzf/ODj/Vlb/VVX/Q0P/SUn/SEj/SUn/XFz/ODj/X1//UVH/NTX/QkL/ODj/SUn/X1//SUn/SUn/UVH/XFz/RET/UlL/PT3/ZWX/SUn/Njb/aWn/Jib/WFj/SUn/Njb/JCT/Vlb/XV3/SUn/SEj/PDz/XV3/UlL/SUn/ODj/Ojr/PDz/VFT/TEz/Q0P/UFD/Rkb/Rkb/RET/MzP/Ozv/Nzf/UVH/S0v/SEj/S0v/TEz/SUn/SEj/S0v/Skr/TU3/RUX/R0f/Vlb/VFT/TEz/QED/W1v/T0//UFD///+WTqvGAAAAYHRSTlMAF0R/ssvi8ufQhEscCmH6/b1rEvKQZ+l5uio88VFVb1RuOPglw9xcfPanXE5sgT37WZlH2oqd07BP+MjYRaFNAjc53jIh8jLVWWSMosZehptI+XwhlbT8J+tshy8FIix4bNkdAAAAAWJLR0RuIg9RFwAAAAd0SU1FB+IGHAAjCyuso0cAAAJ4SURBVEjHjVVpY9JAEF3OQKhQaQmU2uKBR6EHVqRaa73qURXrUe9a90hCQsP//2qWJbiThIT3gWzYtzu7b15mEPIjkUylM1lFyeXTamEBxeBSMV3CmOAx3Mfi5fJSFF3N4QCWK4lZfK1KcQiYUgulL6xQhkPBWKYe5K9eYQTPAtHX/Px1g+EomA3IvzqI5mNmXZP5180YPod0qqUbhMTRCbGa0wU36RwBGL3l8W/rZjzfjUHvTPK7Yc/Dx9g2hLVUHVyATe9DKAWhid4aB1iW+Yy1y9T7w6itD2X9COW2aoOwdBOhLXEn82IboZ2BKe/HXbUi79+5y4NuO3xbe5eP74Ebdt0cyIqynNDhvk2o0RPjPSBJEyXBiTqaYO0OjAdi9HAfSFJEKXgFsy14jw7E8zGDOTpEaagcu3gimE/Hv88cAkxAMmjP5yLTef7fZM2S3zMvUOArpvqRx3/5yvabsoqUgAOItSP49VHQw0rIAjxcjVoQUlheRx7pjf9Adsyl02APQgdQ1lFAVtWXuGPBz3iJs2HiWqgA3jtvBa83GE6ssbkPCBpKyK+e+d65KTffT8wHFrglsA8ifOCcE4uPnY98/GlDns/yEgzuYLjVZ8sZn9uwVPcDooY8r/Ki9FnSiVC9XfZ0YcaX46GsErFPedCvvqJBpNUwb/Y3Ufe+h7aFIKjxQ+jQsGML5Tggq3gOOGBzlEpMf04tc2rFF2NMRpLJCnMEwJrcIH5ZcQ1ldAJbUCOmgJPf/ia3pkc0RWxrKICz/CytGM4mURhSpfDGTip/UDjOe4sh/NYRmo3zWh5LbnLLtfoXxaBe7PW7VUWpdvuH2llg+h9HuVCDOCt98QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0wNi0yOFQwMDozNToxMS0wNzowMKdRAJ8AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMDYtMjhUMDA6MzU6MTEtMDc6MDDWDLgjAAAAAElFTkSuQmCC" /></svg>';
$eMessage = <<<EOJ
<table border="0" cellpadding="0" cellspacing="0" class="msg e"><tr><td>{$e_svg}<br clear="all"><br clear="all"><h3>access denied</h3><br clear="all"><br clear="all"><p>Access to the requested page has been denied.</p><br clear="all"><br clear="all"><a href="{$baseurl}">Go Back to Home</a></td></tr></table>
EOJ;

echo <<<EOJ
<div class="loader"><div class="loading">LOADING...</div></div>
<div class="header"><img src="{$imageurl}logo-default.png" alt="{$websitename}" /><a href="{$baseurl}">Home</a></div>
<div class="holder">
EOJ;

if(($type === 'payment') && ($option1) && ($option2) && ($option3)):
	$decodedproductid			= $en->decode($option1);
	$decodedproductbookchapterid= $en->decode($option2);
	$decodedproductchaptertoken = $en->decode($option3);

	$stmt = $mysqli->prepare("SELECT * FROM productbookchapters WHERE (productbookchapterid = ? AND productid = ? AND token = ?) ORDER BY productbookchapterid DESC") or die('An error occurred. Please try after some time.');
	$stmt->bind_param('iis', $decodedproductbookchapterid, $decodedproductid, $decodedproductchaptertoken);
	$stmt->execute();
	$stmt->store_result();
	$count_rows = $stmt->num_rows();
	$stmt->close();
	if($count_rows == 1):
echo <<<EOJ
		<noscript>Your browser doesn&rsquo;t support javascript. Please use another browser.</noscript>
		<p class="noscript">Your browser doesn&rsquo;t support form script. Please use another browser.</p>
		<div class="wrap">
			<form action="{$baseurl}chapter" method="post" name="paymentform" class="form ajax-form">
				<input type="hidden" name="token" value="{$en->encrypt('[PHPSESSID]=[GEN_TOKEN]')}" autocomplete="off" readonly />
				<input type="hidden" name="focus" value="{$en->encrypt('[MAKE_CHAPTER_PAYMENT]')}" autocomplete="off" readonly />
				<input type="hidden" name="{$token_id}" value="{$token_value}" autocomplete="off" readonly />
				<input type="hidden" name="myp__id" value="{$option1}" autocomplete="off" readonly />
				<input type="hidden" name="mybc_id" value="{$option2}" autocomplete="off" readonly />
				<input type="hidden" name="bctoken" value="{$option3}" autocomplete="off" readonly />
				<div class="head">Provide Details</div>
				<div class="body">
					<div class="row">
						<label for="name" class="label">Full Name<span>*</span></label>
						<input type="text" name="name" value="" autocomplete="off" class="field" />
					</div>
					<div class="row">
						<label for="email" class="label">Email<span>*</span></label>
						<input type="text" name="email" value="" autocomplete="off" class="field" />
					</div>
					<div class="row">
						<label for="phone" class="label">Mobile<span>*</span></label>
						<input type="text" name="phone" value="" autocomplete="off" class="field phone" />
					</div>
					<div class="row">
						<label for="country" class="label">Country <span>*</span></label>
						<select name="country" autocomplete="off" class="field" onchange="if(this.value!=='India') { $('.paymentmode').hide().find('input').prop('checked',false);$('.mode label').removeClass('checked'); } else { $('.paymentmode').show().find('input').prop('checked',false);$('.mode label').removeClass('checked'); }">
							<option value="" selected="selected">Select Country</option>
							{$countries}
						</select>
					</div>
					<div class="row paymentmode">
						<label for="paymentmode" class="label">Payment Mode<span>*</span></label>
						<div class="flex mode">
							<label for="DC_CARD"><input type="radio" name="paymentmode" value="DC_CARD" autocomplete="off" id="DC_CARD" />Debit Card/Debit Card</label>
							<label for="NET_BANKING"><input type="radio" name="paymentmode" value="NET_BANKING" autocomplete="off" id="NET_BANKING" />Net Banking</label>
						</div>
					</div>
					<div class="row">
						<input type="submit" name="submit" value="pay now" class="button" disabled />
					</div>
				</div>
			</form>
			<div class="output"></div>
			<div class="cards"></div>
		</div>
EOJ;
	else:
		echo $eMessage;
	endif;
elseif(($type === 'response') && ($option1) && ($option2) && ($option3)):
	$txnid  = $option1;	$secretkey = $option2; $status = $option3;
	$stmt = $mysqli->prepare("SELECT productbookchapterid, productid, name, email, phone, country, amount, currency, creation FROM chapterpurchase WHERE (txnid = ? AND secretkey = ?) LIMIT 1") or die('An error occurred. Please try after some time.');
	$stmt->bind_param('ss', $txnid, $secretkey);
	$stmt->execute();
	$stmt->store_result();
	$count_rows = $stmt->num_rows();
	$stmt->bind_result($productbookchapterid, $productid, $name, $email, $phone, $country, $amount, $currency, $creation);
	$stmt->fetch();
	$stmt->close();
	if($count_rows == 1):
		$statuses = array('success' => 'successful', 'failed' => 'failed');
		$status   = (array_key_exists($status, $statuses)) ? $statuses[$status] : '';
		$txndate  = date('d/m/Y', strtotime($creation));

		$null = '';
		$stmt = $mysqli->prepare("UPDATE chapterpurchase SET status = ?, secretkey = ? WHERE (txnid = ? AND secretkey = ?) LIMIT 1") or die('An error occurred. Please try after some time.');
		$stmt->bind_param('ssss', $status, $null, $txnid, $secretkey);
		$stmt->execute();
		$stmt->close();

		$stmt = $mysqli->prepare("SELECT title FROM products WHERE productid = ? LIMIT 1") or die('An error occurred. Please try after some time.');
		$stmt->bind_param('i', $productid);
		$stmt->execute();
		$stmt->store_result();
		$stmt->bind_result($booktitle);
		$stmt->fetch();
		$stmt->close();

		$stmt = $mysqli->prepare("SELECT chaptercode, chaptername, token FROM productbookchapters WHERE (productbookchapterid = ? AND productid = ?) LIMIT 1") or die('An error occurred. Please try after some time.');
		$stmt->bind_param('ii', $productbookchapterid, $productid);
		$stmt->execute();
		$stmt->store_result();
		$stmt->bind_result($chaptercode, $chaptername, $chaptertoken);
		$stmt->fetch();
		$stmt->close();
		$mysqli->close();

		$encodedchaptercode = $en->encode($chaptercode);
		$encodedchaptertoken = $en->encode($chaptertoken);

		if($status === 'successful'):
			$description = '<b>Book Title:</b> '.$booktitle.'<br clear="all"><br clear="all"><b>Chapter Title:</b> '.$chaptername;
			if(method_exists('transaction', 'receipt')):
				$tn->receipt($txnid, $name, $description, $amount, $currency, $creation, '', 'Journal & Book Publishing & Hosting Company', true);
				$attachments = array($txnid.'.pdf');
			else:
				$attachments = '';
			endif;

			if(method_exists('transaction', 'genmail')):
				$wmailmsg = $tn->genmail('w', $txnid, $name, $description, $amount, $currency, $creation, $email, $phone, $address, $country, $status);
				$wsubject = (array_key_exists(0, $wmailmsg)) ? $wmailmsg[0] : '';
				$wmessage = (array_key_exists(1, $wmailmsg)) ? $wmailmsg[1] : '';

				$cmailmsg = $tn->genmail('c', $txnid, $name, $description, $amount, $currency, $creation, $email, $phone, $address, $country, $status);
				$csubject = (array_key_exists(0, $cmailmsg)) ? $cmailmsg[0] : '';
				$cmessage = (array_key_exists(1, $cmailmsg)) ? $cmailmsg[1] : '';

				if(($wmessage) && ($wsubject)):
					$sm->send($websiteemail, '', '', $wsubject, $wmessage, '', $fromname, $fromemail, $name, $email);
				endif;

				if(($cmessage) && ($csubject)):
					$sm->send($email, '', '', $csubject, $cmessage, $attachments, $fromname, $fromemail, $replyname, $replyemail);
				endif;
			endif;

			$chaptermailsubject  = 'Book Chapter Purchased on '.date('d/m/Y').'. TXN ID: '.$txnid;
			$chaptermailmessage  = 'Dear '.$name.',<br>';
			$chaptermailmessage .= 'Kindly download purchased chapter by clicking following download link.<br><br>';
			$chaptermailmessage .= '<a href="'.$filesuploaddir.'download/'.$txnid.'/'.$chaptercode.'/'.$chaptertoken.'">Click here to download</a>';
			$chaptermailmessage .= '<br><br>Regards<br>'.nl2br($signature);
			$chaptermailmessage .= '<br><br><img src="'.$imageurl.'tree.png" alt="Tree" style="float:left" /><b style="float:left;margin:14px 0px 0px 10px;color:#009933">Please consider the environment before you print this email.</b>';
			$sm->send($email, '', '', $chaptermailsubject, $chaptermailbody, '', $fromname, $fromemail, $replyname, $replyemail);

			if(file_exists(($txnid.'.pdf'))) : @unlink($txnid.'.pdf'); endif;
echo <<<EOJ
			<table border="0" cellpadding="0" cellspacing="0" class="msg s">
				<tr>
					<td>
						{$s_svg}<br clear="all"><br clear="all">
						<h3>Your payment has been {$status}.</h3><br clear="all">
						<p>Your transaction id: {$txnid}.</p><br clear="all">
						<p>We&apos;ve sent you a confirmation email with your payment details and payment receipt to {$email}.</p><br clear="all">
						<b>For any other query</h4><h4>Call: +91-9711224068</b><br clear="all"><br clear="all">
						<a href="{$baseurl}">Go Back to Home</a>
					</td>
				</tr>
			</table>
EOJ;
		elseif($status === 'failed'):
echo <<<EOJ
			<table border="0" cellpadding="0" cellspacing="0" class="msg e">
				<tr>
					<td>
						{$e_svg}<br clear="all"><br clear="all">
						<h3>Your payment has been {$status}</h3><br clear="all">
						<p>Your transaction id: {$txnid}</p><br clear="all">
						<p>Please note the transaction id for your reference.</p><br clear="all">
						<b>For any other query</b><br clear="all"><b>Call: +91-9711224068</b><br clear="all"><br clear="all">
						<a href="{$baseurl}">Go Back to Home</a>
					</td>
				</tr>
			</table>
EOJ;
		else:
			echo $eMessage;
		endif;
	else:
		echo $eMessage;
	endif;
else:
	echo $eMessage;
endif;
?>
</div>
<script type="text/javascript" src="https://www.akinik.com/js/jquery.js" defer></script>
<script type="text/javascript">
function downloadJSAtOnload(){
var element = document.createElement('script');
element.src = '<?php echo $baseurl;?>js/defer.js?<?php echo time();?>';
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener('load', downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent('onload', downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit