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.45.223
Current Path : /var/www/html/pget/ |
| Current File : /var/www/html/pget/student.php |
<?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";
// var_dump($query4);
$rst4 = $aobj_context->mobj_db->GetAll($query4);
// var_dump($rst4);
$arr['boards'] = $rst4;
$query = "select distinct d.fdegree as int_code, concat(d.fdescpn,' - ',d.fdegree) as val from degree d
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;
$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(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
FROM studadm WHERE FCONTACT_NO = '{$_SESSION['MOBILE']}'";
$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 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 = 'BA1' 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.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, cs.femail, cs.fname, cs.fdob,
CONCAT(dg.fdegree, ' - ', dg.fdescpn) AS fdegree,
CONCAT('[', cl.fcollcode,'] ', cl.fcollname) AS college
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']}'";
$rst = $aobj_context->mobj_db->GetRow($query);
$query = "select ifnull(ffinsub,'T') as ffinsub from studadm where fcontact_no = '{$_SESSION['MOBILE']}'";
$rst1 = $aobj_context->mobj_db->GetRow($query);
if($mobile == 'T')
{
$rst['msg'] = 'Do not use Mobile Phone for application Entry';
}
$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"];
if($_SESSION['MOBILE'] != '')
{
$query = "update collstud where fset FEMAIL = '{$femail}'
where fmobileno = '{$_SESSION['MOBILE']}' and ifnull(femail,'') = ''";
// $results = $aobj_context->mobj_db->Execute($query);
$query = "insert into grvhead(fgrvdate,fgrvfrom,fgrvemail,fgrvmobile,fgrvsub,
fgrvmsg,fgrvuser,fgrvmode,funivcode,fstudemail)
values (now(),'{$_SESSION['NAME']}','{$_SESSION['EMAIL']}','{$_SESSION['MOBILE']}',
'{$fsubject}','{$fmessage}','Student','helpdesk','041','{$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;
}
}
?>
|