diff --git a/include/functions.inc.php b/include/functions.inc.php index 866bbc115..6f6c5cc3b 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1097,117 +1097,4 @@ function PersonLog($person_id, $logtype_kurzbz, $logdata, $taetigkeit_kurzbz, $a $personlog = new personlog(); $personlog->log($person_id, $logtype_kurzbz, $logdata, $taetigkeit_kurzbz, $app, $oe_kurzbz, $user); } - -/** - * Sendet einen Request an den CaseTime Server um die Zeitfehler abzufragen - */ -function getCaseTimeErrors($uid) -{ - $ch = curl_init(); - - $url = CASETIME_SERVER.'/sync/get_zeitfehler'; - - $params = 'sachb='.$uid; - - curl_setopt($ch, CURLOPT_URL, $url.'?'.$params ); //Url together with parameters - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Return data instead printing directly in Browser - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT , 7); //Timeout after 7 seconds - curl_setopt($ch, CURLOPT_USERAGENT , "FH-Complete CaseTime Addon"); - curl_setopt($ch, CURLOPT_HEADER, 0); - - $result = curl_exec($ch); - - if(curl_errno($ch)) - { - return 'Curl error: ' . curl_error($ch); - curl_close($ch); - } - else - { - curl_close($ch); - $data = json_decode($result); - - if(isset($data->STATUS) && $data->STATUS=='OK') - { - return $data->RESULT; - } - else - return false; - } -} - -/** - * Sendet einen Request an den CaseTime Server um den Zeitsaldo abzufragen - */ -function getCaseTimeZeitsaldo($uid) -{ - $ch = curl_init(); - - $url = CASETIME_SERVER.'/sync/get_zeitsaldo'; - - $params = 'sachb='.$uid; - - curl_setopt($ch, CURLOPT_URL, $url.'?'.$params ); //Url together with parameters - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Return data instead printing directly in Browser - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT , 7); //Timeout after 7 seconds - curl_setopt($ch, CURLOPT_USERAGENT , "FH-Complete CaseTime Addon"); - curl_setopt($ch, CURLOPT_HEADER, 0); - - $result = curl_exec($ch); - - if(curl_errno($ch)) - { - return 'Curl error: ' . curl_error($ch); - curl_close($ch); - } - else - { - curl_close($ch); - $data = json_decode($result); - - if(isset($data->STATUS) && $data->STATUS=='OK') - { - return $data->RESULT; - } - else - return false; - } -} - -/** - * Sendet einen Request an den CaseTime Server um den Urlaubssaldo abzufragen - */ -function getCastTimeUrlaubssaldo($uid) -{ - $ch = curl_init(); - - $url = CASETIME_SERVER.'/sync/get_urlaubsaldo'; - - $params = 'sachb='.$uid; - - curl_setopt($ch, CURLOPT_URL, $url.'?'.$params); //Url together with parameters - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Return data instead printing directly in Browser - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 7); //Timeout after 7 seconds - curl_setopt($ch, CURLOPT_USERAGENT, "FH-Complete CaseTime Addon"); - curl_setopt($ch, CURLOPT_HEADER, 0); - - $result = curl_exec($ch); - - if (curl_errno($ch)) - { - return 'Curl error: '.curl_error($ch); - } - else - { - curl_close($ch); - $data = json_decode($result); - - if (isset($data->STATUS) && $data->STATUS == 'OK') - { - return $data->RESULT; - } - else - return false; - } -} ?>