mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add show all to registrations
This commit is contained in:
@@ -46,6 +46,11 @@
|
||||
$text['label-response']['pt-pt'] = "Resposta:";
|
||||
$text['label-response']['fr-fr'] = "Réponse:";
|
||||
|
||||
$text['button-show_all']['en-us'] = "Show All";
|
||||
$text['button-show_all']['es-cl'] = "Mostrar Todos";
|
||||
$text['button-show_all']['pt-pt'] = "Mostrar Todos";
|
||||
$text['button-show_all']['fr-fr'] = "Montrer Tout";
|
||||
|
||||
$text['button-unregister']['en-us'] = "Unregister";
|
||||
$text['button-unregister']['es-cl'] = "";
|
||||
$text['button-unregister']['pt-pt'] = "";
|
||||
|
||||
@@ -47,8 +47,9 @@ require_once "resources/check_auth.php";
|
||||
require_once "resources/header.php";
|
||||
$page["title"] = $text['header-registrations'];
|
||||
|
||||
//retrieve profile, if set
|
||||
//set the variables
|
||||
$profile = (isset($_REQUEST['profile']) && $_REQUEST['profile'] != '') ? $_REQUEST['profile'] : "internal";
|
||||
$show = trim($_REQUEST["show"]);
|
||||
|
||||
//ajax for refresh
|
||||
?>
|
||||
@@ -88,7 +89,7 @@ require_once "resources/check_auth.php";
|
||||
}
|
||||
|
||||
var requestTime = function() {
|
||||
var url = 'status_registrations_inc.php?profile=<?php echo $profile; ?>';
|
||||
var url = 'status_registrations_inc.php?profile=<?php echo $profile; ?>&show=<?php echo $show; ?>';
|
||||
new loadXmlHttp(url, 'ajax_reponse');
|
||||
setInterval(function(){new loadXmlHttp(url, 'ajax_reponse');}, 1500);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ require_once "resources/check_auth.php";
|
||||
|
||||
//request profile
|
||||
$sip_profile_name = trim($_REQUEST["profile"]);
|
||||
$show = trim($_REQUEST["show"]);
|
||||
|
||||
//define variables
|
||||
$c = 0;
|
||||
@@ -108,7 +109,7 @@ require_once "resources/check_auth.php";
|
||||
|
||||
//remove unrelated domains
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
if (permission_exists('registration_all')) {
|
||||
if (permission_exists('registration_all') && $show == "all") {
|
||||
//show all registrations
|
||||
}
|
||||
else {
|
||||
@@ -117,6 +118,7 @@ require_once "resources/check_auth.php";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//increment the array id
|
||||
$x++;
|
||||
}
|
||||
@@ -125,9 +127,19 @@ require_once "resources/check_auth.php";
|
||||
//show the registrations
|
||||
echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='4'>\n";
|
||||
echo "<td colspan='5'>\n";
|
||||
echo " <b>".$text['header-registrations'].": ".count($registrations)."</b>\n";
|
||||
echo "</td>\n";
|
||||
echo "<td align='right'>\n";
|
||||
if (permission_exists('registration_all')) {
|
||||
if ($show == "all") {
|
||||
echo " <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']."'>\n";
|
||||
}
|
||||
else {
|
||||
echo " <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']."'>\n";
|
||||
}
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
Reference in New Issue
Block a user