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.118.162.166
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/enableStudReg.php |
<?php
function getStudentsRegDet($aobj_context)
{
session_start();
if(!isset($_SESSION['collcode']))
{
$arr['msg'] = 'Session Expired Re-login';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
}
$college_code = $_SESSION['collcode'];
$FUNIVCODE = $_SESSION['FUNIVCODE'];
$user_type = $_SESSION['user_type'];
$userid = $_SESSION['user_id'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = trim($aobj_context->mobj_data["degree"]);
$exam_no = trim($aobj_context->mobj_data["exam_no"]);
$stype = trim($aobj_context->mobj_data["stype"]);
$cnd = "";
if($stype == 'Registered')
$cnd = "and ifnull(c.fdob,'') <> ''";
else if($stype == 'Pending')
$cnd = "and ifnull(c.fdob,'') = ''";
$query = "select s.fregno, s.fname, ifnull(c.FAPPBLOCK,'T') as FAPPBLOCK,
if(ifnull(c.fdob,'') = '','Not Registered','Registered') as fstatus
from regcandsum c inner join student s on c.fdegree = s.fdegree
and c.fcollcode = s.fcollcode and c.fregno = s.fregno
where c.fcollcode = '{$college_code}'
and c.fdegree = '{$degree}'
and c.fexamno = '{$exam_no}'
{$cnd}
group by c.fregno order by c.fregno";
//var_dump($query);//FELIG FCONSTYPE FHTBLK
$obj_get_details = $aobj_context->mobj_db->GetAll($query);
if(!$obj_get_details)
{
$arr['msg'] = 'No Students Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$k = 1;
foreach ($obj_get_details as $key => $value)
{
$regno = $value['fregno'];
$name = $value['fname'];
$fstatus = $value['fstatus'];
$FAPPBLOCK = $value['FAPPBLOCK'];
$ht_checked = $FAPPBLOCK == 'F'? 'checked' : '';
if($k%2==0)
{
$class='tbl_row';
}
else
{
$class='tbl_row1';
}
$edy_data.="<tr class='ui-widget-content jqgrow'>";
$edy_data.="<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>{$k}</td>";
$edy_data.="<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'>{$regno}
<input type = 'hidden' value = '{$regno}' id = 'hregno_{$k}'>
</td>";
$edy_data.="<td class='tbl_row_new' align='left' style='border-right:1px solid #C5DBEC; padding:2px;' id='fmacas_FSUBNAME_{$k}'>{$name}</td>";
$edy_data.="<td class='tbl_row_new' align='left' style='border-right:1px solid #C5DBEC; padding:2px;' id='fmacas_status_{$k}'>{$fstatus}</td>";
$edy_data.="<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;'><input type=checkbox {$ht_checked} id = 'ht_$k' onchange='statusChanged(this)' name='hallticket'> {$ht_lable}</td>";
$edy_data.="<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:0px;display:none'><input type=checkbox id='h_{$regno}' name='hidden'></td>";
$edy_data.="</tr>";
$k++;
}
$e_data="<table width='98%' id='clear' class='tr_ventor_row' align='center' cellspacing='0' cellpadding='0' border='0' >";
$e_data.="<th align='left' colspan='8' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:22px;'>Enable Registration</th>";
$e_data.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$e_data.="<td align=center style='padding:2px; width:24px; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
$e_data.="<td align=center style='padding:2px; width:24px; border-bottom:1px solid #C5DBEC; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Reg. No.</td>";
$e_data.="<td align=center style='padding:2px; width:60px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Student Name</td>";
$e_data.="<td align=center style='padding:2px; width:60px; border-bottom:1px solid #C5DBEC;border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>status</td>";
$e_data.="<td align=center style='padding:2px; width:20px; border-bottom:1px solid #C5DBEC; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Enable <br><input type = 'checkbox' id = 'ht' onclick = 'selecthtall();'> </td>";
$e_data.="</tr>";
$arr['html_data']=$e_data.$edy_data;
$arr['total_count']=$k;
// $arr['rem_sub']=trim($exam_removed_subject_code);
if($obj_get_details)
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
function saveStudReg($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$realname = $_SESSION['realname'];
include("error_log.php");
if(!isset($_SESSION['collcode']))
{
$arr['msg'] = 'Session Expired Re-login';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = trim($aobj_context->mobj_data["degree"]);
$examno = strtoupper(trim($aobj_context->mobj_data["exam_no"]));
$strECH = stripslashes($aobj_context->mobj_data["strECH"]);
$rgECH = json_decode($strECH, true);
foreach ($rgECH as $key => $value)
{
$query = "update regcandsum set FAPPBLOCK = '{$value['hallticket']}',
FAPPBLOCKDATE = NOW()
where fdegree = '{$degree}' and fcollcode = '{$college_code}'
and fregno = '{$value['regno']}'";
//var_dump($query);
$results = $aobj_context->mobj_db->Execute($query);
}
if($results)
{
$arr='Updated Successfully';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr='Updation Failure';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
function loadStudRegDegree($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$realname = $_SESSION['realname'];
include("error_log.php");
if(!isset($_SESSION['collcode']))
{
$arr['msg'] = 'Session Expired Re-login';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$query = "select distinct cs.fdegree as id, concat(dg.fdescpn,' [',dg.fdegree,']') as value
from regcandsum cs
inner join degree dg on dg.fdegree = cs.fdegree and dg.fexamno = 'A'
where cs.fcollcode = '{$college_code}'
order by dg.fdescpn";
$results = $aobj_context->mobj_db->GetAll($query);
if($results)
{
$arr['degcode'] = $results;
echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
return;
}
else
{
$arr='Registration Degree are not found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
function getStudRegSem($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$realname = $_SESSION['realname'];
$degree = trim($aobj_context->mobj_data["degree"]);
include("error_log.php");
if(!isset($_SESSION['collcode']))
{
$arr['msg'] = 'Session Expired Re-login';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$query = "select distinct cs.fexamno as id, concat(dg.fexamname,' [',dg.fexamno,']') as value
from regcandsum cs
inner join degree dg on dg.fdegree = cs.fdegree and dg.fexamno = cs.fexamno
where cs.fcollcode = '{$college_code}'
and cs.fdegree = '{$degree}'
order by dg.fexamname";
$results = $aobj_context->mobj_db->GetAll($query);
if($results)
{
$arr['sem'] = $results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr='Registration Details are not found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
?>
|