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 : 18.227.46.87
<?php
function getcmsdropdownmenuvalues($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$COLLCODE = $_SESSION['FCOLLCODE'];
$query3 = "SELECT FCATEGORY AS int_code,FDESCPN AS val FROM category
where ifnull(FDELETED,'') <> 'T' order by FCATEGORY asc ";
$rst3 = $aobj_context->mobj_db->GetAll($query3);
$arr['category'] = $rst3;
$query = "SELECT IFNULL(FCOLLCODE,'') AS idCollege, IFNULL(d.fdescpn,'') AS idDegreeName,
IFNULL(p.fdegree,'') AS idDegree,
IFNULL(p.fadmsub,'') AS admsub,
ifnull(ftotfee,400) as amount,
ifnull(f371j,'') as 371J,
ifnull(fpwd,'') as SPWD,
ifnull(fqaldegname,'') as qaldegname,
ifnull(fqalunivname,'') as qalunivname,
IFNULL(p.fpaymenttype,'') AS paytype,
IFNULL(d.fdegsub,'') as substudy,
IFNULL(FNAME,'') AS idStudname, IFNULL(FFATNAME,'') AS idFatname,
IFNULL(FMOTNAME,'') AS idMotname, IFNULL(FFAT_OCC,'') AS fatocc,
IFNULL(FEMAIL,'') AS stuEmail, IFNULL(FDOB,'') AS idDob,
IFNULL(FCASTE,'') AS idCategory,
IFNULL(fmobileno,'') AS stuMobileno, IFNULL(FNATIONAL,'') AS idNationality,
IFNULL(FCURRADD1,'') AS cadd1, IFNULL(FCURRADD2,'') AS cadd2,
IFNULL(FCURRADD3,'') AS cadd3, IFNULL(FCURRADD4,'') AS cadd4,
IFNULL(FPERMADD1,'') AS padd1, IFNULL(FPERMADD2,'') AS padd2,
IFNULL(FPERMADD3,'') AS padd3, IFNULL(FPERMADD4,'') AS padd4,
IFNULL(FPHOTOPATH,'') AS studphoto, IFNULL(FRELIGION,'') AS idReligion,
IFNULL(FSTUTYPE,'') AS sttype,
IFNULL(FQUOTA,'') AS adquota,
IFNULL(FCOMBCODE,'') AS idDegComb, IFNULL(fgender,'') AS gender,
IFNULL(FCATBIRTH,'') AS idCaste, IFNULL(FCONTACT_NO,'') AS pmobileno,
IFNULL(p.FSIGNPATH,'') AS studsign, IFNULL(FAADHARNO,'') AS adhar,
IFNULL(FSTATE,'') AS fstate, IFNULL(FINCOME,'') AS income,
IFNULL(FUNIVNAME,'') AS idUnvName, IFNULL(FQMONTH,'') AS idUnvPassMth,
IFNULL(FQYEAR,'') AS idUnvPassYear, IFNULL(internal_code,'') AS fappno,
IFNULL(FQPERCENTAGE,'') AS idUnvPerc, IFNULL(FQUALEXREGNO,'') AS idUnvRegno,
IFNULL(FQMAXMARKS,'') AS idUnvMaxMarks,
IFNULL(FQSECMARKS,'') AS idUnvSecMarks, IFNULL(FTYPEQUALEXAM,'') AS idUnvExam,
IFNULL(fcombcode,'') AS idDegComb, IFNULL(FPERDIST,'') AS pdistrict,
IFNULL(FPERPINCODE,'') AS ppincode, IFNULL(FPERSATE,'') AS pstate,
IFNULL(FCOMDIST,'') AS cdistrict, IFNULL(FCOMPINCODE,'') AS cpincode,
IFNULL(FCOMSTATE,'') AS cstate
FROM pgstudadm p inner join degree d on p.fdegree = d.fdegree and d.fexamno = 'A'
WHERE fmobileno = '{$_SESSION['MOBILE']}' and internal_code = '{$_SESSION['appno']}'";
//var_dump($query);
$result = $aobj_context->mobj_db->GetRow($query);
$arr['perdetl'] = $result;
$arr['fmobileno'] = $_SESSION['MOBILE'];
$arr['fdob'] = $_SESSION['FDOB'];
$arr['fcollcode'] = $_SESSION['FCOLLCODE'];
$arr['fdegree'] = $_SESSION['FDEGREE'];
$arr['percnt'] = count($result);
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function getdegreedetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$college = $aobj_context->mobj_data["college"];
$query = "select distinct d.fdegree as int_code, concat(d.fdescpn,' - ',d.fdegree) as val from degree d
where d.fexamno = 'A' and d.fadmdeg = 'T' and ifnull(d.fdeleted,'') <> 'T'
order by d.fdescpn";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['degree'] = $results;
//
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function getcombinationdetailsdetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$college = $aobj_context->mobj_data["college"];
$degree = $aobj_context->mobj_data["degree"];
$query = "select distinct m.fcombcode as int_code, concat(m.fcombcode,' - ',m.FCOMBDESC) as val from mascomb m
where m.fdegree = '{$degree}' and ifnull(m.fdeleted,'') <> 'T' order by m.fcombcode";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['mascomb'] = $results;
//
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function getboarddetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$boardCode = $aobj_context->mobj_data["boardCode"];
$query = "select fboardcode, fboardsate, fboardname, faddress, fphoneno
from masboard where fboardcode = '{$boardCode}'
order by forder";
$results = $aobj_context->mobj_db->GetRow($query);
$arr['boardDet'] = $results;
//
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function loadSubjectdet($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$combcode = $aobj_context->mobj_data["combcode"];
$query = "select FTOTSUB from degree where fdegree ='{$degree}' and fexamno = 'A'";
$results = $aobj_context->mobj_db->GetRow($query);
$totsub = $results['FTOTSUB'];
$query = "SELECT fsubcode,fsubname,fsubshort FROM degree d INNER JOIN subject s ON
s.FDEGREE=d.FDEGREE AND d.FEXAMNO=s.FEXAMNO
WHERE d.FDEGREE='{$degree}' AND s.FEXAMNO='A' AND FMANDATORY='T' GROUP BY s.FSUBCODE
UNION
SELECT s.FSUBCODE,s.FSUBNAME,s.FSUBSHORT FROM degree d INNER JOIN subject s ON
s.FDEGREE=d.FDEGREE AND d.FEXAMNO=s.FEXAMNO
LEFT JOIN mascomb m ON m.FDEGREE=d.FDEGREE AND m.fcombcode = '{$combcode}'
WHERE d.FDEGREE='{$degree}' AND m.FSUBCODE = s.FSUBCODE
GROUP BY s.FSUBCODE";
//var_dump($query);
$mresults = $aobj_context->mobj_db->GetAll($query);
$mtotalsub = count($mresults);
$remaing = $totsub - $mtotalsub;
$query = "select fsubcode,fsubname,fsubshort from subject
where fdegree = '{$degree}'
and fexamno = 'A' and ifnull(fmandatory,'F') <> 'T'
and ifnull(fretain,'F') <> 'T' and ifnull(fintass,'F') <> 'T'
and ifnull(fsuspend,'F') <> 'T' and ifnull(fcombsub,'') <> 'T'";
$rresults = $aobj_context->mobj_db->GetAll($query);
$arr['totsub'] = $totsub;
$arr['mresults'] = $mresults;
$arr['mtotalsub'] = $mtotalsub;
$arr['rresults'] = $rresults;
$arr['remaing'] = $remaing;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function loadeditSubjectdet($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$combcode = $aobj_context->mobj_data["combcode"];
$appno = $aobj_context->mobj_data["appno"];
$query = "select FTOTSUB from degree where fdegree ='{$degree}' and fexamno = 'A'";
$results = $aobj_context->mobj_db->GetRow($query);
$totsub = $results['FTOTSUB'];
$query = "SELECT fsubcode,fsubname,fsubshort FROM degree d INNER JOIN subject s ON
s.FDEGREE=d.FDEGREE AND d.FEXAMNO=s.FEXAMNO
WHERE d.FDEGREE='{$degree}' AND s.FEXAMNO='A' AND FMANDATORY='T' GROUP BY s.FSUBCODE
UNION
SELECT s.FSUBCODE,s.FSUBNAME,s.FSUBSHORT FROM degree d INNER JOIN subject s ON
s.FDEGREE=d.FDEGREE AND d.FEXAMNO=s.FEXAMNO
LEFT JOIN mascomb m ON m.FDEGREE=d.FDEGREE AND m.fcombcode = '{$combcode}'
WHERE d.FDEGREE='{$degree}' AND m.FSUBCODE = s.FSUBCODE
GROUP BY s.FSUBCODE";
//var_dump($query);
$mresults = $aobj_context->mobj_db->GetAll($query);
$mtotalsub = count($mresults);
$remaing = $totsub - $mtotalsub;
$query = "select fsubcode,fsubname,fsubshort from subject
where fdegree = '{$degree}'
and fexamno = 'A' and ifnull(fmandatory,'F') = 'F'
and ifnull(fretain,'F') = 'F' and ifnull(fintass,'F') = 'F'
and ifnull(fsuspend,'F') <> 'T' and ifnull(fcombsub,'') <> 'T'";
$rresults = $aobj_context->mobj_db->GetAll($query);
$query = "select fsubcode from options where fappno = '{$appno}'";
$option_sub = $aobj_context->mobj_db->GetAll($query);
$arr['option_sub'] = $option_sub;
$arr['totsub'] = $totsub;
$arr['mresults'] = $mresults;
$arr['mtotalsub'] = $mtotalsub;
$arr['rresults'] = $rresults;
$arr['remaing'] = $remaing;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function loadpgmarks($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fappno = $aobj_context->mobj_data["appno"];
$query = "select fappno, fsubcode, fsubname, fsecmarksa, fmaxmarksa, fsecmarksb, fmaxmarksb, fsecmarksc, fmaxmarksc,
fsecmarksd, fmaxmarksd, fsecmarkse, fmaxmarkse, fsecmarksf, fmaxmarksf, ftotsecmarks, ftotmaxmarks, fsubpercent
from qualsubdet where fappno = '{$fappno}'";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['pgmarks'] = $results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function uploaddetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = "select internal_code as int_code,
FCERTDESC as doc_type,
ifnull(FFILENAME,REPLACE(REPLACE(FCERTDESC,' ','_'),'+','_')) as FFILENAME
from
masdoc where fdegree = 'PG' order by forder";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['masdoc'] = $results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function uploadeditdetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$fappno = $aobj_context->mobj_data["fappno"];
$college = $aobj_context->mobj_data["college"];
$query = "SELECT DISTINCT m.internal_code AS int_code,
FCERTDESC AS doc_type ,
IFNULL(FFILENAME,REPLACE(REPLACE(FCERTDESC,' ','_'),'+','_')) AS FFILENAME,
ifnull(s.file_path,'') as file_path
FROM masdoc m
LEFT OUTER JOIN studoc s
ON s.fdegree = m.fdegree and s.fdoctype = m.FFILENAME
AND s.fappno = '{$fappno}'
AND s.fcollcode = '{$college}' where m.fdegree = '{$degree}'
ORDER BY forder";
// var_dump($query);
$results = $aobj_context->mobj_db->GetAll($query);
$arr['masdoc'] = $results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function savedegree($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$combcode = $aobj_context->mobj_data["combcode"];
$mobileno = $_SESSION['MOBILE'];
$email = $_SESSION['EMAIL'];
if($_SESSION['MOBILE'] == '')
{
$error_msg = 'Please Login and try again';
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
$query = "insert into pgstudadm(fdegree,fcollcode,fcombcode,fmobileno,femail)
values ('{$degree}','1001','{$combcode}','{$mobileno}','{$email}')";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "select internal_code, d.fdescpn as fdegree,fcollcode,fcombcode,
fmobileno,ffinsub,ifnull(fpaymentstatus,'') as fpaymentstatus
from pgstudadm p inner join degree d on p.fdegree = d.fdegree and d.fexamno = 'a'
where fmobileno = '{$_SESSION['MOBILE']}'";
$rst1 = $aobj_context->mobj_db->GetAll($query);
echo $aobj_context->mobj_output->ToJSONEnvelope($rst1,0,"success");
return;
}else
{
$error_msg = 'You already Applied For this Course';
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
}
function getstudentdetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$os_platform = "Unknown OS Platform";
$os_array = array(
'/windows nt 10/i' => 'Windows 10',
'/windows nt 6.3/i' => 'Windows 8.1',
'/windows nt 6.2/i' => 'Windows 8',
'/windows nt 6.1/i' => 'Windows 7',
'/windows nt 6.0/i' => 'Windows Vista',
'/windows nt 5.2/i' => 'Windows Server 2003/XP x64',
'/windows nt 5.1/i' => 'Windows XP',
'/windows xp/i' => 'Windows XP',
'/windows nt 5.0/i' => 'Windows 2000',
'/windows me/i' => 'Windows ME',
'/win98/i' => 'Windows 98',
'/win95/i' => 'Windows 95',
'/win16/i' => 'Windows 3.11',
'/macintosh|mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);
foreach ($os_array as $regex => $value)
if (preg_match($regex, $user_agent))
$os_platform = $value;
$mobile = 'F';
if($os_platform == 'Mobile' || $os_platform == 'Android' || $os_platform == 'iPhone')
{
$mobile = 'T';
}
$query = "SELECT cs.fmobileno, if(ifnull(cs.femail,'') = '', 'not provided', cs.femail) as femail,
cs.fname, cs.fdob, cs.fcollcode,
CONCAT('[', cl.fcollcode,'] ', cl.fcollname) AS college
FROM collstud cs INNER JOIN college cl
ON cs.fcollcode = cl.fcollcode
WHERE cs.fmobileno = '{$_SESSION['MOBILE']}'";
$rst = $aobj_context->mobj_db->GetRow($query);
$query = "select internal_code, d.fdescpn as fdegree,fcollcode,fcombcode,
fmobileno,ffinsub,ifnull(fpaymentstatus,'') as fpaymentstatus
from pgstudadm p inner join degree d on p.fdegree = d.fdegree and d.fexamno = 'a'
where fmobileno = '{$_SESSION['MOBILE']}'";
$rst1 = $aobj_context->mobj_db->GetAll($query);
$query = "select * from collexam where date_format(now(),'%Y-%m-%d') between fadmfrom
and fadmto and fdegree = 'PG'
and fcollcode = '{$rst['fcollcode']}'";
$rst2 = $aobj_context->mobj_db->GetAll($query);
$lastdate = 'F';
if($mobile == 'T')
{
$rst['msg'] = 'Do not use Mobile Phone for application Entry';
}
$query = "select distinct fdegree, fdescpn from degree where FPROGCODE = 'ma'";
$rstma = $aobj_context->mobj_db->GetAll($query);
$query = "select distinct fdegree, fdescpn from degree where FPROGCODE = 'msc'";
$rstmsc = $aobj_context->mobj_db->GetAll($query);
$query = "select distinct fdegree, fdescpn from degree where FPROGCODE = 'mcom'";
$rstmcom = $aobj_context->mobj_db->GetAll($query);
$rst['lastdate'] = $lastdate;
$rst['mobile'] = $mobile;
$rst['os'] = $os_platform;
$rst['ma'] = $rstma;
$rst['msc'] = $rstmsc;
$rst['mcom'] = $rstmcom;
$rst['studadm'] = $rst1;
if($rst)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
return;
}
else
{
$error_msg = 'Not a valid Register no.';
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
}
function replaceChars($name)
{
$spl_char = array("*","/","~","!","@","#","$","%","^","&",":",";","?","/","\\","_","-","'"," ","");
$link_name = strtolower(str_replace($spl_char,"_",$name));
return str_ireplace("__","_",$link_name);
}
function setappnosession($aobj_context)
{
$appno = $aobj_context->mobj_data["appno"];
$_SESSION['appno'] = $appno;
$_SESSION['FCOLLCODE'] = '1001';
echo $aobj_context->mobj_output->ToJSONEnvelope($appno,0,"success");
return;
}
?>
|