addEditContact($_POST['username'], $authuser, $authpw, $contactName, $contactID); break; case 'removeContact': removeContact($_POST['username'], $authuser, $authpw, $contactID); break; case 'getContactAttributes': getContactAttributes($_POST['username'], $authuser, $authpw, $contactID); break; case 'getContactAttribute': getContactAttribute($_POST['username'], $authuser, $authpw, $attributeName); break; case 'updateAttribute': updateAttribute($_POST['username'], $authuser, $authpw, $contactName, $contactID); break; case 'deleteAttribute': deleteAttribute($_POST['username'], $authuser, $authpw, $attributeName); break; } } /* * 4.2.1.Create a new subscription for address book changes * HTTP POST http://{serverRoot}/addressbook/{apiVersion}/{userId}/subscriptions/abChanges */ function postSubscription($username, $authuser, $authpw) { //NOT WORKING global $SERVER_URL, $APIVERSION; $url = $SERVER_URL . 'addressbook/' . $APIVERSION . '/' . $username . '/subscriptions/abChanges'; $action = array('contact' => array("attributeList" => array("attribute" => array("name" => "display-name", "value" => "doyle3")), "contactId" => "sip:doyle2@solaiemes.com")); $data = array('data' => urlencode(json_encode($action))); //echo $url;
<?php include "header_start.php"; printTitle("Manage Attributes"); include "header_end.php"; include_once "api.php"; //Delete attribute? if (!is_null($_GET) && key_exists('delete', $_GET)) { $deleteID = intval($_GET["delete"]); deleteAttribute($deleteID); } ?> <h1><a href="overview.php">Overview</a> > Attributes</h1> <input type="button" value="Add new attribute" onclick="goto('edit_attribute.php')" /> <br/><br/> <div class="table-row table-header"> <div class="table-column right">ID</div> <div class="table-column">Code</div> <div class="table-column">Name</div> <div class="table-column">Labels</div> <div class="table-column">Description</div> <div class="table-column right">Training samples</div> <div class="table-column"> </div> </div> <?php $attributes = getAttributes(); foreach ($attributes as $a) { $id = $a->id;