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.69.185
<?php
function getFaculty($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = "SELECT distinct FFACULTY AS int_code,concat('Faculty of ', FFACULTY) AS val
FROM entdegree
where ifnull(fadmdeg,'') = 'P' and fdeggrp = 'PG' and ifnull(ffaculty,'') <> ''
and fexamno = 'A'
order by FFACULTY asc";
$result1 = $aobj_context->mobj_db->GetAll($query);
if(!$result1 && gettype($result1) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if(count($result1) > 0) {
$arr['faculty'] = $result1;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else {
$arr['msg'] = "No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
function loadotdeg($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fappno = $aobj_context->mobj_data["fappno"];
$degcode = $aobj_context->mobj_data["degcode"];
$combcode = $aobj_context->mobj_data["combcode"];
$studtype = $aobj_context->mobj_data["studtype"];
// var_dump($fappno); studtype
$query = "select ifnull(fenttype,'S') as fenttype from entstudadm where fappno = '{$fappno}'";
$res = $aobj_context->mobj_db->GetRow($query);
$fenttype = $res['fenttype'];
if($fenttype == 'M')
{
$query = "select distinct d.fdegree,d.fdescpn,if(ifnull(sd.fdegree,'')='','','checked') as sddeg
from entdeg d
inner join entoptdeg sd on d.fdegree = sd.fdegree
and ifnull(d.flocked,'F') <> 'T'
and ifnull(d.fdeleted,'') <> 'T'
and fappno = '{$fappno}'";
}else
{
if($studtype == 'OUKN' || $studtype == 'OUNK') {
$query = "select distinct d.fdegree,d.fdescpn,if(ifnull(sd.fdegree,'')='','','checked') as sddeg
from entdeg d inner join entprevcomb c on instr(feligdeg,concat(d.fdegree,'*')) > 0
left join entoptdeg sd on d.fdegree = sd.fdegree and fappno = '{$fappno}'
and ifnull(sd.fdeleted,'') <> 'T'
where instr(feligdeg,concat(d.fdegree,'*')) >0
and c.fdegree = '{$degcode}' and c.fcombcode = '{$combcode}'
and d.fdegree in ('MED', 'MPED')
and ifnull(d.flocked,'F') <> 'T'
and ifnull(d.fdeleted,'') <> 'T' ";
}
else {
$query = "select distinct d.fdegree,d.fdescpn,if(ifnull(sd.fdegree,'')='','','checked') as sddeg
from entdeg d inner join entprevcomb c on instr(feligdeg,concat(d.fdegree,'*')) > 0
left join entoptdeg sd on d.fdegree = sd.fdegree and fappno = '{$fappno}'
and ifnull(sd.fdeleted,'') <> 'T'
where instr(feligdeg,concat(d.fdegree,'*')) >0
and c.fdegree = '{$degcode}' and c.fcombcode = '{$combcode}'
and ifnull(d.flocked,'F') <> 'T'
and ifnull(d.fdeleted,'') <> 'T' ";
}
}
// var_dump($query);
$result1 = $aobj_context->mobj_db->GetAll($query);
// var_dump($result1);
if(count($result1) > 0) {
$arr['optdeg'] = $result1;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else {
$arr['msg'] = "Eligible degree not defined for the given Combination code";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
function getFacultyDegree($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
// $ffaculty = $aobj_context->mobj_data["ffaculty"];
session_start();
$db = $aobj_context->mobj_data["db"];
$query1 = "SET SESSION group_concat_max_len=100000";
$results1 = $aobj_context->mobj_db->Execute($query1);
$query1 = "SET SESSION group_concat_max_len=10000000";
$results = $aobj_context->mobj_db->Execute($query1);
$query = "select distinct fdegree as int_code, fdescpn as val
from entprevdeg
where ifnull(fdeleted,'') <> 'T'
order by fdescpn";
$result1 = $aobj_context->mobj_db->GetAll($query);
//var_dump($query);
$query = "select distinct fsubcode as int_code, fsubname as val
from entprevcomb
where fdegree = 'lan' and fcombcode = 'lan'
order by fdescpn";
$lanres = $aobj_context->mobj_db->GetAll($query);
$query1 = "SET SESSION group_concat_max_len=100000";
$results1 = $aobj_context->mobj_db->Execute($query1);
$query1 = "SET SESSION group_concat_max_len=10000000";
$results = $aobj_context->mobj_db->Execute($query1);
$query = "select distinct fdegree as fdegree, ifnull(fnolan,'F') as fnolan
from entprevdeg
where ifnull(fdeleted,'') <> 'T'
order by fdescpn";
$reslan = $aobj_context->mobj_db->GetAll($query);
$nolan = [];
foreach($reslan as $value)
{
$nolan[$value['fdegree']] = $value['fnolan'];
}
$query = "select distinct fdegree,
group_concat(distinct concat(fcombcode,'-',fdescpn) separator '*') as combdet
from entprevcomb
where fdegree <> 'lan'
group by fdegree";
$res = $aobj_context->mobj_db->GetAll($query);
$combcode = [];
foreach($res as $value)
{
$combcode[$value['fdegree']] = $value['combdet'];
}
$query = "select distinct concat(fdegree,fcombcode) as code,
group_concat(distinct concat(fsubcode,'-',fsubname) separator '*') as subbdet
from entprevcomb
where fdegree <> 'lan'
group by fdegree,fcombcode";
$res = $aobj_context->mobj_db->GetAll($query);
$combsubs = [];
foreach($res as $value)
{
$combsubs[$value['code']] = $value['subbdet'];
}
// var_dump($_SESSION['MOBILE']);
$query = "select ifnull(fappno,'') as fappno, ifnull(ffinsub,'F') as ffinsub,
ifnull(fpaystatus,'') as fpaystatus from entstudadm
where fmobileno = '{$_SESSION['MOBILE']}'";
// var_dump($query);
$result2 = $aobj_context->mobj_db->GetRow($query);
$query = "select * from entcoll where fdocvrfloc = 'T'";
// var_dump($query);
$prefdocvrfloc = $aobj_context->mobj_db->GetAll($query);
// var_dump($result2);
if(!$result1 && gettype($result1) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if($result2['fpaystatus']== 'success')
{
$arr['msg'] = "Payment Successful can't edit application";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-2,"Failure");
return;
}
if(count($result1) > 0) {
$arr['fappno'] = $result2['fappno'];
$arr['fpaystatus'] = $result2['fpaystatus'];
$arr['combcode'] = $combcode;
if(count($result2) == 0)
$arr['fappno'] = "";
$arr['fmobileno'] = $_SESSION['MOBILE'];
$arr['degree'] = $result1;
$arr['lanres'] = $lanres;
$arr['combsubs'] = $combsubs;
$arr['prefdocvrfloc'] = $prefdocvrfloc;
$arr['nolan'] = $nolan;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else {
$arr['msg'] = "No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
function getFacultyDegreeView($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fappno = $aobj_context->mobj_data["fappno"];
$fname = $aobj_context->mobj_data["fname"];
session_start();
$query1 = "SET SESSION group_concat_max_len=10000000";
$results = $aobj_context->mobj_db->Execute($query1);
$query = "select distinct fdegree as int_code, fdescpn as val
from entprevdeg
where ifnull(fdeleted,'') <> 'T'
order by fdescpn";
$result1 = $aobj_context->mobj_db->GetAll($query);
$query = "select distinct fdegree as fdegree, ifnull(fnolan,'F') as fnolan
from entprevdeg
where ifnull(fdeleted,'') <> 'T'
order by fdescpn";
$reslan = $aobj_context->mobj_db->GetAll($query);
$nolan = [];
foreach($reslan as $value)
{
$nolan[$value['fdegree']] = $value['fnolan'];
}
$query = "select distinct fsubcode as int_code, fsubname as val
from entprevcomb
where fdegree = 'lan' and fcombcode = 'lan'
order by fdescpn";
$lanres = $aobj_context->mobj_db->GetAll($query);
$query = "select distinct fdegree,
group_concat(distinct concat(fcombcode,'-',fdescpn) separator '*') as combdet
from entprevcomb
where fdegree <> 'lan'
group by fdegree";
$res = $aobj_context->mobj_db->GetAll($query);
$combcode = [];
foreach($res as $value)
{
$combcode[$value['fdegree']] = $value['combdet'];
}
$query = "select distinct concat(fdegree,fcombcode) as code,
group_concat(distinct concat(fsubcode,'-',fsubname) separator '*') as subbdet
from entprevcomb
where fdegree <> 'lan'
group by fdegree,fcombcode";
$res = $aobj_context->mobj_db->GetAll($query);
$combsubs = [];
foreach($res as $value)
{
$combsubs[$value['code']] = $value['subbdet'];
}
$query1 = "SET SESSION group_concat_max_len=10000000";
$results = $aobj_context->mobj_db->Execute($query1);
$query = "select ifnull(fappno,'') as fappno, ifnull(ffinsub,'F') as ffinsub,
ifnull(fpaystatus,'') as fpaystatus from entstudadm
where fappno = '{$fappno}'";
$result2 = $aobj_context->mobj_db->GetRow($query);
if(!$result1 && gettype($result1) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if(count($result1) > 0) {
$arr['fappno'] = $result2['fappno'];
$arr['fpaystatus'] = $result2['fpaystatus'];
$arr['combcode'] = $combcode;
if(count($result2) == 0)
$arr['fappno'] = "";
$arr['fname'] = $fname;
$arr['degree'] = $result1;
$arr['lanres'] = $lanres;
$arr['combsubs'] = $combsubs;
$arr['nolan'] = $nolan;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else {
$arr['msg'] = "No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
?>
|