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.139.104.140
<?php
function getExamMonthRoomAllotment($aobj_context){
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode = $_SESSION['collcode'];
$doe = stripslashes($aobj_context->mobj_data["date"]);
$query = "select funivcode from control";
$results = $aobj_context->mobj_db->GetRow($query);
$funivcode = $results['funivcode'];
$query = "select froomno as `key`, froomno as `value`, concat(froomname,' - ',fcapacity) as `label` from masroom
where ifnull(fdeleted,'') <>'T' and fcapacity > 0
and fcollcode = '{$collcode}' order by froomno ";
$rst1 = $aobj_context->mobj_db->getAll($query);
$query = "SELECT DISTINCT dg.fdeggrp as id, dg.fdescpn as value
FROM deggrp dg
INNER JOIN degree d ON d.fdeggrp = dg.fdeggrp
INNER JOIN subject s on s.fdegree = d.fdegree and d.fexamno = s.fexamno
INNER JOIN timetable t on s.fqpcode = t.fqpcode
INNER JOIN colldeg c ON c.fdegree = d.fdegree and ifnull(c.fdeleted,'') <> 'T'
WHERE t.fdate ='{$doe}'";
$rst2 = $aobj_context->mobj_db->getAll($query);
$query = "SELECT distinct CONCAT(d.fyear,'*',d.fexamtype,'*',t.fdeggrp,'*',d.fexamdate)AS `value`, concat(t.fdeggrp,' - ',d.fexamdate) as `label`,
concat(t.fdeggrp,' - ',d.fexamdate) as `key`
FROM degexam d INNER JOIN candsum c
ON d.fdegree = c.fdegree and d.fyear = c.fyear
and d.fexamtype = c.fexamtype
INNER JOIN subject s on s.fdegree = c.fdegree
INNER JOIN timetable t on s.fqpcode = t.fqpcode
and t.fyear = c.fyear
and t.fexamtype = c.fexamtype
WHERE c.fcntrcode = '{$collcode}'
#and t.fdate =date_format(STR_TO_DATE('{$doe}', '%d/%m/%Y'),'%Y-%m-%d')
and t.fdate ='{$doe}'
GROUP BY d.fyear,d.fexamtype,t.fdeggrp";
$result1 = $aobj_context->mobj_db->GetAll($query);
if($funivcode == '012' || $funivcode == '052')
{
$query3 = "select distinct FREASONCD as id,concat(r.FDESCPN,' (',r.FREASONCD,')') as value
from reason r
order by r.FREASONCD";
}else
{
$cnd = "inner join colldeg cd on s.fdegree = cd.fdegree and ifnull(cd.fdeleted,'') <> 'T'
where cd.fcollcode = '{$collcode}'";
if($funivcode == '042')
{
$cnd = "";
}
$query3 = "SELECT DISTINCT s.fsession AS `key`,s.fsession AS `value`,CONCAT(s.fsession, ' - ',r.FDESCPN) AS `label`
from subject s inner join reason r on s.fsession = r.FREASONCD
{$cnd} and s.fdoe ='{$doe}'
order by s.fsession";
}
$rst3 =$aobj_context->mobj_db->getAll($query3);
$rst['room'] = $rst1;
$rst['deggrp'] = $rst2;
$rst['session'] = $rst3;
$rst['exmmonth'] = $result1;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
function getDegreeSessionOnDateAndYearModeForReports($aobj_context){
$collcode=$_SESSION['collcode'];
$funivcode=$_SESSION['univcode'];
$dates=$aobj_context->mobj_data['date'];
$yearmode=$aobj_context->mobj_data['exam'];
$yearmodeSplit=explode('*',$yearmode);
// $yearAndMode=explode('*',$yearmodeSplit[0]);
$query = "SELECT CONCAT(dg.fdeggrp, ' - ',dg.fdescpn)AS fdeggrp,t.fsession,r.FDESCPN,COUNT(DISTINCT cd.FREGNO) AS reg_cnt,
SUM(IF(IFNULL(cd.fhallno,'') = '',0,1)) AS fhallno,d.fdegree,
(COUNT(DISTINCT cd.FREGNO)-SUM(IF(IFNULL(cd.fhallno,'') = '',0,1)))AS pending
FROM canddet cd
INNER JOIN subject s ON s.fdegree = cd.fdegree AND s.fexamno = cd.fexamno
AND s.FSUBCODE = cd.FSUBCODE
INNER JOIN degree d ON cd.fdegree = d.fdegree AND cd.fexamno = d.fexamno
INNER JOIN deggrp dg ON dg.fdeggrp = d.fdeggrp
INNER JOIN candsum cs ON cd.fcollcode = cs.fcollcode AND cs.FREGNO = cd.FREGNO
INNER JOIN timetable t ON s.fqpcode = t.fqpcode AND t.fyear = cd.fyear
AND cd.fexamtype = t.fexamtype AND t.fdeggrp = d.fdeggrp
INNER JOIN reason r ON t.FSESSION = r.FREASONCD
WHERE cs.fcntrcode='{$collcode}' AND cd.fyear='{$yearmodeSplit[0]}'
AND cd.fexamtype='{$yearmodeSplit[1]}'
#AND cd.fhallno<>''
AND cd.FPRESENT = 'P'
#AND IFNULL(cd.fpassmth,'') = ''
AND t.fdate='{$dates}'
GROUP BY dg.fdeggrp,t.fsession";
$res = $aobj_context->mobj_db->GetAll($query);
if($res){
$rst['degses']=$res;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}else{
$rst['msg']="Data Not Found";
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,-1,"Failed");
}
}
function getpendingstudentList($aobj_context){
$collcode=$_SESSION['collcode'];
$funivcode=$_SESSION['univcode'];
$dates=$aobj_context->mobj_data['date'];
$yearmode=$aobj_context->mobj_data['exam'];
$deggrp1=$aobj_context->mobj_data['deggrp'];
$session=$aobj_context->mobj_data['session'];
$deg=explode('-',$deggrp1);
$deggrp=$deg[0];
$yearAndmode=explode('*',$yearmode);
$year=$yearAndmode[0];
$examtype=$yearAndmode[1];
$query=" SELECT DISTINCT cd.FREGNO AS reg_cnt, CONCAT(dg.fdeggrp, ' - ',dg.fdescpn)AS fdeggrp,t.fsession,r.FDESCPN,
IF(IFNULL(cd.fhallno,'') = '',0,1) AS fhallno,d.fdegree,st.fname,cd.fexamno,cd.fcollcode,c.fcollname
FROM canddet cd INNER JOIN subject s ON s.fdegree = cd.fdegree
AND s.fexamno = cd.fexamno AND s.FSUBCODE = cd.FSUBCODE
INNER JOIN degree d ON cd.fdegree = d.fdegree AND cd.fexamno = d.fexamno
INNER JOIN deggrp dg ON dg.fdeggrp = d.fdeggrp INNER JOIN candsum cs ON cd.fcollcode = cs.fcollcode AND cs.FREGNO = cd.FREGNO
INNER JOIN timetable t ON s.fqpcode = t.fqpcode AND t.fyear = cd.fyear AND cd.fexamtype = t.fexamtype AND t.fdeggrp = d.fdeggrp
INNER JOIN reason r ON t.FSESSION = r.FREASONCD
INNER JOIN student st ON st.fdegree=cd.fdegree AND st.fregno=cd.fregno
INNER JOIN college c ON c.fcollcode=cd.fcollcode
WHERE cs.fcntrcode='{$collcode}' AND cd.fyear='{$year}' AND cd.fexamtype='{$examtype}'
AND cd.FPRESENT = 'P' AND IFNULL(cd.fpassmth,'') = '' AND t.fdate='{$dates}' AND dg.fdeggrp='{$deggrp}' AND t.fsession='{$session}'";
}
?>
|