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


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

<?php

include ("database.php");

include("commandb.php");

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

$query = "INSERT INTO menulog(funivcode,fdate,fhelpdesk)
VALUES('{$UNIVCODE}',date_format(now(),'%Y-%m-%d'),1)
ON DUPLICATE KEY UPDATE fhelpdesk = if(ifnull(fhelpdesk,'') = '', 1,fhelpdesk+1)";

$results = mysqli_query($conndb,$query);

$query = "select concat(fcollname,', ',FTOWN,'[ ',fcollcode,' ]') as fcollcode,
		  FPRINCIPALNAME as principalname,
		  ifnull(fphone,'') as phone, ifnull(FMOBILE,'') as FMOBILE, 
		  FEMAIL as FEMAIL,
		  ifnull(FCOLLADD1,'') as FCOLLADD1,
		  ifnull(FCOLLADD2,'') as FCOLLADD2, ifnull(FCOLLADD3,'') as FCOLLADD3,
		  ifnull(FCOLLADD4,'') as FCOLLADD4
		  from college 
		  where fcollcode = '{$_SESSION['COLLCODE']}'";
//var_dump($query);
$result = mysqli_query($conn,$query);
$count = mysqli_num_rows($result);
if($count > 0)
{
	$row = mysqli_fetch_assoc($result);
	
	$row['ftechcontact'] = $_SESSION['FTECHCONTACT'];
	$row['ftechemail'] = $_SESSION['FTECHEMAIL'];
	$row['status'] = 'success';
	echo json_encode($row);
}
else
{
	$data = array("status"=>"failure");
	echo json_encode($data);
}