Exemplo n.º 1
0
 function HTTP_GET()
 {
     $pCore_AddressBook = new core_AddressBook();
     $image = $pCore_AddressBook->getContactImage($this->_idNumero, $this->_thumbnail);
     if ($image === FALSE) {
         $json = new paloSantoJSON();
         $error = $pCore_AddressBook->getError();
         if ($error["fc"] == "DBERROR") {
             header("HTTP/1.1 500 Internal Server Error");
         } else {
             header("HTTP/1.1 400 Bad Request");
         }
         $json->set_status("ERROR");
         $json->set_error($error);
         return $json->createJSON();
     } else {
         return $image;
     }
 }
Exemplo n.º 2
0
 /**
  * Function that implements the SOAP call to remove a contact from the external address book. If an error exists a SOAP fault is   * thrown
  * 
  * @param   mixed   $request:
  *                      id: ID of the contact to remove
  * @return  mixed   Array with boolean data, true if was successful or false if an error exists
  */
 public function delAddressBookContact($request)
 {
     $return = parent::delAddressBookContact($request->id);
     if (!$return) {
         $eMSG = parent::getError();
         $this->objSOAPServer->fault($eMSG['fc'], $eMSG['fm'], $eMSG['cn'], $eMSG['fd'], 'fault');
     }
     return array("return" => $return);
 }