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.144.98.43
<?php
function getexamappcollege($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = trim($aobj_context->mobj_data["univcode"]);
$deggrp = trim($aobj_context->mobj_data["deggrp"]);
$fcollcode = trim($aobj_context->mobj_data["fcollcode"]);
$cond = "";
if($fcollcode !== ""){
$cond = "and c.FCOLLCODE = '{$fcollcode}'";
}
$query = "select distinct ifnull(c.FCOLLCODE,'') as fcollcode ,ifnull(c.FCOLLNAME,'') as fcollname
from college c inner join candsum cd on cd.FCOLLCODE = c.FCOLLCODE where INSTR(c.ffaculty,'{$deggrp}') <> 0 $cond";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'Error While Loading..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
return;
}
function getexamappdegree($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = trim($aobj_context->mobj_data["univcode"]);
$deggrp = trim($aobj_context->mobj_data["deggrp"]);
$req = $aobj_context->req_body;
$coll = $req['college'];
foreach($coll as $key => $val){
$college .= "'".$val."',";
}
$collarr = substr_replace($college ,"",-1);
if(strpos($collarr,"All") == ""){
$cnd = "and c.FCOLLCODE in ($collarr)";
}else{
$cnd = "";
}
$query = "select distinct ifnull(d.FDEGREE,'') as fdegree ,ifnull(d.FDESCPN,'') as fdescpn
from degree d inner join candsum c on c.FDEGREE = d.FDEGREE
where d.fdeggrp = '{$deggrp}' $cnd";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'Error While Loading..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
return;
}
function getexamappexamno($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = trim($aobj_context->mobj_data["univcode"]);
$deggrp = trim($aobj_context->mobj_data["deggrp"]);
$req = $aobj_context->req_body;
$deg = $req['degree'];
foreach($deg as $key => $val){
$degree .= "'".$val."',";
}
$degarr = substr_replace($degree ,"",-1);
if(strpos($degarr,"All") == ""){
$cnd = "and d.FDEGREE = ($degarr)";
}else{
$cnd = "";
}
$query = "select distinct ifnull(d.FEXAMNO,'') as fexamno,ifnull(d.FEXAMNAME,'') as fexamname
from degree d inner join candsum c on c.FDEGREE = d.FDEGREE
where d.fdeggrp = '{$deggrp}' $cnd
group by d.FEXAMNO";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'Error While Loading..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
return;
}
|