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.142.251.42
<?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"];
$regno = $aobj_context->mobj_data["regno"];
$lan1 = $aobj_context->mobj_data["lan1"];
$lan2 = $aobj_context->mobj_data["lan2"];
// var_dump($fappno);
if($combcode == 'UNIV') {
$query = "select x.fdegree, y.fdescpn, if(ifnull(z.fdegree,'')='','','checked') as sddeg from
(select distinct b.* from entvalmarks a, enteligdeg b
where a.fdegree = b.fprevdeg and a.fsubcode = b.fnewsub
and fregno = '{$regno}'
union
select distinct b.* from entvalmarks a, enteligdeg b
where a.fdegree = b.fprevdeg and a.fsubcode = b.fsubcode
and fregno = '{$regno}') x
inner join entdeg y on x.fdegree = y.fdegree left join entoptdeg z
on x.fdegree = z.fdegree and z.fappno = '{$fappno}'
group by x.fdegree";
}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}'
union
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.fcombcode = 'LAN' and c.fsubcode in ('{$lan1}', '{$lan2}')";
}
// 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);
$enable = $aobj_context->mobj_data["enable"];
session_start();
$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
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);
// var_dump($lanres);
$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
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,ifnull(feditapp,'') as feditapp from entstudadm
where fmobileno = '{$_SESSION['MOBILE']}'";
//var_dump($query);
$result2 = $aobj_context->mobj_db->GetRow($query);
$query = "select * from entcoll where fdocvrfloc = 'T' order by fcollcode desc";
// 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;
}
$query_pgadmdate = "select count(*) from collexam where fcollcode = 'pget'
and fdegree = 'pget'
and date_format(now(),'%Y-%m-%d') between date_format(FPGADMFROM,'%Y-%m-%d')
and date_format(FPGADMTO,'%Y-%m-%d')";
// var_dump($query_pgadmdate);
$result3 = $aobj_context->mobj_db->GetRow($query_pgadmdate);
// var_dump($result3);
$query_masdoc = "select * from masdoc
order by forder";
// var_dump($query_masdoc);
$masdoc = $aobj_context->mobj_db->GetAll($query_masdoc);
if($result2['feditapp'] == 'T'){
}else if($result3['count(*)']== '0')
{
$arr['msg'] = "Last Date to apply for PG-Admission is over";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-2,"Failure");
return;
}else if($result2['fpaystatus']== 'success' && $enable != 'T' )
{
$arr['msg'] = "Payment Successful can't edit application";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-2,"Failure");
return;
}
if(count($result1) > 0) {
if($result2['fappno'] == "") {
$query = "select fappno from entstudadm
where fmobileno = '{$_SESSION['MOBILE']}'";
// var_dump($query);
$result3 = $aobj_context->mobj_db->GetRow($query);
// var_dump($result3);
if(count($result3) > 0) {
$arr['fappno'] = $result3['fappno'];
}
else {
$arr['fappno'] = "";
}
}
else {
$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;
$arr['masdoc'] = $masdoc;
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();
$query = "select distinct fdegree as int_code, fdescpn as val
from entprevdeg
order by fdescpn";
$result1 = $aobj_context->mobj_db->GetAll($query);
$query = "select distinct fdegree as fdegree, ifnull(fnolan,'F') as fnolan
from entprevdeg
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 * from entcoll where fdocvrfloc = 'T' order by fcollcode desc";
// var_dump($query);
$prefdocvrfloc = $aobj_context->mobj_db->GetAll($query);
$query1 = "SET SESSION group_concat_max_len=10000000";
$results = $aobj_context->mobj_db->Execute($query1);
$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);
// var_dump($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'];
}
$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;
$arr['prefdocvrfloc'] = $prefdocvrfloc;
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;
}
}
?>
|