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.144.224.116
<?php
function getExaminerDetails($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$departmentCode = $aobj_context->mobj_data['deptCode'];
$qpcode = $aobj_context->mobj_data['qpcode'];
$get_teachers = "select mt.fteachcode, mt.fteachname, td.fdeptcode, td.fqpcode
from masteach mt
inner join teachdet td
on mt.fteachcode = td.fteachcode
and mt.fdeptcode = td.fdeptcode
where td.fqpcode = '{$qpcode}'
and mt.fdeptcode = '{$departmentCode}'";
$lobj_get_data = $aobj_context->mobj_db->GetAll($get_teachers);
$arr['teachers'] = $lobj_get_data;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function saveExaminerDetails($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$departmentCode = $aobj_context->mobj_data['deptCode'];
$qpcode = $aobj_context->mobj_data['qpcode'];
$teach_arr = stripslashes($aobj_context->mobj_data['teach_arr']);
$teach_arr_decode = json_decode($teach_arr, true);
foreach ($teach_arr_decode as $key => $value)
{
$update_teachers = "update teachdet set
fpsapprove = '{$value['fpsapprove']}',
fvalapprove = '{$value['fvalapprove']}',
fprapprove = '{$value['fprapprove']}'
where fdeptcode = '{$departmentCode}'
and fqpcode = '{$qpcode}'
and fteachcode = '{$value['teachcode']}'";
$rst = $aobj_context->mobj_db->Execute($update_teachers);
}
if($rst)
{
$success_msg = "Updated Successfully";
echo $aobj_context->mobj_output->ToJSONEnvelope($success_msg,0,"success");
}
else
{
$error_msg = "Updation Failed";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,1,"failure");
}
}
?>
|