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.137.189.236
<?php
function getDayRooms($aobj_context)
{
$collcode=$_SESSION['collcode'];
$doe = $aobj_context->mobj_data["doe"];
$session = $aobj_context->mobj_data["session"];
$fbatch = $aobj_context->mobj_data["fbatch"];
$query = "select distinct cd.fhallno as id,m.froomname as value from candsum cs inner join canddet cd on cs.fregno = cd.fregno
and cd.fcollcode = cs.fcollcode
inner join timetable t on cd.fqpcode1 = t.fqpcode
and cd.fbatch = t.fbatch
and cd.fyear = t.fyear and cd.fexamtype = t.fexamtype
and cs.fyear = t.fyear and cs.fexamtype = t.fexamtype
inner join masroom m on cs.fcntrcode = m.fcollcode
and cd.fhallno = m.froomno
where cs.fcntrcode = '{$collcode}'
and t.fdoe = date_format(str_to_date('{$doe}','%d/%m/%Y'),'%Y-%m-%d')
and t.fsession like '{$session}'
and m.fcollcode = '{$collcode}'
and cd.fbatch = '{$fbatch}'";
// var_dump($query);
$results = $aobj_context->mobj_db->GetAll($query);
if($results)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
return;
}
else
{
$results = "Room Allotment not done";
echo $aobj_context->mobj_output->ToJSONEnvelope($results,-1,"failure");
return;
}
}
function viewAnsBookEntry($aobj_context)
{
session_start();
$collcode=$_SESSION['collcode'];
$doe = $aobj_context->mobj_data["doe"];
$session = $aobj_context->mobj_data["session"];
$fbatch = $aobj_context->mobj_data["fbatch"];
$room = $aobj_context->mobj_data["room"];
$query = "select cd.fregno,cd.fsubcode,cd.fcollcode,cd.fdegree,t.fqpcode,st.fname,ifnull(cd.flmid,'') as flmid,
ifnull(fdummyno,'') as fdummyno
from candsum cs inner join canddet cd on cs.fregno = cd.fregno
and cd.fcollcode = cs.fcollcode
inner join timetable t on cd.fqpcode1 = t.fqpcode
and cd.fbatch = t.fbatch
and cd.fyear = t.fyear and cd.fexamtype = t.fexamtype
and cs.fyear = t.fyear and cs.fexamtype = t.fexamtype
inner join masroom m on cs.fcntrcode = m.fcollcode
and cd.fhallno = m.froomno
inner join student st on st.fregno = cs.fregno
where cs.fcntrcode = '{$collcode}'
and t.fdoe = date_format(str_to_date('{$doe}','%d/%m/%Y'),'%Y-%m-%d')
and t.fsession like '{$session}'
and m.fcollcode = '{$collcode}'
and cd.fpresent = 'P'
and cd.fbatch = '{$fbatch}'
and cd.fhallno = '{$room}'
order by cd.fregno";
$results = $aobj_context->mobj_db->GetAll($query);
$e_data.="<table width='80%' id = 'showteachsub' cellspacing='0' class='tr_ventor_row' cellpadding='0' border='0' >";
$e_data.="<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;'>TAB No. Entry</th>";
$e_data.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$e_data.="<td style='padding:2px; width:20px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Sl.<br>No.</center></td>";
$e_data.="<td style='padding:2px; width:50px; 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:140px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Student Name</center></td>";
$e_data.="<td style='padding:2px; width:140px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>TAB Number</center></td>";
$e_data.="<td style='padding:2px; width:140px; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'><center>Dummy No. Entry</center></td>";
$e_data.="</tr>";
$k=1;
$border_bottom="border-bottom:1px solid #C5DBEC;";
foreach($results as $value)
{
$e_data.="<tr class='ui-widget-content jqgrow'>";
$e_data.="<td tabindex=-1 align='center' style='{$border_bottom}; border-left:1px solid #C5DBEC;border-right:1px solid #C5DBEC; padding:2px;'>{$k}</td>";
$e_data.="<td tabindex=-1 align='center' style='{$border_bottom}; border-left:1px solid #C5DBEC;border-right:1px solid #C5DBEC; padding:2px;'>
<input tabindex=-1 {$inp_class} type=text name='Regno' style='width:80px;border:none;' readonly id='reg_{$value[fregno]}' value='{$value[fregno]}'> </td>";
$e_data.="<td tabindex=-1 align='left' style='{$border_bottom};border-right:1px solid #C5DBEC; padding:2px;' id='mes_std_name_{$value[fregno]}' > {$value['fname']} </td>";
$e_data.="<td tabindex=-1 align='center' style='{$border_bottom};border-right:1px solid #C5DBEC; padding:2px;'>
<input type='text' style='width:90%;{$border}' id='mes_marks_{$value[fsubcode]}_{$value[fregno]}' class='ElementCount' onchange = 'getansBookUpdate(this.id)' value = '{$value[flmid]}' >
<input type=hidden style='width:10px;{$border}' id='hidden_{$value[fsubcode]}_{$value[fregno]}' value='A'> </td>";
$e_data.="<td tabindex=-1 align='center' style='{$border_bottom};border-right:1px solid #C5DBEC; padding:2px;'>
<input type='text' style='width:90%;{$border}' id='mes_dummyno_{$value[fsubcode]}_{$value[fregno]}' class='ElementCount' onchange = 'getansBookUpdate(this.id)' value = '{$value[fdummyno]}' > </td>";
$k++;
$e_data.="</tr>";
}
$arr['tabledata'] = $e_data;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function saveAnsBookEntry($aobj_context)
{
session_start();
include("error_log.php");
$collcode=$_SESSION['collcode'];
$User_code = $_SESSION['usr'];
$degree = $aobj_context->mobj_data["degree"];
$exam = $aobj_context->mobj_data["degexam"];
$subcode = $aobj_context->mobj_data["subcode"];
$test = $aobj_context->mobj_data["test"];
$subarry = $aobj_context->mobj_data["subarry"];
$fsubarry = json_decode($subarry);
foreach($fsubarry as $value)
{
$query = "update canddet set flmid = '{$value->lmid}',fdummyno = '{$value->dummyno}'
where fregno = '{$value->regno}'
and fsubcode = '{$value->subcode}'";
$obj_upd = $aobj_context->mobj_db->Execute($query);
}
if($obj_upd)
{
$rdata = "Updated Successfully.";
echo($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
return $rdata;
}
else
{
$rdata = "No Updation / Add..!";
echo($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
return $rdata;
}
}
?>
|