0xV3NOMx
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.15.203.195


Current Path : /var/www/html/admission/src/
Upload File :
Current File : /var/www/html/admission/src/sessionmaster.php

<?php
function getsessionmaster($aobj_context){

  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

  $univcode = $aobj_context->mobj_data['univcode'];
  
    $query = "select ifnull(s.fsession,'') as fsession, ifnull(r.fdescpn,'') as fdescpn,
    ifnull(r.ffrmtime,'') as ffrmtime,ifnull(r.ftotime,'') as ftotime
    from subject s inner join reason r on s.fsession = r.freasoncd
    group by fsession";
  
    $result = $aobj_context->pobj_db->GetAll($query);


  if ($result) {
    echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
  } else {
    $arr['msg'] = 'Failed to Load';
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
  }
    
    
  }


  function saveQPSessionMaster($aobj_context){

    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
  
    $univcode = $aobj_context->mobj_data['univcode'];
    $req = $aobj_context->req_body;
    $data = $req['data']['sessiontab'];

    
      foreach($data as $key => $val){
        $query = "update reason set ffrmtime = '{$val['ffrmtime']}',ftotime = '{$val['ftotime']}'
        where freasoncd = '{$val['fsession']}'";
      
        $result = $aobj_context->pobj_db->Execute($query);
      }
      
  
  
    if ($result) {
        $arr['msg'] = 'Saved Successfully...!';
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 0, "success");
    } else {
      $arr['msg'] = 'Failed to Load';
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
    }
      
      
    }

?>