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.119.119
<?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"]);
$condition_name = trim($aobj_context->mobj_data["condition_name"]);
$condition_val = stripcslashes($aobj_context->mobj_data["condition_val"]);
$mycondition = ($condition_name=='like')?$condition_name." '%{$condition_val}%' ":$condition_name.$condition_val;
$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='4' 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:40px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Sl. No.</center></td>";
$Table_Header.="<td style='padding:2px; width:70px; 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 distinct s.fregno,s.fname, ifnull(s.fsection, '') as fsection from student s, marks m
where s.fdegree = m.fdegree and s.fregno = m.fregno and m.fcollcode = '{$college_code}' and m.fdegree ='{$degree_code}'
and m.fexamno='{$exam_no}' and m.fregno {$mycondition} and ifnull(m.fsubcode,'') <> '' order by m.fdegree, m.fregno";
$lobj_get_studentInfo = $aobj_context->mobj_db->getAll($get_studentInfo);
$i=1;
foreach($lobj_get_studentInfo as $key=>$value)
{
$id = $value['fregno'];
$Table_Header.="<tr class='ui-widget-content jqgrow'>";
$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:40px;border:none;text-align:center;' readonly value='{$i}'> </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 tabindex=-1 type=text name='Regno' style='width:70px;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']}' maxlength = 1 style='width:50px;text-align:center;' onkeypress = 'return isLetter(event,this)' onkeyup ='this.value=this.value.toUpperCase();'></td>";
$Table_Header.="</tr>";
$i++;
}
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 FREGNO = '{$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;
}
}
?>
|