} else { //get sofia status profile information including registrations $cmd = "api sofia xmlstatus profile " . $sip_profile_name . " reg"; $xml_response = trim(event_socket_request($fp, $cmd)); if ($xml_response == "Invalid Profile!") { $xml_response = "<error_msg>" . $text['label-message'] . "</error_msg>"; } $xml_response = str_replace("<profile-info>", "<profile_info>", $xml_response); $xml_response = str_replace("</profile-info>", "</profile_info>", $xml_response); try { $xml = new SimpleXMLElement($xml_response); } catch (Exception $e) { echo $e->getMessage(); exit; } $registrations = get_registrations($sip_profile_name); //show the registrations echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>\n"; echo "<tr>\n"; echo "<td width='100%'>\n"; echo "\t<b>" . $text['header-registrations'] . " (" . count($registrations) . ")</b>\n"; echo "</td>\n"; echo "<td valign='middle' nowrap='nowrap' style='padding-right: 15px' id='refresh_state'>"; echo "\t<img src='resources/images/refresh_active.gif' style='width: 16px; height: 16px; border: none; margin-top: 3px; cursor: pointer;' onclick='refresh_stop();' alt=\"" . $text['label-refresh_pause'] . "\" title=\"" . $text['label-refresh_pause'] . "\">"; echo "</td>"; echo "<td valign='top' nowrap='nowrap'>"; if (permission_exists('registration_all')) { if ($show == "all") { echo "\t<input type='button' class='btn' name='' alt='" . $text['button-back'] . "' onclick=\"window.location='status_registrations.php?show_reg=1&profile={$sip_profile_name}'\" value='" . $text['button-back'] . "' " . $onhover_pause_refresh . ">\n"; } else { echo "\t<input type='button' class='btn' name='' alt='" . $text['button-show_all'] . "' onclick=\"window.location='status_registrations.php?show_reg=1&profile={$sip_profile_name}&show=all'\" value='" . $text['button-show_all'] . "' " . $onhover_pause_refresh . ">\n";
require_once $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/registrations/resources/classes/status_registrations.php"; //check permissions if (permission_exists('extension_view')) { //access granted } else { echo "access denied"; exit; } //get the registrations if (permission_exists('extension_registered')) { //create the event socket connection $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); if (!$fp) { $msg = "<div align='center'>" . $text['error-event-socket'] . "<br /></div>"; } $registrations = get_registrations('internal'); //order the array require_once "resources/classes/array_order.php"; $order = new array_order(); $registrations = $order->sort($registrations, 'sip-auth-realm', 'user'); } //add multi-lingual support $language = new text(); $text = $language->get(); //get the http values and set them as variables $search = check_str($_GET["search"]); $order_by = check_str($_GET["order_by"]); $order = check_str($_GET["order"]); //handle search term $search = check_str($_GET["search"]); if (strlen($search) > 0) {