CMXX - New translations ES, PT. Registration page translated.
This commit is contained in:
@@ -554,7 +554,7 @@ function ioServer($api_call, $data){
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// API TO API
|
||||
// API TO API version 1
|
||||
//------------------------------------------
|
||||
function ioAPI($api_call, $data, $token){
|
||||
|
||||
@@ -595,6 +595,52 @@ function ioAPI($api_call, $data, $token){
|
||||
//Response
|
||||
return $resp;
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// API TO API version 2
|
||||
//------------------------------------------
|
||||
function ioAPIv2($api_call, $data, $token){
|
||||
|
||||
include dirname(__FILE__,2).'/settings/settings.php';
|
||||
|
||||
$token = (!empty($token) || $token !='')? $token : 'authorization_request';
|
||||
$bearertoken = createCommunicationToken($token);
|
||||
|
||||
$url = $baseurl.$api_call;
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
$headers = array(
|
||||
"Authorization: Bearer $bearertoken",
|
||||
"Content-Type: application/json",
|
||||
);
|
||||
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
if (!empty($data)){
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
}
|
||||
|
||||
$resp = curl_exec($curl);
|
||||
$http_status = curl_getinfo($curl) ?? '200';
|
||||
curl_close($curl);
|
||||
|
||||
|
||||
//Check If errorcode is returned
|
||||
if($http_status['http_code'] == '403' || $http_status['http_code'] == '400') {$resp = json_encode('NOK');}
|
||||
|
||||
if (debug){
|
||||
$message = $date.';'.$api_call;
|
||||
debuglog($message);
|
||||
}
|
||||
|
||||
//Response
|
||||
return $resp;
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//get user profile||$profile=settings, $permision = userright()
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Reference in New Issue
Block a user