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.32.251
<?php
include ("database.php");
$query = "select distinct s.fname, s.ffatname, s.fmotname, s.fdegree, s.fcollcode,
d.fdescpn as degree, d.fexamname, concat(d.fexamdate,' Examination') as fexamdate,
concat(c.fcollname,', ',c.ftown, ' [', c.fcollcode, ']') as college,
s.fphotopath,
if(ifnull(fcaste,'') = '', 'GM',fcaste) as category,
if(ifnull(fconstype,'') = '', 'Normal Fee', fconstype) as feetype,
ifnull(fexamappblk,0) as examblk
from student s
inner join degree d
on s.fdegree = d.fdegree
inner join college c
on s.fcollcode = c.fcollcode
where s.fregno = '{$_SESSION['REGNO']}'";
//var_dump($query);
$result = mysqli_query($conn,$query);
$count = mysqli_num_rows($result);
if($count > 0)
{
$row = mysqli_fetch_assoc($result);
//
$path = "/home/logisys32/public_html/oasis/".$_SESSION['FOLDER'].'/'.$row['fphotopath'];
if(file_exists($path))
$row['photopath'] = 'http://oasis.logisys.org/'.$_SESSION['FOLDER'].'/'.$row['fphotopath'];
else
$row['photopath'] = 'http://studentportal.universitysolutions.in/'.$_SESSION['FOLDER'].'/'.$row['fphotopath'];
$_SESSION['CATEGORY'] = $row['category'];
$_SESSION['FEETYPE'] = $row['feetype'];
$_SESSION['EXAMBLK'] = $row['examblk'];
$_SESSION['DEGREE'] = $row['fdegree'];
$_SESSION['COLLCODE'] = $row['fcollcode'];
$row['strRegno'] = $_SESSION['REGNO'];
$row['strMobile'] = $_SESSION['MOBILE'];
$row['strEmail'] = $_SESSION['EMAIL'];
$row['strParentMob'] = $_SESSION['PARENTMOB'];
$row['strSemester'] = $row['fexamname'];
$row['strExamdate'] = $row['fexamdate'];
$get_subs_query = "select distinct cd.fsubcode, su.fsubname,
de.fexamname, cd.fexamno
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
where cd.fregno = '{$_SESSION['REGNO']}'
and ifnull(cd.fpassmth,'') = ''
order by fsubcode";
$sub_result = mysqli_query($conn,$get_subs_query);
$i = 0;
while($row1 = mysqli_fetch_assoc($sub_result))
{
$subject[$i] = $row1;
$i++;
}
$row['subject'] = $subject;
$row['status'] = 'success';
echo json_encode($row);
}
else
{
$data = array("status"=>"failure");
echo json_encode($data);
}
|