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.123.61
Current Path : /var/www/html/nehu/src/ |
| Current File : /var/www/html/nehu/src/updateSection.php |
<?php
session_start();
function GetUpdateSectionStudentList($aobj_context)
{
include_once("/JSON.php");
$json = new Services_JSON();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree_code = ($aobj_context->mobj_data["degree"]);
$exam_no = ($aobj_context->mobj_data["examno"]);
$College_Code = $_SESSION['collcode'];
$Table_Header.="<table width='80%' cellspacing='0' class='tr_ventor_row' cellpadding='0' border='0'>";
$Table_Header.="<th align='left' colspan='5' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:24px;'>Section List</th>";
$Table_Header.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$Table_Header.="<td style='padding:2px; width:100px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Reg No</center></td>";
$Table_Header.="<td style='padding:2px; width:300px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Student Name</center></td>";
$Table_Header.="<td style='padding:2px; width:50px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Section</center></td>";
$Table_Header.="</tr>";
$get_studentInfo = "select fstudid,FREGNO,FNAME,ifnull(FSECTION, '') as FSECTION from student
where fcollcode = '{$College_Code}' and fdegree ='{$degree_code}'
and fexamno='{$exam_no}'";
$lobj_get_studentInfo = $aobj_context->mobj_db->getAll($get_studentInfo);
foreach($lobj_get_studentInfo as $key=>$value)
{
$id = $value[fstudid];
$Table_Header.="<tr class='tbl_row'>";
$Table_Header.="<td class='tbl_row_new' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' ><input tabindex=-1 type=text name='Regno' style='width:80px;border:none;' readonly id='regno_{$id}' value='{$value[FREGNO]}'> </td>";
$Table_Header.="<td class='tbl_row_new' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:left;padding-left:20px;' ><input tabindex=-1 type=text name='Regno' style='width:300px;border:none;' readonly id='name_{$id}' value='{$value[FNAME]}'> </td>";
$Table_Header.="<td class='tbl_row_new' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' ><input type='text' id='section_{$id}' value='{$value[FSECTION]}' style='width:50px;text-align:center;' onblur='this.value=this.value.toUpperCase();'></td>";
$Table_Header.="</tr>";
}
if(empty($lobj_get_studentInfo))
{
$Table_Header.="<tr style='height: 20'>";
$Table_Header.="<td COLSPAN=4 align = 'center'>No Records Found For this Search</td>";
$Table_Header.="</tr>";
}
$Table_Header.="</table>";
$arr['html']=$Table_Header;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function SaveStudentSectionDetails($aobj_context)
{
session_start();
include_once("/JSON.php");
$json = new Services_JSON();
$College_Code = $_SESSION['collcode'];
$lstr_param = stripslashes($aobj_context->mobj_data["output_details"]);
$mobj_jsondata = $json->decode($lstr_param);
$att_details = get_object_vars($mobj_jsondata);
foreach($att_details as $ak=>$av)
{
$lquery="update student set
FSECTION='{$av->c}'
where fcollcode='{$College_Code}' and fstudid = '{$ak}'" ;
$lobj_insert_qry = $aobj_context->mobj_db->Execute($lquery);
//var_dump($lobj_insert_qry);
}
if($lobj_insert_qry)
{
$rdata = "Updated Successfully.";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
return $rdata;
}
else
{
$rdata = "No Updation / Add..!";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
return $rdata;
}
}
?>
|