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.6.122
<?php
function getSubjectList($aobj_context){
$univcode = $aobj_context->mobj_data["univcode"];
$collcode = $aobj_context->mobj_data["collcode"];
$query="select distinct c.FDEGREE as value, c.FDEGREE, concat(d.FDESCPN, ' ', '[',c.FDEGREE,']')as label
from colldeg c inner join degree d on
d.FDEGREE=c.FDEGREE and FCOLLCODE='{$collcode}'
and c.FDELETED = 'F' order by d.FDESCPN";
$result = $aobj_context->mobj_db->getAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$arr['msg']='Failed to Load';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"failure");
return;
}
}
function getSemdet($aobj_context){
$univcode = $aobj_context->mobj_data["univcode"];
$collcode = $aobj_context->mobj_data["collcode"];
$deg = $aobj_context->mobj_data["deg"];
$query="select distinct fexamno as value,concat(fexamname, ' ', '[',fexamno,']')as label from degree where fdegree='{$deg}'";
$result = $aobj_context->mobj_db->getAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$arr['msg']='Failed to Load';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"failure");
return;
}
}
function getSubjectdet($aobj_context){
$univcode = $aobj_context->mobj_data["univcode"];
$collcode = $aobj_context->mobj_data["collcode"];
$degree = $aobj_context->mobj_data["degree"];
$sem = $aobj_context->mobj_data["sem"];
$type = $aobj_context->mobj_data["type"];
if($sem=="All"){
$cond="" ;
}else{
$cond="AND FEXAMNO='{$sem}'" ;
}
if( $type=="mainSub"){
$query="SELECT
IF(FMANDATORY='T', CONCAT('* ', IFNULL(FSUBCODE, '')), CONCAT(' ', IFNULL(FSUBCODE, ''))) AS FSUBCODE,
IF(FMANDATORY='T', CONCAT('* ', IFNULL(FCSUBCODE, '')), CONCAT(' ', IFNULL(FCSUBCODE, ''))) AS FCSUBCODE,
IFNULL(FEXAMNO, '') AS FEXAMNO,
IFNULL(FSUBNAME, '') AS FSUBNAME,
IFNULL(FSUBSHORT, '') AS FSUBSHORT,
IFNULL(FQPCODE, '') AS FQPCODE,
IFNULL(FSUSPEND, '') AS FSUSPEND,
IFNULL(FSMAXMARKS, '') AS FSMAXMARKS,
CONCAT(
IF(FTHEORY='T', 'Theory', 'Practical'),
CONCAT(SPACE(2), IF(FINTASS='T', 'I A', ''))
) AS Remarks
FROM
subject
WHERE
FDEGREE='{$degree}'
$cond
AND IFNULL(FDELETED, 'F')='F'
GROUP BY
FSUBCODE";
$result = $aobj_context->mobj_db->getAll($query);
}else if($type=="elementSub"){
$query="SELECT
IF(FMANDATORY='T', CONCAT('*', IFNULL(FCSUBCODE, '')), CONCAT(' ', IFNULL(FCSUBCODE, ''))) AS FCSUBCODE,
IF(FMANDATORY='T', CONCAT('*', IFNULL(FSUBCODE, '')), CONCAT(' ', IFNULL(FSUBCODE, ''))) AS FSUBCODE,
IFNULL(FEXAMNO, '') AS FEXAMNO,
CONCAT(
IFNULL(FSUBNAME, ''),
CONCAT(
SPACE(3),
IFNULL(FSSUBNAME, ''),
'(',
IF(FTHEORY='T', 'TH', 'PA'),
')'
)
) AS FSUBNAME,
LEFT(IFNULL(FCSUBCODE, ''), LENGTH(IFNULL(FCSUBCODE, '')) - 1) AS FSUBCODE,
IFNULL(FSUBSHORT, '') AS FSUBSHORT,
IFNULL(FSMAXMARKS, '') AS FSMAXMARKS,
IFNULL(FQPCODE, '') AS FQPCODE,
CONCAT(
IF(FTHEORY='T', 'Theory', 'Practical'),
CONCAT(SPACE(2), IF(FINTASS='T', 'I A', ''))
) AS Remarks
FROM
subject
WHERE
FDEGREE='{$degree}' $cond
AND IFNULL(FDELETED, 'F') ='F'
GROUP BY
FCSUBCODE";
$result = $aobj_context->mobj_db->getAll($query);
}else{
$query="SELECT
IF(FMANDATORY='T', CONCAT('*', IFNULL(FCSUBCODE, '')), CONCAT(' ', IFNULL(FCSUBCODE, ''))) AS FCSUBCODE,
IF(FMANDATORY='T', CONCAT('*', IFNULL(FSUBCODE, '')), CONCAT(' ', IFNULL(FSUBCODE, ''))) AS FSUBCODE,
IFNULL(FEXAMNO, '') AS FEXAMNO,
CONCAT(
IFNULL(FSUBNAME, ''),
CONCAT(
SPACE(3),
IFNULL(FSSUBNAME, ''),
'(',
IF(FTHEORY='T', 'TH', ''),
')'
)
) AS FSUBNAME,
LEFT(IFNULL(FCSUBCODE, ''), LENGTH(IFNULL(FCSUBCODE, '')) - 1) AS FSUBCODE,
IFNULL(FSUBSHORT, '') AS FSUBSHORT,
IFNULL(FSMAXMARKS, '') AS FSMAXMARKS,
IFNULL(FQPCODE, '') AS FQPCODE,
CONCAT(
IF(FTHEORY='T', 'Theory', 'Practical'),
CONCAT(SPACE(2), IF(FINTASS='T', 'I A', ''))
) AS Remarks
FROM
subject
WHERE
FDEGREE='{$degree}' $cond
AND IFNULL(FDELETED, 'F') ='F'
AND IFNULL(FTHEORY, 'F') = 'T'
AND IFNULL(FINTASS, 'F') <> 'T'
GROUP BY
FCSUBCODE";
$result = $aobj_context->mobj_db->getAll($query);
}
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$arr['msg']='Failed to Load';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"failure");
return;
}
}
?>
|