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.21.105.222
<?php
function tdvs_getTeacherCode($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$board = $aobj_context->mobj_data['board'];
if($board === "All"){
$cond = "";
}else{
$cond = "where q.fboard = '{$board}'";
}
$query = "select distinct m.fteachcode as value, concat(m.fteachname,' ','[',m.fteachcode,']') as text from tdvs_masteach m
inner join tdvs_tabsum t on t.fteachcode = m.fteachcode
inner join tdvs_masqp q on q.fqpcode = t.fqpcode order by m.fteachname";
$res = $aobj_context->pobj_db->GetAll($query);
if($res){
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
return;
}else{
$arr['msg'] = 'Something went wrong try again later';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
function TDVS_getTeacherValuationDetails($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$board = $aobj_context->mobj_data['board'];
$teachcode = $aobj_context->mobj_data['teachcode'];
$deggrp = $aobj_context->mobj_data['deggrp'];
$year = $aobj_context->mobj_data['year'];
$examtype = $aobj_context->mobj_data['examtype'];
if($board === "All"){
$boardCond = "";
}else{
$boardCond = "and q.fboard = '{$board}'";
}
if($teachcode === "All"){
$teachCond = "";
}else{
$teachCond = "and s.fteachcode = '{$teachcode}'";
}
$query = "select t.fteachcode, m.fteachname, ifnull(fmobile, '')as fmobile,
ifnull(femail, '')as femail, ifnull(faadharno, '')as faadharno,
ifnull(faccno, '')as faccno, ifnull(fifsccode, '')as fifsccode,
ifnull(fbankname, '')as fbankname, ifnull(fpanno, '')as fpanno,
ifnull(t.fqpcode, '')as fqpcode,
count(x.qpcnt) as count,
group_concat(distinct x.fqpcode, ' - ', x.fsmaxmarks ,' - ' ,x.qpcnt) as qpdet
from tdvs_tabsum t
inner join tdvs_masteach m on t.fteachcode = m.fteachcode
inner join (select s.fteachcode, s.fqpcode, count(*) as qpcnt, q.fsmaxmarks
from tdvs_tabsum s inner join tdvs_masqp q on q.fqpcode = s.fqpcode
where ifnull(fstatus,'') = 'final'
{$teachCond} {$boardCond} and s.fyear='{$year}' and s.fexamtype='{$examtype}'
and q.fdeggrp='{$deggrp}'
group by s.fteachcode, s.fqpcode) x
on x.fteachcode = t.fteachcode and x.fqpcode = t.fqpcode
group by t.fteachcode";
// var_dump($query);die();
$res = $aobj_context->pobj_db->GetAll($query);
if($res){
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
return;
}else{
$arr['msg'] = 'Something went wrong try again later';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
?>
|