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.140.185.250
<?php
function getdegdet($aobj_context)
{
$query3 = "select distinct FDEGREE as internal_code, CONCAT(FDESCPN,' - ',FDEGREE) as value
from degree where ifnull(fdegree,'') <> ''
and ifnull(fdeleted,'F') <> 'T'
order by fdescpn, fdegree";
$results3 = $aobj_context->mobj_db->GetAll($query3);
$arr['FDEGREE']=$results3;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function getDegExamDet($aobj_context)
{
$degree = $aobj_context->mobj_data["degree"];
$query = "select distinct FEXAMNO as internal_code, concat(FEXAMNO,' - ',FEXAMNAME) as value
from degree where fdegree = '{$degree}'";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['FEXAMNO']=$results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function displayqpcntdet($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$examno = $aobj_context->mobj_data["examno"];
$query1 = "select distinct fqpcode,fsubname,FSUBSHORT as fssubname,fvalmax as fsmaxmarks,fqpcnt,
fset1,fset2,fset3,fset4,fset5,ifnull(finternal,'')as finternal, ifnull(fexternal,'')as fexternal, ifnull(ftotal,'')as ftotal
from subject where fdegree = '{$degree}' and fexamno = '{$examno}' and ifnull(fqpcode,'') <> ''
and ifnull(FSUSPEND,'') <> 'T'";
$results1 = $aobj_context->mobj_db->GetAll($query1);
// $i = 1;
// $j= 0;
// foreach($results1 as $ak=>$av)
// {
// $details.="<tr>
// <td><input type = 'text' id='subcode{$j}' disabled style = 'width:45px' name = 'rowid' name = 'rowid' value = '{$av['fqpcode']}'/></td>
// <td ><input type = 'text' id='subname{$j}' disabled style = 'width:310px;text-align:left' value = '{$av['fsubname']}' /></td>
// <td width = '10px'> <input type = 'text' disabled id='subele{$j}' style = 'width:70px;text-align:left' value = '{$av['fssubname']}'/> <input type = 'hidden' id='feeprh{$j}' style = 'width:50px' value = 'T'/></td>
// <td width = '10px'> <input type = 'text' onkeypress= 'return (event.charCode !=8 && event.charCode ==0 || (event.charCode >= 48 && event.charCode <= 57))' id='subqp_1{$j}' style = 'width:50px;text-align:right' value = '{$av['fqp1']}' /></td>
// <td width = '10px'> <input type = 'text' id='subscheme_1{$j}' style = 'width:50px;text-align:right' value = '{$av['fscheme1']}' /></td>
// <td width = '10px'> <input type = 'text' id='subqp_2{$j}' style = 'width:50px;text-align:right' value = '{$av['fqp2']}' /></td>
// <td width = '10px'> <input type = 'text' id='subscheme_2{$j}' style = 'width:50px;text-align:right' value = '{$av['fscheme2']}' /></td>
// <td width = '10px'> <input type = 'text' id='subqp_3{$j}' style = 'width:50px;text-align:right' value = '{$av['fqp3']}' /></td>
// <td width = '10px'> <input type = 'text' id='subscheme_3{$j}' style = 'width:50px;text-align:right' value = '{$av['fscheme3']}' /></td>
// <td width = '10px'> <input type = 'text' id='subqp_4{$j}' style = 'width:50px;text-align:right' value = '{$av['fqp4']}' /></td>
// <td width = '10px'> <input type = 'text' id='subscheme_4{$j}' style = 'width:50px;text-align:right' value = '{$av['fscheme4']}' /></td>
// <td width = '10px'> <input type = 'text' id='subqp_5{$j}' style = 'width:50px;text-align:right' value = '{$av['fqp5']}' /></td>
// <td width = '10px'> <input type = 'text' id='subscheme_5{$j}' style = 'width:50px;text-align:right' value = '{$av['fscheme5']}' /></td>
// <td width = '10px'> <input type = 'text' id='subinternal{$j}' style = 'width:50px;text-align:right' value = '{$av['finternal']}' /></td>
// <td width = '10px'> <input type = 'text' id='subexternal{$j}' style = 'width:50px;text-align:right' value = '{$av['fexternal']}' onblur='getTotal()' /></td>
// <td width = '10px'> <input type = 'text' id='subtotal{$j}' style = 'width:50px;text-align:right' value = '{$av['ftotal']}' /></td>
// </tr>";
// $j++;
// }
// $arr['details']=$details;
// $arr['totallength']=$j;
if($results1){
echo $aobj_context->mobj_output->ToJSONEnvelope($results1,0,"success");
}else{
$arr['msg'] = 'Failed to load';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function Saveqpcntdet($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$examno = trim($aobj_context->mobj_data["examno"]);
$degree = trim($aobj_context->mobj_data["degree"]);
$arrayset = $aobj_context->mobj_data["arraySetData"];
$array = json_decode($arrayset, true);
// var_dump($array);
// die();
foreach($array as $key => $value)
{
$update = " update subject set
fset1='{$value['set1']}', fset2='{$value['set2']}', fset3='{$value['set3']}',
fset4='{$value['set4']}', fset5='{$value['set5']}',
finternal='{$value['subinternal']}', fexternal='{$value['subexternal']}', ftotal='{$value['subtotal']}'
where fdegree = '{$degree}' and fexamno='{$examno}'
and fqpcode ='{$value['qp']}'";
$results = $aobj_context->mobj_db->Execute($update);
}
if($results)
{
$rdata['msg'] = "Updated Successfully.";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
return $rdata;
}
else
{
$rdata['msg'] = "No Updation";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
return $rdata;
}
}
?>
|