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


Current Path : /var/www/html/univadmin/src_12/
Upload File :
Current File : /var/www/html/univadmin/src_12/results.php

<?php
	
	include 'database.php';


	include("commandb.php");

	//session_start();
	$UNIVCODE  = $_SESSION['UNIVCODE'];

	$query = "INSERT INTO menulog(funivcode,fdate,fresults)
	VALUES('{$UNIVCODE}',date_format(now(),'%Y-%m-%d'),1)
	ON DUPLICATE KEY UPDATE fresults = if(ifnull(fresults,'') = '', 1,fresults+1)";
	$results = mysqli_query($conndb,$query);
	
	$strUserLogQuery = "insert into userlog 
	(funivcode, fregno, fmobileno, fipadd, FREASONCODE, FDESCPN)
	values ('{$_SESSION['UNIVCODE']}', '{$_SESSION['REGNO']}', 
	'{$_SESSION['MOBILE']}', '{$_SERVER['REMOTE_ADDR']}', 
	'REMN', 'REMN - {$_SESSION['REGNO']} Viewed Results')";
	$result = mysqli_query($conndb,$strUserLogQuery);

	$id = $_POST['id'];
	$reg_no = $_SESSION['REGNO'];
	$folder = $_SESSION['FOLDER'];
	
	$sql = "SELECT re.fexamno,dg.fexamname FROM res_fee re
	inner join degree dg on re.fdegree = dg.fdegree and re.fexamno = dg.fexamno
	where re.fregno = '{$reg_no}' order by fexamno"; 
	$result = mysqli_query($conn,$sql);
	while ($row1 = $result->fetch_assoc()) 
	{
		$array[] = $row1;
		
	}
	//var_dump(count($array));

	$query = "select fregno, fdegree, fcaste from student where fregno = '{$reg_no}'"; 
	$result = mysqli_query($conn,$query);
	while ($studentrow = $result->fetch_assoc()) 
	{
		$fcaste = $studentrow['fcaste'];
		
	}

	if($array > 0)
	{
		$row['sem'] = $array;
		$row['fregno'] = $reg_no;
		$row['folder'] = $folder;
		$row['fcaste'] = $fcaste;
		$row['UNIVCODE'] = $_SESSION['UNIVCODE'];
		$row['status'] = 'success';
		echo json_encode($row);
	}
	else
	{
		$data = array("status"=>"failure");
		echo json_encode($data);
	}
?>