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.102.43
Current Path : /var/www/oasis/src_old/ |
| Current File : /var/www/oasis/src_old/studentportal_remove.php |
<?php
function DisplayStudentPortalData($aobj_context)
{
session_start();
// $degree_code = trim($aobj_context->mobj_data["degree"]);
$regno = trim($aobj_context->mobj_data["regno"]);
$status = trim($aobj_context->mobj_data["status"]);
$cnd = '';
$univcodeQuery = 'select funivcode from control';
$univcodeResult = $aobj_context->mobj_db->GetRow($univcodeQuery);
// $univcode = '003D';
$univcode = $univcodeResult['funivcode'];
$getStudDataQuery = "select m.fregno, m.funivcode, p.fname, m.fmobileno, m.femail,
m.fdob from logisys3_comexam.masuser m inner join logisys3_comexam.pushstud p
on m.funivcode = p.funivcode and m.fregno = p.fregno
where m.funivcode= '{$univcode}' and m.fregno = '{$regno}'";
// var_dump($getStudDataQuery);
$getStudDataRes = $aobj_context->mobj_db->GetAll($getStudDataQuery);
// var_dump($getStudDataRes);
$str_reval.="<table style='padding:3px 4px 3px 3px;' class='tr_ventor_row' id='reval_table_data' width='100%' border='0' cellspacing='0' cellpadding='0'>";
$str_reval.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$str_reval.="<td align='center' style='padding:4px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl No</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Univ. Code</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Reg. No.</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Student Name</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>DOB</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Mobile</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Email</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Action</td>";
$str_reval.="</tr>";
$k=0;
$sl_no=1;
if($getStudDataRes)
{
foreach($getStudDataRes as $ak=>$av)
{
$delete ="<center><span class='raval_submit' style='margin-top: 2px; width: 60px;float:left;margin-left:0px;cursor: pointer;color:#545345; line-height: 19px;font-size:13px;font-weight:bold;'' onclick='DeleteStudentPortalData(\"{$av['funivcode']}\", \"{$av['fregno']}\")'><b>Delete</b></span></center>";
$str_reval.="<tr>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center;' >{$av['funivcode']} </td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center;' >{$av['fregno']} </td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center;' >{$av['fname']} </td>";
$str_reval.="<td class='{$class} tbl_row_new' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:left;' > {$av['fdob']}</td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$av['fmobileno']}</td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$av['femail']}</td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;text-align:center; ' >{$delete}</td>";
$str_reval.="</tr>";
$sl_no++;
$k++;
}
}else
{
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-left:1px solid #C5DBEC;padding:2px;text-align:center; cursor:pointer;' colspan = '10'><b>No details found for the given Reg. No.</b></td>";
$str_reval.="</tr>";
}
$str_reval.="</table>";
$arr['html']=$str_reval;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
// VIJB0001482
function DeleteStudentPortalData($aobj_context)
{
session_start();
$univcode = trim($aobj_context->mobj_data["univcode"]);
$regno = trim($aobj_context->mobj_data["regno"]);
$query = "insert into logisys3_comexam.masuser_del (FMOBILENO, FMOBILEOTP, FMOBOTPTIME, FOTPCOUNTER,
FMOBILEVALID, FEMAIL, FEMAILOTP, FEMAILOTPTIME, FEMAILHASH, FEMAILVALID, FREGNO, FDOB,
FADHARNO, FPARENTMOB, FPASSWD, FUNIVCODE, FACTIVE, FRESETOTP, FRESETOTPTIME, FRESETOTPCOUNT,
FUPDTIME, FDELETETIME, FDELETEUSER)
select FMOBILENO, FMOBILEOTP, FMOBOTPTIME, FOTPCOUNTER,
FMOBILEVALID, FEMAIL, FEMAILOTP, FEMAILOTPTIME, FEMAILHASH, FEMAILVALID, FREGNO, FDOB,
FADHARNO, FPARENTMOB, FPASSWD, FUNIVCODE, FACTIVE, FRESETOTP, FRESETOTPTIME, FRESETOTPCOUNT,
FUPDTIME, now(), '{$_SESSION['user_type']}' from logisys3_comexam.masuser
where funivcode = '{$univcode}' and fregno = '{$regno}'";
// var_dump($query);
$results = $aobj_context->mobj_db->Execute($query);
if(!$results)
{
$arr['msg'] = "Student Removal Failure. Please try again";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$query = "delete from logisys3_comexam.masuser
where funivcode = '{$univcode}' and fregno = '{$regno}'";
$results = $aobj_context->mobj_db->Execute($query);
if(!$results)
{
$arr['msg'] = "Student Removal Failed. Please try again";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
else
{
$arr['msg'] = "Deleted successfully.";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
}
?>
|