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.197.111
Current Path : /var/www/html/sdu/src/ |
| Current File : /var/www/html/sdu/src/batch_close.php |
<?php
class checkbatchdetails
{
function __construct($aobj_context)
{
session_start();
$this->aobj_context = $aobj_context;
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$this->user_id = $_SESSION['user_id'] ;
$this->collcode = $_SESSION['collcode'];
$this->log_name = $_SESSION['usr'];
$this->user_type = $_SESSION['user_type'];
}
function checkbatchdetails()
{
$degcode = ($this->aobj_context->mobj_data["degcode"]);
$subcode = ($this->aobj_context->mobj_data["subcode"]);
$examno = ($this->aobj_context->mobj_data["examno"]);
$batch_no = ($this->aobj_context->mobj_data["batch_no"]);
$edit = 'F';
if($this->user_type == 'SuperUser')
$edit = 'T';
$lquery = "select FTEACHCODE as id, concat(FTEACHNAME,' - ',FTEACHCODE) as value from masteach
where ifnull(fdeleted,'') <>'T' order by FTEACHNAME";
$lresult = $this->aobj_context->mobj_db->getAll($lquery);
$arr['teachcode'] = $lresult;
$lquery = "select FTEACHCODE as id, concat(FTEACHNAME,' - ',FTEACHCODE) as value from masteach
where ifnull(fdeleted,'') <>'T' and ifnull(fstafftype,'') = 'Teaching' order by FTEACHNAME";
$lresult = $this->aobj_context->mobj_db->getAll($lquery);
$arr['Chief'] = $lresult;
$lquery = "select FTEACHCODE as id, concat(FTEACHNAME,' - ',FTEACHCODE) as value from masteach
where ifnull(fdeleted,'') <>'T' and ifnull(fstafftype,'') = 'Non Teaching' order by FTEACHNAME";
$lresult = $this->aobj_context->mobj_db->getAll($lquery);
$arr['clerk'] = $lresult;
$lquery = "select date_format(fexamdate,'%d/%m/%Y') as fexamdate, fexamtime, ifnull(fintexamcode,'') as fintexamcode,
ifnull(fextexamcode,'') as fextexamcode, ifnull(fchief,'') as fchief, ifnull(fclerk,'') as fclerk,
ifnull(fgroup,'') as fgroup, ifnull(fsession,'') as fsession, '{$edit}' as fedit from practical_entry_freeze
where fdegree = '{$degcode}' and fcsubcode = '{$subcode}' and fexam = '{$examno}' and fbatch = '{$batch_no}'";
$lresult = $this->aobj_context->mobj_db->getRow($lquery);
$arr['fexamdate'] = $lresult['fexamdate'];
$arr['fexamtime'] = $lresult['fexamtime'];
$arr['fintexamcode'] = $lresult['fintexamcode'];
$arr['fextexamcode'] = $lresult['fextexamcode'];
$arr['fchief'] = $lresult['fchief'];
$arr['fclerk'] = $lresult['fclerk'];
$arr['fgroup'] = $lresult['fgroup'];
$arr['fsession'] = $lresult['fsession'];
$arr['fedit'] = $lresult['fedit'];
if($lresult)
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
else
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
function savebatchclose($aobj_context)
{
$degcode = ($this->aobj_context->mobj_data["degcode"]);
$subcode = ($this->aobj_context->mobj_data["subcode"]);
$examno = ($this->aobj_context->mobj_data["examno"]);
$batchno = ($this->aobj_context->mobj_data["batchno"]);
$prdate = ($this->aobj_context->mobj_data["prdate"]);
$prtime = ($this->aobj_context->mobj_data["prtime"]);
$stype = ($this->aobj_context->mobj_data["stype"]);
$intname = ($this->aobj_context->mobj_data["intname"]);
$extname = ($this->aobj_context->mobj_data["extname"]);
$chief = ($this->aobj_context->mobj_data["chief"]);
$clerk = ($this->aobj_context->mobj_data["clerk"]);
$group = ($this->aobj_context->mobj_data["group"]);
$lquery = "update practical_entry_freeze set fchief = '{$chief}', fclerk = '{$clerk}', fgroup = '{$group}',
fintexamcode = '{$intname}', fextexamcode = '{$extname}',fsession = '{$stype}'
where fdegree = '{$degcode}' and fexam = '{$examno}' and fcsubcode = '{$subcode}' and fbatch = '{$batchno}'";
$lresult = $this->aobj_context->mobj_db->Execute($lquery);
if($lresult)
{
$arr = "Updated Successfully";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$arr = "Updation Failed";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
}
function checkbatchdetails($aobj_context)
{
$class_obj=new checkbatchdetails($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->checkbatchdetails();
}
function savebatchclose($aobj_context)
{
$class_obj=new checkbatchdetails($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->savebatchclose();
}
?>
|