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.165.234
<?php
function getNameDegrepeiamarksentry($aobj_context){
session_start();
$collcode = $_SESSION['collcode'];
$regno = $aobj_context->mobj_data["reg"];
$query = " SELECT s.fname, d.fdegree, d.fexamno,d.fexamname, s.fregno, s.fcollcode FROM student s INNER JOIN degree d ON s.fdegree=d.fdegree
AND s.fexamno=d.fexamno WHERE s.fregno='{$regno}' AND s.fcollcode='{$collcode}' AND IFNULL(fregno,'')<>''";
$result = $aobj_context->mobj_db->GetRow($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
}
else{
$arr['msg']="No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
}
}
function iamarksEntries($aobj_context){
$regno = $aobj_context->mobj_data["reg"];
$deg = $aobj_context->mobj_data["degree"];
$sem = $aobj_context->mobj_data["s_semister"];
$query=" SELECT DISTINCT CONCAT(s.fsubname,' - ',s.fssubname)AS fsubname,s.fvalmax, s.fcsubcode,r.fregno,r.fdegree,r.fyear,r.fexamtype,r.fexamno,IFNULL(m.fmarks,'') AS fmarks
FROM canddet r INNER JOIN subject s ON s.fdegree=r.fdegree AND s.fexamno=r.fexamno
AND s.fsubcode = r.fsubcode
inner join candsum cs on r.fregno = cs.fregno and cs.ffreshexam <> r.fexamno
LEFT JOIN marks m ON r.fregno = m.fregno AND r.fexamno = m.fexamno
AND r.fsubcode = LEFT(m.fsubcode,4) AND m.fsubcode = s.fcsubcode
WHERE r.fregno='{$regno}' AND r.fdegree='{$deg}' AND s.FINTASS='T'
AND r.fexamno='{$sem}' AND IFNULL(fpassmth,'')=''";
$result = $aobj_context->mobj_db->GetAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
}
else{
$arr['msg']="Failed to Load";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
}
}
function savetomarkstable($aobj_context){
$regno = $aobj_context->mobj_data["reg"];
$deg = $aobj_context->mobj_data["degree"];
$sem = $aobj_context->mobj_data["semester"];
$theorymarks = json_decode($aobj_context->mobj_data["data"],true);
session_start();
$collcode = $_SESSION['collcode'];
$user = $_SESSION['usr'];
$now = date("Y-m-d h:i:s");
$valid =date("Y-m-d");
$query="SELECT FIAREPFROM, FIAREPTO
FROM collexam
WHERE fcollcode = '{$collcode}'
AND fdegree = '{$deg}'
AND fexamno = '{$sem}'
AND date_format(now(), '%Y-%m-%d') BETWEEN FIAREPFROM AND FIAREPTO";
$res=$aobj_context->mobj_db->GetAll($query);
if($res){
foreach ($theorymarks as $data)
{
if(!empty($data['fmarks'])){
$query=" INSERT INTO marks (fdegree,fexamno, fcollcode,fregno,fsubcode,fmarks, flogname,flogdate, fyear,fexamtype,fcreateuser)
VALUES('{$data['fdegree']}', '{$data['fexamno']}', '{$collcode}','{$data['fregno']}', '{$data['fcsubcode']}',
'{$data['fmarks']}','{$user}','{$now}','{$data['fyear']}','{$data['fexamtype']}','repeater')
on duplicate key update fmarks='{$data['fmarks']}',flogdate='{$now}',flogname='{$user}' ";
$result = $aobj_context->mobj_db->Execute($query);
}
}
if ($result){
$data['data'] = "updates successfully";
echo $aobj_context->mobj_output->ToJSONEnvelope($data, 0,"success");
} else
{
$data['data'] = "Failed to update";
echo $aobj_context->mobj_output->ToJSONEnvelope($data, -1,"fail");
}
}else{
$data['data'] = "The Date Is Not Enabled";
echo $aobj_context->mobj_output->ToJSONEnvelope($data, -1,"fail");
}
}
function getSempeiamarksentry($aobj_context){
$query=" SELECT DISTINCT fexamno, CONCAT(IFNULL(fexamno,''),' - ',IFNULL(fexamname,''))AS fexamname FROM degree
GROUP BY fexamno ORDER BY fexamno";
$result = $aobj_context->mobj_db->GetAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
}
else{
$arr['msg']="Failed to Load";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
}
}
?>
|