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


Current Path : /var/www/html/demo/studentportal/src/
Upload File :
Current File : /var/www/html/demo/studentportal/src/hallticket.php

<?php

include("database.php");

$regno  = $_SESSION['REGNO'];
$FUNIVCODE  = $_SESSION['UNIVCODE'];

$folder  = $_SESSION['FOLDER'];

$degree = $_SESSION['DEGREE'];
$collcode = $_SESSION['COLLCODE'];

$url = dirname(__FILE__);

$path = '/home/logisys32/public_html/oasis/demo/oasis/halltickets/'.'HT_'.$FUNIVCODE.'_'.$regno.'.pdf';
//echo $path;

$durl='http://oasis.logisys.org/demo/oasis/halltickets/'.'HT_'.$FUNIVCODE.'_'.$regno.'.pdf';
//echo $durl;
$url = 'http://docs.google.com/gview?url=http://oasis.logisys.org/demo/oasis/halltickets/'.'HT_'.$FUNIVCODE.'_'.$regno.'.pdf&embedded=true';

$fileName = 'HT_'.$regno.'.pdf';

$count = 1;

if($count > 0)
{
	$uploadRequest = array(
	 	    'degree_code' => $_SESSION['DEGREE'],
	 	    'fcollcode' => $_SESSION['COLLCODE'],
	 	    'reg_starts' => $_SESSION['REGNO'],
	 	    'reg_ends' => $_SESSION['REGNO'],
			'FUNIVCODE' => $_SESSION['UNIVCODE']
	 	);

	 	// Execute remote upload
	 	$curl = curl_init();
	 	curl_setopt($curl, CURLOPT_URL, 'http://oasis.logisys.org/demo/oasis/app.php?a=generatePostAdmissionTicket.demo');
	 	curl_setopt($curl, CURLOPT_TIMEOUT, 30);
	 	curl_setopt($curl, CURLOPT_POST, 1);
	 	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
	 	curl_setopt($curl, CURLOPT_POSTFIELDS, $uploadRequest);
	 	$response = curl_exec($curl);
	 	curl_close($curl);
	 	echo $response;

	if(true)
	{
		// $strUpdateQuery = "update candsum set fhtstatus = 'T' 
		// where fdegree = '{$degree}'
		// and fcollcode = '{$collcode}'
		// and fregno = '{$regno}'";
		// $updateHtResult = mysqli_query($conn,$strUpdateQuery);

		$row['status'] = 'success';
		$row['url'] = $url;
		$row['durl'] = $durl;
		$row['fileName'] = $fileName;
	}
	else if($_SESSION['EXAMBLK'] == 'T')
	{
		$row['status'] = 'failure';
		$row['msg'] = "Hall Ticket is blocked. Contact college.";
	}
	else
	{
		$row['status'] = 'failure';
		$row['msg'] = "Hall Ticket will be available in college";
	}	
}
else
{
	$row['status'] = 'error';
	$row['msg'] = "Hall Tickect is not available";
}

echo json_encode($row);

?>