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.118.33.239


Current Path : /var/www/html/dypatil/
Upload File :
Current File : /var/www/html/dypatil/rv_update.php

<?php
	ini_set('max_execution_time', 600);
	include("/var/www/config.php");
	$servername = SERVERNAME;
	$username   = USERNAME;
	$password  = PASSWORD;
	$dbname = "logisys3_dypatil";
	/*$servername = "localhost";
	$username = "root";
	$password = "";
	$dbname = "resultsg_kus";*/
	$conn = new mysqli($servername, $username, $password, $dbname);


	$query = "select distinct ac.appno, ac.fregno, ac.FPAYMENTSTATUS, ac.FPAYGATEWAY,kp.fname as fname, ac.FDATE,
	ac.fcollcode, ac.fdegree  from res_stud ac
	inner join pg_txn kp on
	ac.appno = kp.fappno
	where ifnull(ac.FPAYMENTSTATUS,'') <> 'success'";
	
	$resultm = $conn->query($query);
	
	if (mysqli_num_rows($resultm) > 0) 
	{
		while($row = mysqli_fetch_assoc($resultm)) 
		{

			$productinfo  = $row['appno'];
			$regno = $row['fregno'];
			$paytm  = $row['FPAYGATEWAY'];
			$degree  = $row['fdegree'];
			$collcode  = $row['fcollcode'];
			$fname  = $row['fname'];
			//$firstname = "paytm";

			 $update="update res_stud set FPAYMENTREMARKS='{$txnid}',FPAYMENTSTATUS='success',
                    FPAYMENTCONFIRM='success', fackdate = current_date(), funivrecdate = current_date(), 
                    fackuser = '{$fname}', FCHALLANNO = '{$productinfo}'
                    where APPNO='{$productinfo}'";
			$result = $conn->query($update);

			$update = "insert ignore into tdvs_tabsum(fqpcode,FPACKET,FREGCODE,FVALNO,FYEAR,FEXAMTYPE,fupddate)
			select t.fqpcode,'0001',t.fregcode,'R',r.FYEAR,r.FEXAMTYPE, now()
			from res_stud r inner join subject s on r.fdegree = s.fdegree
			and r.fexamno = s.fexamno and left(s.fsubcode,4) = left(r.fsubcode,4)
			inner join tdvs_tabulate t on r.fregno = t.fregno
			and s.fqpcode = t.fqpcode
			and r.fyear = t.fyear 
			and r.fexamtype = t.fexamtype
			where ifnull(r.fpaymentstatus,'') = 'success'
			and r.APPNO='{$productinfo}'
			and r.FCORRTYPE = 'RV'";
			$result = $conn->query($update);

		
			//var_dump($insert_studfee);
			echo $regno;
			echo "<br/>";

		}
	}

?>