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.119.235.107
<?php
function DisplayDeleteStudent($aobj_context)
{
session_start();
$degree_code = trim($aobj_context->mobj_data["degree"]);
$status = trim($aobj_context->mobj_data["status"]);
$cnd = '';
if($status == 'verified')
$cnd = "and ifnull(fappstatus,'Pending') = 'verified'";
else if($status == 'pending')
$cnd = "and ifnull(fappstatus,'Pending') <> 'verified'";
else
$cnd = '';
$admCollDataQuery = "select c.fname, c.fmobileno, c.femail,
ifnull(s.fappno,'') as fappno,
if(ifnull(factive,'') <> 'T', 'Regn. Not Done',
if(ifnull(s.fcollcode,'') = '', 'Regn. Done',
if(ifnull(ffinsub,'') <> 'T', 'Final Sub. Not Done',
if(ifnull(fappstatus,'') = '', 'Ack. Pending', 'Ack. Done')))) as remarks
from collstud c left join studadm s on c.fmobileno = s.fcontact_no
and s.fdegree = c.fdegree and s.fcollcode = c.fcollcode
where c.fcollcode = '{$_SESSION['collcode']}' and
ifnull(c.fdeleted,'') <> 'T' and ifnull(s.fdeleted,'') <> 'T'
and c.fdegree = '{$degree_code}' {$cnd} order by fname";
//var_dump($admCollDataQuery);
$admCollData = $aobj_context->mobj_db->GetAll($admCollDataQuery);
$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;'>Mobile No.</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>App. 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;'>Status</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($admCollData)
{
foreach($admCollData 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='DeleteStudent(\"{$av['fappno']}\", \"{$av['fmobileno']}\")'><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['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['fappno']} </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['fname']}</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['remarks']}</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 deatils found for the given deatils.</b></td>";
$str_reval.="</tr>";
}
$str_reval.="</table>";
$arr['html']=$str_reval;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function DeleteStudent($aobj_context)
{
session_start();
$mobileno = $aobj_context->mobj_data["mob"];
$appno = $aobj_context->mobj_data["appno"];
$collcode = $_SESSION['collcode'];
$query = "update collstud set fdeleted = 'T' where fmobileno = '{$mobileno}'";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "update studadm set fdeleted = 'T'
where fcollcode = '{$collcode}' and fcontact_no = '{$mobileno}'";
$results = $aobj_context->mobj_db->Execute($query);
if($appno != '')
{
$query = "update options set fdeleted = 'T'
where fcollcode = '{$collcode}'
and fappno = '{$appno}'";
$results = $aobj_context->mobj_db->Execute($query);
$query = "update studoc set fdeleted = 'T'
where fcollcode = '{$collcode}'
and login_cnt = '{$appno}'";
$results = $aobj_context->mobj_db->Execute($query);
$query = "delete from admfeedetl where fcollcode = '{$collcode}'
and fappno = '{$appno}'";
$results = $aobj_context->mobj_db->Execute($query);
}
}
if($results)
{
$arr['msg'] = "Deleted successfully.";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}else
{
$arr = "Acknowledgement Removal Failure. Please Try Gain";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
?>
|