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.142.198.250
<?php
function getDefaultAbsentEntrySubjectRegNosQp($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$College_Code = $_SESSION['collcode'];
$range = ($aobj_context->mobj_data["range"]);
$qp_code = ($aobj_context->mobj_data["qp_code"]);
$ScreenType = ($aobj_context->mobj_data["ScreenType"]);
$type = ($aobj_context->mobj_data["type"]);
$limit = ($aobj_context->mobj_data["limit"]);
$Subcode = ($aobj_context->mobj_data["Subcode"]);
$Degcode = ($aobj_context->mobj_data["Degcode"]);
$Examno = ($aobj_context->mobj_data["Examno"]);
$LastRegno = ($aobj_context->mobj_data["LastRegno"]);
$FirstRegno = ($aobj_context->mobj_data["FirstRegno"]);
$FDOE = ($aobj_context->mobj_data["FDOE"]);
$FSESSION = ($aobj_context->mobj_data["FSESSION"]);
$range_cond=($range=='')?"":" and stu.FREGNO like '%{$range}%'";
$e_data.="<table id='tbl_absent_subjectwise' align='center' width='80%' cellspacing='0' cellpadding='0' border='0' >";
$e_data.="<th align='left' colspan='3' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:24px;'></th>";
$e_data.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$e_data.="<td style='padding:2px; width:60px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Reg No</center></td>";
$e_data.="<td style='padding:2px; width:160px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Student Name</center></td>";
$e_data.="<td style='padding:2px; width:70px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Delete<input type=checkbox></td>";
$e_data.="</tr>";
if($LastRegno!="")
{
$get_records="select distinct stu.FREGNO,stu.FNAME
from absent a inner join student stu on stu.FREGNO=a.FREGNO
wher 1=1 {$range_cond} and a.FQPCODE='{$qp_code}'
and a.FREGNO>'{$LastRegno}'
and FABSTYPE='{$ScreenType}'
and a.FCOLLCODE='{$College_Code}'
and a.FDOE='{$FDOE}'
order by a.FREGNO";
}
else
{
$get_records="select distinct stu.FREGNO,stu.FNAME
from absent a inner join student stu on stu.FREGNO=a.FREGNO
where 1=1 and a.FQPCODE='{$qp_code}'
and a.FCOLLCODE='{$College_Code}'
and a.FDOE='{$FDOE}'
and a.FSESSION='{$FSESSION}'
{$range_cond}
and FABSTYPE='{$ScreenType}' order by a.FREGNO";
}
// var_dump($get_records);
$lobj_get_records = $aobj_context->mobj_db->GetAll($get_records);
$k=0;
//$border=($type=='Edit')?"":"border:none;";
//$read_only=($type=='Edit')?"":"readOnly";
$row_id=1;
foreach($lobj_get_records as $key=>$value)
{
if($k%2==0)
{
$class='tbl_row';
$inp_class='tbl_row_input';
}
else
{
$input_class='tbl_row1';
$inp_class='tbl_row1_input';
}
//$on_blur=($type=='Edit')?" onblur=\"validateRegNoMarks($('#markentry_sub_maxmark').val(),this.value,'mes_present_{$value[FREGNO]}',this.id);\" ":" ";
//$on_blur=($type=='Edit')?" onblur=\"validateEditRegNoMarks(this.id);\" ":" ";
//$on_focus=($type=='Edit')?" onfocus=\"if(\$g_mes_edit_valid_marks_flag==0) $('#mes_marks_{$value[FREGNO]}').focus();\" ":" ";
$e_data.="<tr class='ui-widget-content jqgrow' id='qp_row_{$row_id}' >";
$e_data.="<td class='tbl_row_new' align='center' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;'><input {$inp_class} type=text style='width:60px;border:none;' readonly id='abs_subwise_regno_{$row_id}' value='{$value[FREGNO]}'></td>";
$e_data.="<td class='tbl_row_new' align='left' style='border-right:1px solid #C5DBEC; padding:2px;'><input {$inp_class} type=text style='width:170px;border:none;' readonly id='abs_subwise_stuname_{$row_id}' value='{$value[FNAME]}'></td>";
$e_data.="<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;'><input type=checkbox id='abs_check_{$row_id}' > <input id='st_{$row_id}' type=hidden value='U'> </td>";
$e_data.="</tr>";
$k++;
$row_id++;
}
$e_data.="</table><br>";
//$e_data.="<center><a href='#' onclick='MarkEnterySubjectWiseTablePrevPage()' style='color:#FF9900'><b>Prev</b></a> ";
//$e_data.="<a href='#' onclick='MarkEnterySubjectWiseTableNextPage()' style='color:#FF9900'><b>Next</b></a></center>";
$arr['html']=$e_data;
$arr['table_data']=$lobj_get_records;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
function SaveAbsEntryQpStudetwise($aobj_context)
{
session_start();
include_once("/JSON.php");
$json = new Services_JSON();
$qp_code = ($aobj_context->mobj_data["qp_code"]);
$get_degree_data="select FMEYEAR,FMEEXAMTYP from subject s
inner join degree d on d.FDEGREE=s.FDEGREE
where FQPCODE='{$qp_code}' limit 1";
$lobj_check_dup = $aobj_context->mobj_db->getRow($get_degree_data);
$FMEYEAR=$lobj_check_dup['FMEYEAR'];
$FMEEXAMTYP=$lobj_check_dup['FMEEXAMTYP'];
$all_reg_nos = stripslashes($aobj_context->mobj_data["all_reg_nos"]);
$all_reg_nos=substr($all_reg_nos,0,strlen($all_reg_nos)-1);
$College_Code = $_SESSION['collcode'];
$User_code = $_SESSION['usr'];
$type =($aobj_context->mobj_data["type"]);
$date =($aobj_context->mobj_data["examdate"]);
$ScreenType =($aobj_context->mobj_data["ScreenType"]);
$Session =($aobj_context->mobj_data["Session"]);
$lstr_param = stripslashes($aobj_context->mobj_data["output_details"]);
$mobj_jsondata = $json->decode($lstr_param);
$Markentry_details = get_object_vars($mobj_jsondata);
foreach($Markentry_details as $ak=>$av)
{
$delete=$av->delete;
$FRegno=strtoupper($av->FRegno);
$a_type=$av->a_type;
if($a_type=="U" && $FRegno!="" && $delete=="1")
{
$update_qry = "delete from absent
where
FREGNO='{$FRegno}'
and FYEAR='{$FMEYEAR}'
and FEXAMTYPE='{$FMEEXAMTYP}'
and FABSTYPE='{$ScreenType}'
and FQPCODE='{$qp_code}'";
$lobj_insert_qry = $aobj_context->mobj_db->Execute($update_qry);
}
if($a_type=="I" && $FRegno!="" && $delete=="0")
{
$insert_qry="insert into absent (FCOLLCODE, FQPCODE, FDOE, FYEAR, FEXAMTYPE,
FREGNO, FABSTYPE, FLOGNAME, FLOGDATE, FDELETED, FSESSION)
values(
'{$College_Code}',
'{$qp_code}',
'{$date}',
'{$FMEYEAR}',
'{$FMEEXAMTYP}',
'{$FRegno}',
'{$ScreenType}',
'{$User_code}',
NOW(),
'F',
'{$Session}'
)";
// var_dump($insert_qry);
$lobj_insert_qry = $aobj_context->mobj_db->Execute($insert_qry);
}
}
// Execute remote upload
/*$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://logisys.net.in/rcub/app.php?a=recieveCurlPhoto.demo');
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $uploadRequest);
$response = curl_exec($curl);
curl_close($curl);
echo $response;*/
if($lobj_insert_qry)
{
$rdata = "Updated Successfully.";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
return $rdata;
}
else
{
$rdata = "Insertion Failed.";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
return $rdata;
}
}
?>
|