mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
App->Sip_status, added initial support for translations.
This commit is contained in:
32
app/sip_status/app_languages.php
Normal file
32
app/sip_status/app_languages.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
James Rose <james.o.rose@gmail.com>
|
||||||
|
*/
|
||||||
|
$text['error-event-socket']['en-us'] = 'Connection to Event Socket failed.';
|
||||||
|
$text['label-message']['en-us'] = 'Message';
|
||||||
|
$text['title-sofia-status']['en-us'] = 'sofia status';
|
||||||
|
$text['title-sofia-status-profile']['en-us'] = 'sofia status profile';
|
||||||
|
$text['title-status']['en-us'] = 'status';
|
||||||
|
?>
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
James Rose <james.o.rose@gmail.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "includes/require.php";
|
require_once "includes/require.php";
|
||||||
@@ -36,7 +37,11 @@ else {
|
|||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
//add multi-lingual support
|
||||||
|
require_once "app_languages.php";
|
||||||
|
foreach($text as $key => $value) {
|
||||||
|
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||||
|
}
|
||||||
//define variables
|
//define variables
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
@@ -71,13 +76,13 @@ require_once "includes/header.php";
|
|||||||
$msg = $_GET["savemsg"];
|
$msg = $_GET["savemsg"];
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
$msg = "<div align='center'>".$text['error-event-socket']."<br /></div>";
|
||||||
}
|
}
|
||||||
if (strlen($msg) > 0) {
|
if (strlen($msg) > 0) {
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
echo "<table width='40%'>\n";
|
echo "<table width='40%'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<th align='left'>Message</th>\n";
|
echo "<th align='left'>".$text['label-message']."</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='row_style1'><strong>$msg</strong></td>\n";
|
echo "<td class='row_style1'><strong>$msg</strong></td>\n";
|
||||||
@@ -100,7 +105,7 @@ if (strlen($msg) > 0) {
|
|||||||
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='50%'>\n";
|
echo "<td width='50%'>\n";
|
||||||
echo " <b>sofia status</b> \n";
|
echo " <b>".$text['title-sofia-status']."</b> \n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='50%' align='right'>\n";
|
echo "<td width='50%' align='right'>\n";
|
||||||
echo " <input type='button' class='btn' value='Reload ACL' onclick=\"document.location.href='cmd.php?cmd=api+reloadacl';\" />\n";
|
echo " <input type='button' class='btn' value='Reload ACL' onclick=\"document.location.href='cmd.php?cmd=api+reloadacl';\" />\n";
|
||||||
@@ -174,7 +179,7 @@ if (strlen($msg) > 0) {
|
|||||||
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='50%'>\n";
|
echo "<td width='50%'>\n";
|
||||||
echo " <b>sofia status profile $sip_profile_name</b> \n";
|
echo " <b>".$text['title-sofia-status-profile']." $sip_profile_name</b> \n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='50%' align='right'>\n";
|
echo "<td width='50%' align='right'>\n";
|
||||||
echo " <input type='button' class='btn' value='registrations' onclick=\"document.location.href='".PROJECT_PATH."/app/registrations/v_status_registrations.php?show_reg=1&profile=".$sip_profile_name."';\" />\n";
|
echo " <input type='button' class='btn' value='registrations' onclick=\"document.location.href='".PROJECT_PATH."/app/registrations/v_status_registrations.php?show_reg=1&profile=".$sip_profile_name."';\" />\n";
|
||||||
@@ -246,7 +251,7 @@ if (strlen($msg) > 0) {
|
|||||||
if ($fp && permission_exists('sip_status_switch_status')) {
|
if ($fp && permission_exists('sip_status_switch_status')) {
|
||||||
$cmd = "api status";
|
$cmd = "api status";
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
echo "<b>status</b><br />\n";
|
echo "<b>".$text['title-status']."</b><br />\n";
|
||||||
echo "<pre style=\"font-size: 9pt;\">";
|
echo "<pre style=\"font-size: 9pt;\">";
|
||||||
echo trim($response);
|
echo trim($response);
|
||||||
echo "</pre>\n";
|
echo "</pre>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user