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.145.199.240
<?php
function loadciedeggrp($aobj_context) {
$collcode = $_SESSION['collcode'];
$query = "SELECT DISTINCT dg.fdeggrp, dg.fdescpn FROM deggrp dg
where ifnull(dg.fdeleted,'F') <> 'T'";
$result = $aobj_context->mobj_db->GetAll($query);
if ($result) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
} else {
$arr['msg'] = "Data not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
function loadciedegree($aobj_context){
$collcode=$_SESSION['collcode'];
$deggrp = $aobj_context->mobj_data["deggrp"];
$cnd = "and c.fcollcode='{$collcode}'";
if($_SESSION['usrtype'] == 40){
$cnd="";
}
if($collcode == 'lsys')
$cnd="";
$query="SELECT DISTINCT d.FDEGREE, d.FDESCPN FROM degree d
WHERE d.fdeggrp='{$deggrp}'";
$result = $aobj_context->mobj_db->GetAll($query);
if ($result) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
} else {
$arr['msg'] = "Data not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
function loadciesem($aobj_context){
$collcode = $_SESSION['collcode'];
$deg = $aobj_context->mobj_data["degree"];
if($collcode == 'lsys')
$cnd="";
$query = "SELECT DISTINCT d.FEXAMNO, d.FEXAMNAME FROM degree d
INNER JOIN colldeg c ON c.FDEGREE = d.FDEGREE
WHERE c.FCOLLCODE='{$collcode}' AND d.FDEGREE ='{$deg}'";
// var_dump($query);
// die();
$result = $aobj_context->mobj_db->GetAll($query);
if ($result) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
} else {
$arr['msg'] = "Data not found or an error occurred";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
function loadciesub($aobj_context) {
$collcode =$_SESSION['collcode'];
$examno = $aobj_context->mobj_data["examno"];
$deg = $aobj_context->mobj_data["degree"];
// var_dump($deg);
// die();
$query1 =" SELECT DISTINCT d.fexamno, d.fexamname, d.fdegree, s.FSUBCODE ,s.FSUBNAME FROM degree d INNER JOIN subject s ON d.fdegree = s.fdegree
WHERE d.fdegree = '{$deg}' AND d.FEXAMNO='{$examno}'";
// var_dump($query1);
// die();
$result = $aobj_context->mobj_db->GetAll($query1);
// var_dump($result);
// die();
if ($result) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
} else {
$arr['msg'] = "Data not found or an error occurred";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
// function loadciesub($aobj_context){
// $collcode = $_SESSION["collcode"];
// $examno = $aobj_context->mobj_data["examno"];
// $query1 = "SELECT DISTINCT s.fsubname
// FROM SUBJECT s
// INNER JOIN degree d ON s.FEXAMNO = d.FEXAMNO
// INNER JOIN colldeg c ON c.FDEGREE = d.FDEGREE
// WHERE c.FCOLLCODE = '{$collcode}' AND d.FDEGREE = '{$examno}'";
// // var_dump($query1);
// // die();
// $result = $aobj_context->mobj_db->GetAll($query1);
// if ($result) {
// echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
// } else {
// $arr['msg'] = "Data not found or an error occurred";
// echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
// return;
// }
// }
?>
|