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.226.214.1
<?php
function getcmsdropdownmenuvalues($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$COLLCODE = $_SESSION['FCOLLCODE'];
$query = "select c.fcollcode as int_code, concat(ifnull(c.fcollname,''),', ', ifnull(c.FTOWN,''),' - ',ifnull(c.fcollcode,'')) as val from college c
where FCOLLCODE = '{$COLLCODE}' and ifnull(c.fdeleted,'') <> 'T' order by c.fcollname";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['college'] = $results;
$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;
$query4 = "select fboardcode as int_code, fboardname as val from masboard order by forder";
$rst4 = $aobj_context->mobj_db->GetAll($query4);
$arr['boards'] = $rst4;
$query = "select distinct c.funivcode, d.fdegree as int_code,
concat(d.fdescpn,' - ',d.fdegree) as val, fdeggrp
from degree d, control c
where ifnull(d.fdeleted,'') <> 'T' and d.fexamno = 'A' and d.fadmdeg = 'T'
and fdegree = '{$_SESSION['FDEGREE']}' order by d.fdescpn";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['degree'] = $results;
$arr['funivcode'] = $results[0]['funivcode'];
$query = "SELECT IFNULL(FCOLLCODE,'') AS idCollege, IFNULL(FDEGREE,'') AS idDegree,
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(FBLOOD_GROUP,'') AS idBldgrp,
IFNULL(FCONTACT_NO,'') 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(FMEDIUM,'') AS medium, IFNULL(FSTUTYPE,'') AS sttype,
IFNULL(FQUOTA,'') AS adquota,
IFNULL(FCOMBCODE,'') AS idDegComb, IFNULL(fgender,'') AS gender,
IFNULL(FCATBIRTH,'') AS idCaste, IFNULL(FMOBILE_NO,'') AS pmobileno,
IFNULL(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(FAPPNO,'') AS fappno,
IFNULL(FQPERCENTAGE,'') AS idUnvPerc, IFNULL(FQUALEXREGNO,'') AS idUnvRegno,
IFNULL(FAREA,'') AS area, 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,
IFNULL(fincomecert,'') AS fincomecert,
IFNULL(fcastecert,'') AS fcastecert,
IFNULL(fph,'') AS fph,
ifnull(fstudidno,'') as fstudidno,
ifnull(idFatOccup,'')as idFatOccup ,ifnull(fFatAnInc,'')as fFatAnInc,
ifnull(idMotOccup,'')as idMotOccup,ifnull(fMotAnInc,'')as fMotAnInc,
ifnull(ftenregno,'')as ftenregno,ifnull(ftenminmrk,'')as ftenminmrk,
ifnull(ftenmaxmrk,'')as ftenmaxmrk,ifnull(ftenper,'')as ftenper,
ifnull(ftenbrd,'')as ftenbrd,ifnull(ftenschname,'')as ftenschname,
ifnull(ftenlocsch,'')as ftenlocsch,ifnull(ftwtregno,'')as ftwtregno,
ifnull(ftwtminmrk,'')as ftwtminmrk,ifnull(ftwtmaxmrk,'')as ftwtmaxmrk,
ifnull(ftwtper,'')as ftwtper,ifnull(ftwtbrd,'')as ftwtbrd,
ifnull(ftwtcollname,'')as ftwtcollname,ifnull(ftwtloccoll,'')as ftwtloccoll,
ifnull(fpcmaggt,'')as fpcmaggt,ifnull(fdipregno,'')as fdipregno,
ifnull(fthredipmin,'')as fthredipmin,ifnull(fthredipmax,'')as fthredipmax,
ifnull(fdipper,'')as fdipper,ifnull(fdipbrd,'')as fdipbrd ,
ifnull(fdipcollname,'')as fdipcollname ,ifnull(fdiploccoll,'')as fdiploccoll,
ifnull(fenttstnm,'')as fenttstnm,ifnull(fentmax,'')as fentmax,
ifnull(fentper,'')as fentper,ifnull(frankobt,'')as frankobt,
ifnull(fentrritmrk,'')as fentrritmrk,ifnull(frrittestper,'')as frrittestper,
ifnull(frankrritobt,'')as frankrritobt,
ifnull(fdomCountry,'')as fdomCountry,ifnull(fdomstate,'')as fdomstate,
ifnull(fpassportno,'')as fpassportno,
date_format(fppexpirydate, '%d/%m/%Y')as fppexpirydate,
ifnull(fvisaNo,'')as fvisaNo,
date_format(fvisaExp, '%d/%m/%Y')as fvisaExp,ifnull(fefrroNo,'')as fefrroNo,
date_format(fefrroexpdate, '%d/%m/%Y')as fefrroexpdate,ifnull(idFatOccup,'')as idFatOccup,
ifnull(fFatAnInc,'')as fFatAnInc,ifnull(idMotOccup,'')as idMotOccup,
ifnull(fMotAnInc,'')as fMotAnInc,ifnull(fparexser,'')as fparexser,
ifnull(fpergovt,'')as fpergovt,ifnull(fstdncc,'')as fstdncc,
ifnull(fFatMob,'')as fFatMob,ifnull(fMotMob,'')as fMotMob,
ifnull(fentmin,'')as fentmin,ifnull(fentrritmin,'')as fentrritmin
FROM studadm WHERE FCONTACT_NO = '{$_SESSION['MOBILE']}'";
$result = $aobj_context->mobj_db->GetRow($query);
$query = "select fcstudidno from collstud where fmobileno = '{$_SESSION['MOBILE']}'";
$result9 = $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['fcaste'] = $_SESSION['FCASTE'];
$arr['fcombcode'] = $_SESSION['FCOMBCODE'];
$arr['fname'] = $_SESSION['NAME'];
$arr['studidno'] = $result9['fcstudidno'];
$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);
$appno = $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 = '{$appno}'";
$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);
$fdegree = $aobj_context->mobj_data["fdegree"];
$query = "select internal_code as int_code,
FCERTDESC as doc_type ,
ifnull(FFILENAME,REPLACE(REPLACE(FCERTDESC,' ','_'),'+','_')) as FFILENAME
from
masdoc where fdegree = '{$fdegree}' 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 c.funivcode, 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 control c, masdoc m
LEFT OUTER JOIN studoc s
ON s.fdegree = m.fdegree and s.fdoctype = m.FFILENAME
AND s.login_cnt = '{$fappno}'
AND s.fcollcode = '{$college}' where m.fdegree = '{$degree}'
ORDER BY forder";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['masdoc'] = $results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
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,
CONCAT(dg.fdegree, ' - ', dg.fdescpn) AS fdegree, cs.fcollcode, cs.fdegree,
CONCAT('[', cl.fcollcode,'] ', cl.fcollname) AS college,
ifnull(fcstudidno,'') as fcstudidno
FROM collstud cs INNER JOIN college cl
ON cs.fcollcode = cl.fcollcode INNER JOIN degree dg
ON cs.fdegree = dg.fdegree
WHERE cs.fmobileno = '{$_SESSION['MOBILE']}'";
// var_dump($query);
$rst = $aobj_context->mobj_db->GetRow($query);
$query = "select if(ifnull(fappstatus,'') = 'verified', 'T', 'F') as ffinsub from studadm
where fcontact_no = '{$_SESSION['MOBILE']}'";
$rst1 = $aobj_context->mobj_db->GetRow($query);
$query = "select * from collexam where date_format(now(),'%Y-%m-%d') between fadmfrom
and fadmto and fdegree = '{$rst['fdegree']}'
and fcollcode = '{$rst['fcollcode']}'";
$rst2 = $aobj_context->mobj_db->GetRow($query);
$lastdate = 'F';
if(count($rst2) == 0)
{
$lastdate = 'T';
$rst['msg'] = 'Admission Dates not enabled by university';
}
if($mobile == 'T')
{
$rst['msg'] = 'Do not use Mobile Phone for application Entry';
}
if($rst1['ffinsub'] == 'T')
{
$rst['msg'] = 'College has verified your application. Further contact college for correction';
}
$rst['lastdate'] = $lastdate;
$rst['mobile'] = $mobile;
$rst['os'] = $os_platform;
$rst['ffinsub'] = $rst1['ffinsub'];
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 submitquery($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fmessage = $aobj_context->mobj_data["fmessage"];
$fsubject = $aobj_context->mobj_data["fsubject"];
$femail = $aobj_context->mobj_data["femail"];
$query = "select funivcode from control";
$rst = $aobj_context->mobj_db->GetRow($query);
$funivcode = $rst['funivcode'];
if($_SESSION['MOBILE'] != '')
{
$query = "insert into logisys3_grv.grvhead(fgrvdate,fgrvfrom,fgrvemail,fgrvmobile,fgrvsub,
fgrvmsg,fgrvuser,fgrvmode,funivcode,fstudemail)
values (now(),'{$_SESSION['NAME']}','{$_SESSION['EMAIL']}','{$_SESSION['MOBILE']}',
'{$fsubject}','{$fmessage}','Student','helpdesk','{$funivcode}','{$femail}')";
//var_dump($query);
$results = $aobj_context->mobj_db->Execute($query);
$last_inserted_id = $aobj_context->mobj_db->Insert_ID();
if($results)
{
$msg = $last_inserted_id;
echo $aobj_context->mobj_output->ToJSONEnvelope($msg,0,"success");
return;
}
else
{
$error_msg = 'Not able to submit the query. please try after some time.';
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"failure");
return;
}
}
else
{
$error_msg = 'Please login to submit the query.';
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-2,"failure");
return;
}
}
?>
|