\r\n --> \n
Cause all the .php files containing lines ending with \r\n to instead end with \n.
DYI with:
find fusionpbx -type f -name '*.php' -exec dos2unix '{}' \;
This commit is contained in:
+18
-18
@@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][0]['title']['en-us'] = "Adminer";
|
$apps[$x]['menu'][0]['title']['en-us'] = "Adminer";
|
||||||
$apps[$x]['menu'][0]['title']['es-cl'] = "Administrador";
|
$apps[$x]['menu'][0]['title']['es-cl'] = "Administrador";
|
||||||
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "Admin BDD";
|
$apps[$x]['menu'][0]['title']['fr-fr'] = "Admin BDD";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "Administrador";
|
$apps[$x]['menu'][0]['title']['pt-pt'] = "Administrador";
|
||||||
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][0]['uuid'] = "1f59d07b-b4f7-4f9e-bde9-312cf491d66e";
|
$apps[$x]['menu'][0]['uuid'] = "1f59d07b-b4f7-4f9e-bde9-312cf491d66e";
|
||||||
$apps[$x]['menu'][0]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][0]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][0]['category'] = "external";
|
$apps[$x]['menu'][0]['category'] = "external";
|
||||||
$apps[$x]['menu'][0]['path'] = "<!--{project_path}-->/app/adminer/index.php";
|
$apps[$x]['menu'][0]['path'] = "<!--{project_path}-->/app/adminer/index.php";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+257
-257
@@ -1,258 +1,258 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists("backup_download")) {
|
if (permission_exists("backup_download")) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//download the backup
|
//download the backup
|
||||||
if ($_GET['a'] == "download" && permission_exists('backup_download')) {
|
if ($_GET['a'] == "download" && permission_exists('backup_download')) {
|
||||||
$file_format = $_GET['file_format'];
|
$file_format = $_GET['file_format'];
|
||||||
$file_format = ($file_format != '') ? $file_format : 'tgz';
|
$file_format = ($file_format != '') ? $file_format : 'tgz';
|
||||||
|
|
||||||
//build the backup file
|
//build the backup file
|
||||||
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
||||||
$backup_file = 'backup_'.date('Ymd_His').'.'.$file_format;
|
$backup_file = 'backup_'.date('Ymd_His').'.'.$file_format;
|
||||||
if (count($_SESSION['backup']['path']) > 0) {
|
if (count($_SESSION['backup']['path']) > 0) {
|
||||||
//determine compression method
|
//determine compression method
|
||||||
switch ($file_format) {
|
switch ($file_format) {
|
||||||
case "rar" : $cmd = 'rar a -ow -r '; break;
|
case "rar" : $cmd = 'rar a -ow -r '; break;
|
||||||
case "zip" : $cmd = 'zip -r '; break;
|
case "zip" : $cmd = 'zip -r '; break;
|
||||||
case "tbz" : $cmd = 'tar -jvcf '; break;
|
case "tbz" : $cmd = 'tar -jvcf '; break;
|
||||||
default : $cmd = 'tar -zvcf ';
|
default : $cmd = 'tar -zvcf ';
|
||||||
}
|
}
|
||||||
$cmd .= $backup_path.'/'.$backup_file.' ';
|
$cmd .= $backup_path.'/'.$backup_file.' ';
|
||||||
foreach ($_SESSION['backup']['path'] as $value) {
|
foreach ($_SESSION['backup']['path'] as $value) {
|
||||||
$cmd .= $value.' ';
|
$cmd .= $value.' ';
|
||||||
}
|
}
|
||||||
exec($cmd);
|
exec($cmd);
|
||||||
|
|
||||||
//download the file
|
//download the file
|
||||||
session_cache_limiter('public');
|
session_cache_limiter('public');
|
||||||
if (file_exists($backup_path."/".$backup_file)) {
|
if (file_exists($backup_path."/".$backup_file)) {
|
||||||
$fd = fopen($backup_path."/".$backup_file, 'rb');
|
$fd = fopen($backup_path."/".$backup_file, 'rb');
|
||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Transfer-Encoding: binary");
|
header("Content-Transfer-Encoding: binary");
|
||||||
header("Content-Description: File Transfer");
|
header("Content-Description: File Transfer");
|
||||||
header('Content-Disposition: attachment; filename='.$backup_file);
|
header('Content-Disposition: attachment; filename='.$backup_file);
|
||||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||||
header("Content-Length: ".filesize($backup_path."/".$backup_file));
|
header("Content-Length: ".filesize($backup_path."/".$backup_file));
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
header("Expires: 0");
|
header("Expires: 0");
|
||||||
ob_clean();
|
ob_clean();
|
||||||
fpassthru($fd);
|
fpassthru($fd);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//set response message
|
//set response message
|
||||||
$_SESSION["message"] = $text['message-backup_failed_format'];
|
$_SESSION["message"] = $text['message-backup_failed_format'];
|
||||||
header("Location: ".$_SERVER['PHP_SELF']);
|
header("Location: ".$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//set response message
|
//set response message
|
||||||
$_SESSION["message"] = $text['message-backup_failed_paths'];
|
$_SESSION["message"] = $text['message-backup_failed_paths'];
|
||||||
header("Location: ".$_SERVER['PHP_SELF']);
|
header("Location: ".$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//script a backup (cron)
|
//script a backup (cron)
|
||||||
if ($_GET['a'] == "script" && permission_exists('backup_download')) {
|
if ($_GET['a'] == "script" && permission_exists('backup_download')) {
|
||||||
$file_format = $_GET['file_format'];
|
$file_format = $_GET['file_format'];
|
||||||
$target_type = "script";
|
$target_type = "script";
|
||||||
|
|
||||||
$backup = new backup;
|
$backup = new backup;
|
||||||
$command = $backup->command("backup", $file_format);
|
$command = $backup->command("backup", $file_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
//restore a backup
|
//restore a backup
|
||||||
if ($_POST['a'] == "restore" && permission_exists('backup_upload')) {
|
if ($_POST['a'] == "restore" && permission_exists('backup_upload')) {
|
||||||
|
|
||||||
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
$backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp';
|
||||||
$backup_file = $_FILES['backup_file']['name'];
|
$backup_file = $_FILES['backup_file']['name'];
|
||||||
|
|
||||||
if (is_uploaded_file($_FILES['backup_file']['tmp_name'])) {
|
if (is_uploaded_file($_FILES['backup_file']['tmp_name'])) {
|
||||||
//move temp file to backup path
|
//move temp file to backup path
|
||||||
move_uploaded_file($_FILES['backup_file']['tmp_name'], $backup_path.'/'.$backup_file);
|
move_uploaded_file($_FILES['backup_file']['tmp_name'], $backup_path.'/'.$backup_file);
|
||||||
//determine file format and restore backup
|
//determine file format and restore backup
|
||||||
$file_format = pathinfo($_FILES['backup_file']['name'], PATHINFO_EXTENSION);
|
$file_format = pathinfo($_FILES['backup_file']['name'], PATHINFO_EXTENSION);
|
||||||
$valid_format = true;
|
$valid_format = true;
|
||||||
switch ($file_format) {
|
switch ($file_format) {
|
||||||
case "rar" : $cmd = 'rar x -ow -o+ '.$backup_path.'/'.$backup_file.' /'; break;
|
case "rar" : $cmd = 'rar x -ow -o+ '.$backup_path.'/'.$backup_file.' /'; break;
|
||||||
case "zip" : $cmd = 'umask 755; unzip -o -qq -X -K '.$backup_path.'/'.$backup_file.' -d /'; break;
|
case "zip" : $cmd = 'umask 755; unzip -o -qq -X -K '.$backup_path.'/'.$backup_file.' -d /'; break;
|
||||||
case "tbz" : $cmd = 'tar -xvpjf '.$backup_path.'/'.$backup_file.' -C /'; break;
|
case "tbz" : $cmd = 'tar -xvpjf '.$backup_path.'/'.$backup_file.' -C /'; break;
|
||||||
case "tgz" : $cmd = 'tar -xvpzf '.$backup_path.'/'.$backup_file.' -C /'; break;
|
case "tgz" : $cmd = 'tar -xvpzf '.$backup_path.'/'.$backup_file.' -C /'; break;
|
||||||
default: $valid_format = false;
|
default: $valid_format = false;
|
||||||
}
|
}
|
||||||
if (!$valid_format) {
|
if (!$valid_format) {
|
||||||
@unlink($backup_path.'/'.$backup_file);
|
@unlink($backup_path.'/'.$backup_file);
|
||||||
$_SESSION["message"] = $text['message-restore_failed_format'];
|
$_SESSION["message"] = $text['message-restore_failed_format'];
|
||||||
header("Location: ".$_SERVER['PHP_SELF']);
|
header("Location: ".$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exec($cmd);
|
exec($cmd);
|
||||||
//set response message
|
//set response message
|
||||||
$_SESSION["message"] = $text['message-restore_completed'];
|
$_SESSION["message"] = $text['message-restore_completed'];
|
||||||
header("Location: ".$_SERVER['PHP_SELF']);
|
header("Location: ".$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//set response message
|
//set response message
|
||||||
$_SESSION["message"] = $text['message-restore_failed_upload'];
|
$_SESSION["message"] = $text['message-restore_failed_upload'];
|
||||||
header("Location: ".$_SERVER['PHP_SELF']);
|
header("Location: ".$_SERVER['PHP_SELF']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the header
|
//add the header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
$document['title'] = $text['title-destinations'];
|
$document['title'] = $text['title-destinations'];
|
||||||
|
|
||||||
// backup type switch javascript
|
// backup type switch javascript
|
||||||
echo "<script language='javascript' type='text/javascript'>";
|
echo "<script language='javascript' type='text/javascript'>";
|
||||||
echo " var fade_speed = 400;";
|
echo " var fade_speed = 400;";
|
||||||
echo " function toggle_target(first_elem, second_elem) {";
|
echo " function toggle_target(first_elem, second_elem) {";
|
||||||
echo " $('#command').fadeOut(fade_speed);";
|
echo " $('#command').fadeOut(fade_speed);";
|
||||||
echo " $('#'+first_elem).fadeToggle(fade_speed, function() {";
|
echo " $('#'+first_elem).fadeToggle(fade_speed, function() {";
|
||||||
echo " $('#command').slideUp(fade_speed, function() {";
|
echo " $('#command').slideUp(fade_speed, function() {";
|
||||||
echo " $('#'+second_elem).fadeToggle(fade_speed);";
|
echo " $('#'+second_elem).fadeToggle(fade_speed);";
|
||||||
echo " });";
|
echo " });";
|
||||||
echo " });";
|
echo " });";
|
||||||
echo " }";
|
echo " }";
|
||||||
echo "</script>";
|
echo "</script>";
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
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%' valign='top'>\n";
|
echo " <td width='50%' valign='top'>\n";
|
||||||
|
|
||||||
echo "<b>".$text['header-backup']."</b>\n";
|
echo "<b>".$text['header-backup']."</b>\n";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo $text['description-backup']."\n";
|
echo $text['description-backup']."\n";
|
||||||
echo "<br><br><br>";
|
echo "<br><br><br>";
|
||||||
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-source_paths']."\n";
|
echo " ".$text['label-source_paths']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
foreach ($_SESSION['backup']['path'] as $backup_path) {
|
foreach ($_SESSION['backup']['path'] as $backup_path) {
|
||||||
echo $backup_path."<br>\n";
|
echo $backup_path."<br>\n";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-file_format']."\n";
|
echo " ".$text['label-file_format']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='file_format' id='file_format'>";
|
echo " <select class='formfld' name='file_format' id='file_format'>";
|
||||||
echo " <option value='tgz' ".(($file_format == 'tgz') ? 'selected' : null).">TAR GZIP</option>";
|
echo " <option value='tgz' ".(($file_format == 'tgz') ? 'selected' : null).">TAR GZIP</option>";
|
||||||
echo " <option value='tbz' ".(($file_format == 'tbz') ? 'selected' : null).">TAR BZIP</option>";
|
echo " <option value='tbz' ".(($file_format == 'tbz') ? 'selected' : null).">TAR BZIP</option>";
|
||||||
echo " <option value='rar' ".(($file_format == 'rar') ? 'selected' : null).">RAR</option>";
|
echo " <option value='rar' ".(($file_format == 'rar') ? 'selected' : null).">RAR</option>";
|
||||||
echo " <option value='zip' ".(($file_format == 'zip') ? 'selected' : null).">ZIP</option>";
|
echo " <option value='zip' ".(($file_format == 'zip') ? 'selected' : null).">ZIP</option>";
|
||||||
echo " </select>";
|
echo " </select>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-target_type']."\n";
|
echo " ".$text['label-target_type']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='target_type' id='target_type' onchange=\"(this.selectedIndex == 0) ? toggle_target('btn_script','btn_download') : toggle_target('btn_download','btn_script');\">";
|
echo " <select class='formfld' name='target_type' id='target_type' onchange=\"(this.selectedIndex == 0) ? toggle_target('btn_script','btn_download') : toggle_target('btn_download','btn_script');\">";
|
||||||
echo " <option value='download'>".$text['option-file_download']."</option>";
|
echo " <option value='download'>".$text['option-file_download']."</option>";
|
||||||
echo " <option value='script' ".(($target_type == 'script') ? 'selected' : null).">".$text['option-command']."</option>";
|
echo " <option value='script' ".(($target_type == 'script') ? 'selected' : null).">".$text['option-command']."</option>";
|
||||||
echo " </select>";
|
echo " </select>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<div id='command' ".(($command == '') ? "style='display: none;'" : null).">";
|
echo "<div id='command' ".(($command == '') ? "style='display: none;'" : null).">";
|
||||||
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-command']."\n";
|
echo " ".$text['label-command']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <textarea class='formfld' style='width: 100%; height: 200px; font-family: courier;'>".$command."</textarea>";
|
echo " <textarea class='formfld' style='width: 100%; height: 200px; font-family: courier;'>".$command."</textarea>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
echo "<div align='right'>";
|
echo "<div align='right'>";
|
||||||
echo "<input type='button' id='btn_script' class='btn' ".(($target_type != 'script') ? "style='display: none;'" : null)." value='".$text['button-generate']."' onclick=\"document.location.href='".PROJECT_PATH."/app/backup/index.php?a=script&file_format='+document.getElementById('file_format').options[document.getElementById('file_format').selectedIndex].value;\">";
|
echo "<input type='button' id='btn_script' class='btn' ".(($target_type != 'script') ? "style='display: none;'" : null)." value='".$text['button-generate']."' onclick=\"document.location.href='".PROJECT_PATH."/app/backup/index.php?a=script&file_format='+document.getElementById('file_format').options[document.getElementById('file_format').selectedIndex].value;\">";
|
||||||
echo "<input type='button' id='btn_download' class='btn' ".(($target_type == 'script') ? "style='display: none;'" : null)." value='".$text['button-download']."' onclick=\"document.location.href='".PROJECT_PATH."/app/backup/index.php?a=download&file_format='+document.getElementById('file_format').options[document.getElementById('file_format').selectedIndex].value;\">";
|
echo "<input type='button' id='btn_download' class='btn' ".(($target_type == 'script') ? "style='display: none;'" : null)." value='".$text['button-download']."' onclick=\"document.location.href='".PROJECT_PATH."/app/backup/index.php?a=download&file_format='+document.getElementById('file_format').options[document.getElementById('file_format').selectedIndex].value;\">";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
if (permission_exists("backup_upload")) {
|
if (permission_exists("backup_upload")) {
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='20'> </td>\n";
|
echo " <td width='20'> </td>\n";
|
||||||
echo " <td width='50%' valign='top'>\n";
|
echo " <td width='50%' valign='top'>\n";
|
||||||
echo " <b>".$text['header-restore']."</b>\n";
|
echo " <b>".$text['header-restore']."</b>\n";
|
||||||
echo " <br><br>";
|
echo " <br><br>";
|
||||||
echo $text['description-restore']."\n";
|
echo $text['description-restore']."\n";
|
||||||
echo " <br><br><br>";
|
echo " <br><br><br>";
|
||||||
echo " <div align='center'>";
|
echo " <div align='center'>";
|
||||||
echo " <form name='frmrestore' method='post' enctype='multipart/form-data' action=''>";
|
echo " <form name='frmrestore' method='post' enctype='multipart/form-data' action=''>";
|
||||||
echo " <input type='hidden' name='a' value='restore'>";
|
echo " <input type='hidden' name='a' value='restore'>";
|
||||||
echo " <table>";
|
echo " <table>";
|
||||||
echo " <tr>";
|
echo " <tr>";
|
||||||
echo " <td nowrap>".$text['label-select_backup']." </td>";
|
echo " <td nowrap>".$text['label-select_backup']." </td>";
|
||||||
echo " <td><input type='file' class='formfld fileinput' name='backup_file'></td>";
|
echo " <td><input type='file' class='formfld fileinput' name='backup_file'></td>";
|
||||||
echo " <td><input type='submit' class='btn' value='".$text['button-restore']."'></td>";
|
echo " <td><input type='submit' class='btn' value='".$text['button-restore']."'></td>";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo " </table>";
|
echo " </table>";
|
||||||
echo " <br>";
|
echo " <br>";
|
||||||
echo " <span style='font-weight: bold; text-decoration: underline; color: #000;'>".$text['description-restore_warning']."</span>";
|
echo " <span style='font-weight: bold; text-decoration: underline; color: #000;'>".$text['description-restore_warning']."</span>";
|
||||||
echo " </form>\n";
|
echo " </form>\n";
|
||||||
echo " </div>";
|
echo " </div>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,360 +1,360 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('call_center_active_view')) {
|
if (permission_exists('call_center_active_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get the queue_name and set it as a variable
|
//get the queue_name and set it as a variable
|
||||||
$queue_name = $_GET[queue_name].'@'. $_SESSION['domains'][$domain_uuid]['domain_name'];
|
$queue_name = $_GET[queue_name].'@'. $_SESSION['domains'][$domain_uuid]['domain_name'];
|
||||||
|
|
||||||
//convert the string to a named array
|
//convert the string to a named array
|
||||||
function str_to_named_array($tmp_str, $tmp_delimiter) {
|
function str_to_named_array($tmp_str, $tmp_delimiter) {
|
||||||
$tmp_array = explode ("\n", $tmp_str);
|
$tmp_array = explode ("\n", $tmp_str);
|
||||||
$result = '';
|
$result = '';
|
||||||
if (trim(strtoupper($tmp_array[0])) != "+OK") {
|
if (trim(strtoupper($tmp_array[0])) != "+OK") {
|
||||||
$tmp_field_name_array = explode ($tmp_delimiter, $tmp_array[0]);
|
$tmp_field_name_array = explode ($tmp_delimiter, $tmp_array[0]);
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($tmp_array as $row) {
|
foreach ($tmp_array as $row) {
|
||||||
if ($x > 0) {
|
if ($x > 0) {
|
||||||
$tmp_field_value_array = explode ($tmp_delimiter, $tmp_array[$x]);
|
$tmp_field_value_array = explode ($tmp_delimiter, $tmp_array[$x]);
|
||||||
$y = 0;
|
$y = 0;
|
||||||
foreach ($tmp_field_value_array as $tmp_value) {
|
foreach ($tmp_field_value_array as $tmp_value) {
|
||||||
$tmp_name = $tmp_field_name_array[$y];
|
$tmp_name = $tmp_field_name_array[$y];
|
||||||
if (trim(strtoupper($tmp_value)) != "+OK") {
|
if (trim(strtoupper($tmp_value)) != "+OK") {
|
||||||
$result[$x][$tmp_name] = $tmp_value;
|
$result[$x][$tmp_name] = $tmp_value;
|
||||||
}
|
}
|
||||||
$y++;
|
$y++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
unset($row);
|
unset($row);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//alternate the color of the row
|
//alternate the color of the row
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
//create an event socket connection
|
//create an event socket connection
|
||||||
$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']);
|
||||||
|
|
||||||
//get the call center queue, agent and tiers list
|
//get the call center queue, agent and tiers list
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
||||||
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'>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";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
//get the agent list
|
//get the agent list
|
||||||
|
|
||||||
//show the title
|
//show the title
|
||||||
echo "<b>".$text['header-agents']."</b><br />\n";
|
echo "<b>".$text['header-agents']."</b><br />\n";
|
||||||
echo $text['description-agents']."<br /><br />\n";
|
echo $text['description-agents']."<br /><br />\n";
|
||||||
|
|
||||||
//send the event socket command and get the response
|
//send the event socket command and get the response
|
||||||
//callcenter_config queue list tiers [queue_name] |
|
//callcenter_config queue list tiers [queue_name] |
|
||||||
$switch_cmd = 'callcenter_config queue list tiers '.$queue_name;
|
$switch_cmd = 'callcenter_config queue list tiers '.$queue_name;
|
||||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||||
$result = str_to_named_array($event_socket_str, '|');
|
$result = str_to_named_array($event_socket_str, '|');
|
||||||
|
|
||||||
//prepare the result for array_multisort
|
//prepare the result for array_multisort
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$tier_result[$x]['level'] = $row['level'];
|
$tier_result[$x]['level'] = $row['level'];
|
||||||
$tier_result[$x]['position'] = $row['position'];
|
$tier_result[$x]['position'] = $row['position'];
|
||||||
$tier_result[$x]['agent'] = $row['agent'];
|
$tier_result[$x]['agent'] = $row['agent'];
|
||||||
$tier_result[$x]['state'] = trim($row['state']);
|
$tier_result[$x]['state'] = trim($row['state']);
|
||||||
$tier_result[$x]['queue'] = $row['queue'];
|
$tier_result[$x]['queue'] = $row['queue'];
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//sort the array //SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING
|
//sort the array //SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING
|
||||||
array_multisort($tier_result, SORT_ASC);
|
array_multisort($tier_result, SORT_ASC);
|
||||||
|
|
||||||
//send the event socket command and get the response
|
//send the event socket command and get the response
|
||||||
//callcenter_config queue list agents [queue_name] [status] |
|
//callcenter_config queue list agents [queue_name] [status] |
|
||||||
$switch_cmd = 'callcenter_config queue list agents '.$queue_name;
|
$switch_cmd = 'callcenter_config queue list agents '.$queue_name;
|
||||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||||
$agent_result = str_to_named_array($event_socket_str, '|');
|
$agent_result = str_to_named_array($event_socket_str, '|');
|
||||||
|
|
||||||
//list the agents
|
//list the agents
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<th>".$text['label-name']."</th>\n";
|
echo "<th>".$text['label-name']."</th>\n";
|
||||||
echo "<th>".$text['label-extension']."</th>\n";
|
echo "<th>".$text['label-extension']."</th>\n";
|
||||||
echo "<th>".$text['label-status']."</th>\n";
|
echo "<th>".$text['label-status']."</th>\n";
|
||||||
echo "<th>".$text['label-state']."</th>\n";
|
echo "<th>".$text['label-state']."</th>\n";
|
||||||
echo "<th>".$text['label-status_change']."</th>\n";
|
echo "<th>".$text['label-status_change']."</th>\n";
|
||||||
echo "<th>".$text['label-missed']."</th>\n";
|
echo "<th>".$text['label-missed']."</th>\n";
|
||||||
echo "<th>".$text['label-answered']."</th>\n";
|
echo "<th>".$text['label-answered']."</th>\n";
|
||||||
echo "<th>".$text['label-tier_state']."</th>\n";
|
echo "<th>".$text['label-tier_state']."</th>\n";
|
||||||
echo "<th>".$text['label-tier_level']."</th>\n";
|
echo "<th>".$text['label-tier_level']."</th>\n";
|
||||||
echo "<th>".$text['label-tier_position']."</th>\n";
|
echo "<th>".$text['label-tier_position']."</th>\n";
|
||||||
if (permission_exists('call_center_active_options')) {
|
if (permission_exists('call_center_active_options')) {
|
||||||
echo "<th>".$text['label-options']."</th>\n";
|
echo "<th>".$text['label-options']."</th>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
foreach ($tier_result as $tier_row) {
|
foreach ($tier_result as $tier_row) {
|
||||||
//$queue = $tier_row['queue'];
|
//$queue = $tier_row['queue'];
|
||||||
//$queue = str_replace('@'.$_SESSION['domain_name'], '', $queue);
|
//$queue = str_replace('@'.$_SESSION['domain_name'], '', $queue);
|
||||||
$agent = $tier_row['agent'];
|
$agent = $tier_row['agent'];
|
||||||
//$agent = str_replace('@'.$_SESSION['domain_name'], '', $agent);
|
//$agent = str_replace('@'.$_SESSION['domain_name'], '', $agent);
|
||||||
$tier_state = $tier_row['state'];
|
$tier_state = $tier_row['state'];
|
||||||
$tier_level = $tier_row['level'];
|
$tier_level = $tier_row['level'];
|
||||||
$tier_position = $tier_row['position'];
|
$tier_position = $tier_row['position'];
|
||||||
|
|
||||||
foreach ($agent_result as $agent_row) {
|
foreach ($agent_result as $agent_row) {
|
||||||
if ($tier_row['agent'] == $agent_row['name']) {
|
if ($tier_row['agent'] == $agent_row['name']) {
|
||||||
$name = $agent_row['name'];
|
$name = $agent_row['name'];
|
||||||
$name = str_replace('@'.$_SESSION['domain_name'], '', $name);
|
$name = str_replace('@'.$_SESSION['domain_name'], '', $name);
|
||||||
//$system = $agent_row['system'];
|
//$system = $agent_row['system'];
|
||||||
$a_uuid = $agent_row['uuid'];
|
$a_uuid = $agent_row['uuid'];
|
||||||
//$type = $agent_row['type'];
|
//$type = $agent_row['type'];
|
||||||
$contact = $agent_row['contact'];
|
$contact = $agent_row['contact'];
|
||||||
$a_exten = preg_replace("/user\//", "", $contact);
|
$a_exten = preg_replace("/user\//", "", $contact);
|
||||||
$a_exten = preg_replace("/@.*/", "", $a_exten);
|
$a_exten = preg_replace("/@.*/", "", $a_exten);
|
||||||
$a_exten = preg_replace("/{.*}/", "", $a_exten);
|
$a_exten = preg_replace("/{.*}/", "", $a_exten);
|
||||||
$status = $agent_row['status'];
|
$status = $agent_row['status'];
|
||||||
$state = $agent_row['state'];
|
$state = $agent_row['state'];
|
||||||
$max_no_answer = $agent_row['max_no_answer'];
|
$max_no_answer = $agent_row['max_no_answer'];
|
||||||
$wrap_up_time = $agent_row['wrap_up_time'];
|
$wrap_up_time = $agent_row['wrap_up_time'];
|
||||||
$reject_delay_time = $agent_row['reject_delay_time'];
|
$reject_delay_time = $agent_row['reject_delay_time'];
|
||||||
$busy_delay_time = $agent_row['busy_delay_time'];
|
$busy_delay_time = $agent_row['busy_delay_time'];
|
||||||
$last_bridge_start = $agent_row['last_bridge_start'];
|
$last_bridge_start = $agent_row['last_bridge_start'];
|
||||||
$last_bridge_end = $agent_row['last_bridge_end'];
|
$last_bridge_end = $agent_row['last_bridge_end'];
|
||||||
//$last_offered_call = $agent_row['last_offered_call'];
|
//$last_offered_call = $agent_row['last_offered_call'];
|
||||||
$last_status_change = $agent_row['last_status_change'];
|
$last_status_change = $agent_row['last_status_change'];
|
||||||
$no_answer_count = $agent_row['no_answer_count'];
|
$no_answer_count = $agent_row['no_answer_count'];
|
||||||
$calls_answered = $agent_row['calls_answered'];
|
$calls_answered = $agent_row['calls_answered'];
|
||||||
$talk_time = $agent_row['talk_time'];
|
$talk_time = $agent_row['talk_time'];
|
||||||
$ready_time = $agent_row['ready_time'];
|
$ready_time = $agent_row['ready_time'];
|
||||||
|
|
||||||
$last_offered_call_seconds = time() - $last_offered_call;
|
$last_offered_call_seconds = time() - $last_offered_call;
|
||||||
$last_offered_call_length_hour = floor($last_offered_call_seconds/3600);
|
$last_offered_call_length_hour = floor($last_offered_call_seconds/3600);
|
||||||
$last_offered_call_length_min = floor($last_offered_call_seconds/60 - ($last_offered_call_length_hour * 60));
|
$last_offered_call_length_min = floor($last_offered_call_seconds/60 - ($last_offered_call_length_hour * 60));
|
||||||
$last_offered_call_length_sec = $last_offered_call_seconds - (($last_offered_call_length_hour * 3600) + ($last_offered_call_length_min * 60));
|
$last_offered_call_length_sec = $last_offered_call_seconds - (($last_offered_call_length_hour * 3600) + ($last_offered_call_length_min * 60));
|
||||||
$last_offered_call_length_min = sprintf("%02d", $last_offered_call_length_min);
|
$last_offered_call_length_min = sprintf("%02d", $last_offered_call_length_min);
|
||||||
$last_offered_call_length_sec = sprintf("%02d", $last_offered_call_length_sec);
|
$last_offered_call_length_sec = sprintf("%02d", $last_offered_call_length_sec);
|
||||||
$last_offered_call_length = $last_offered_call_length_hour.':'.$last_offered_call_length_min.':'.$last_offered_call_length_sec;
|
$last_offered_call_length = $last_offered_call_length_hour.':'.$last_offered_call_length_min.':'.$last_offered_call_length_sec;
|
||||||
|
|
||||||
$last_status_change_seconds = time() - $last_status_change;
|
$last_status_change_seconds = time() - $last_status_change;
|
||||||
$last_status_change_length_hour = floor($last_status_change_seconds/3600);
|
$last_status_change_length_hour = floor($last_status_change_seconds/3600);
|
||||||
$last_status_change_length_min = floor($last_status_change_seconds/60 - ($last_status_change_length_hour * 60));
|
$last_status_change_length_min = floor($last_status_change_seconds/60 - ($last_status_change_length_hour * 60));
|
||||||
$last_status_change_length_sec = $last_status_change_seconds - (($last_status_change_length_hour * 3600) + ($last_status_change_length_min * 60));
|
$last_status_change_length_sec = $last_status_change_seconds - (($last_status_change_length_hour * 3600) + ($last_status_change_length_min * 60));
|
||||||
$last_status_change_length_min = sprintf("%02d", $last_status_change_length_min);
|
$last_status_change_length_min = sprintf("%02d", $last_status_change_length_min);
|
||||||
$last_status_change_length_sec = sprintf("%02d", $last_status_change_length_sec);
|
$last_status_change_length_sec = sprintf("%02d", $last_status_change_length_sec);
|
||||||
$last_status_change_length = $last_status_change_length_hour.':'.$last_status_change_length_min.':'.$last_status_change_length_sec;
|
$last_status_change_length = $last_status_change_length_hour.':'.$last_status_change_length_min.':'.$last_status_change_length_sec;
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$name."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$name."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$a_exten."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$a_exten."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$status."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$status."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$state."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$state."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$last_status_change_length."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$last_status_change_length."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$no_answer_count."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$no_answer_count."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$calls_answered."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$calls_answered."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$tier_state."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$tier_state."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$tier_level."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$tier_level."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$tier_position."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$tier_position."</td>\n";
|
||||||
|
|
||||||
if (permission_exists('call_center_active_options')) {
|
if (permission_exists('call_center_active_options')) {
|
||||||
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>";
|
echo "<td valign='top' class='".$row_style[$c]."'>";
|
||||||
|
|
||||||
//need to check state to so only waiting gets call, and trying/answer gets eavesdrop
|
//need to check state to so only waiting gets call, and trying/answer gets eavesdrop
|
||||||
if ($tier_state == "Offering" || $tier_state == "Active Inbound") {
|
if ($tier_state == "Offering" || $tier_state == "Active Inbound") {
|
||||||
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".$a_exten."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26eavesdrop(".$a_uuid.")";
|
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".$a_exten."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26eavesdrop(".$a_uuid.")";
|
||||||
|
|
||||||
//debug
|
//debug
|
||||||
//echo $orig_command;
|
//echo $orig_command;
|
||||||
//echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=log+".$orig_command.")');}\">log_cmd</a> \n";
|
//echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=log+".$orig_command.")');}\">log_cmd</a> \n";
|
||||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=originate+".$orig_command.")');}\">".$text['label-eavesdrop']."</a> \n";
|
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=originate+".$orig_command.")');}\">".$text['label-eavesdrop']."</a> \n";
|
||||||
|
|
||||||
$xfer_command = $a_uuid." -bleg ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
|
$xfer_command = $a_uuid." -bleg ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
|
||||||
//$xfer_command = $a_uuid." ".$_SESSION['user']['extension'][0]['user']." XML default";
|
//$xfer_command = $a_uuid." ".$_SESSION['user']['extension'][0]['user']." XML default";
|
||||||
$xfer_command = urlencode($xfer_command);
|
$xfer_command = urlencode($xfer_command);
|
||||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=uuid_transfer+".$xfer_command."');}\">".$text['label-transfer']."</a> \n";
|
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=uuid_transfer+".$xfer_command."');}\">".$text['label-transfer']."</a> \n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$orig_call="{origination_caller_id_name=c2c-".urlencode($name).",origination_caller_id_number=".$a_exten."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26bridge(user/".$a_exten."@".$_SESSION['domain_name'].")";
|
$orig_call="{origination_caller_id_name=c2c-".urlencode($name).",origination_caller_id_number=".$a_exten."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26bridge(user/".$a_exten."@".$_SESSION['domain_name'].")";
|
||||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=originate+".$orig_call.")');}\">".$text['label-call']."</a> \n";
|
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=originate+".$orig_call.")');}\">".$text['label-call']."</a> \n";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
}
|
}
|
||||||
echo "</table>\n\n";
|
echo "</table>\n\n";
|
||||||
|
|
||||||
//add vertical spacing
|
//add vertical spacing
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
|
|
||||||
//get the queue list
|
//get the queue list
|
||||||
//send the event socket command and get the response
|
//send the event socket command and get the response
|
||||||
//callcenter_config queue list members [queue_name]
|
//callcenter_config queue list members [queue_name]
|
||||||
$switch_cmd = 'callcenter_config queue list members '.$queue_name;
|
$switch_cmd = 'callcenter_config queue list members '.$queue_name;
|
||||||
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||||
$result = str_to_named_array($event_socket_str, '|');
|
$result = str_to_named_array($event_socket_str, '|');
|
||||||
|
|
||||||
//show the title
|
//show the title
|
||||||
$q_waiting=0;
|
$q_waiting=0;
|
||||||
$q_trying=0;
|
$q_trying=0;
|
||||||
$q_answered=0;
|
$q_answered=0;
|
||||||
|
|
||||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left'><b>".$text['label-queue'].": ".ucfirst($_GET[queue_name])."</b><br />\n";
|
echo " <td align='left'><b>".$text['label-queue'].": ".ucfirst($_GET[queue_name])."</b><br />\n";
|
||||||
echo " ".$text['description-queue']."<br />\n";
|
echo " ".$text['description-queue']."<br />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td align='right' valign='top'>";
|
echo " <td align='right' valign='top'>";
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$state = $row['state'];
|
$state = $row['state'];
|
||||||
$q_trying += ($state == "Trying") ? 1 : 0;
|
$q_trying += ($state == "Trying") ? 1 : 0;
|
||||||
$q_waiting += ($state == "Waiting") ? 1 : 0;
|
$q_waiting += ($state == "Waiting") ? 1 : 0;
|
||||||
$q_answered += ($state == "Answered") ? 1 : 0;
|
$q_answered += ($state == "Answered") ? 1 : 0;
|
||||||
}
|
}
|
||||||
echo " <strong>".$text['label-waiting'].":</strong> <b>".$q_waiting."</b> ";
|
echo " <strong>".$text['label-waiting'].":</strong> <b>".$q_waiting."</b> ";
|
||||||
echo " <strong>".$text['label-trying'].":</strong> <b>".$q_trying."</b> ";
|
echo " <strong>".$text['label-trying'].":</strong> <b>".$q_trying."</b> ";
|
||||||
echo " <strong>".$text['label-answered'].":</strong> <b>".$q_answered."</b>";
|
echo " <strong>".$text['label-answered'].":</strong> <b>".$q_answered."</b>";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<th>".$text['label-time']."</th>\n";
|
echo "<th>".$text['label-time']."</th>\n";
|
||||||
//echo "<th>".$text['label-system']."</th>\n";
|
//echo "<th>".$text['label-system']."</th>\n";
|
||||||
echo "<th>".$text['label-name']."</th>\n";
|
echo "<th>".$text['label-name']."</th>\n";
|
||||||
echo "<th>".$text['label-number']."</th>\n";
|
echo "<th>".$text['label-number']."</th>\n";
|
||||||
echo "<th>".$text['label-status']."</th>\n";
|
echo "<th>".$text['label-status']."</th>\n";
|
||||||
if ((if_group("admin") || if_group("superadmin"))) {
|
if ((if_group("admin") || if_group("superadmin"))) {
|
||||||
echo "<th>".$text['label-options']."</th>\n";
|
echo "<th>".$text['label-options']."</th>\n";
|
||||||
}
|
}
|
||||||
echo "<th>".$text['label-agent']."</th>\n";
|
echo "<th>".$text['label-agent']."</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$queue = $row['queue'];
|
$queue = $row['queue'];
|
||||||
$system = $row['system'];
|
$system = $row['system'];
|
||||||
$uuid = $row['uuid'];
|
$uuid = $row['uuid'];
|
||||||
$session_uuid = $row['session_uuid'];
|
$session_uuid = $row['session_uuid'];
|
||||||
$caller_number = $row['cid_number'];
|
$caller_number = $row['cid_number'];
|
||||||
$caller_name = $row['cid_name'];
|
$caller_name = $row['cid_name'];
|
||||||
$system_epoch = $row['system_epoch'];
|
$system_epoch = $row['system_epoch'];
|
||||||
$joined_epoch = $row['joined_epoch'];
|
$joined_epoch = $row['joined_epoch'];
|
||||||
$rejoined_epoch = $row['rejoined_epoch'];
|
$rejoined_epoch = $row['rejoined_epoch'];
|
||||||
$bridge_epoch = $row['bridge_epoch'];
|
$bridge_epoch = $row['bridge_epoch'];
|
||||||
$abandoned_epoch = $row['abandoned_epoch'];
|
$abandoned_epoch = $row['abandoned_epoch'];
|
||||||
$base_score = $row['base_score'];
|
$base_score = $row['base_score'];
|
||||||
$skill_score = $row['skill_score'];
|
$skill_score = $row['skill_score'];
|
||||||
$serving_agent = $row['serving_agent'];
|
$serving_agent = $row['serving_agent'];
|
||||||
$serving_system = $row['serving_system'];
|
$serving_system = $row['serving_system'];
|
||||||
$state = $row['state'];
|
$state = $row['state'];
|
||||||
$joined_seconds = time() - $joined_epoch;
|
$joined_seconds = time() - $joined_epoch;
|
||||||
$joined_length_hour = floor($joined_seconds/3600);
|
$joined_length_hour = floor($joined_seconds/3600);
|
||||||
$joined_length_min = floor($joined_seconds/60 - ($joined_length_hour * 60));
|
$joined_length_min = floor($joined_seconds/60 - ($joined_length_hour * 60));
|
||||||
$joined_length_sec = $joined_seconds - (($joined_length_hour * 3600) + ($joined_length_min * 60));
|
$joined_length_sec = $joined_seconds - (($joined_length_hour * 3600) + ($joined_length_min * 60));
|
||||||
$joined_length_min = sprintf("%02d", $joined_length_min);
|
$joined_length_min = sprintf("%02d", $joined_length_min);
|
||||||
$joined_length_sec = sprintf("%02d", $joined_length_sec);
|
$joined_length_sec = sprintf("%02d", $joined_length_sec);
|
||||||
$joined_length = $joined_length_hour.':'.$joined_length_min.':'.$joined_length_sec;
|
$joined_length = $joined_length_hour.':'.$joined_length_min.':'.$joined_length_sec;
|
||||||
|
|
||||||
//$system_seconds = time() - $system_epoch;
|
//$system_seconds = time() - $system_epoch;
|
||||||
//$system_length_hour = floor($system_seconds/3600);
|
//$system_length_hour = floor($system_seconds/3600);
|
||||||
//$system_length_min = floor($system_seconds/60 - ($system_length_hour * 60));
|
//$system_length_min = floor($system_seconds/60 - ($system_length_hour * 60));
|
||||||
//$system_length_sec = $system_seconds - (($system_length_hour * 3600) + ($system_length_min * 60));
|
//$system_length_sec = $system_seconds - (($system_length_hour * 3600) + ($system_length_min * 60));
|
||||||
//$system_length_min = sprintf("%02d", $system_length_min);
|
//$system_length_min = sprintf("%02d", $system_length_min);
|
||||||
//$system_length_sec = sprintf("%02d", $system_length_sec);
|
//$system_length_sec = sprintf("%02d", $system_length_sec);
|
||||||
//$system_length = $system_length_hour.':'.$system_length_min.':'.$system_length_sec;
|
//$system_length = $system_length_hour.':'.$system_length_min.':'.$system_length_sec;
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$joined_length."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$joined_length."</td>\n";
|
||||||
//echo "<td valign='top' class='".$row_style[$c]."'>".$system_length."</td>\n";
|
//echo "<td valign='top' class='".$row_style[$c]."'>".$system_length."</td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$caller_name." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$caller_name." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$caller_number." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$caller_number." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$state."</td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$state."</td>\n";
|
||||||
if (if_group("admin") || if_group("superadmin")) {
|
if (if_group("admin") || if_group("superadmin")) {
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>";
|
echo "<td valign='top' class='".$row_style[$c]."'>";
|
||||||
if ($state != "Abandoned") {
|
if ($state != "Abandoned") {
|
||||||
$q_caller_number = urlencode($caller_number);
|
$q_caller_number = urlencode($caller_number);
|
||||||
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".$q_caller_number."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26eavesdrop(".$session_uuid.")";
|
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".$q_caller_number."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26eavesdrop(".$session_uuid.")";
|
||||||
|
|
||||||
//debug
|
//debug
|
||||||
//echo $orig_command;
|
//echo $orig_command;
|
||||||
//echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=log+".$orig_command.")');}\">log_cmd</a> \n";
|
//echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=log+".$orig_command.")');}\">log_cmd</a> \n";
|
||||||
|
|
||||||
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=originate+".$orig_command.")');}\">".$text['label-eavesdrop']."</a> \n";
|
echo " <a href='javascript:void(0);' style='color: #444444;' onclick=\"confirm_response = confirm('".$text['message-confirm']."');if (confirm_response){send_cmd('call_center_exec.php?cmd=originate+".$orig_command.")');}\">".$text['label-eavesdrop']."</a> \n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " ";
|
echo " ";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$serving_agent." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$serving_agent." </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
//add vertical spacing
|
//add vertical spacing
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,100 +1,100 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/*
|
/*
|
||||||
v_exec.php
|
v_exec.php
|
||||||
Copyright (C) 2008 Mark J Crane
|
Copyright (C) 2008 Mark J Crane
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
notice, this list of conditions and the following disclaimer in the
|
notice, this list of conditions and the following disclaimer in the
|
||||||
documentation and/or other materials provided with the distribution.
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('call_center_active_view')) {
|
if (permission_exists('call_center_active_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//http get variables set to php variables
|
//http get variables set to php variables
|
||||||
if (count($_GET)>0) {
|
if (count($_GET)>0) {
|
||||||
$switch_cmd = trim($_GET["cmd"]);
|
$switch_cmd = trim($_GET["cmd"]);
|
||||||
$action = trim(check_str($_GET["action"]));
|
$action = trim(check_str($_GET["action"]));
|
||||||
$data = trim(check_str($_GET["data"]));
|
$data = trim(check_str($_GET["data"]));
|
||||||
$username = trim(check_str($_GET["username"]));
|
$username = trim(check_str($_GET["username"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
//authorized commands
|
//authorized commands
|
||||||
if (stristr($switch_cmd, 'user_status') == true) {
|
if (stristr($switch_cmd, 'user_status') == true) {
|
||||||
//authorized;
|
//authorized;
|
||||||
} elseif (stristr($switch_cmd, 'callcenter_config') == true) {
|
} elseif (stristr($switch_cmd, 'callcenter_config') == true) {
|
||||||
//authorized;
|
//authorized;
|
||||||
} elseif (stristr($switch_cmd, 'eavesdrop') == true) {
|
} elseif (stristr($switch_cmd, 'eavesdrop') == true) {
|
||||||
//authorized;
|
//authorized;
|
||||||
} elseif (stristr($switch_cmd, 'bridge') == true) {
|
} elseif (stristr($switch_cmd, 'bridge') == true) {
|
||||||
//authorized;
|
//authorized;
|
||||||
} elseif (stristr($switch_cmd, 'uuid_transfer') == true) {
|
} elseif (stristr($switch_cmd, 'uuid_transfer') == true) {
|
||||||
//authorized;
|
//authorized;
|
||||||
} else {
|
} else {
|
||||||
//not found. this command is not authorized
|
//not found. this command is not authorized
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the username
|
//set the username
|
||||||
if (if_group("admin") || if_group("superadmin")) {
|
if (if_group("admin") || if_group("superadmin")) {
|
||||||
//use the username that was provided
|
//use the username that was provided
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$username = $_SESSION['username'];
|
$username = $_SESSION['username'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//get to php variables
|
//get to php variables
|
||||||
if (count($_GET)>0) {
|
if (count($_GET)>0) {
|
||||||
if ($action == "user_status") {
|
if ($action == "user_status") {
|
||||||
$user_status = $data;
|
$user_status = $data;
|
||||||
$sql = "update v_users set ";
|
$sql = "update v_users set ";
|
||||||
$sql .= "user_status = '".trim($user_status, "'")."' ";
|
$sql .= "user_status = '".trim($user_status, "'")."' ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
$sql .= "and username = '".$username."' ";
|
$sql .= "and username = '".$username."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
//fs cmd
|
//fs cmd
|
||||||
if (strlen($switch_cmd) > 0) {
|
if (strlen($switch_cmd) > 0) {
|
||||||
//setup the event socket connection
|
//setup the event socket connection
|
||||||
$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']);
|
||||||
//ensure the connection exists
|
//ensure the connection exists
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
//send the command
|
//send the command
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
//set the user state
|
//set the user state
|
||||||
$cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting";
|
$cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting";
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015
|
Portions created by the Initial Developer are Copyright (C) 2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,224 +1,224 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2015
|
Copyright (C) 2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cache class provides an abstracted cache
|
* cache class provides an abstracted cache
|
||||||
*
|
*
|
||||||
* @method string dialplan - builds the dialplan for call center
|
* @method string dialplan - builds the dialplan for call center
|
||||||
*/
|
*/
|
||||||
//define the call center class
|
//define the call center class
|
||||||
if (!class_exists('call_center')) {
|
if (!class_exists('call_center')) {
|
||||||
class call_center {
|
class call_center {
|
||||||
/**
|
/**
|
||||||
* define the variables
|
* define the variables
|
||||||
*/
|
*/
|
||||||
public $domain_uuid;
|
public $domain_uuid;
|
||||||
public $call_center_queue_uuid;
|
public $call_center_queue_uuid;
|
||||||
public $dialplan_uuid;
|
public $dialplan_uuid;
|
||||||
public $queue_name;
|
public $queue_name;
|
||||||
public $queue_description;
|
public $queue_description;
|
||||||
public $destination_number;
|
public $destination_number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//place holder
|
//place holder
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a dialplan for call center
|
* Add a dialplan for call center
|
||||||
* @var string $domain_uuid the multi-tenant id
|
* @var string $domain_uuid the multi-tenant id
|
||||||
* @var string $value string to be cached
|
* @var string $value string to be cached
|
||||||
*/
|
*/
|
||||||
public function dialplan() {
|
public function dialplan() {
|
||||||
|
|
||||||
//delete previous dialplan
|
//delete previous dialplan
|
||||||
if (strlen($this->dialplan_uuid) > 0) {
|
if (strlen($this->dialplan_uuid) > 0) {
|
||||||
//delete the previous dialplan
|
//delete the previous dialplan
|
||||||
$sql = "delete from v_dialplans ";
|
$sql = "delete from v_dialplans ";
|
||||||
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$this->db->exec($sql);
|
$this->db->exec($sql);
|
||||||
|
|
||||||
$sql = "delete from v_dialplan_details ";
|
$sql = "delete from v_dialplan_details ";
|
||||||
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$this->db->exec($sql);
|
$this->db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
|
|
||||||
//build the dialplan array
|
//build the dialplan array
|
||||||
$dialplan["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
|
$dialplan["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
|
||||||
$dialplan["domain_uuid"] = $this->domain_uuid;
|
$dialplan["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_name"] = ($this->queue_name != '') ? $this->queue_name : format_phone($this->destination_number);
|
$dialplan["dialplan_name"] = ($this->queue_name != '') ? $this->queue_name : format_phone($this->destination_number);
|
||||||
$dialplan["dialplan_number"] = $this->destination_number;
|
$dialplan["dialplan_number"] = $this->destination_number;
|
||||||
$dialplan["dialplan_context"] = $_SESSION['context'];
|
$dialplan["dialplan_context"] = $_SESSION['context'];
|
||||||
$dialplan["dialplan_continue"] = "false";
|
$dialplan["dialplan_continue"] = "false";
|
||||||
$dialplan["dialplan_order"] = "210";
|
$dialplan["dialplan_order"] = "210";
|
||||||
$dialplan["dialplan_enabled"] = "true";
|
$dialplan["dialplan_enabled"] = "true";
|
||||||
$dialplan["dialplan_description"] = $this->queue_description;
|
$dialplan["dialplan_description"] = $this->queue_description;
|
||||||
$dialplan_detail_order = 10;
|
$dialplan_detail_order = 10;
|
||||||
|
|
||||||
//add the public condition
|
//add the public condition
|
||||||
$y = 1;
|
$y = 1;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "\${caller_id_name}";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "\${caller_id_name}";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^([^#]+#)(.*)$";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^([^#]+#)(.*)$";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "never";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "never";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "caller_id_name=$2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "caller_id_name=$2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
|
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^".$this->destination_number."\$";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^".$this->destination_number."\$";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hangup_after_bridge=true";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hangup_after_bridge=true";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
if (strlen($this->queue_cid_prefix) > 0) {
|
if (strlen($this->queue_cid_prefix) > 0) {
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "effective_caller_id_name=".$this->queue_cid_prefix."#\${caller_id_name}";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "effective_caller_id_name=".$this->queue_cid_prefix."#\${caller_id_name}";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
}
|
}
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "callcenter";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "callcenter";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $this->queue_name.'@'.$_SESSION["domain_name"];
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $this->queue_name.'@'.$_SESSION["domain_name"];
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
if (strlen($this->queue_timeout_action) > 0) {
|
if (strlen($this->queue_timeout_action) > 0) {
|
||||||
$action_array = explode(":",$this->queue_timeout_action);
|
$action_array = explode(":",$this->queue_timeout_action);
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $action_array[0];
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $action_array[0];
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = substr($this->queue_timeout_action, strlen($action_array[0])+1, strlen($this->queue_timeout_action));
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = substr($this->queue_timeout_action, strlen($action_array[0])+1, strlen($this->queue_timeout_action));
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
}
|
}
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "hangup";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "hangup";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "2";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
|
|
||||||
//add the dialplan permission
|
//add the dialplan permission
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
$p->add("dialplan_add", 'temp');
|
$p->add("dialplan_add", 'temp');
|
||||||
$p->add("dialplan_detail_add", 'temp');
|
$p->add("dialplan_detail_add", 'temp');
|
||||||
$p->add("dialplan_edit", 'temp');
|
$p->add("dialplan_edit", 'temp');
|
||||||
$p->add("dialplan_detail_edit", 'temp');
|
$p->add("dialplan_detail_edit", 'temp');
|
||||||
|
|
||||||
//save the dialplan
|
//save the dialplan
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('dialplans');
|
$orm->name('dialplans');
|
||||||
$orm->save($dialplan);
|
$orm->save($dialplan);
|
||||||
$dialplan_response = $orm->message;
|
$dialplan_response = $orm->message;
|
||||||
$this->dialplan_uuid = $dialplan_response['uuid'];
|
$this->dialplan_uuid = $dialplan_response['uuid'];
|
||||||
|
|
||||||
//if new dialplan uuid then update the call center queue
|
//if new dialplan uuid then update the call center queue
|
||||||
$sql = "update v_call_center_queues ";
|
$sql = "update v_call_center_queues ";
|
||||||
$sql .= "set dialplan_uuid = '".$this->dialplan_uuid."' ";
|
$sql .= "set dialplan_uuid = '".$this->dialplan_uuid."' ";
|
||||||
$sql .= "where call_center_queue_uuid = '".$this->call_center_queue_uuid."' ";
|
$sql .= "where call_center_queue_uuid = '".$this->call_center_queue_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$this->db->exec($sql);
|
$this->db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//remove the temporary permission
|
//remove the temporary permission
|
||||||
$p->delete("dialplan_add", 'temp');
|
$p->delete("dialplan_add", 'temp');
|
||||||
$p->delete("dialplan_detail_add", 'temp');
|
$p->delete("dialplan_detail_add", 'temp');
|
||||||
$p->delete("dialplan_edit", 'temp');
|
$p->delete("dialplan_edit", 'temp');
|
||||||
$p->delete("dialplan_detail_edit", 'temp');
|
$p->delete("dialplan_detail_edit", 'temp');
|
||||||
|
|
||||||
//synchronize the xml config
|
//synchronize the xml config
|
||||||
save_dialplan_xml();
|
save_dialplan_xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("dialplan:".$_SESSION['context']);
|
$cache->delete("dialplan:".$_SESSION['context']);
|
||||||
|
|
||||||
//return the dialplan_uuid
|
//return the dialplan_uuid
|
||||||
return $dialplan_response;
|
return $dialplan_response;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$o = new call_center;
|
$o = new call_center;
|
||||||
$c->domain_uuid = "";
|
$c->domain_uuid = "";
|
||||||
$c->dialplan_uuid = "";
|
$c->dialplan_uuid = "";
|
||||||
$c->queue_name = "";
|
$c->queue_name = "";
|
||||||
$c->queue_cid_prefix = "";
|
$c->queue_cid_prefix = "";
|
||||||
$c->queue_timeout_action = "";
|
$c->queue_timeout_action = "";
|
||||||
$c->queue_description = "";
|
$c->queue_description = "";
|
||||||
$c->destination_number = "";
|
$c->destination_number = "";
|
||||||
$c->dialplan();
|
$c->dialplan();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+474
-474
@@ -1,475 +1,475 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$text['title']['en-us'] = "Call Routing";
|
$text['title']['en-us'] = "Call Routing";
|
||||||
$text['title']['es-cl'] = "enrutamiento de llamadas";
|
$text['title']['es-cl'] = "enrutamiento de llamadas";
|
||||||
$text['title']['pt-pt'] = "roteamento de chamadas";
|
$text['title']['pt-pt'] = "roteamento de chamadas";
|
||||||
$text['title']['fr-fr'] = "routage des appels";
|
$text['title']['fr-fr'] = "routage des appels";
|
||||||
$text['title']['uk'] = "маршрутизація викликів";
|
$text['title']['uk'] = "маршрутизація викликів";
|
||||||
$text['title']['pl'] = "Call Routing";
|
$text['title']['pl'] = "Call Routing";
|
||||||
$text['title']['sv-se'] = "Call Routing";
|
$text['title']['sv-se'] = "Call Routing";
|
||||||
$text['title']['de-at'] = "Call Routing";
|
$text['title']['de-at'] = "Call Routing";
|
||||||
$text['title']['ro'] = "rutare de apel";
|
$text['title']['ro'] = "rutare de apel";
|
||||||
$text['title']['ar-eg'] = "توجيه الدعوة";
|
$text['title']['ar-eg'] = "توجيه الدعوة";
|
||||||
$text['title']['he'] = "ניתוב שיחות";
|
$text['title']['he'] = "ניתוב שיחות";
|
||||||
|
|
||||||
$text['table-tools']['en-us'] = "Tools";
|
$text['table-tools']['en-us'] = "Tools";
|
||||||
$text['table-tools']['es-cl'] = "Herramientas";
|
$text['table-tools']['es-cl'] = "Herramientas";
|
||||||
$text['table-tools']['pt-pt'] = "Ferramentas";
|
$text['table-tools']['pt-pt'] = "Ferramentas";
|
||||||
$text['table-tools']['fr-fr'] = "Outils";
|
$text['table-tools']['fr-fr'] = "Outils";
|
||||||
$text['table-tools']['pt-br'] = "Ferramentas";
|
$text['table-tools']['pt-br'] = "Ferramentas";
|
||||||
$text['table-tools']['pl'] = "Narzędzia";
|
$text['table-tools']['pl'] = "Narzędzia";
|
||||||
$text['table-tools']['sv-se'] = "Verktyg ";
|
$text['table-tools']['sv-se'] = "Verktyg ";
|
||||||
$text['table-tools']['uk'] = "Інструменти";
|
$text['table-tools']['uk'] = "Інструменти";
|
||||||
$text['table-tools']['de-at'] = "Funktionen";
|
$text['table-tools']['de-at'] = "Funktionen";
|
||||||
|
|
||||||
$text['table-extension']['en-us'] = "Extension";
|
$text['table-extension']['en-us'] = "Extension";
|
||||||
$text['table-extension']['es-cl'] = "Extensión";
|
$text['table-extension']['es-cl'] = "Extensión";
|
||||||
$text['table-extension']['pt-pt'] = "Extensão";
|
$text['table-extension']['pt-pt'] = "Extensão";
|
||||||
$text['table-extension']['fr-fr'] = "Extension";
|
$text['table-extension']['fr-fr'] = "Extension";
|
||||||
$text['table-extension']['pt-br'] = "Ramal";
|
$text['table-extension']['pt-br'] = "Ramal";
|
||||||
$text['table-extension']['pl'] = "Numer wewnętrzny";
|
$text['table-extension']['pl'] = "Numer wewnętrzny";
|
||||||
$text['table-extension']['sv-se'] = "Anknytning ";
|
$text['table-extension']['sv-se'] = "Anknytning ";
|
||||||
$text['table-extension']['uk'] = "Розширення (Extention)";
|
$text['table-extension']['uk'] = "Розширення (Extention)";
|
||||||
$text['table-extension']['de-at'] = "Nebenstelle";
|
$text['table-extension']['de-at'] = "Nebenstelle";
|
||||||
|
|
||||||
$text['table-description']['en-us'] = "Description";
|
$text['table-description']['en-us'] = "Description";
|
||||||
$text['table-description']['es-cl'] = "Descripción";
|
$text['table-description']['es-cl'] = "Descripción";
|
||||||
$text['table-description']['pt-pt'] = "Descrição";
|
$text['table-description']['pt-pt'] = "Descrição";
|
||||||
$text['table-description']['fr-fr'] = "Description";
|
$text['table-description']['fr-fr'] = "Description";
|
||||||
$text['table-description']['pt-br'] = "Descrição";
|
$text['table-description']['pt-br'] = "Descrição";
|
||||||
$text['table-description']['pl'] = "Opis";
|
$text['table-description']['pl'] = "Opis";
|
||||||
$text['table-description']['sv-se'] = "Beskrivning ";
|
$text['table-description']['sv-se'] = "Beskrivning ";
|
||||||
$text['table-description']['uk'] = "Опис";
|
$text['table-description']['uk'] = "Опис";
|
||||||
$text['table-description']['de-at'] = "Beschreibung";
|
$text['table-description']['de-at'] = "Beschreibung";
|
||||||
|
|
||||||
$text['label-select-cid-number']['en-us'] = "Select Caller ID Number";
|
$text['label-select-cid-number']['en-us'] = "Select Caller ID Number";
|
||||||
$text['label-select-cid-number']['es-cl'] = "Seleccione Llamadas Número de Identificación";
|
$text['label-select-cid-number']['es-cl'] = "Seleccione Llamadas Número de Identificación";
|
||||||
$text['label-select-cid-number']['pt-pt'] = "Selecione Caller ID Number";
|
$text['label-select-cid-number']['pt-pt'] = "Selecione Caller ID Number";
|
||||||
$text['label-select-cid-number']['fr-fr'] = "Sélectionnez Caller ID Number";
|
$text['label-select-cid-number']['fr-fr'] = "Sélectionnez Caller ID Number";
|
||||||
$text['label-select-cid-number']['pt-br'] = "Selecionar ID da chamada";
|
$text['label-select-cid-number']['pt-br'] = "Selecionar ID da chamada";
|
||||||
$text['label-select-cid-number']['pl'] = "Ustaw prezentację numeru dzwoniącego";
|
$text['label-select-cid-number']['pl'] = "Ustaw prezentację numeru dzwoniącego";
|
||||||
$text['label-select-cid-number']['sv-se'] = "Välj Nummerpresentation ";
|
$text['label-select-cid-number']['sv-se'] = "Välj Nummerpresentation ";
|
||||||
$text['label-select-cid-number']['uk'] = "";
|
$text['label-select-cid-number']['uk'] = "";
|
||||||
$text['label-select-cid-number']['de-at'] = "Anruferkennung (Nummer) wählen";
|
$text['label-select-cid-number']['de-at'] = "Anruferkennung (Nummer) wählen";
|
||||||
|
|
||||||
$text['label-ring-timeout']['en-us'] = "Timeout";
|
$text['label-ring-timeout']['en-us'] = "Timeout";
|
||||||
$text['label-ring-timeout']['es-cl'] = "Timeout";
|
$text['label-ring-timeout']['es-cl'] = "Timeout";
|
||||||
$text['label-ring-timeout']['pt-pt'] = "Timeout";
|
$text['label-ring-timeout']['pt-pt'] = "Timeout";
|
||||||
$text['label-ring-timeout']['fr-fr'] = "Timeout";
|
$text['label-ring-timeout']['fr-fr'] = "Timeout";
|
||||||
$text['label-ring-timeout']['pt-br'] = "Tempo limite";
|
$text['label-ring-timeout']['pt-br'] = "Tempo limite";
|
||||||
$text['label-ring-timeout']['pl'] = "Przekroczenie czasu oczekiwania ";
|
$text['label-ring-timeout']['pl'] = "Przekroczenie czasu oczekiwania ";
|
||||||
$text['label-ring-timeout']['sv-se'] = "Tidsgräns ";
|
$text['label-ring-timeout']['sv-se'] = "Tidsgräns ";
|
||||||
$text['label-ring-timeout']['uk'] = "Таймаут";
|
$text['label-ring-timeout']['uk'] = "Таймаут";
|
||||||
$text['label-ring-timeout']['de-at'] = "Abwurfzeit";
|
$text['label-ring-timeout']['de-at'] = "Abwurfzeit";
|
||||||
|
|
||||||
$text['label-ring-order']['en-us'] = "Ring Order";
|
$text['label-ring-order']['en-us'] = "Ring Order";
|
||||||
$text['label-ring-order']['es-cl'] = "Solicitar Llamado";
|
$text['label-ring-order']['es-cl'] = "Solicitar Llamado";
|
||||||
$text['label-ring-order']['pt-pt'] = "Pedir Chamada";
|
$text['label-ring-order']['pt-pt'] = "Pedir Chamada";
|
||||||
$text['label-ring-order']['fr-fr'] = "Ordre de sonnerie";
|
$text['label-ring-order']['fr-fr'] = "Ordre de sonnerie";
|
||||||
$text['label-ring-order']['pt-br'] = "Solicitar chamada";
|
$text['label-ring-order']['pt-br'] = "Solicitar chamada";
|
||||||
$text['label-ring-order']['pl'] = "Kolejność dzwonienia";
|
$text['label-ring-order']['pl'] = "Kolejność dzwonienia";
|
||||||
$text['label-ring-order']['sv-se'] = "Ring Ordning ";
|
$text['label-ring-order']['sv-se'] = "Ring Ordning ";
|
||||||
$text['label-ring-order']['uk'] = "Послідовність набору";
|
$text['label-ring-order']['uk'] = "Послідовність набору";
|
||||||
$text['label-ring-order']['de-at'] = "Ruf Reihenfolge";
|
$text['label-ring-order']['de-at'] = "Ruf Reihenfolge";
|
||||||
|
|
||||||
$text['label-ring-delay']['en-us'] = "Delay";
|
$text['label-ring-delay']['en-us'] = "Delay";
|
||||||
$text['label-ring-delay']['es-cl'] = "Retardo";
|
$text['label-ring-delay']['es-cl'] = "Retardo";
|
||||||
$text['label-ring-delay']['pt-pt'] = "Atraso";
|
$text['label-ring-delay']['pt-pt'] = "Atraso";
|
||||||
$text['label-ring-delay']['fr-fr'] = "Délais";
|
$text['label-ring-delay']['fr-fr'] = "Délais";
|
||||||
$text['label-ring-delay']['pt-br'] = "Delay";
|
$text['label-ring-delay']['pt-br'] = "Delay";
|
||||||
$text['label-ring-delay']['pl'] = "Opóznienie";
|
$text['label-ring-delay']['pl'] = "Opóznienie";
|
||||||
$text['label-ring-delay']['sv-se'] = "Fördröjning ";
|
$text['label-ring-delay']['sv-se'] = "Fördröjning ";
|
||||||
$text['label-ring-delay']['uk'] = "Затримка";
|
$text['label-ring-delay']['uk'] = "Затримка";
|
||||||
$text['label-ring-delay']['de-at'] = "Verzögerung";
|
$text['label-ring-delay']['de-at'] = "Verzögerung";
|
||||||
|
|
||||||
$text['label-prompt']['en-us'] = "Prompt to accept the call";
|
$text['label-prompt']['en-us'] = "Prompt to accept the call";
|
||||||
$text['label-prompt']['es-cl'] = "Preguntar para aceptar una llamada";
|
$text['label-prompt']['es-cl'] = "Preguntar para aceptar una llamada";
|
||||||
$text['label-prompt']['pt-pt'] = "Perguntar para aceitar a chamada";
|
$text['label-prompt']['pt-pt'] = "Perguntar para aceitar a chamada";
|
||||||
$text['label-prompt']['fr-fr'] = "Annonce pour accepter l'appel";
|
$text['label-prompt']['fr-fr'] = "Annonce pour accepter l'appel";
|
||||||
$text['label-prompt']['pt-br'] = "Perguntar para aceitar a chamada";
|
$text['label-prompt']['pt-br'] = "Perguntar para aceitar a chamada";
|
||||||
$text['label-prompt']['pl'] = "Podpowiedz, aby odebrać rozmowę";
|
$text['label-prompt']['pl'] = "Podpowiedz, aby odebrać rozmowę";
|
||||||
$text['label-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal. ";
|
$text['label-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal. ";
|
||||||
$text['label-prompt']['uk'] = "";
|
$text['label-prompt']['uk'] = "";
|
||||||
$text['label-prompt']['de-at'] = "Ansage um den Anruf anzunehmen";
|
$text['label-prompt']['de-at'] = "Ansage um den Anruf anzunehmen";
|
||||||
|
|
||||||
$text['label-on-busy']['en-us'] = "On Busy";
|
$text['label-on-busy']['en-us'] = "On Busy";
|
||||||
$text['label-on-busy']['es-cl'] = "Concurrida";
|
$text['label-on-busy']['es-cl'] = "Concurrida";
|
||||||
$text['label-on-busy']['pt-pt'] = "Movimentado";
|
$text['label-on-busy']['pt-pt'] = "Movimentado";
|
||||||
$text['label-on-busy']['fr-fr'] = "Sur Occupé";
|
$text['label-on-busy']['fr-fr'] = "Sur Occupé";
|
||||||
$text['label-on-busy']['it-it'] = "Su occupato";
|
$text['label-on-busy']['it-it'] = "Su occupato";
|
||||||
$text['label-on-busy']['pt-br'] = "Ocupado";
|
$text['label-on-busy']['pt-br'] = "Ocupado";
|
||||||
$text['label-on-busy']['pl'] = "Kiedy zajęty";
|
$text['label-on-busy']['pl'] = "Kiedy zajęty";
|
||||||
$text['label-on-busy']['sv-se'] = "Vid Upptaget ";
|
$text['label-on-busy']['sv-se'] = "Vid Upptaget ";
|
||||||
$text['label-on-busy']['uk'] = "Якщо зайнято";
|
$text['label-on-busy']['uk'] = "Якщо зайнято";
|
||||||
$text['label-on-busy']['de-at'] = "Bei Besetzt";
|
$text['label-on-busy']['de-at'] = "Bei Besetzt";
|
||||||
|
|
||||||
$text['label-number']['en-us'] = "Number";
|
$text['label-number']['en-us'] = "Number";
|
||||||
$text['label-number']['es-cl'] = "Número";
|
$text['label-number']['es-cl'] = "Número";
|
||||||
$text['label-number']['pt-pt'] = "Número";
|
$text['label-number']['pt-pt'] = "Número";
|
||||||
$text['label-number']['fr-fr'] = "Numéro";
|
$text['label-number']['fr-fr'] = "Numéro";
|
||||||
$text['label-number']['pt-br'] = "Número";
|
$text['label-number']['pt-br'] = "Número";
|
||||||
$text['label-number']['pl'] = "Numer";
|
$text['label-number']['pl'] = "Numer";
|
||||||
$text['label-number']['sv-se'] = "Nummer ";
|
$text['label-number']['sv-se'] = "Nummer ";
|
||||||
$text['label-number']['uk'] = "Номер";
|
$text['label-number']['uk'] = "Номер";
|
||||||
$text['label-number']['de-at'] = "Nummer";
|
$text['label-number']['de-at'] = "Nummer";
|
||||||
|
|
||||||
$text['label-no_answer']['en-us'] = "No Answer";
|
$text['label-no_answer']['en-us'] = "No Answer";
|
||||||
$text['label-no_answer']['es-cl'] = "Sin Respuesta";
|
$text['label-no_answer']['es-cl'] = "Sin Respuesta";
|
||||||
$text['label-no_answer']['pt-pt'] = "Sem Resposta";
|
$text['label-no_answer']['pt-pt'] = "Sem Resposta";
|
||||||
$text['label-no_answer']['fr-fr'] = "Sans Réponse";
|
$text['label-no_answer']['fr-fr'] = "Sans Réponse";
|
||||||
$text['label-no_answer']['it-it'] = "Senza Risposta";
|
$text['label-no_answer']['it-it'] = "Senza Risposta";
|
||||||
$text['label-no_answer']['pt-br'] = "Sem resposta";
|
$text['label-no_answer']['pt-br'] = "Sem resposta";
|
||||||
$text['label-no_answer']['pl'] = "Brak odpowiedzi";
|
$text['label-no_answer']['pl'] = "Brak odpowiedzi";
|
||||||
$text['label-no_answer']['sv-se'] = "Inget Svar ";
|
$text['label-no_answer']['sv-se'] = "Inget Svar ";
|
||||||
$text['label-no_answer']['uk'] = "Без відповіді";
|
$text['label-no_answer']['uk'] = "Без відповіді";
|
||||||
$text['label-no_answer']['de-at'] = "Keine Antwort";
|
$text['label-no_answer']['de-at'] = "Keine Antwort";
|
||||||
|
|
||||||
$text['label-not_registered']['en-us'] = "Not Registered";
|
$text['label-not_registered']['en-us'] = "Not Registered";
|
||||||
$text['label-not_registered']['es-cl'] = "";
|
$text['label-not_registered']['es-cl'] = "";
|
||||||
$text['label-not_registered']['pt-pt'] = "";
|
$text['label-not_registered']['pt-pt'] = "";
|
||||||
$text['label-not_registered']['fr-fr'] = "";
|
$text['label-not_registered']['fr-fr'] = "";
|
||||||
$text['label-not_registered']['it-it'] = "";
|
$text['label-not_registered']['it-it'] = "";
|
||||||
$text['label-not_registered']['pt-br'] = "";
|
$text['label-not_registered']['pt-br'] = "";
|
||||||
$text['label-not_registered']['pl'] = "";
|
$text['label-not_registered']['pl'] = "";
|
||||||
$text['label-not_registered']['sv-se'] = "";
|
$text['label-not_registered']['sv-se'] = "";
|
||||||
$text['label-not_registered']['uk'] = "";
|
$text['label-not_registered']['uk'] = "";
|
||||||
$text['label-not_registered']['de-at'] = "";
|
$text['label-not_registered']['de-at'] = "";
|
||||||
|
|
||||||
$text['label-ignore-busy']['en-us'] = "Ignore Busy";
|
$text['label-ignore-busy']['en-us'] = "Ignore Busy";
|
||||||
$text['label-ignore-busy']['es-cl'] = "";
|
$text['label-ignore-busy']['es-cl'] = "";
|
||||||
$text['label-ignore-busy']['pt-pt'] = "";
|
$text['label-ignore-busy']['pt-pt'] = "";
|
||||||
$text['label-ignore-busy']['fr-fr'] = "";
|
$text['label-ignore-busy']['fr-fr'] = "";
|
||||||
$text['label-ignore-busy']['it-it'] = "";
|
$text['label-ignore-busy']['it-it'] = "";
|
||||||
$text['label-ignore-busy']['pt-br'] = "";
|
$text['label-ignore-busy']['pt-br'] = "";
|
||||||
$text['label-ignore-busy']['pl'] = "";
|
$text['label-ignore-busy']['pl'] = "";
|
||||||
$text['label-ignore-busy']['sv-se'] = "";
|
$text['label-ignore-busy']['sv-se'] = "";
|
||||||
$text['label-ignore-busy']['uk'] = "";
|
$text['label-ignore-busy']['uk'] = "";
|
||||||
$text['label-ignore-busy']['de-at'] = "Ignorieren bei Besetzt";
|
$text['label-ignore-busy']['de-at'] = "Ignorieren bei Besetzt";
|
||||||
|
|
||||||
$text['label-follow-me']['en-us'] = "Follow Me";
|
$text['label-follow-me']['en-us'] = "Follow Me";
|
||||||
$text['label-follow-me']['es-cl'] = "Sígueme";
|
$text['label-follow-me']['es-cl'] = "Sígueme";
|
||||||
$text['label-follow-me']['pt-pt'] = "Segue-me";
|
$text['label-follow-me']['pt-pt'] = "Segue-me";
|
||||||
$text['label-follow-me']['fr-fr'] = "Follow Me";
|
$text['label-follow-me']['fr-fr'] = "Follow Me";
|
||||||
$text['label-follow-me']['pt-br'] = "Siga-me";
|
$text['label-follow-me']['pt-br'] = "Siga-me";
|
||||||
$text['label-follow-me']['pl'] = "Podążaj za mną";
|
$text['label-follow-me']['pl'] = "Podążaj za mną";
|
||||||
$text['label-follow-me']['sv-se'] = "Följ Mig ";
|
$text['label-follow-me']['sv-se'] = "Följ Mig ";
|
||||||
$text['label-follow-me']['uk'] = "";
|
$text['label-follow-me']['uk'] = "";
|
||||||
$text['label-follow-me']['de-at'] = "Anrufweiterschaltung";
|
$text['label-follow-me']['de-at'] = "Anrufweiterschaltung";
|
||||||
|
|
||||||
$text['label-dnd']['en-us'] = "Do Not Disturb";
|
$text['label-dnd']['en-us'] = "Do Not Disturb";
|
||||||
$text['label-dnd']['es-cl'] = "No Molestar";
|
$text['label-dnd']['es-cl'] = "No Molestar";
|
||||||
$text['label-dnd']['pt-pt'] = "Não Perturbar";
|
$text['label-dnd']['pt-pt'] = "Não Perturbar";
|
||||||
$text['label-dnd']['fr-fr'] = "Ne pas déranger";
|
$text['label-dnd']['fr-fr'] = "Ne pas déranger";
|
||||||
$text['label-dnd']['pt-br'] = "Não Pertube";
|
$text['label-dnd']['pt-br'] = "Não Pertube";
|
||||||
$text['label-dnd']['pl'] = "Nie przeszkadzaj (DND)";
|
$text['label-dnd']['pl'] = "Nie przeszkadzaj (DND)";
|
||||||
$text['label-dnd']['sv-se'] = "Stör Ej ";
|
$text['label-dnd']['sv-se'] = "Stör Ej ";
|
||||||
$text['label-dnd']['uk'] = "Не турбувати";
|
$text['label-dnd']['uk'] = "Не турбувати";
|
||||||
$text['label-dnd']['de-at'] = "Bitte nicht stören";
|
$text['label-dnd']['de-at'] = "Bitte nicht stören";
|
||||||
|
|
||||||
$text['label-destinations']['en-us'] = "Destinations";
|
$text['label-destinations']['en-us'] = "Destinations";
|
||||||
$text['label-destinations']['es-cl'] = "Destinos";
|
$text['label-destinations']['es-cl'] = "Destinos";
|
||||||
$text['label-destinations']['fr-fr'] = "Destinations";
|
$text['label-destinations']['fr-fr'] = "Destinations";
|
||||||
$text['label-destinations']['pt-pt'] = "Destinos";
|
$text['label-destinations']['pt-pt'] = "Destinos";
|
||||||
$text['label-destinations']['pt-br'] = "Destinos";
|
$text['label-destinations']['pt-br'] = "Destinos";
|
||||||
$text['label-destinations']['pl'] = "Destynacje";
|
$text['label-destinations']['pl'] = "Destynacje";
|
||||||
$text['label-destinations']['sv-se'] = "Destinationer ";
|
$text['label-destinations']['sv-se'] = "Destinationer ";
|
||||||
$text['label-destinations']['uk'] = "Номери";
|
$text['label-destinations']['uk'] = "Номери";
|
||||||
$text['label-destinations']['de-at'] = "Ziele";
|
$text['label-destinations']['de-at'] = "Ziele";
|
||||||
|
|
||||||
$text['label-destination_timeout']['en-us'] = "Timeout";
|
$text['label-destination_timeout']['en-us'] = "Timeout";
|
||||||
$text['label-destination_timeout']['es-cl'] = "Timeout";
|
$text['label-destination_timeout']['es-cl'] = "Timeout";
|
||||||
$text['label-destination_timeout']['fr-fr'] = "Timeout";
|
$text['label-destination_timeout']['fr-fr'] = "Timeout";
|
||||||
$text['label-destination_timeout']['pt-pt'] = "Timeout";
|
$text['label-destination_timeout']['pt-pt'] = "Timeout";
|
||||||
$text['label-destination_timeout']['pt-br'] = "Tempo de saída";
|
$text['label-destination_timeout']['pt-br'] = "Tempo de saída";
|
||||||
$text['label-destination_timeout']['pl'] = "Limit czasowy";
|
$text['label-destination_timeout']['pl'] = "Limit czasowy";
|
||||||
$text['label-destination_timeout']['sv-se'] = "Tidsgräns ";
|
$text['label-destination_timeout']['sv-se'] = "Tidsgräns ";
|
||||||
$text['label-destination_timeout']['uk'] = "Таймаут";
|
$text['label-destination_timeout']['uk'] = "Таймаут";
|
||||||
$text['label-destination_timeout']['de-at'] = "Abwurfzeit";
|
$text['label-destination_timeout']['de-at'] = "Abwurfzeit";
|
||||||
|
|
||||||
$text['label-destination_prompt_confirm']['en-us'] = "Confirm";
|
$text['label-destination_prompt_confirm']['en-us'] = "Confirm";
|
||||||
$text['label-destination_prompt_confirm']['es-cl'] = "Confirmar";
|
$text['label-destination_prompt_confirm']['es-cl'] = "Confirmar";
|
||||||
$text['label-destination_prompt_confirm']['fr-fr'] = "Confirmer";
|
$text['label-destination_prompt_confirm']['fr-fr'] = "Confirmer";
|
||||||
$text['label-destination_prompt_confirm']['pt-pt'] = "Confirmar";
|
$text['label-destination_prompt_confirm']['pt-pt'] = "Confirmar";
|
||||||
$text['label-destination_prompt_confirm']['pt-br'] = "Confirmar";
|
$text['label-destination_prompt_confirm']['pt-br'] = "Confirmar";
|
||||||
$text['label-destination_prompt_confirm']['pl'] = "Potwierdź";
|
$text['label-destination_prompt_confirm']['pl'] = "Potwierdź";
|
||||||
$text['label-destination_prompt_confirm']['sv-se'] = "Bekräfta ";
|
$text['label-destination_prompt_confirm']['sv-se'] = "Bekräfta ";
|
||||||
$text['label-destination_prompt_confirm']['uk'] = "Підтвердити";
|
$text['label-destination_prompt_confirm']['uk'] = "Підтвердити";
|
||||||
$text['label-destination_prompt_confirm']['de-at'] = "Bestätigen";
|
$text['label-destination_prompt_confirm']['de-at'] = "Bestätigen";
|
||||||
|
|
||||||
$text['label-destination_prompt_announce']['en-us'] = "Announce";
|
$text['label-destination_prompt_announce']['en-us'] = "Announce";
|
||||||
$text['label-destination_prompt_announce']['es-cl'] = "Anunciar";
|
$text['label-destination_prompt_announce']['es-cl'] = "Anunciar";
|
||||||
$text['label-destination_prompt_announce']['fr-fr'] = "Annonce";
|
$text['label-destination_prompt_announce']['fr-fr'] = "Annonce";
|
||||||
$text['label-destination_prompt_announce']['pt-pt'] = "Anunciar";
|
$text['label-destination_prompt_announce']['pt-pt'] = "Anunciar";
|
||||||
$text['label-destination_prompt_announce']['pt-br'] = "Anunciar";
|
$text['label-destination_prompt_announce']['pt-br'] = "Anunciar";
|
||||||
$text['label-destination_prompt_announce']['pl'] = "Rozgłoś/powiadom";
|
$text['label-destination_prompt_announce']['pl'] = "Rozgłoś/powiadom";
|
||||||
$text['label-destination_prompt_announce']['sv-se'] = "Meddela ";
|
$text['label-destination_prompt_announce']['sv-se'] = "Meddela ";
|
||||||
$text['label-destination_prompt_announce']['uk'] = "";
|
$text['label-destination_prompt_announce']['uk'] = "";
|
||||||
$text['label-destination_prompt_announce']['de-at'] = "Ankündigen";
|
$text['label-destination_prompt_announce']['de-at'] = "Ankündigen";
|
||||||
|
|
||||||
$text['label-destination_prompt']['en-us'] = "Prompt";
|
$text['label-destination_prompt']['en-us'] = "Prompt";
|
||||||
$text['label-destination_prompt']['es-cl'] = "Prompt";
|
$text['label-destination_prompt']['es-cl'] = "Prompt";
|
||||||
$text['label-destination_prompt']['fr-fr'] = "Prompt";
|
$text['label-destination_prompt']['fr-fr'] = "Prompt";
|
||||||
$text['label-destination_prompt']['pt-pt'] = "Prompt";
|
$text['label-destination_prompt']['pt-pt'] = "Prompt";
|
||||||
$text['label-destination_prompt']['pt-br'] = "Prompt";
|
$text['label-destination_prompt']['pt-br'] = "Prompt";
|
||||||
$text['label-destination_prompt']['pl'] = "Potwierdź aby odebrac rozmowę";
|
$text['label-destination_prompt']['pl'] = "Potwierdź aby odebrac rozmowę";
|
||||||
$text['label-destination_prompt']['sv-se'] = "Verifiering ";
|
$text['label-destination_prompt']['sv-se'] = "Verifiering ";
|
||||||
$text['label-destination_prompt']['uk'] = "";
|
$text['label-destination_prompt']['uk'] = "";
|
||||||
$text['label-destination_prompt']['de-at'] = "Nachfragen";
|
$text['label-destination_prompt']['de-at'] = "Nachfragen";
|
||||||
|
|
||||||
$text['label-destination_number']['en-us'] = "Destination";
|
$text['label-destination_number']['en-us'] = "Destination";
|
||||||
$text['label-destination_number']['es-cl'] = "Destino";
|
$text['label-destination_number']['es-cl'] = "Destino";
|
||||||
$text['label-destination_number']['fr-fr'] = "Destination";
|
$text['label-destination_number']['fr-fr'] = "Destination";
|
||||||
$text['label-destination_number']['pt-pt'] = "Destino";
|
$text['label-destination_number']['pt-pt'] = "Destino";
|
||||||
$text['label-destination_number']['pt-br'] = "Desvio";
|
$text['label-destination_number']['pt-br'] = "Desvio";
|
||||||
$text['label-destination_number']['pl'] = "Destynacja";
|
$text['label-destination_number']['pl'] = "Destynacja";
|
||||||
$text['label-destination_number']['sv-se'] = "Destination Nummer ";
|
$text['label-destination_number']['sv-se'] = "Destination Nummer ";
|
||||||
$text['label-destination_number']['uk'] = "Номер";
|
$text['label-destination_number']['uk'] = "Номер";
|
||||||
$text['label-destination_number']['de-at'] = "Ziel";
|
$text['label-destination_number']['de-at'] = "Ziel";
|
||||||
|
|
||||||
$text['label-destination_delay']['en-us'] = "Delay";
|
$text['label-destination_delay']['en-us'] = "Delay";
|
||||||
$text['label-destination_delay']['es-cl'] = "Retraso";
|
$text['label-destination_delay']['es-cl'] = "Retraso";
|
||||||
$text['label-destination_delay']['fr-fr'] = "Délais";
|
$text['label-destination_delay']['fr-fr'] = "Délais";
|
||||||
$text['label-destination_delay']['pt-pt'] = "Atraso";
|
$text['label-destination_delay']['pt-pt'] = "Atraso";
|
||||||
$text['label-destination_delay']['pt-br'] = "Delay";
|
$text['label-destination_delay']['pt-br'] = "Delay";
|
||||||
$text['label-destination_delay']['pl'] = "Opóźnienie";
|
$text['label-destination_delay']['pl'] = "Opóźnienie";
|
||||||
$text['label-destination_delay']['sv-se'] = "Fördröjning ";
|
$text['label-destination_delay']['sv-se'] = "Fördröjning ";
|
||||||
$text['label-destination_delay']['uk'] = "Затримка";
|
$text['label-destination_delay']['uk'] = "Затримка";
|
||||||
$text['label-destination_delay']['de-at'] = "Verzögerung";
|
$text['label-destination_delay']['de-at'] = "Verzögerung";
|
||||||
|
|
||||||
$text['label-destination']['en-us'] = "Destination";
|
$text['label-destination']['en-us'] = "Destination";
|
||||||
$text['label-destination']['es-cl'] = "Destino";
|
$text['label-destination']['es-cl'] = "Destino";
|
||||||
$text['label-destination']['fr-fr'] = "Destination";
|
$text['label-destination']['fr-fr'] = "Destination";
|
||||||
$text['label-destination']['pt-pt'] = "Destino";
|
$text['label-destination']['pt-pt'] = "Destino";
|
||||||
$text['label-destination']['pt-br'] = "Número de destino";
|
$text['label-destination']['pt-br'] = "Número de destino";
|
||||||
$text['label-destination']['pl'] = "Destynacja";
|
$text['label-destination']['pl'] = "Destynacja";
|
||||||
$text['label-destination']['sv-se'] = "Destination ";
|
$text['label-destination']['sv-se'] = "Destination ";
|
||||||
$text['label-destination']['uk'] = "Номер";
|
$text['label-destination']['uk'] = "Номер";
|
||||||
$text['label-destination']['de-at'] = "Ziel";
|
$text['label-destination']['de-at'] = "Ziel";
|
||||||
|
|
||||||
$text['label-cid-number-prefix']['en-us'] = "Caller ID Number";
|
$text['label-cid-number-prefix']['en-us'] = "Caller ID Number";
|
||||||
$text['label-cid-number-prefix']['es-cl'] = "Número de Caller ID";
|
$text['label-cid-number-prefix']['es-cl'] = "Número de Caller ID";
|
||||||
$text['label-cid-number-prefix']['pt-pt'] = "Número do Chamador";
|
$text['label-cid-number-prefix']['pt-pt'] = "Número do Chamador";
|
||||||
$text['label-cid-number-prefix']['pt-br'] = "Número do discador";
|
$text['label-cid-number-prefix']['pt-br'] = "Número do discador";
|
||||||
$text['label-cid-number-prefix']['pl'] = "Prefiks prezentacji numeru dzwoniącego";
|
$text['label-cid-number-prefix']['pl'] = "Prefiks prezentacji numeru dzwoniącego";
|
||||||
$text['label-cid-number-prefix']['sv-se'] = "Nummerpresentation ";
|
$text['label-cid-number-prefix']['sv-se'] = "Nummerpresentation ";
|
||||||
$text['label-cid-number-prefix']['uk'] = "Caller ID Номер";
|
$text['label-cid-number-prefix']['uk'] = "Caller ID Номер";
|
||||||
$text['label-cid-number-prefix']['fr-fr'] = "CID Nombre Préfixe";
|
$text['label-cid-number-prefix']['fr-fr'] = "CID Nombre Préfixe";
|
||||||
$text['label-cid-number-prefix']['de-at'] = "Anruferkennung (Nummer)";
|
$text['label-cid-number-prefix']['de-at'] = "Anruferkennung (Nummer)";
|
||||||
|
|
||||||
$text['label-cid-name-prefix']['en-us'] = "Caller ID Name";
|
$text['label-cid-name-prefix']['en-us'] = "Caller ID Name";
|
||||||
$text['label-cid-name-prefix']['es-cl'] = "Nombre de Caller ID";
|
$text['label-cid-name-prefix']['es-cl'] = "Nombre de Caller ID";
|
||||||
$text['label-cid-name-prefix']['pt-pt'] = "Nome do Chamador";
|
$text['label-cid-name-prefix']['pt-pt'] = "Nome do Chamador";
|
||||||
$text['label-cid-name-prefix']['fr-fr'] = "Préfixe de l'appelant";
|
$text['label-cid-name-prefix']['fr-fr'] = "Préfixe de l'appelant";
|
||||||
$text['label-cid-name-prefix']['pt-br'] = "Nome do discador";
|
$text['label-cid-name-prefix']['pt-br'] = "Nome do discador";
|
||||||
$text['label-cid-name-prefix']['pl'] = "Prefiks prezentacji nazwy dzwoniącego";
|
$text['label-cid-name-prefix']['pl'] = "Prefiks prezentacji nazwy dzwoniącego";
|
||||||
$text['label-cid-name-prefix']['sv-se'] = "Namnpresentation ";
|
$text['label-cid-name-prefix']['sv-se'] = "Namnpresentation ";
|
||||||
$text['label-cid-name-prefix']['uk'] = "Caller ID Ім’я";
|
$text['label-cid-name-prefix']['uk'] = "Caller ID Ім’я";
|
||||||
$text['label-cid-name-prefix']['de-at'] = "Anruferkennung (Name)";
|
$text['label-cid-name-prefix']['de-at'] = "Anruferkennung (Name)";
|
||||||
|
|
||||||
$text['label-call-prompt']['en-us'] = "Call Prompt";
|
$text['label-call-prompt']['en-us'] = "Call Prompt";
|
||||||
$text['label-call-prompt']['es-cl'] = "Aviso de Llamadas";
|
$text['label-call-prompt']['es-cl'] = "Aviso de Llamadas";
|
||||||
$text['label-call-prompt']['pt-pt'] = "Espoletar Chamada";
|
$text['label-call-prompt']['pt-pt'] = "Espoletar Chamada";
|
||||||
$text['label-call-prompt']['fr-fr'] = "Annonce d'appel";
|
$text['label-call-prompt']['fr-fr'] = "Annonce d'appel";
|
||||||
$text['label-call-prompt']['pt-br'] = "Prompt chamada";
|
$text['label-call-prompt']['pt-br'] = "Prompt chamada";
|
||||||
$text['label-call-prompt']['pl'] = "Potwierdź przed odebraniem rozmowy";
|
$text['label-call-prompt']['pl'] = "Potwierdź przed odebraniem rozmowy";
|
||||||
$text['label-call-prompt']['sv-se'] = "Samtals Verifiering ";
|
$text['label-call-prompt']['sv-se'] = "Samtals Verifiering ";
|
||||||
$text['label-call-prompt']['uk'] = "";
|
$text['label-call-prompt']['uk'] = "";
|
||||||
$text['label-call-prompt']['de-at'] = "Nachfragen";
|
$text['label-call-prompt']['de-at'] = "Nachfragen";
|
||||||
|
|
||||||
$text['label-call-forward']['en-us'] = "Call Forward";
|
$text['label-call-forward']['en-us'] = "Call Forward";
|
||||||
$text['label-call-forward']['es-cl'] = "Reenvio de Llamadas";
|
$text['label-call-forward']['es-cl'] = "Reenvio de Llamadas";
|
||||||
$text['label-call-forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
$text['label-call-forward']['pt-pt'] = "Encaminhamento de Chamadas";
|
||||||
$text['label-call-forward']['fr-fr'] = "Renvoi d'appel";
|
$text['label-call-forward']['fr-fr'] = "Renvoi d'appel";
|
||||||
$text['label-call-forward']['pt-br'] = "Encaminhamento de chamadas";
|
$text['label-call-forward']['pt-br'] = "Encaminhamento de chamadas";
|
||||||
$text['label-call-forward']['pl'] = "Przekierowanie";
|
$text['label-call-forward']['pl'] = "Przekierowanie";
|
||||||
$text['label-call-forward']['sv-se'] = "Vidarekoppling ";
|
$text['label-call-forward']['sv-se'] = "Vidarekoppling ";
|
||||||
$text['label-call-forward']['uk'] = "Переадресація";
|
$text['label-call-forward']['uk'] = "Переадресація";
|
||||||
$text['label-call-forward']['de-at'] = "Rufumleitung";
|
$text['label-call-forward']['de-at'] = "Rufumleitung";
|
||||||
|
|
||||||
$text['header-call_routing']['en-us'] = "Call Routing";
|
$text['header-call_routing']['en-us'] = "Call Routing";
|
||||||
$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas";
|
$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas";
|
||||||
$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas";
|
$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas";
|
||||||
$text['header-call_routing']['fr-fr'] = "Routage des Appels";
|
$text['header-call_routing']['fr-fr'] = "Routage des Appels";
|
||||||
$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas";
|
$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas";
|
||||||
$text['header-call_routing']['pl'] = "Trasy połączeń";
|
$text['header-call_routing']['pl'] = "Trasy połączeń";
|
||||||
$text['header-call_routing']['he'] = "ניתוב שיחות";
|
$text['header-call_routing']['he'] = "ניתוב שיחות";
|
||||||
$text['header-call_routing']['uk'] = "маршрутизація викликів";
|
$text['header-call_routing']['uk'] = "маршрутизація викликів";
|
||||||
$text['header-call_routing']['sv-se'] = "samtals Rutter";
|
$text['header-call_routing']['sv-se'] = "samtals Rutter";
|
||||||
$text['header-call_routing']['de-at'] = "Anrufrouten";
|
$text['header-call_routing']['de-at'] = "Anrufrouten";
|
||||||
$text['header-call_routing']['ro'] = "Маршрутизация вызовов";
|
$text['header-call_routing']['ro'] = "Маршрутизация вызовов";
|
||||||
$text['header-call_routing']['fa'] = "";
|
$text['header-call_routing']['fa'] = "";
|
||||||
$text['header-call_routing']['ar-eg'] = "توجيه الدعوة";
|
$text['header-call_routing']['ar-eg'] = "توجيه الدعوة";
|
||||||
|
|
||||||
$text['description-on-busy']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
|
$text['description-on-busy']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
|
||||||
$text['description-on-busy']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
|
$text['description-on-busy']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
|
||||||
$text['description-on-busy']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
|
$text['description-on-busy']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
|
||||||
$text['description-on-busy']['fr-fr'] = "Remplace la messagerie vocale si activé.";
|
$text['description-on-busy']['fr-fr'] = "Remplace la messagerie vocale si activé.";
|
||||||
$text['description-on-busy']['it-it'] = "Se abilitato, esegue l'override del valore di abilitazione voicemail nell'estensione.";
|
$text['description-on-busy']['it-it'] = "Se abilitato, esegue l'override del valore di abilitazione voicemail nell'estensione.";
|
||||||
$text['description-on-busy']['pt-br'] = "Se ativado, substitui o valor do correio de voz permitindo uma extensão quando estiver ocupado";
|
$text['description-on-busy']['pt-br'] = "Se ativado, substitui o valor do correio de voz permitindo uma extensão quando estiver ocupado";
|
||||||
$text['description-on-busy']['pl'] = "Jeżeli włączone, ustawienie włączenia poczty głosowej zostaje nadpisane.";
|
$text['description-on-busy']['pl'] = "Jeżeli włączone, ustawienie włączenia poczty głosowej zostaje nadpisane.";
|
||||||
$text['description-on-busy']['sv-se'] = "Om aktiverad, så tar den överhand framför röstbrevlåda hos anknytningen. ";
|
$text['description-on-busy']['sv-se'] = "Om aktiverad, så tar den överhand framför röstbrevlåda hos anknytningen. ";
|
||||||
$text['description-on-busy']['uk'] = "";
|
$text['description-on-busy']['uk'] = "";
|
||||||
$text['description-on-busy']['de-at'] = "Falls aktiv, wird der Wert 'Mailbox eingeschaltet' in der Nebenstelle überschrieben";
|
$text['description-on-busy']['de-at'] = "Falls aktiv, wird der Wert 'Mailbox eingeschaltet' in der Nebenstelle überschrieben";
|
||||||
|
|
||||||
$text['description-no_answer']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
|
$text['description-no_answer']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
|
||||||
$text['description-no_answer']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
|
$text['description-no_answer']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
|
||||||
$text['description-no_answer']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
|
$text['description-no_answer']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
|
||||||
$text['description-no_answer']['fr-fr'] = "Remplace la messagerie vocale si activé.";
|
$text['description-no_answer']['fr-fr'] = "Remplace la messagerie vocale si activé.";
|
||||||
$text['description-no_answer']['it-it'] = "Se abilitato, esegue l'override del valore di abilitazione voicemail nell'estensione.";
|
$text['description-no_answer']['it-it'] = "Se abilitato, esegue l'override del valore di abilitazione voicemail nell'estensione.";
|
||||||
$text['description-no_answer']['pt-br'] = "Se ativado, substitui o valor do correio de voz permitindo uma extensão quando estiver chamando";
|
$text['description-no_answer']['pt-br'] = "Se ativado, substitui o valor do correio de voz permitindo uma extensão quando estiver chamando";
|
||||||
$text['description-no_answer']['pl'] = "Jeżeli włączone, ustawienie włączenia poczty głosowej zostaje nadpisane.";
|
$text['description-no_answer']['pl'] = "Jeżeli włączone, ustawienie włączenia poczty głosowej zostaje nadpisane.";
|
||||||
$text['description-no_answer']['sv-se'] = "Om aktiverad, så tar den överhand framför röstbrevlåda hos anknytningen. ";
|
$text['description-no_answer']['sv-se'] = "Om aktiverad, så tar den överhand framför röstbrevlåda hos anknytningen. ";
|
||||||
$text['description-no_answer']['uk'] = "";
|
$text['description-no_answer']['uk'] = "";
|
||||||
$text['description-no_answer']['de-at'] = "Falls aktiv, wird der Wert 'Mailbox eingeschaltet' in der Nebenstelle überschrieben";
|
$text['description-no_answer']['de-at'] = "Falls aktiv, wird der Wert 'Mailbox eingeschaltet' in der Nebenstelle überschrieben";
|
||||||
|
|
||||||
$text['description-not_registered']['en-us'] = "If endpoint is not reachable, forward to this destination before going to voicemail.";
|
$text['description-not_registered']['en-us'] = "If endpoint is not reachable, forward to this destination before going to voicemail.";
|
||||||
$text['description-not_registered']['es-cl'] = "";
|
$text['description-not_registered']['es-cl'] = "";
|
||||||
$text['description-not_registered']['pt-pt'] = "";
|
$text['description-not_registered']['pt-pt'] = "";
|
||||||
$text['description-not_registered']['fr-fr'] = "";
|
$text['description-not_registered']['fr-fr'] = "";
|
||||||
$text['description-not_registered']['it-it'] = "";
|
$text['description-not_registered']['it-it'] = "";
|
||||||
$text['description-not_registered']['pt-br'] = "";
|
$text['description-not_registered']['pt-br'] = "";
|
||||||
$text['description-not_registered']['pl'] = "";
|
$text['description-not_registered']['pl'] = "";
|
||||||
$text['description-not_registered']['sv-se'] = "";
|
$text['description-not_registered']['sv-se'] = "";
|
||||||
$text['description-not_registered']['uk'] = "";
|
$text['description-not_registered']['uk'] = "";
|
||||||
$text['description-not_registered']['de-at'] = "";
|
$text['description-not_registered']['de-at'] = "";
|
||||||
|
|
||||||
$text['description-cid-number-prefix']['en-us'] = "Set the caller ID number prefix.";
|
$text['description-cid-number-prefix']['en-us'] = "Set the caller ID number prefix.";
|
||||||
$text['description-cid-number-prefix']['es-cl'] = "Configure el prefijo de número de caller ID.";
|
$text['description-cid-number-prefix']['es-cl'] = "Configure el prefijo de número de caller ID.";
|
||||||
$text['description-cid-number-prefix']['pt-pt'] = "Defina o número do Chamador";
|
$text['description-cid-number-prefix']['pt-pt'] = "Defina o número do Chamador";
|
||||||
$text['description-cid-number-prefix']['pt-br'] = "Defina o número do prefixo";
|
$text['description-cid-number-prefix']['pt-br'] = "Defina o número do prefixo";
|
||||||
$text['description-cid-number-prefix']['pl'] = "Prefiks prezentacji numeru dzwoniącego.";
|
$text['description-cid-number-prefix']['pl'] = "Prefiks prezentacji numeru dzwoniącego.";
|
||||||
$text['description-cid-number-prefix']['sv-se'] = "Ange nummerpresentation prefix. ";
|
$text['description-cid-number-prefix']['sv-se'] = "Ange nummerpresentation prefix. ";
|
||||||
$text['description-cid-number-prefix']['uk'] = "";
|
$text['description-cid-number-prefix']['uk'] = "";
|
||||||
$text['description-cid-number-prefix']['fr-fr'] = "Définir un préfixe sur le nombre d'ID d'appelant.";
|
$text['description-cid-number-prefix']['fr-fr'] = "Définir un préfixe sur le nombre d'ID d'appelant.";
|
||||||
$text['description-cid-number-prefix']['de-at'] = "Setzen Sie ein Präfix für die Anruferkennung (Nummer)";
|
$text['description-cid-number-prefix']['de-at'] = "Setzen Sie ein Präfix für die Anruferkennung (Nummer)";
|
||||||
|
|
||||||
$text['description-cid-name-prefix']['en-us'] = "Set the caller ID name prefix.";
|
$text['description-cid-name-prefix']['en-us'] = "Set the caller ID name prefix.";
|
||||||
$text['description-cid-name-prefix']['es-cl'] = "Configure el prefijo de nombre de caller ID";
|
$text['description-cid-name-prefix']['es-cl'] = "Configure el prefijo de nombre de caller ID";
|
||||||
$text['description-cid-name-prefix']['pt-pt'] = "Defina o nome do Chamador";
|
$text['description-cid-name-prefix']['pt-pt'] = "Defina o nome do Chamador";
|
||||||
$text['description-cid-name-prefix']['fr-fr'] = "Choisr le péfixe du nom d'appelant.";
|
$text['description-cid-name-prefix']['fr-fr'] = "Choisr le péfixe du nom d'appelant.";
|
||||||
$text['description-cid-name-prefix']['pt-br'] = "Defina o nome do discador";
|
$text['description-cid-name-prefix']['pt-br'] = "Defina o nome do discador";
|
||||||
$text['description-cid-name-prefix']['pl'] = "Prefiks prezentacji nazwy dzwoniącego.";
|
$text['description-cid-name-prefix']['pl'] = "Prefiks prezentacji nazwy dzwoniącego.";
|
||||||
$text['description-cid-name-prefix']['sv-se'] = "Ange namnpresentation prefix. ";
|
$text['description-cid-name-prefix']['sv-se'] = "Ange namnpresentation prefix. ";
|
||||||
$text['description-cid-name-prefix']['uk'] = "";
|
$text['description-cid-name-prefix']['uk'] = "";
|
||||||
$text['description-cid-name-prefix']['de-at'] = "Setzen Sie ein Präfix für die Anruferkennung (Name)";
|
$text['description-cid-name-prefix']['de-at'] = "Setzen Sie ein Präfix für die Anruferkennung (Name)";
|
||||||
|
|
||||||
$text['description-call-prompt']['en-us'] = "Prompt to accept the call for external destinations.";
|
$text['description-call-prompt']['en-us'] = "Prompt to accept the call for external destinations.";
|
||||||
$text['description-call-prompt']['es-cl'] = "Preguntar para aceptar un llamado para destinos externos";
|
$text['description-call-prompt']['es-cl'] = "Preguntar para aceptar un llamado para destinos externos";
|
||||||
$text['description-call-prompt']['pt-pt'] = "Aceitar chamada para destinos externos.";
|
$text['description-call-prompt']['pt-pt'] = "Aceitar chamada para destinos externos.";
|
||||||
$text['description-call-prompt']['fr-fr'] = "Annonce pour accepter l'appel venant de destinations externes.";
|
$text['description-call-prompt']['fr-fr'] = "Annonce pour accepter l'appel venant de destinations externes.";
|
||||||
$text['description-call-prompt']['pt-br'] = "Aceiter chamada para destinos externos";
|
$text['description-call-prompt']['pt-br'] = "Aceiter chamada para destinos externos";
|
||||||
$text['description-call-prompt']['pl'] = "Zapytaj czy akceptować rozmowę do zewnętrznych destynacji.";
|
$text['description-call-prompt']['pl'] = "Zapytaj czy akceptować rozmowę do zewnętrznych destynacji.";
|
||||||
$text['description-call-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal för externa destinationer. ";
|
$text['description-call-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal för externa destinationer. ";
|
||||||
$text['description-call-prompt']['uk'] = "";
|
$text['description-call-prompt']['uk'] = "";
|
||||||
$text['description-call-prompt']['de-at'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll.";
|
$text['description-call-prompt']['de-at'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll.";
|
||||||
|
|
||||||
$text['description-call_routing']['en-us'] = "Define alternate inbound call handling for the following extensions.";
|
$text['description-call_routing']['en-us'] = "Define alternate inbound call handling for the following extensions.";
|
||||||
$text['description-call_routing']['es-cl'] = "Definir alternativa para el manejo de las siguientes extensiones de llamadas entrantes.";
|
$text['description-call_routing']['es-cl'] = "Definir alternativa para el manejo de las siguientes extensiones de llamadas entrantes.";
|
||||||
$text['description-call_routing']['pt-pt'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
|
$text['description-call_routing']['pt-pt'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
|
||||||
$text['description-call_routing']['fr-fr'] = "Définir la manipulation pour les extensions suivantes alternent appel entrant.";
|
$text['description-call_routing']['fr-fr'] = "Définir la manipulation pour les extensions suivantes alternent appel entrant.";
|
||||||
$text['description-call_routing']['pt-br'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
|
$text['description-call_routing']['pt-br'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
|
||||||
$text['description-call_routing']['pl'] = "Definiowanie alternatywnego połączenia przychodzącego obsługi dla następujących rozszerzeń.";
|
$text['description-call_routing']['pl'] = "Definiowanie alternatywnego połączenia przychodzącego obsługi dla następujących rozszerzeń.";
|
||||||
$text['description-call_routing']['sv-se'] = "Definiera alternativa inkommande samtalshantering för följande tillägg.";
|
$text['description-call_routing']['sv-se'] = "Definiera alternativa inkommande samtalshantering för följande tillägg.";
|
||||||
$text['description-call_routing']['uk'] = "Визначити обробку для наступних розширень альтернативного вхідного дзвінка.";
|
$text['description-call_routing']['uk'] = "Визначити обробку для наступних розширень альтернативного вхідного дзвінка.";
|
||||||
$text['description-call_routing']['de-at'] = "Definieren Sie alternative eingehende Anruf für die folgenden Erweiterungen der Handhabung.";
|
$text['description-call_routing']['de-at'] = "Definieren Sie alternative eingehende Anruf für die folgenden Erweiterungen der Handhabung.";
|
||||||
|
|
||||||
$text['description']['en-us'] = "Directs incoming calls for extension:";
|
$text['description']['en-us'] = "Directs incoming calls for extension:";
|
||||||
$text['description']['es-cl'] = "Dirige las llamadas entrantes hacia una extensión:";
|
$text['description']['es-cl'] = "Dirige las llamadas entrantes hacia una extensión:";
|
||||||
$text['description']['pt-pt'] = "Direciona as chamadas recebidas para a extensão:";
|
$text['description']['pt-pt'] = "Direciona as chamadas recebidas para a extensão:";
|
||||||
$text['description']['fr-fr'] = "Rediriger les appels entrant pour l'extension:";
|
$text['description']['fr-fr'] = "Rediriger les appels entrant pour l'extension:";
|
||||||
$text['description']['pt-br'] = "Editar informações da conta.";
|
$text['description']['pt-br'] = "Editar informações da conta.";
|
||||||
$text['description']['pl'] = "Kieruj rozmowy przychodzące na numer wewnętrzny:";
|
$text['description']['pl'] = "Kieruj rozmowy przychodzące na numer wewnętrzny:";
|
||||||
$text['description']['sv-se'] = "Styr inkommande samtal för anknytning: ";
|
$text['description']['sv-se'] = "Styr inkommande samtal för anknytning: ";
|
||||||
$text['description']['uk'] = "Керування вхідними дзвінками для розширення";
|
$text['description']['uk'] = "Керування вхідними дзвінками для розширення";
|
||||||
$text['description']['de-at'] = "Leitet eingehende Gespräche für die Nebenstelle:";
|
$text['description']['de-at'] = "Leitet eingehende Gespräche für die Nebenstelle:";
|
||||||
|
|
||||||
$text['confirm-update']['en-us'] = "Update Complete";
|
$text['confirm-update']['en-us'] = "Update Complete";
|
||||||
$text['confirm-update']['es-cl'] = "Actualización Completa";
|
$text['confirm-update']['es-cl'] = "Actualización Completa";
|
||||||
$text['confirm-update']['pt-pt'] = "Actualização Efectuada";
|
$text['confirm-update']['pt-pt'] = "Actualização Efectuada";
|
||||||
$text['confirm-update']['fr-fr'] = "Mis à jour";
|
$text['confirm-update']['fr-fr'] = "Mis à jour";
|
||||||
$text['confirm-update']['pt-br'] = "Atualização Efetuada";
|
$text['confirm-update']['pt-br'] = "Atualização Efetuada";
|
||||||
$text['confirm-update']['pl'] = "Aktualizacja zakonczona";
|
$text['confirm-update']['pl'] = "Aktualizacja zakonczona";
|
||||||
$text['confirm-update']['sv-se'] = "Uppdatering Klar ";
|
$text['confirm-update']['sv-se'] = "Uppdatering Klar ";
|
||||||
$text['confirm-update']['uk'] = "Оновлено";
|
$text['confirm-update']['uk'] = "Оновлено";
|
||||||
$text['confirm-update']['de-at'] = "Aktualisierung durchgeführt";
|
$text['confirm-update']['de-at'] = "Aktualisierung durchgeführt";
|
||||||
|
|
||||||
$text['ckeck-true']['es-cl'] = "Verdadero";
|
$text['ckeck-true']['es-cl'] = "Verdadero";
|
||||||
$text['ckeck-true']['pt-pt'] = "Sim";
|
$text['ckeck-true']['pt-pt'] = "Sim";
|
||||||
$text['ckeck-true']['fr-fr'] = "Oui";
|
$text['ckeck-true']['fr-fr'] = "Oui";
|
||||||
$text['ckeck-true']['pt-br'] = "Sim";
|
$text['ckeck-true']['pt-br'] = "Sim";
|
||||||
$text['ckeck-true']['pl'] = "";
|
$text['ckeck-true']['pl'] = "";
|
||||||
$text['ckeck-true']['sv-se'] = "";
|
$text['ckeck-true']['sv-se'] = "";
|
||||||
$text['ckeck-true']['uk'] = "";
|
$text['ckeck-true']['uk'] = "";
|
||||||
$text['ckeck-true']['de-at'] = "";
|
$text['ckeck-true']['de-at'] = "";
|
||||||
|
|
||||||
$text['ckeck-simultaneous']['es-cl'] = "simultaneo";
|
$text['ckeck-simultaneous']['es-cl'] = "simultaneo";
|
||||||
$text['ckeck-simultaneous']['pt-pt'] = "simultâneo";
|
$text['ckeck-simultaneous']['pt-pt'] = "simultâneo";
|
||||||
$text['ckeck-simultaneous']['pt-br'] = "Simultâneo";
|
$text['ckeck-simultaneous']['pt-br'] = "Simultâneo";
|
||||||
$text['ckeck-simultaneous']['pl'] = "";
|
$text['ckeck-simultaneous']['pl'] = "";
|
||||||
$text['ckeck-simultaneous']['sv-se'] = "";
|
$text['ckeck-simultaneous']['sv-se'] = "";
|
||||||
$text['ckeck-simultaneous']['uk'] = "";
|
$text['ckeck-simultaneous']['uk'] = "";
|
||||||
$text['ckeck-simultaneous']['fr-fr'] = "";
|
$text['ckeck-simultaneous']['fr-fr'] = "";
|
||||||
$text['ckeck-simultaneous']['de-at'] = "";
|
$text['ckeck-simultaneous']['de-at'] = "";
|
||||||
|
|
||||||
$text['ckeck-sequence']['es-cl'] = "secuencia";
|
$text['ckeck-sequence']['es-cl'] = "secuencia";
|
||||||
$text['ckeck-sequence']['pt-pt'] = "sequência";
|
$text['ckeck-sequence']['pt-pt'] = "sequência";
|
||||||
$text['ckeck-sequence']['pt-br'] = "Sequência";
|
$text['ckeck-sequence']['pt-br'] = "Sequência";
|
||||||
$text['ckeck-sequence']['pl'] = "";
|
$text['ckeck-sequence']['pl'] = "";
|
||||||
$text['ckeck-sequence']['sv-se'] = "";
|
$text['ckeck-sequence']['sv-se'] = "";
|
||||||
$text['ckeck-sequence']['uk'] = "";
|
$text['ckeck-sequence']['uk'] = "";
|
||||||
$text['ckeck-sequence']['fr-fr'] = "";
|
$text['ckeck-sequence']['fr-fr'] = "";
|
||||||
$text['ckeck-sequence']['de-at'] = "";
|
$text['ckeck-sequence']['de-at'] = "";
|
||||||
|
|
||||||
$text['ckeck-false']['es-cl'] = "Falso";
|
$text['ckeck-false']['es-cl'] = "Falso";
|
||||||
$text['ckeck-false']['pt-pt'] = "Não";
|
$text['ckeck-false']['pt-pt'] = "Não";
|
||||||
$text['ckeck-false']['fr-fr'] = "Non";
|
$text['ckeck-false']['fr-fr'] = "Non";
|
||||||
$text['ckeck-false']['pt-br'] = "Não";
|
$text['ckeck-false']['pt-br'] = "Não";
|
||||||
$text['ckeck-false']['pl'] = "";
|
$text['ckeck-false']['pl'] = "";
|
||||||
$text['ckeck-false']['sv-se'] = "";
|
$text['ckeck-false']['sv-se'] = "";
|
||||||
$text['ckeck-false']['uk'] = "";
|
$text['ckeck-false']['uk'] = "";
|
||||||
$text['ckeck-false']['de-at'] = "";
|
$text['ckeck-false']['de-at'] = "";
|
||||||
|
|
||||||
$text['check-true']['en-us'] = "True";
|
$text['check-true']['en-us'] = "True";
|
||||||
$text['check-true']['pt-br'] = "";
|
$text['check-true']['pt-br'] = "";
|
||||||
$text['check-true']['pl'] = "Tak";
|
$text['check-true']['pl'] = "Tak";
|
||||||
$text['check-true']['sv-se'] = "Sann ";
|
$text['check-true']['sv-se'] = "Sann ";
|
||||||
$text['check-true']['uk'] = "Так";
|
$text['check-true']['uk'] = "Так";
|
||||||
$text['check-true']['fr-fr'] = "";
|
$text['check-true']['fr-fr'] = "";
|
||||||
$text['check-true']['de-at'] = "An";
|
$text['check-true']['de-at'] = "An";
|
||||||
|
|
||||||
$text['check-simultaneous']['en-us'] = "simultaneous";
|
$text['check-simultaneous']['en-us'] = "simultaneous";
|
||||||
$text['check-simultaneous']['fr-fr'] = "simultanément";
|
$text['check-simultaneous']['fr-fr'] = "simultanément";
|
||||||
$text['check-simultaneous']['pt-br'] = "";
|
$text['check-simultaneous']['pt-br'] = "";
|
||||||
$text['check-simultaneous']['pl'] = "jednoczesne";
|
$text['check-simultaneous']['pl'] = "jednoczesne";
|
||||||
$text['check-simultaneous']['sv-se'] = "Samtidiga ";
|
$text['check-simultaneous']['sv-se'] = "Samtidiga ";
|
||||||
$text['check-simultaneous']['uk'] = "одночасно";
|
$text['check-simultaneous']['uk'] = "одночасно";
|
||||||
$text['check-simultaneous']['de-at'] = "gleichzeitig";
|
$text['check-simultaneous']['de-at'] = "gleichzeitig";
|
||||||
|
|
||||||
$text['check-sequence']['en-us'] = "sequence";
|
$text['check-sequence']['en-us'] = "sequence";
|
||||||
$text['check-sequence']['fr-fr'] = "séquence";
|
$text['check-sequence']['fr-fr'] = "séquence";
|
||||||
$text['check-sequence']['pt-br'] = "";
|
$text['check-sequence']['pt-br'] = "";
|
||||||
$text['check-sequence']['pl'] = "kolejność";
|
$text['check-sequence']['pl'] = "kolejność";
|
||||||
$text['check-sequence']['sv-se'] = "sekvens ";
|
$text['check-sequence']['sv-se'] = "sekvens ";
|
||||||
$text['check-sequence']['uk'] = "послідовно";
|
$text['check-sequence']['uk'] = "послідовно";
|
||||||
$text['check-sequence']['de-at'] = "sequenziell";
|
$text['check-sequence']['de-at'] = "sequenziell";
|
||||||
|
|
||||||
$text['check-false']['en-us'] = "False";
|
$text['check-false']['en-us'] = "False";
|
||||||
$text['check-false']['pt-br'] = "";
|
$text['check-false']['pt-br'] = "";
|
||||||
$text['check-false']['pl'] = "Nie";
|
$text['check-false']['pl'] = "Nie";
|
||||||
$text['check-false']['sv-se'] = "Falsk ";
|
$text['check-false']['sv-se'] = "Falsk ";
|
||||||
$text['check-false']['uk'] = "Ні";
|
$text['check-false']['uk'] = "Ні";
|
||||||
$text['check-false']['fr-fr'] = "";
|
$text['check-false']['fr-fr'] = "";
|
||||||
$text['check-false']['de-at'] = "Aus";
|
$text['check-false']['de-at'] = "Aus";
|
||||||
|
|
||||||
$text['button-view_all']['en-us'] = "View All";
|
$text['button-view_all']['en-us'] = "View All";
|
||||||
$text['button-view_all']['es-cl'] = "Mostrar Todos";
|
$text['button-view_all']['es-cl'] = "Mostrar Todos";
|
||||||
$text['button-view_all']['pt-pt'] = "Mostrar Todos";
|
$text['button-view_all']['pt-pt'] = "Mostrar Todos";
|
||||||
$text['button-view_all']['fr-fr'] = "Tout Montrer";
|
$text['button-view_all']['fr-fr'] = "Tout Montrer";
|
||||||
$text['button-view_all']['pl'] = "Pokaż wszystkie";
|
$text['button-view_all']['pl'] = "Pokaż wszystkie";
|
||||||
$text['button-view_all']['uk'] = "Показати всі";
|
$text['button-view_all']['uk'] = "Показати всі";
|
||||||
$text['button-view_all']['sv-se'] = "Visa Allt";
|
$text['button-view_all']['sv-se'] = "Visa Allt";
|
||||||
$text['button-view_all']['ro'] = "";
|
$text['button-view_all']['ro'] = "";
|
||||||
$text['button-view_all']['de-at'] = "Alle anzeigen";
|
$text['button-view_all']['de-at'] = "Alle anzeigen";
|
||||||
$text['button-view_all']['he'] = "הצג הכל";
|
$text['button-view_all']['he'] = "הצג הכל";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+20
-20
@@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][0]['title']['en-us'] = "Call Routing";
|
$apps[$x]['menu'][0]['title']['en-us'] = "Call Routing";
|
||||||
$apps[$x]['menu'][0]['title']['es-mx'] = "enrutamiento de llamadas";
|
$apps[$x]['menu'][0]['title']['es-mx'] = "enrutamiento de llamadas";
|
||||||
$apps[$x]['menu'][0]['title']['de-de'] = "Call Routing";
|
$apps[$x]['menu'][0]['title']['de-de'] = "Call Routing";
|
||||||
$apps[$x]['menu'][0]['title']['de-ch'] = "Call Routing";
|
$apps[$x]['menu'][0]['title']['de-ch'] = "Call Routing";
|
||||||
$apps[$x]['menu'][0]['title']['de-at'] = "Call Routing";
|
$apps[$x]['menu'][0]['title']['de-at'] = "Call Routing";
|
||||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "routage des appels";
|
$apps[$x]['menu'][0]['title']['fr-fr'] = "routage des appels";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ca'] = "routage des appels";
|
$apps[$x]['menu'][0]['title']['fr-ca'] = "routage des appels";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ch'] = "routage des appels";
|
$apps[$x]['menu'][0]['title']['fr-ch'] = "routage des appels";
|
||||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "roteamento de chamadas";
|
$apps[$x]['menu'][0]['title']['pt-pt'] = "roteamento de chamadas";
|
||||||
$apps[$x]['menu'][0]['title']['pt-br'] = "roteamento de chamadas";
|
$apps[$x]['menu'][0]['title']['pt-br'] = "roteamento de chamadas";
|
||||||
$apps[$x]['menu'][0]['uuid'] = "4e4df00b-aafb-45a8-82c1-cdabc921889c";
|
$apps[$x]['menu'][0]['uuid'] = "4e4df00b-aafb-45a8-82c1-cdabc921889c";
|
||||||
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||||
$apps[$x]['menu'][0]['category'] = "internal";
|
$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
$apps[$x]['menu'][0]['path'] = "/app/calls/calls.php";
|
$apps[$x]['menu'][0]['path'] = "/app/calls/calls.php";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "user";
|
$apps[$x]['menu'][0]['groups'][] = "user";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "admin";
|
$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,448 +1,448 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2010 - 2014
|
Copyright (C) 2010 - 2014
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||||
Salvatore Caruso <salvatore.caruso@nems.it>
|
Salvatore Caruso <salvatore.caruso@nems.it>
|
||||||
Riccardo Granchi <riccardo.granchi@nems.it>
|
Riccardo Granchi <riccardo.granchi@nems.it>
|
||||||
Errol Samuels <voiptology@gmail.com>
|
Errol Samuels <voiptology@gmail.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
|
|
||||||
//define the follow me class
|
//define the follow me class
|
||||||
class follow_me {
|
class follow_me {
|
||||||
public $domain_uuid;
|
public $domain_uuid;
|
||||||
public $db_type;
|
public $db_type;
|
||||||
public $follow_me_uuid;
|
public $follow_me_uuid;
|
||||||
public $cid_name_prefix;
|
public $cid_name_prefix;
|
||||||
public $cid_number_prefix;
|
public $cid_number_prefix;
|
||||||
public $accountcode;
|
public $accountcode;
|
||||||
public $follow_me_enabled;
|
public $follow_me_enabled;
|
||||||
public $follow_me_caller_id_uuid;
|
public $follow_me_caller_id_uuid;
|
||||||
public $follow_me_ignore_busy;
|
public $follow_me_ignore_busy;
|
||||||
public $outbound_caller_id_name;
|
public $outbound_caller_id_name;
|
||||||
public $outbound_caller_id_number;
|
public $outbound_caller_id_number;
|
||||||
private $extension;
|
private $extension;
|
||||||
private $toll_allow;
|
private $toll_allow;
|
||||||
|
|
||||||
public $destination_data_1;
|
public $destination_data_1;
|
||||||
public $destination_type_1;
|
public $destination_type_1;
|
||||||
public $destination_delay_1;
|
public $destination_delay_1;
|
||||||
public $destination_prompt_1;
|
public $destination_prompt_1;
|
||||||
public $destination_timeout_1;
|
public $destination_timeout_1;
|
||||||
|
|
||||||
public $destination_data_2;
|
public $destination_data_2;
|
||||||
public $destination_type_2;
|
public $destination_type_2;
|
||||||
public $destination_delay_2;
|
public $destination_delay_2;
|
||||||
public $destination_prompt_2;
|
public $destination_prompt_2;
|
||||||
public $destination_timeout_2;
|
public $destination_timeout_2;
|
||||||
|
|
||||||
public $destination_data_3;
|
public $destination_data_3;
|
||||||
public $destination_type_3;
|
public $destination_type_3;
|
||||||
public $destination_delay_3;
|
public $destination_delay_3;
|
||||||
public $destination_prompt_3;
|
public $destination_prompt_3;
|
||||||
public $destination_timeout_3;
|
public $destination_timeout_3;
|
||||||
|
|
||||||
public $destination_data_4;
|
public $destination_data_4;
|
||||||
public $destination_type_4;
|
public $destination_type_4;
|
||||||
public $destination_delay_4;
|
public $destination_delay_4;
|
||||||
public $destination_prompt_4;
|
public $destination_prompt_4;
|
||||||
public $destination_timeout_4;
|
public $destination_timeout_4;
|
||||||
|
|
||||||
public $destination_data_5;
|
public $destination_data_5;
|
||||||
public $destination_type_5;
|
public $destination_type_5;
|
||||||
public $destination_delay_5;
|
public $destination_delay_5;
|
||||||
public $destination_prompt_5;
|
public $destination_prompt_5;
|
||||||
public $destination_timeout_5;
|
public $destination_timeout_5;
|
||||||
|
|
||||||
public $destination_timeout = 0;
|
public $destination_timeout = 0;
|
||||||
public $destination_order = 1;
|
public $destination_order = 1;
|
||||||
|
|
||||||
public function add() {
|
public function add() {
|
||||||
//set the global variable
|
//set the global variable
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
//add a new follow me
|
//add a new follow me
|
||||||
$sql = "insert into v_follow_me ";
|
$sql = "insert into v_follow_me ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "follow_me_uuid, ";
|
$sql .= "follow_me_uuid, ";
|
||||||
$sql .= "cid_name_prefix, ";
|
$sql .= "cid_name_prefix, ";
|
||||||
if (strlen($this->cid_number_prefix) > 0) {
|
if (strlen($this->cid_number_prefix) > 0) {
|
||||||
$sql .= "cid_number_prefix, ";
|
$sql .= "cid_number_prefix, ";
|
||||||
}
|
}
|
||||||
$sql .= "follow_me_caller_id_uuid, ";
|
$sql .= "follow_me_caller_id_uuid, ";
|
||||||
$sql .= "follow_me_enabled, ";
|
$sql .= "follow_me_enabled, ";
|
||||||
$sql .= "follow_me_ignore_busy ";
|
$sql .= "follow_me_ignore_busy ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'$this->domain_uuid', ";
|
$sql .= "'$this->domain_uuid', ";
|
||||||
$sql .= "'$this->follow_me_uuid', ";
|
$sql .= "'$this->follow_me_uuid', ";
|
||||||
$sql .= "'$this->cid_name_prefix', ";
|
$sql .= "'$this->cid_name_prefix', ";
|
||||||
if (strlen($this->cid_number_prefix) > 0) {
|
if (strlen($this->cid_number_prefix) > 0) {
|
||||||
$sql .= "'$this->cid_number_prefix', ";
|
$sql .= "'$this->cid_number_prefix', ";
|
||||||
}
|
}
|
||||||
if (strlen($this->follow_me_caller_id_uuid) > 0) {
|
if (strlen($this->follow_me_caller_id_uuid) > 0) {
|
||||||
$sql .= "'$this->follow_me_caller_id_uuid', ";
|
$sql .= "'$this->follow_me_caller_id_uuid', ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql .= 'null, ';
|
$sql .= 'null, ';
|
||||||
}
|
}
|
||||||
$sql .= "'$this->follow_me_enabled', ";
|
$sql .= "'$this->follow_me_enabled', ";
|
||||||
$sql .= "'$this->follow_me_ignore_busy' ";
|
$sql .= "'$this->follow_me_ignore_busy' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
if ($v_debug) {
|
if ($v_debug) {
|
||||||
echo $sql."<br />";
|
echo $sql."<br />";
|
||||||
}
|
}
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
$this->follow_me_destinations();
|
$this->follow_me_destinations();
|
||||||
} //end function
|
} //end function
|
||||||
|
|
||||||
public function update() {
|
public function update() {
|
||||||
//set the global variable
|
//set the global variable
|
||||||
global $db;
|
global $db;
|
||||||
//update follow me table
|
//update follow me table
|
||||||
$sql = "update v_follow_me set ";
|
$sql = "update v_follow_me set ";
|
||||||
$sql .= "follow_me_enabled = '$this->follow_me_enabled', ";
|
$sql .= "follow_me_enabled = '$this->follow_me_enabled', ";
|
||||||
$sql .= "follow_me_ignore_busy = '$this->follow_me_ignore_busy', ";
|
$sql .= "follow_me_ignore_busy = '$this->follow_me_ignore_busy', ";
|
||||||
$sql .= "cid_name_prefix = '$this->cid_name_prefix', ";
|
$sql .= "cid_name_prefix = '$this->cid_name_prefix', ";
|
||||||
if (strlen($this->follow_me_caller_id_uuid) > 0) {
|
if (strlen($this->follow_me_caller_id_uuid) > 0) {
|
||||||
$sql .= "follow_me_caller_id_uuid = '$this->follow_me_caller_id_uuid', ";
|
$sql .= "follow_me_caller_id_uuid = '$this->follow_me_caller_id_uuid', ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql .= "follow_me_caller_id_uuid = null, ";
|
$sql .= "follow_me_caller_id_uuid = null, ";
|
||||||
}
|
}
|
||||||
$sql .= "cid_number_prefix = '$this->cid_number_prefix' ";
|
$sql .= "cid_number_prefix = '$this->cid_number_prefix' ";
|
||||||
$sql .= "where domain_uuid = '$this->domain_uuid' ";
|
$sql .= "where domain_uuid = '$this->domain_uuid' ";
|
||||||
$sql .= "and follow_me_uuid = '$this->follow_me_uuid' ";
|
$sql .= "and follow_me_uuid = '$this->follow_me_uuid' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
$this->follow_me_destinations();
|
$this->follow_me_destinations();
|
||||||
} //end function
|
} //end function
|
||||||
|
|
||||||
public function follow_me_destinations() {
|
public function follow_me_destinations() {
|
||||||
//set the global variable
|
//set the global variable
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
//prepare insert statement
|
//prepare insert statement
|
||||||
$stmt = $db->prepare(
|
$stmt = $db->prepare(
|
||||||
"insert into v_follow_me_destinations("
|
"insert into v_follow_me_destinations("
|
||||||
. "follow_me_destination_uuid,"
|
. "follow_me_destination_uuid,"
|
||||||
. "domain_uuid,"
|
. "domain_uuid,"
|
||||||
. "follow_me_uuid,"
|
. "follow_me_uuid,"
|
||||||
. "follow_me_destination,"
|
. "follow_me_destination,"
|
||||||
. "follow_me_timeout,"
|
. "follow_me_timeout,"
|
||||||
. "follow_me_delay,"
|
. "follow_me_delay,"
|
||||||
. "follow_me_prompt,"
|
. "follow_me_prompt,"
|
||||||
. "follow_me_order"
|
. "follow_me_order"
|
||||||
. ")values(?,?,?,?,?,?,?,?)"
|
. ")values(?,?,?,?,?,?,?,?)"
|
||||||
);
|
);
|
||||||
|
|
||||||
//delete related follow me destinations
|
//delete related follow me destinations
|
||||||
$sql = "delete from v_follow_me_destinations where follow_me_uuid = '$this->follow_me_uuid' ";
|
$sql = "delete from v_follow_me_destinations where follow_me_uuid = '$this->follow_me_uuid' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
|
|
||||||
//insert the follow me destinations
|
//insert the follow me destinations
|
||||||
if (strlen($this->destination_data_1) > 0) {
|
if (strlen($this->destination_data_1) > 0) {
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
uuid(),
|
uuid(),
|
||||||
$this->domain_uuid,
|
$this->domain_uuid,
|
||||||
$this->follow_me_uuid,
|
$this->follow_me_uuid,
|
||||||
$this->destination_data_1,
|
$this->destination_data_1,
|
||||||
$this->destination_timeout_1,
|
$this->destination_timeout_1,
|
||||||
$this->destination_delay_1,
|
$this->destination_delay_1,
|
||||||
$this->destination_prompt_1,
|
$this->destination_prompt_1,
|
||||||
'1'
|
'1'
|
||||||
));
|
));
|
||||||
$this->destination_order++;
|
$this->destination_order++;
|
||||||
}
|
}
|
||||||
if (strlen($this->destination_data_2) > 0) {
|
if (strlen($this->destination_data_2) > 0) {
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
uuid(),
|
uuid(),
|
||||||
$this->domain_uuid,
|
$this->domain_uuid,
|
||||||
$this->follow_me_uuid,
|
$this->follow_me_uuid,
|
||||||
$this->destination_data_2,
|
$this->destination_data_2,
|
||||||
$this->destination_timeout_2,
|
$this->destination_timeout_2,
|
||||||
$this->destination_delay_2,
|
$this->destination_delay_2,
|
||||||
$this->destination_prompt_2,
|
$this->destination_prompt_2,
|
||||||
'2'
|
'2'
|
||||||
));
|
));
|
||||||
$this->destination_order++;
|
$this->destination_order++;
|
||||||
}
|
}
|
||||||
if (strlen($this->destination_data_3) > 0) {
|
if (strlen($this->destination_data_3) > 0) {
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
uuid(),
|
uuid(),
|
||||||
$this->domain_uuid,
|
$this->domain_uuid,
|
||||||
$this->follow_me_uuid,
|
$this->follow_me_uuid,
|
||||||
$this->destination_data_3,
|
$this->destination_data_3,
|
||||||
$this->destination_timeout_3,
|
$this->destination_timeout_3,
|
||||||
$this->destination_delay_3,
|
$this->destination_delay_3,
|
||||||
$this->destination_prompt_3,
|
$this->destination_prompt_3,
|
||||||
'3'
|
'3'
|
||||||
));
|
));
|
||||||
$this->destination_order++;
|
$this->destination_order++;
|
||||||
}
|
}
|
||||||
if (strlen($this->destination_data_4) > 0) {
|
if (strlen($this->destination_data_4) > 0) {
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
uuid(),
|
uuid(),
|
||||||
$this->domain_uuid,
|
$this->domain_uuid,
|
||||||
$this->follow_me_uuid,
|
$this->follow_me_uuid,
|
||||||
$this->destination_data_4,
|
$this->destination_data_4,
|
||||||
$this->destination_timeout_4,
|
$this->destination_timeout_4,
|
||||||
$this->destination_delay_4,
|
$this->destination_delay_4,
|
||||||
$this->destination_prompt_4,
|
$this->destination_prompt_4,
|
||||||
'4'
|
'4'
|
||||||
));
|
));
|
||||||
$this->destination_order++;
|
$this->destination_order++;
|
||||||
}
|
}
|
||||||
if (strlen($this->destination_data_5) > 0) {
|
if (strlen($this->destination_data_5) > 0) {
|
||||||
$stmt->execute(array(
|
$stmt->execute(array(
|
||||||
uuid(),
|
uuid(),
|
||||||
$this->domain_uuid,
|
$this->domain_uuid,
|
||||||
$this->follow_me_uuid,
|
$this->follow_me_uuid,
|
||||||
$this->destination_data_5,
|
$this->destination_data_5,
|
||||||
$this->destination_timeout_5,
|
$this->destination_timeout_5,
|
||||||
$this->destination_delay_5,
|
$this->destination_delay_5,
|
||||||
$this->destination_prompt_5,
|
$this->destination_prompt_5,
|
||||||
'5'
|
'5'
|
||||||
));
|
));
|
||||||
$this->destination_order++;
|
$this->destination_order++;
|
||||||
}
|
}
|
||||||
unset($stmt);
|
unset($stmt);
|
||||||
} //function
|
} //function
|
||||||
|
|
||||||
public function set() {
|
public function set() {
|
||||||
//set the global variable
|
//set the global variable
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
//determine whether to update the dial string
|
//determine whether to update the dial string
|
||||||
$sql = "select * from v_extensions ";
|
$sql = "select * from v_extensions ";
|
||||||
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$sql .= "and extension_uuid = '".$this->extension_uuid."' ";
|
$sql .= "and extension_uuid = '".$this->extension_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) > 0) {
|
if (count($result) > 0) {
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$this->extension = $row["extension"];
|
$this->extension = $row["extension"];
|
||||||
$this->accountcode = $row["accountcode"];
|
$this->accountcode = $row["accountcode"];
|
||||||
$this->toll_allow = $row["toll_allow"];
|
$this->toll_allow = $row["toll_allow"];
|
||||||
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
|
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
|
||||||
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
|
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//determine whether to update the dial string
|
//determine whether to update the dial string
|
||||||
$sql = "select * from v_follow_me ";
|
$sql = "select * from v_follow_me ";
|
||||||
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' ";
|
$sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) > 0) {
|
if (count($result) > 0) {
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$follow_me_uuid = $row["follow_me_uuid"];
|
$follow_me_uuid = $row["follow_me_uuid"];
|
||||||
$this->cid_name_prefix = $row["cid_name_prefix"];
|
$this->cid_name_prefix = $row["cid_name_prefix"];
|
||||||
$this->cid_number_prefix = $row["cid_number_prefix"];
|
$this->cid_number_prefix = $row["cid_number_prefix"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
|
|
||||||
//add follow me
|
//add follow me
|
||||||
if (strlen($follow_me_uuid) == 0) {
|
if (strlen($follow_me_uuid) == 0) {
|
||||||
$this->add();
|
$this->add();
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the extension dial string
|
//set the extension dial string
|
||||||
$sql = "select * from v_follow_me_destinations ";
|
$sql = "select * from v_follow_me_destinations ";
|
||||||
$sql .= "where follow_me_uuid = '".$this->follow_me_uuid."' ";
|
$sql .= "where follow_me_uuid = '".$this->follow_me_uuid."' ";
|
||||||
$sql .= "order by follow_me_order asc ";
|
$sql .= "order by follow_me_order asc ";
|
||||||
$prep_statement_2 = $db->prepare(check_sql($sql));
|
$prep_statement_2 = $db->prepare(check_sql($sql));
|
||||||
$prep_statement_2->execute();
|
$prep_statement_2->execute();
|
||||||
$result = $prep_statement_2->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement_2->fetchAll(PDO::FETCH_NAMED);
|
||||||
$dial_string = "{";
|
$dial_string = "{";
|
||||||
if ($this->follow_me_ignore_busy != 'true') {
|
if ($this->follow_me_ignore_busy != 'true') {
|
||||||
$dial_string .= "fail_on_single_reject=USER_BUSY,";
|
$dial_string .= "fail_on_single_reject=USER_BUSY,";
|
||||||
}
|
}
|
||||||
$dial_string .= "instant_ringback=true,";
|
$dial_string .= "instant_ringback=true,";
|
||||||
$dial_string .= "ignore_early_media=true";
|
$dial_string .= "ignore_early_media=true";
|
||||||
$dial_string .= ",domain_uuid=".$_SESSION['domain_uuid'];
|
$dial_string .= ",domain_uuid=".$_SESSION['domain_uuid'];
|
||||||
$dial_string .= ",sip_invite_domain=".$_SESSION['domain_name'];
|
$dial_string .= ",sip_invite_domain=".$_SESSION['domain_name'];
|
||||||
$dial_string .= ",domain_name=".$_SESSION['domain_name'];
|
$dial_string .= ",domain_name=".$_SESSION['domain_name'];
|
||||||
$dial_string .= ",domain=".$_SESSION['domain_name'];
|
$dial_string .= ",domain=".$_SESSION['domain_name'];
|
||||||
$dial_string .= ",extension_uuid=".$this->extension_uuid;
|
$dial_string .= ",extension_uuid=".$this->extension_uuid;
|
||||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua";
|
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua";
|
||||||
|
|
||||||
$dial_string_caller_id_name = "\${caller_id_name}";
|
$dial_string_caller_id_name = "\${caller_id_name}";
|
||||||
$dial_string_caller_id_number = "\${caller_id_number}";
|
$dial_string_caller_id_number = "\${caller_id_number}";
|
||||||
|
|
||||||
if (strlen($this->follow_me_caller_id_uuid) > 0){
|
if (strlen($this->follow_me_caller_id_uuid) > 0){
|
||||||
$sql_caller = "select destination_number, destination_description, destination_caller_id_number, destination_caller_id_name from v_destinations where domain_uuid = '$this->domain_uuid' and destination_type = 'inbound' and destination_uuid = '$this->follow_me_caller_id_uuid'";
|
$sql_caller = "select destination_number, destination_description, destination_caller_id_number, destination_caller_id_name from v_destinations where domain_uuid = '$this->domain_uuid' and destination_type = 'inbound' and destination_uuid = '$this->follow_me_caller_id_uuid'";
|
||||||
$prep_statement_caller = $db->prepare($sql_caller);
|
$prep_statement_caller = $db->prepare($sql_caller);
|
||||||
if ($prep_statement_caller) {
|
if ($prep_statement_caller) {
|
||||||
$prep_statement_caller->execute();
|
$prep_statement_caller->execute();
|
||||||
$row_caller = $prep_statement_caller->fetch(PDO::FETCH_ASSOC);
|
$row_caller = $prep_statement_caller->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
$caller_id_number = $row_caller['destination_caller_id_number'];
|
$caller_id_number = $row_caller['destination_caller_id_number'];
|
||||||
if(strlen($caller_id_number) == 0){
|
if(strlen($caller_id_number) == 0){
|
||||||
$caller_id_number = $row_caller['destination_number'];
|
$caller_id_number = $row_caller['destination_number'];
|
||||||
}
|
}
|
||||||
$caller_id_name = $row_caller['destination_caller_id_name'];
|
$caller_id_name = $row_caller['destination_caller_id_name'];
|
||||||
if(strlen($caller_id_name) == 0){
|
if(strlen($caller_id_name) == 0){
|
||||||
$caller_id_name = $row_caller['destination_description'];
|
$caller_id_name = $row_caller['destination_description'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($caller_id_name) > 0) {
|
if (strlen($caller_id_name) > 0) {
|
||||||
$dial_string_caller_id_name = $caller_id_name;
|
$dial_string_caller_id_name = $caller_id_name;
|
||||||
}
|
}
|
||||||
if (strlen($caller_id_number) > 0) {
|
if (strlen($caller_id_number) > 0) {
|
||||||
$dial_string_caller_id_number = $caller_id_number;
|
$dial_string_caller_id_number = $caller_id_number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($this->cid_name_prefix) > 0) {
|
if (strlen($this->cid_name_prefix) > 0) {
|
||||||
$dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."$dial_string_caller_id_name";
|
$dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."$dial_string_caller_id_name";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dial_string .= ",origination_caller_id_name=$dial_string_caller_id_name";
|
$dial_string .= ",origination_caller_id_name=$dial_string_caller_id_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($this->cid_number_prefix) > 0) {
|
if (strlen($this->cid_number_prefix) > 0) {
|
||||||
//$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."";
|
//$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."";
|
||||||
$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."$dial_string_caller_id_number";
|
$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."$dial_string_caller_id_number";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dial_string .= ",origination_caller_id_number=$dial_string_caller_id_number";
|
$dial_string .= ",origination_caller_id_number=$dial_string_caller_id_number";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($this->accountcode) > 0) {
|
if (strlen($this->accountcode) > 0) {
|
||||||
$dial_string .= ",sip_h_X-accountcode=".$this->accountcode;
|
$dial_string .= ",sip_h_X-accountcode=".$this->accountcode;
|
||||||
$dial_string .= ",accountcode=".$this->accountcode;
|
$dial_string .= ",accountcode=".$this->accountcode;
|
||||||
}
|
}
|
||||||
$dial_string .= ",toll_allow='".$this->toll_allow."'";
|
$dial_string .= ",toll_allow='".$this->toll_allow."'";
|
||||||
$dial_string .= "}";
|
$dial_string .= "}";
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
if ($x > 0) {
|
if ($x > 0) {
|
||||||
$dial_string .= ",";
|
$dial_string .= ",";
|
||||||
}
|
}
|
||||||
if (extension_exists($row["follow_me_destination"])) {
|
if (extension_exists($row["follow_me_destination"])) {
|
||||||
//set the dial string
|
//set the dial string
|
||||||
if (strlen($_SESSION['domain']['dial_string']['text']) == 0) {
|
if (strlen($_SESSION['domain']['dial_string']['text']) == 0) {
|
||||||
$dial_string .= "[";
|
$dial_string .= "[";
|
||||||
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number,";
|
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number,";
|
||||||
$dial_string .= "presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
|
$dial_string .= "presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
|
||||||
if ($row["follow_me_prompt"] == "1") {
|
if ($row["follow_me_prompt"] == "1") {
|
||||||
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
||||||
}
|
}
|
||||||
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
|
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
|
||||||
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
|
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
|
||||||
$dial_string .= "\${sofia_contact(".$row["follow_me_destination"]."@".$_SESSION['domain_name'].")}";
|
$dial_string .= "\${sofia_contact(".$row["follow_me_destination"]."@".$_SESSION['domain_name'].")}";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$replace_value = $row["follow_me_destination"];
|
$replace_value = $row["follow_me_destination"];
|
||||||
if ($row["follow_me_prompt"] == "1") {
|
if ($row["follow_me_prompt"] == "1") {
|
||||||
$replace_value .= "[group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true]";
|
$replace_value .= "[group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true]";
|
||||||
}
|
}
|
||||||
$local_dial_string = $_SESSION['domain']['dial_string']['text'];
|
$local_dial_string = $_SESSION['domain']['dial_string']['text'];
|
||||||
$local_dial_string = str_replace("\${dialed_user}", $replace_value, $local_dial_string);
|
$local_dial_string = str_replace("\${dialed_user}", $replace_value, $local_dial_string);
|
||||||
$local_dial_string = str_replace("\${dialed_domain}", $_SESSION['domain_name'], $local_dial_string);
|
$local_dial_string = str_replace("\${dialed_domain}", $_SESSION['domain_name'], $local_dial_string);
|
||||||
$local_dial_string = str_replace("\${call_timeout}", $row["follow_me_timeout"], $local_dial_string);
|
$local_dial_string = str_replace("\${call_timeout}", $row["follow_me_timeout"], $local_dial_string);
|
||||||
$local_dial_string = str_replace("\${leg_timeout}", $row["follow_me_timeout"], $local_dial_string);
|
$local_dial_string = str_replace("\${leg_timeout}", $row["follow_me_timeout"], $local_dial_string);
|
||||||
$dial_string .= $local_dial_string;
|
$dial_string .= $local_dial_string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dial_string .= "[";
|
$dial_string .= "[";
|
||||||
if ($_SESSION['cdr']['follow_me_fix']['boolean'] == "true"){
|
if ($_SESSION['cdr']['follow_me_fix']['boolean'] == "true"){
|
||||||
$dial_string .= "outbound_caller_id_name=".$this->outbound_caller_id_name;
|
$dial_string .= "outbound_caller_id_name=".$this->outbound_caller_id_name;
|
||||||
$dial_string .= ",outbound_caller_id_number=".$this->outbound_caller_id_number;
|
$dial_string .= ",outbound_caller_id_number=".$this->outbound_caller_id_number;
|
||||||
$dial_string .= ",origination_caller_id_name=".$this->outbound_caller_id_name;
|
$dial_string .= ",origination_caller_id_name=".$this->outbound_caller_id_name;
|
||||||
$dial_string .= ",origination_caller_id_number=".$this->outbound_caller_id_number;
|
$dial_string .= ",origination_caller_id_number=".$this->outbound_caller_id_number;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number";
|
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number";
|
||||||
}
|
}
|
||||||
$dial_string .= ",presence_id=".$this->extension."@".$_SESSION['domain_name'];
|
$dial_string .= ",presence_id=".$this->extension."@".$_SESSION['domain_name'];
|
||||||
if ($row["follow_me_prompt"] == "1") {
|
if ($row["follow_me_prompt"] == "1") {
|
||||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
||||||
}
|
}
|
||||||
$dial_string .= ",leg_delay_start=".$row["follow_me_delay"];
|
$dial_string .= ",leg_delay_start=".$row["follow_me_delay"];
|
||||||
$dial_string .= ",leg_timeout=".$row["follow_me_timeout"]."]";
|
$dial_string .= ",leg_timeout=".$row["follow_me_timeout"]."]";
|
||||||
if (is_numeric($row["follow_me_destination"])) {
|
if (is_numeric($row["follow_me_destination"])) {
|
||||||
if ($_SESSION['domain']['bridge']['text'] == "outbound" || $_SESSION['domain']['bridge']['text'] == "bridge") {
|
if ($_SESSION['domain']['bridge']['text'] == "outbound" || $_SESSION['domain']['bridge']['text'] == "bridge") {
|
||||||
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);
|
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);
|
||||||
$dial_string .= $bridge[0];
|
$dial_string .= $bridge[0];
|
||||||
}
|
}
|
||||||
elseif ($_SESSION['domain']['bridge']['text'] == "loopback") {
|
elseif ($_SESSION['domain']['bridge']['text'] == "loopback") {
|
||||||
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
||||||
}
|
}
|
||||||
elseif ($_SESSION['domain']['bridge']['text'] == "lcr") {
|
elseif ($_SESSION['domain']['bridge']['text'] == "lcr") {
|
||||||
$dial_string .= "lcr/".$_SESSION['lcr']['profile']['text']."/".$_SESSION['domain_name']."/".$row["follow_me_destination"];
|
$dial_string .= "lcr/".$_SESSION['lcr']['profile']['text']."/".$_SESSION['domain_name']."/".$row["follow_me_destination"];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dial_string .= $row["follow_me_destination"];
|
$dial_string .= $row["follow_me_destination"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
$this->dial_string = $dial_string;
|
$this->dial_string = $dial_string;
|
||||||
|
|
||||||
$sql = "update v_follow_me set ";
|
$sql = "update v_follow_me set ";
|
||||||
$sql .= "dial_string = '".$this->dial_string."' ";
|
$sql .= "dial_string = '".$this->dial_string."' ";
|
||||||
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' ";
|
$sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' ";
|
||||||
if ($this->debug) {
|
if ($this->debug) {
|
||||||
echo $sql."<br />";
|
echo $sql."<br />";
|
||||||
}
|
}
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//is follow me enabled
|
//is follow me enabled
|
||||||
$dial_string = '';
|
$dial_string = '';
|
||||||
if ($this->follow_me_enabled == "true") {
|
if ($this->follow_me_enabled == "true") {
|
||||||
$dial_string = $this->dial_string;
|
$dial_string = $this->dial_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "update v_extensions set ";
|
$sql = "update v_extensions set ";
|
||||||
$sql .= "dial_string = '".check_str($dial_string)."', ";
|
$sql .= "dial_string = '".check_str($dial_string)."', ";
|
||||||
$sql .= "dial_domain = '".$_SESSION['domain_name']."' ";
|
$sql .= "dial_domain = '".$_SESSION['domain_name']."' ";
|
||||||
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' ";
|
$sql .= "and follow_me_uuid = '".$this->follow_me_uuid."' ";
|
||||||
if ($this->debug) {
|
if ($this->debug) {
|
||||||
echo $sql."<br />";
|
echo $sql."<br />";
|
||||||
}
|
}
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
} //function
|
} //function
|
||||||
} //class
|
} //class
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][0]['title']['en-us'] = "Click to Call";
|
$apps[$x]['menu'][0]['title']['en-us'] = "Click to Call";
|
||||||
$apps[$x]['menu'][0]['title']['es-cl'] = "Pulse para Llamar";
|
$apps[$x]['menu'][0]['title']['es-cl'] = "Pulse para Llamar";
|
||||||
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "Cliquez pour Appeller";
|
$apps[$x]['menu'][0]['title']['fr-fr'] = "Cliquez pour Appeller";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "Clicar para Chamadas";
|
$apps[$x]['menu'][0]['title']['pt-pt'] = "Clicar para Chamadas";
|
||||||
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][0]['uuid'] = "f862556f-9ddd-2697-fdf4-bed08ec63aa5";
|
$apps[$x]['menu'][0]['uuid'] = "f862556f-9ddd-2697-fdf4-bed08ec63aa5";
|
||||||
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||||
$apps[$x]['menu'][0]['category'] = "internal";
|
$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
$apps[$x]['menu'][0]['path'] = "/app/click_to_call/click_to_call.php";
|
$apps[$x]['menu'][0]['path'] = "/app/click_to_call/click_to_call.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+377
-377
@@ -1,377 +1,377 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/*
|
/*
|
||||||
call.php
|
call.php
|
||||||
Copyright (C) 2008, 2009 Mark J Crane
|
Copyright (C) 2008, 2009 Mark J Crane
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
notice, this list of conditions and the following disclaimer in the
|
notice, this list of conditions and the following disclaimer in the
|
||||||
documentation and/or other materials provided with the distribution.
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('click_to_call_view')) {
|
if (permission_exists('click_to_call_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//include the header
|
//include the header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
if (is_array($_REQUEST) && !empty($_REQUEST['src']) && !empty($_REQUEST['dest'])) {
|
if (is_array($_REQUEST) && !empty($_REQUEST['src']) && !empty($_REQUEST['dest'])) {
|
||||||
//retrieve submitted variables
|
//retrieve submitted variables
|
||||||
$src = check_str($_REQUEST['src']);
|
$src = check_str($_REQUEST['src']);
|
||||||
$src_cid_name = check_str($_REQUEST['src_cid_name']);
|
$src_cid_name = check_str($_REQUEST['src_cid_name']);
|
||||||
$src_cid_number = check_str($_REQUEST['src_cid_number']);
|
$src_cid_number = check_str($_REQUEST['src_cid_number']);
|
||||||
|
|
||||||
$dest = check_str($_REQUEST['dest']);
|
$dest = check_str($_REQUEST['dest']);
|
||||||
$dest_cid_name = check_str($_REQUEST['dest_cid_name']);
|
$dest_cid_name = check_str($_REQUEST['dest_cid_name']);
|
||||||
$dest_cid_number = check_str($_REQUEST['dest_cid_number']);
|
$dest_cid_number = check_str($_REQUEST['dest_cid_number']);
|
||||||
|
|
||||||
$auto_answer = check_str($_REQUEST['auto_answer']); //true,false
|
$auto_answer = check_str($_REQUEST['auto_answer']); //true,false
|
||||||
$rec = check_str($_REQUEST['rec']); //true,false
|
$rec = check_str($_REQUEST['rec']); //true,false
|
||||||
$ringback = check_str($_REQUEST['ringback']);
|
$ringback = check_str($_REQUEST['ringback']);
|
||||||
$context = $_SESSION['context'];
|
$context = $_SESSION['context'];
|
||||||
|
|
||||||
//clean up variable values
|
//clean up variable values
|
||||||
$src = str_replace(array('.','(',')','-',' '), '', $src);
|
$src = str_replace(array('.','(',')','-',' '), '', $src);
|
||||||
$dest = (strpbrk($dest, '@') != FALSE) ? str_replace(array('(',')',' '), '', $dest) : str_replace(array('.','(',')','-',' '), '', $dest); //don't strip periods or dashes in sip-uri calls, only phone numbers
|
$dest = (strpbrk($dest, '@') != FALSE) ? str_replace(array('(',')',' '), '', $dest) : str_replace(array('.','(',')','-',' '), '', $dest); //don't strip periods or dashes in sip-uri calls, only phone numbers
|
||||||
|
|
||||||
//adjust variable values
|
//adjust variable values
|
||||||
$sip_auto_answer = ($auto_answer == "true") ? ",sip_auto_answer=true" : null;
|
$sip_auto_answer = ($auto_answer == "true") ? ",sip_auto_answer=true" : null;
|
||||||
|
|
||||||
//mozilla thunderbird TBDialout workaround (seems it can only handle the first %NUM%)
|
//mozilla thunderbird TBDialout workaround (seems it can only handle the first %NUM%)
|
||||||
$dest = ($dest == "%NUM%") ? $src_cid_number : $dest;
|
$dest = ($dest == "%NUM%") ? $src_cid_number : $dest;
|
||||||
|
|
||||||
//translate ringback
|
//translate ringback
|
||||||
switch ($ringback) {
|
switch ($ringback) {
|
||||||
case "music": $ringback_value = "\'local_stream://moh\'"; break;
|
case "music": $ringback_value = "\'local_stream://moh\'"; break;
|
||||||
case "uk-ring": $ringback_value = "\'%(400,200,400,450);%(400,2200,400,450)\'"; break;
|
case "uk-ring": $ringback_value = "\'%(400,200,400,450);%(400,2200,400,450)\'"; break;
|
||||||
case "fr-ring": $ringback_value = "\'%(1500,3500,440.0,0.0)\'"; break;
|
case "fr-ring": $ringback_value = "\'%(1500,3500,440.0,0.0)\'"; break;
|
||||||
case "pt-ring": $ringback_value = "\'%(1000,5000,400.0,0.0)\'"; break;
|
case "pt-ring": $ringback_value = "\'%(1000,5000,400.0,0.0)\'"; break;
|
||||||
case "rs-ring": $ringback_value = "\'%(1000,4000,425.0,0.0)\'"; break;
|
case "rs-ring": $ringback_value = "\'%(1000,4000,425.0,0.0)\'"; break;
|
||||||
case "it-ring": $ringback_value = "\'%(1000,4000,425.0,0.0)\'"; break;
|
case "it-ring": $ringback_value = "\'%(1000,4000,425.0,0.0)\'"; break;
|
||||||
case "us-ring":
|
case "us-ring":
|
||||||
default:
|
default:
|
||||||
$ringback = 'us-ring';
|
$ringback = 'us-ring';
|
||||||
$ringback_value = "\'%(2000,4000,440.0,480.0)\'";
|
$ringback_value = "\'%(2000,4000,440.0,480.0)\'";
|
||||||
}
|
}
|
||||||
|
|
||||||
//determine call direction
|
//determine call direction
|
||||||
$dir = (strlen($dest) < 7) ? 'local' : 'outbound';
|
$dir = (strlen($dest) < 7) ? 'local' : 'outbound';
|
||||||
|
|
||||||
//define a leg - set source to display the defined caller id name and number
|
//define a leg - set source to display the defined caller id name and number
|
||||||
$source_common = "{".
|
$source_common = "{".
|
||||||
"click_to_call=true".
|
"click_to_call=true".
|
||||||
",origination_caller_id_name='".$src_cid_name."'".
|
",origination_caller_id_name='".$src_cid_name."'".
|
||||||
",origination_caller_id_number=".$src_cid_number.
|
",origination_caller_id_number=".$src_cid_number.
|
||||||
",instant_ringback=true".
|
",instant_ringback=true".
|
||||||
",ringback=".$ringback_value.
|
",ringback=".$ringback_value.
|
||||||
",presence_id=".$src."@".$_SESSION['domains'][$domain_uuid]['domain_name'].
|
",presence_id=".$src."@".$_SESSION['domains'][$domain_uuid]['domain_name'].
|
||||||
",call_direction=".$dir;
|
",call_direction=".$dir;
|
||||||
if (strlen($src) < 7) {
|
if (strlen($src) < 7) {
|
||||||
//source is a local extension
|
//source is a local extension
|
||||||
$source = $source_common.$sip_auto_answer.
|
$source = $source_common.$sip_auto_answer.
|
||||||
",domain_uuid=".$domain_uuid.
|
",domain_uuid=".$domain_uuid.
|
||||||
",domain_name=".$_SESSION['domains'][$domain_uuid]['domain_name']."}user/".$src."@".$_SESSION['domains'][$domain_uuid]['domain_name'];
|
",domain_name=".$_SESSION['domains'][$domain_uuid]['domain_name']."}user/".$src."@".$_SESSION['domains'][$domain_uuid]['domain_name'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//source is an external number
|
//source is an external number
|
||||||
$bridge_array = outbound_route_to_bridge($_SESSION['domain_uuid'], $src);
|
$bridge_array = outbound_route_to_bridge($_SESSION['domain_uuid'], $src);
|
||||||
$source = $source_common."}".$bridge_array[0];
|
$source = $source_common."}".$bridge_array[0];
|
||||||
}
|
}
|
||||||
unset($source_common);
|
unset($source_common);
|
||||||
|
|
||||||
//define b leg - set destination to display the defined caller id name and number
|
//define b leg - set destination to display the defined caller id name and number
|
||||||
$destination_common = " &bridge({origination_caller_id_name='".$dest_cid_name."',origination_caller_id_number=".$dest_cid_number;
|
$destination_common = " &bridge({origination_caller_id_name='".$dest_cid_name."',origination_caller_id_number=".$dest_cid_number;
|
||||||
if (strlen($dest) < 7) {
|
if (strlen($dest) < 7) {
|
||||||
//destination is a local extension
|
//destination is a local extension
|
||||||
if (strpbrk($dest, '@') != FALSE) { //sip-uri
|
if (strpbrk($dest, '@') != FALSE) { //sip-uri
|
||||||
$switch_cmd = $destination_common.",call_direction=outbound}sofia/external/".$dest.")";
|
$switch_cmd = $destination_common.",call_direction=outbound}sofia/external/".$dest.")";
|
||||||
}
|
}
|
||||||
else { //not sip-uri
|
else { //not sip-uri
|
||||||
$switch_cmd = " &transfer('".$dest." XML ".$context."')";
|
$switch_cmd = " &transfer('".$dest." XML ".$context."')";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//local extension (source) > external number (destination)
|
//local extension (source) > external number (destination)
|
||||||
if (strlen($src) < 7 && strlen($dest_cid_number) == 0) {
|
if (strlen($src) < 7 && strlen($dest_cid_number) == 0) {
|
||||||
//retrieve outbound caller id from the (source) extension
|
//retrieve outbound caller id from the (source) extension
|
||||||
$sql = "select outbound_caller_id_name, outbound_caller_id_number from v_extensions where domain_uuid = '".$_SESSION['domain_uuid']."' and extension = '".$src."' ";
|
$sql = "select outbound_caller_id_name, outbound_caller_id_number from v_extensions where domain_uuid = '".$_SESSION['domain_uuid']."' and extension = '".$src."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$dest_cid_name = $row["outbound_caller_id_name"];
|
$dest_cid_name = $row["outbound_caller_id_name"];
|
||||||
$dest_cid_number = $row["outbound_caller_id_number"];
|
$dest_cid_number = $row["outbound_caller_id_number"];
|
||||||
break; //limit to 1 row
|
break; //limit to 1 row
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
}
|
}
|
||||||
if (permission_exists('click_to_call_call')) {
|
if (permission_exists('click_to_call_call')) {
|
||||||
if (strpbrk($dest, '@') != FALSE) { //sip-uri
|
if (strpbrk($dest, '@') != FALSE) { //sip-uri
|
||||||
$switch_cmd = $destination_common.",call_direction=outbound}sofia/external/".$dest.")";
|
$switch_cmd = $destination_common.",call_direction=outbound}sofia/external/".$dest.")";
|
||||||
}
|
}
|
||||||
else { //not sip-uri
|
else { //not sip-uri
|
||||||
$bridge_array = outbound_route_to_bridge($_SESSION['domain_uuid'], $dest);
|
$bridge_array = outbound_route_to_bridge($_SESSION['domain_uuid'], $dest);
|
||||||
//$switch_cmd = $destination_common."}".$bridge_array[0].")"; // wouldn't set cdr destination correctly, so below used instead
|
//$switch_cmd = $destination_common."}".$bridge_array[0].")"; // wouldn't set cdr destination correctly, so below used instead
|
||||||
$switch_cmd = " &transfer('".$dest." XML ".$context."')";
|
$switch_cmd = " &transfer('".$dest." XML ".$context."')";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($destination_common);
|
unset($destination_common);
|
||||||
|
|
||||||
//create the even socket connection and send the event socket command
|
//create the even socket connection and send the event socket command
|
||||||
$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) {
|
||||||
//error message
|
//error message
|
||||||
echo "<div align='center'><strong>Connection to Event Socket failed.</strong></div>";
|
echo "<div align='center'><strong>Connection to Event Socket failed.</strong></div>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//display the last command
|
//display the last command
|
||||||
$switch_cmd = "api originate ".$source.$switch_cmd;
|
$switch_cmd = "api originate ".$source.$switch_cmd;
|
||||||
echo "<div align='center'>".$switch_cmd."<br /><br /><strong>".$src." has called ".$dest."</strong></div>\n";
|
echo "<div align='center'>".$switch_cmd."<br /><br /><strong>".$src." has called ".$dest."</strong></div>\n";
|
||||||
//show the command result
|
//show the command result
|
||||||
$result = trim(event_socket_request($fp, $switch_cmd));
|
$result = trim(event_socket_request($fp, $switch_cmd));
|
||||||
if (substr($result, 0,3) == "+OK") {
|
if (substr($result, 0,3) == "+OK") {
|
||||||
$uuid = substr($result, 4);
|
$uuid = substr($result, 4);
|
||||||
if ($rec == "true") {
|
if ($rec == "true") {
|
||||||
//use the server's time zone to ensure it matches the time zone used by freeswitch
|
//use the server's time zone to ensure it matches the time zone used by freeswitch
|
||||||
date_default_timezone_set($_SESSION['time_zone']['system']);
|
date_default_timezone_set($_SESSION['time_zone']['system']);
|
||||||
//create the api record command and send it over event socket
|
//create the api record command and send it over event socket
|
||||||
$switch_cmd = "api uuid_record ".$uuid." start ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$uuid.".wav";
|
$switch_cmd = "api uuid_record ".$uuid." start ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$uuid.".wav";
|
||||||
$result2 = trim(event_socket_request($fp, $switch_cmd));
|
$result2 = trim(event_socket_request($fp, $switch_cmd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<div align='center'><br />".$result."<br /><br /></div>\n";
|
echo "<div align='center'><br />".$result."<br /><br /></div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//show html form
|
//show html form
|
||||||
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left'>\n";
|
echo " <td align='left'>\n";
|
||||||
echo " <span class=\"title\">\n";
|
echo " <span class=\"title\">\n";
|
||||||
echo " <strong>".$text['label-click2call']."</strong>\n";
|
echo " <strong>".$text['label-click2call']."</strong>\n";
|
||||||
echo " </span>\n";
|
echo " </span>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td align='right'>\n";
|
echo " <td align='right'>\n";
|
||||||
echo " \n";
|
echo " \n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' colspan='2'>\n";
|
echo " <td align='left' colspan='2'>\n";
|
||||||
echo " <span class=\"vexpl\">\n";
|
echo " <span class=\"vexpl\">\n";
|
||||||
echo " ".$text['desc-click2call']."\n";
|
echo " ".$text['desc-click2call']."\n";
|
||||||
echo " </span>\n";
|
echo " </span>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " </table>";
|
echo " </table>";
|
||||||
|
|
||||||
echo " <br />";
|
echo " <br />";
|
||||||
|
|
||||||
echo "<form>\n";
|
echo "<form>\n";
|
||||||
echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'\n";
|
echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td class='vncellreq' width='40%'>".$text['label-src-caller-id-nam']."</td>\n";
|
echo " <td class='vncellreq' width='40%'>".$text['label-src-caller-id-nam']."</td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input name=\"src_cid_name\" value='$src_cid_name' class='formfld'>\n";
|
echo " <input name=\"src_cid_name\" value='$src_cid_name' class='formfld'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['desc-src-caller-id-nam']."\n";
|
echo " ".$text['desc-src-caller-id-nam']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td class='vncellreq'>".$text['label-src-caller-id-num']."</td>\n";
|
echo " <td class='vncellreq'>".$text['label-src-caller-id-num']."</td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input name=\"src_cid_number\" value='$src_cid_number' class='formfld'>\n";
|
echo " <input name=\"src_cid_number\" value='$src_cid_number' class='formfld'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['desc-src-caller-id-num']."\n";
|
echo " ".$text['desc-src-caller-id-num']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td class='vncell' width='40%'>".$text['label-dest-caller-id-nam']."</td>\n";
|
echo " <td class='vncell' width='40%'>".$text['label-dest-caller-id-nam']."</td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input name=\"dest_cid_name\" value='$dest_cid_name' class='formfld'>\n";
|
echo " <input name=\"dest_cid_name\" value='$dest_cid_name' class='formfld'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['desc-dest-caller-id-nam']."\n";
|
echo " ".$text['desc-dest-caller-id-nam']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td class='vncell'>".$text['label-dest-caller-id-num']."</td>\n";
|
echo " <td class='vncell'>".$text['label-dest-caller-id-num']."</td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input name=\"dest_cid_number\" value='$dest_cid_number' class='formfld'>\n";
|
echo " <input name=\"dest_cid_number\" value='$dest_cid_number' class='formfld'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['desc-dest-caller-id-num']."\n";
|
echo " ".$text['desc-dest-caller-id-num']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td class='vncellreq'>".$text['label-src-num']."</td>\n";
|
echo " <td class='vncellreq'>".$text['label-src-num']."</td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input name=\"src\" value='$src' class='formfld'>\n";
|
echo " <input name=\"src\" value='$src' class='formfld'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['desc-src-num']."\n";
|
echo " ".$text['desc-src-num']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td class='vncellreq'>".$text['label-dest-num']."</td>\n";
|
echo " <td class='vncellreq'>".$text['label-dest-num']."</td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input name=\"dest\" value='$dest' class='formfld'>\n";
|
echo " <input name=\"dest\" value='$dest' class='formfld'>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['desc-dest-num']."\n";
|
echo " ".$text['desc-dest-num']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo" <tr>\n";
|
echo" <tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-auto-answer']."\n";
|
echo " ".$text['label-auto-answer']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='auto_answer'>\n";
|
echo " <select class='formfld' name='auto_answer'>\n";
|
||||||
echo " <option value=''></option>\n";
|
echo " <option value=''></option>\n";
|
||||||
if ($auto_answer == "true") {
|
if ($auto_answer == "true") {
|
||||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($auto_answer == "false") {
|
if ($auto_answer == "false") {
|
||||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['desc-auto-answer']."\n";
|
echo $text['desc-auto-answer']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-record']."\n";
|
echo " ".$text['label-record']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='rec'>\n";
|
echo " <select class='formfld' name='rec'>\n";
|
||||||
echo " <option value=''></option>\n";
|
echo " <option value=''></option>\n";
|
||||||
if ($rec == "true") {
|
if ($rec == "true") {
|
||||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($rec == "false") {
|
if ($rec == "false") {
|
||||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['desc-record']."\n";
|
echo $text['desc-record']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-ringback']."\n";
|
echo " ".$text['label-ringback']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='ringback'>\n";
|
echo " <select class='formfld' name='ringback'>\n";
|
||||||
echo " <option value=''></option>\n";
|
echo " <option value=''></option>\n";
|
||||||
if ($ringback == "us-ring") {
|
if ($ringback == "us-ring") {
|
||||||
echo " <option value='us-ring' selected='selected'>".$text['opt-usring']."</option>\n";
|
echo " <option value='us-ring' selected='selected'>".$text['opt-usring']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='us-ring'>".$text['opt-usring']."</option>\n";
|
echo " <option value='us-ring'>".$text['opt-usring']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($ringback == "fr-ring") {
|
if ($ringback == "fr-ring") {
|
||||||
echo " <option value='fr-ring' selected='selected'>".$text['opt-frring']."</option>\n";
|
echo " <option value='fr-ring' selected='selected'>".$text['opt-frring']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='fr-ring'>".$text['opt-frring']."</option>\n";
|
echo " <option value='fr-ring'>".$text['opt-frring']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($ringback == "pt-ring") {
|
if ($ringback == "pt-ring") {
|
||||||
echo " <option value='pt-ring' selected='selected'>".$text['opt-ptring']."</option>\n";
|
echo " <option value='pt-ring' selected='selected'>".$text['opt-ptring']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='pt-ring'>".$text['opt-ptring']."</option>\n";
|
echo " <option value='pt-ring'>".$text['opt-ptring']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($ringback == "uk-ring") {
|
if ($ringback == "uk-ring") {
|
||||||
echo " <option value='uk-ring' selected='selected'>".$text['opt-ukring']."</option>\n";
|
echo " <option value='uk-ring' selected='selected'>".$text['opt-ukring']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='uk-ring'>".$text['opt-ukring']."</option>\n";
|
echo " <option value='uk-ring'>".$text['opt-ukring']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($ringback == "rs-ring") {
|
if ($ringback == "rs-ring") {
|
||||||
echo " <option value='rs-ring' selected='selected'>".$text['opt-rsring']."</option>\n";
|
echo " <option value='rs-ring' selected='selected'>".$text['opt-rsring']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='rs-ring'>".$text['opt-rsring']."</option>\n";
|
echo " <option value='rs-ring'>".$text['opt-rsring']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($ringback == "it-ring") {
|
if ($ringback == "it-ring") {
|
||||||
echo " <option value='it-ring' selected='selected'>".$text['opt-itring']."</option>\n";
|
echo " <option value='it-ring' selected='selected'>".$text['opt-itring']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='it-ring'>".$text['opt-itring']."</option>\n";
|
echo " <option value='it-ring'>".$text['opt-itring']."</option>\n";
|
||||||
}
|
}
|
||||||
if ($ringback == "music") {
|
if ($ringback == "music") {
|
||||||
echo " <option value='music' selected='selected'>".$text['opt-moh']."</option>\n";
|
echo " <option value='music' selected='selected'>".$text['opt-moh']."</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='music'>".$text['opt-moh']."</option>\n";
|
echo " <option value='music'>".$text['opt-moh']."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['desc-ringback']."\n";
|
echo $text['desc-ringback']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td colspan='2' align='right'>\n";
|
echo " <td colspan='2' align='right'>\n";
|
||||||
echo " <br>";
|
echo " <br>";
|
||||||
echo " <input type=\"submit\" class='btn' value=\"".$text['button-call']."\">\n";
|
echo " <input type=\"submit\" class='btn' value=\"".$text['button-call']."\">\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][0]['title']['en-us'] = "Conferences";
|
$apps[$x]['menu'][0]['title']['en-us'] = "Conferences";
|
||||||
$apps[$x]['menu'][0]['title']['es-cl'] = "Conferencias";
|
$apps[$x]['menu'][0]['title']['es-cl'] = "Conferencias";
|
||||||
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "Conférences";
|
$apps[$x]['menu'][0]['title']['fr-fr'] = "Conférences";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "Conferencias";
|
$apps[$x]['menu'][0]['title']['pt-pt'] = "Conferencias";
|
||||||
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][0]['uuid'] = "9f2a8c08-3e65-c41c-a716-3b53d42bc4d4";
|
$apps[$x]['menu'][0]['uuid'] = "9f2a8c08-3e65-c41c-a716-3b53d42bc4d4";
|
||||||
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||||
$apps[$x]['menu'][0]['category'] = "internal";
|
$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
$apps[$x]['menu'][0]['path'] = "/app/conferences/conferences.php";
|
$apps[$x]['menu'][0]['path'] = "/app/conferences/conferences.php";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "user";
|
//$apps[$x]['menu'][0]['groups'][] = "user";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "admin";
|
//$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+218
-218
@@ -1,219 +1,219 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
|
|
||||||
//populate new phone_label values, phone_type_* values
|
//populate new phone_label values, phone_type_* values
|
||||||
$obj = new schema;
|
$obj = new schema;
|
||||||
$obj->db = $db;
|
$obj->db = $db;
|
||||||
$obj->db_type = $db_type;
|
$obj->db_type = $db_type;
|
||||||
$obj->schema();
|
$obj->schema();
|
||||||
$field_exists = $obj->column_exists($db_name, 'v_contact_phones', 'phone_type'); //check if field exists
|
$field_exists = $obj->column_exists($db_name, 'v_contact_phones', 'phone_type'); //check if field exists
|
||||||
if ($field_exists) {
|
if ($field_exists) {
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
// populate phone_type_* values
|
// populate phone_type_* values
|
||||||
$sql = "update v_contact_phones set phone_type_voice = '1' ";
|
$sql = "update v_contact_phones set phone_type_voice = '1' ";
|
||||||
$sql .= "where phone_type = 'home' ";
|
$sql .= "where phone_type = 'home' ";
|
||||||
$sql .= "or phone_type = 'work' ";
|
$sql .= "or phone_type = 'work' ";
|
||||||
$sql .= "or phone_type = 'voice' ";
|
$sql .= "or phone_type = 'voice' ";
|
||||||
$sql .= "or phone_type = 'voicemail' ";
|
$sql .= "or phone_type = 'voicemail' ";
|
||||||
$sql .= "or phone_type = 'cell' ";
|
$sql .= "or phone_type = 'cell' ";
|
||||||
$sql .= "or phone_type = 'pcs' ";
|
$sql .= "or phone_type = 'pcs' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
$sql = "update v_contact_phones set phone_type_fax = '1' where phone_type = 'fax'";
|
$sql = "update v_contact_phones set phone_type_fax = '1' where phone_type = 'fax'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
$sql = "update v_contact_phones set phone_type_video = '1' where phone_type = 'video'";
|
$sql = "update v_contact_phones set phone_type_video = '1' where phone_type = 'video'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
$sql = "update v_contact_phones set phone_type_text = '1' where phone_type = 'cell' or phone_type = 'pager'";
|
$sql = "update v_contact_phones set phone_type_text = '1' where phone_type = 'cell' or phone_type = 'pager'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
// migrate phone_type values to phone_label, correct case and make multilingual where appropriate
|
// migrate phone_type values to phone_label, correct case and make multilingual where appropriate
|
||||||
$default_phone_types = array('home','work','pref','voice','fax','msg','cell','pager','modem','car','isdn','video','pcs');
|
$default_phone_types = array('home','work','pref','voice','fax','msg','cell','pager','modem','car','isdn','video','pcs');
|
||||||
$default_phone_labels = array($text['option-home'],$text['option-work'],'Pref','Voice',$text['option-fax'],$text['option-voicemail'],$text['option-mobile'],$text['option-pager'],'Modem','Car','ISDN','Video','PCS');
|
$default_phone_labels = array($text['option-home'],$text['option-work'],'Pref','Voice',$text['option-fax'],$text['option-voicemail'],$text['option-mobile'],$text['option-pager'],'Modem','Car','ISDN','Video','PCS');
|
||||||
foreach ($default_phone_types as $index => $old) {
|
foreach ($default_phone_types as $index => $old) {
|
||||||
$new = $default_phone_labels[$index];
|
$new = $default_phone_labels[$index];
|
||||||
$sql = "update v_contact_phones set phone_label = '".$new."' where phone_type = '".$old."'";
|
$sql = "update v_contact_phones set phone_label = '".$new."' where phone_type = '".$old."'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// empty phone_type field to prevent confusion in the future
|
// empty phone_type field to prevent confusion in the future
|
||||||
$sql = "update v_contact_phones set phone_type = null";
|
$sql = "update v_contact_phones set phone_type = null";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
unset($obj);
|
unset($obj);
|
||||||
|
|
||||||
//populate primary email from deprecated field in v_contact table
|
//populate primary email from deprecated field in v_contact table
|
||||||
$obj = new schema;
|
$obj = new schema;
|
||||||
$obj->db = $db;
|
$obj->db = $db;
|
||||||
$obj->db_type = $db_type;
|
$obj->db_type = $db_type;
|
||||||
$obj->schema();
|
$obj->schema();
|
||||||
$field_exists = $obj->column_exists($db_name, 'v_contacts', 'contact_email'); //check if field exists
|
$field_exists = $obj->column_exists($db_name, 'v_contacts', 'contact_email'); //check if field exists
|
||||||
if ($field_exists) {
|
if ($field_exists) {
|
||||||
// get email records
|
// get email records
|
||||||
$sql = "select * from v_contacts where contact_email is not null and contact_email != ''";
|
$sql = "select * from v_contacts where contact_email is not null and contact_email != ''";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$sql = "insert into v_contact_emails ";
|
$sql = "insert into v_contact_emails ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "contact_uuid, ";
|
$sql .= "contact_uuid, ";
|
||||||
$sql .= "contact_email_uuid, ";
|
$sql .= "contact_email_uuid, ";
|
||||||
$sql .= "email_primary, ";
|
$sql .= "email_primary, ";
|
||||||
$sql .= "email_address";
|
$sql .= "email_address";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'".$row['domain_uuid']."', ";
|
$sql .= "'".$row['domain_uuid']."', ";
|
||||||
$sql .= "'".$row['contact_uuid']."', ";
|
$sql .= "'".$row['contact_uuid']."', ";
|
||||||
$sql .= "'".uuid()."', ";
|
$sql .= "'".uuid()."', ";
|
||||||
$sql .= "1, ";
|
$sql .= "1, ";
|
||||||
$sql .= "'".$row['contact_email']."' ";
|
$sql .= "'".$row['contact_email']."' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//verify and remove value from old field
|
//verify and remove value from old field
|
||||||
$sql2 = "select email_address from v_contact_emails ";
|
$sql2 = "select email_address from v_contact_emails ";
|
||||||
$sql2 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
$sql2 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
||||||
$sql2 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
$sql2 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
||||||
$sql2 .= "and email_address = '".$row['contact_email']."' ";
|
$sql2 .= "and email_address = '".$row['contact_email']."' ";
|
||||||
$prep_statement2 = $db->prepare(check_sql($sql2));
|
$prep_statement2 = $db->prepare(check_sql($sql2));
|
||||||
$prep_statement2->execute();
|
$prep_statement2->execute();
|
||||||
$result2 = $prep_statement2->fetchAll(PDO::FETCH_NAMED);
|
$result2 = $prep_statement2->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count2 = count($result2);
|
$result_count2 = count($result2);
|
||||||
if ($result_count2 > 0) {
|
if ($result_count2 > 0) {
|
||||||
$sql3 = "update v_contacts set contact_email = '' ";
|
$sql3 = "update v_contacts set contact_email = '' ";
|
||||||
$sql3 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
$sql3 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
||||||
$sql3 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
$sql3 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
||||||
$prep_statement3 = $db->prepare(check_sql($sql3));
|
$prep_statement3 = $db->prepare(check_sql($sql3));
|
||||||
$prep_statement3->execute();
|
$prep_statement3->execute();
|
||||||
unset($sql3, $prep_statement3);
|
unset($sql3, $prep_statement3);
|
||||||
}
|
}
|
||||||
unset($sql2, $result2, $prep_statement2);
|
unset($sql2, $result2, $prep_statement2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($obj);
|
unset($obj);
|
||||||
|
|
||||||
//populate primary url from deprecated field in v_contact table
|
//populate primary url from deprecated field in v_contact table
|
||||||
$obj = new schema;
|
$obj = new schema;
|
||||||
$obj->db = $db;
|
$obj->db = $db;
|
||||||
$obj->db_type = $db_type;
|
$obj->db_type = $db_type;
|
||||||
$obj->schema();
|
$obj->schema();
|
||||||
$field_exists = $obj->column_exists($db_name, 'v_contacts', 'contact_url'); //check if field exists
|
$field_exists = $obj->column_exists($db_name, 'v_contacts', 'contact_url'); //check if field exists
|
||||||
if ($field_exists) {
|
if ($field_exists) {
|
||||||
// get email records
|
// get email records
|
||||||
$sql = "select * from v_contacts where contact_url is not null and contact_url != ''";
|
$sql = "select * from v_contacts where contact_url is not null and contact_url != ''";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$sql = "insert into v_contact_urls ";
|
$sql = "insert into v_contact_urls ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "contact_uuid, ";
|
$sql .= "contact_uuid, ";
|
||||||
$sql .= "contact_url_uuid, ";
|
$sql .= "contact_url_uuid, ";
|
||||||
$sql .= "url_primary, ";
|
$sql .= "url_primary, ";
|
||||||
$sql .= "url_address";
|
$sql .= "url_address";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'".$row['domain_uuid']."', ";
|
$sql .= "'".$row['domain_uuid']."', ";
|
||||||
$sql .= "'".$row['contact_uuid']."', ";
|
$sql .= "'".$row['contact_uuid']."', ";
|
||||||
$sql .= "'".uuid()."', ";
|
$sql .= "'".uuid()."', ";
|
||||||
$sql .= "1, ";
|
$sql .= "1, ";
|
||||||
$sql .= "'".$row['contact_url']."' ";
|
$sql .= "'".$row['contact_url']."' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//verify and remove value from old field
|
//verify and remove value from old field
|
||||||
$sql2 = "select url_address from v_contact_urls ";
|
$sql2 = "select url_address from v_contact_urls ";
|
||||||
$sql2 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
$sql2 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
||||||
$sql2 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
$sql2 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
||||||
$sql2 .= "and url_address = '".$row['contact_url']."' ";
|
$sql2 .= "and url_address = '".$row['contact_url']."' ";
|
||||||
$prep_statement2 = $db->prepare(check_sql($sql2));
|
$prep_statement2 = $db->prepare(check_sql($sql2));
|
||||||
$prep_statement2->execute();
|
$prep_statement2->execute();
|
||||||
$result2 = $prep_statement2->fetchAll(PDO::FETCH_NAMED);
|
$result2 = $prep_statement2->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count2 = count($result2);
|
$result_count2 = count($result2);
|
||||||
if ($result_count2 > 0) {
|
if ($result_count2 > 0) {
|
||||||
$sql3 = "update v_contacts set contact_url = '' ";
|
$sql3 = "update v_contacts set contact_url = '' ";
|
||||||
$sql3 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
$sql3 .= "where domain_uuid = '".$row['domain_uuid']."' ";
|
||||||
$sql3 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
$sql3 .= "and contact_uuid = '".$row['contact_uuid']."' ";
|
||||||
$prep_statement3 = $db->prepare(check_sql($sql3));
|
$prep_statement3 = $db->prepare(check_sql($sql3));
|
||||||
$prep_statement3->execute();
|
$prep_statement3->execute();
|
||||||
unset($sql3, $prep_statement3);
|
unset($sql3, $prep_statement3);
|
||||||
}
|
}
|
||||||
unset($sql2, $result2, $prep_statement2);
|
unset($sql2, $result2, $prep_statement2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($obj);
|
unset($obj);
|
||||||
|
|
||||||
//set [name]_primary fields to 0 where null
|
//set [name]_primary fields to 0 where null
|
||||||
$name_tables = array('phones','addresses','emails','urls');
|
$name_tables = array('phones','addresses','emails','urls');
|
||||||
$name_fields = array('phone','address','email','url');
|
$name_fields = array('phone','address','email','url');
|
||||||
foreach ($name_tables as $name_index => $name_table) {
|
foreach ($name_tables as $name_index => $name_table) {
|
||||||
$sql = "update v_contact_".$name_table." set ".$name_fields[$name_index]."_primary = 0 ";
|
$sql = "update v_contact_".$name_table." set ".$name_fields[$name_index]."_primary = 0 ";
|
||||||
$sql .= "where ".$name_fields[$name_index]."_primary is null ";
|
$sql .= "where ".$name_fields[$name_index]."_primary is null ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset($sql, $prep_statement);
|
unset($sql, $prep_statement);
|
||||||
}
|
}
|
||||||
unset($name_tables, $name_fields);
|
unset($name_tables, $name_fields);
|
||||||
|
|
||||||
//move the users from the contact groups table into the contact users table
|
//move the users from the contact groups table into the contact users table
|
||||||
$sql = "select * from v_contact_groups ";
|
$sql = "select * from v_contact_groups ";
|
||||||
$sql .= "where group_uuid in (select user_uuid from v_users) ";
|
$sql .= "where group_uuid in (select user_uuid from v_users) ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$sql = "insert into v_contact_users ";
|
$sql = "insert into v_contact_users ";
|
||||||
$sql .= "( ";
|
$sql .= "( ";
|
||||||
$sql .= "contact_user_uuid, ";
|
$sql .= "contact_user_uuid, ";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "contact_uuid, ";
|
$sql .= "contact_uuid, ";
|
||||||
$sql .= "user_uuid ";
|
$sql .= "user_uuid ";
|
||||||
$sql .= ") ";
|
$sql .= ") ";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "( ";
|
$sql .= "( ";
|
||||||
$sql .= "'".uuid()."', ";
|
$sql .= "'".uuid()."', ";
|
||||||
$sql .= "'".$row["domain_uuid"]."', ";
|
$sql .= "'".$row["domain_uuid"]."', ";
|
||||||
$sql .= "'".$row["contact_uuid"]."', ";
|
$sql .= "'".$row["contact_uuid"]."', ";
|
||||||
$sql .= "'".$row["group_uuid"]."' ";
|
$sql .= "'".$row["group_uuid"]."' ";
|
||||||
$sql .= ");";
|
$sql .= ");";
|
||||||
//echo $sql."\n";
|
//echo $sql."\n";
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
$sql = "delete from v_contact_groups ";
|
$sql = "delete from v_contact_groups ";
|
||||||
$sql .= "where contact_group_uuid = '".$row["contact_group_uuid"]."';";
|
$sql .= "where contact_group_uuid = '".$row["contact_group_uuid"]."';";
|
||||||
//echo $sql."\n";
|
//echo $sql."\n";
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+121
-121
@@ -1,122 +1,122 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('contact_add')) {
|
if (permission_exists('contact_add')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
echo "bang!";
|
echo "bang!";
|
||||||
exit;
|
exit;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['contact_auth']['source'] = ($_SESSION['contact_auth']['source'] == '') ? $_REQUEST['source'] : $_SESSION['contact_auth']['source'];
|
$_SESSION['contact_auth']['source'] = ($_SESSION['contact_auth']['source'] == '') ? $_REQUEST['source'] : $_SESSION['contact_auth']['source'];
|
||||||
$_SESSION['contact_auth']['target'] = ($_SESSION['contact_auth']['target'] == '') ? $_REQUEST['target'] : $_SESSION['contact_auth']['target'];
|
$_SESSION['contact_auth']['target'] = ($_SESSION['contact_auth']['target'] == '') ? $_REQUEST['target'] : $_SESSION['contact_auth']['target'];
|
||||||
|
|
||||||
|
|
||||||
//google api authentication
|
//google api authentication
|
||||||
if ($_SESSION['contact_auth']['source'] == 'google') {
|
if ($_SESSION['contact_auth']['source'] == 'google') {
|
||||||
|
|
||||||
if ($_REQUEST['error']) {
|
if ($_REQUEST['error']) {
|
||||||
$_SESSION['message'] = ($text['message-'.$_REQUEST['error']] != '') ? $text['message-'.$_REQUEST['error']] : $_REQUEST['error'];
|
$_SESSION['message'] = ($text['message-'.$_REQUEST['error']] != '') ? $text['message-'.$_REQUEST['error']] : $_REQUEST['error'];
|
||||||
$_SESSION['message_mood'] = 'negative';
|
$_SESSION['message_mood'] = 'negative';
|
||||||
header("Location: ".$_SESSION['contact_auth']['referer']);
|
header("Location: ".$_SESSION['contact_auth']['referer']);
|
||||||
unset($_SESSION['contact_auth']);
|
unset($_SESSION['contact_auth']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_REQUEST['signout'])) {
|
if (isset($_REQUEST['signout'])) {
|
||||||
unset($_SESSION['contact_auth']['token']);
|
unset($_SESSION['contact_auth']['token']);
|
||||||
$_SESSION['message'] = $text['message-google_signed_out'];
|
$_SESSION['message'] = $text['message-google_signed_out'];
|
||||||
header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']);
|
header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET['code'] == '') {
|
if ($_GET['code'] == '') {
|
||||||
header("Location: https://accounts.google.com/o/oauth2/auth?client_id=".$_SESSION['contact']['google_oauth_client_id']['text']."&redirect_uri=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."&scope=https://www.google.com/m8/feeds/&response_type=code");
|
header("Location: https://accounts.google.com/o/oauth2/auth?client_id=".$_SESSION['contact']['google_oauth_client_id']['text']."&redirect_uri=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."&scope=https://www.google.com/m8/feeds/&response_type=code");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$auth_code = $_GET["code"];
|
$auth_code = $_GET["code"];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************************/
|
/*******************************************************************************************/
|
||||||
// request access token
|
// request access token
|
||||||
|
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'code' => urlencode($auth_code),
|
'code' => urlencode($auth_code),
|
||||||
'client_id' => urlencode($_SESSION['contact']['google_oauth_client_id']['text']),
|
'client_id' => urlencode($_SESSION['contact']['google_oauth_client_id']['text']),
|
||||||
'client_secret' => urlencode($_SESSION['contact']['google_oauth_client_secret']['text']),
|
'client_secret' => urlencode($_SESSION['contact']['google_oauth_client_secret']['text']),
|
||||||
'redirect_uri' => urlencode((($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']),
|
'redirect_uri' => urlencode((($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']),
|
||||||
'grant_type' => urlencode('authorization_code')
|
'grant_type' => urlencode('authorization_code')
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($fields as $key => $value) {
|
foreach($fields as $key => $value) {
|
||||||
$post_fields[] = $key.'='.$value;
|
$post_fields[] = $key.'='.$value;
|
||||||
}
|
}
|
||||||
$post_fields = implode("&", $post_fields);
|
$post_fields = implode("&", $post_fields);
|
||||||
|
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt($curl, CURLOPT_URL, 'https://accounts.google.com/o/oauth2/token');
|
curl_setopt($curl, CURLOPT_URL, 'https://accounts.google.com/o/oauth2/token');
|
||||||
curl_setopt($curl, CURLOPT_POST, 5);
|
curl_setopt($curl, CURLOPT_POST, 5);
|
||||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields);
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||||
$result = curl_exec($curl);
|
$result = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
|
|
||||||
$response = json_decode($result);
|
$response = json_decode($result);
|
||||||
$access_token = $response->access_token;
|
$access_token = $response->access_token;
|
||||||
|
|
||||||
if ($access_token != '') {
|
if ($access_token != '') {
|
||||||
// redirect to target script
|
// redirect to target script
|
||||||
$_SESSION['contact_auth']['token'] = $access_token;
|
$_SESSION['contact_auth']['token'] = $access_token;
|
||||||
header("Location: ".$_SESSION['contact_auth']['target']);
|
header("Location: ".$_SESSION['contact_auth']['target']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$_SESSION['message'] = $text['message-access_denied'];
|
$_SESSION['message'] = $text['message-access_denied'];
|
||||||
$_SESSION['message_mood'] = 'negative';
|
$_SESSION['message_mood'] = 'negative';
|
||||||
header("Location: ".$_SESSION['contact_auth']['referer']);
|
header("Location: ".$_SESSION['contact_auth']['referer']);
|
||||||
unset($_SESSION['contact_auth']);
|
unset($_SESSION['contact_auth']);
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,342 +1,342 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('contact_relation_edit') || permission_exists('contact_relation_add')) {
|
if (permission_exists('contact_relation_edit') || permission_exists('contact_relation_add')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//action add or update
|
//action add or update
|
||||||
if (isset($_REQUEST["id"])) {
|
if (isset($_REQUEST["id"])) {
|
||||||
$action = "update";
|
$action = "update";
|
||||||
$contact_relation_uuid = check_str($_REQUEST["id"]);
|
$contact_relation_uuid = check_str($_REQUEST["id"]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$action = "add";
|
$action = "add";
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the contact uuid
|
//get the contact uuid
|
||||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get http post variables and set them to php variables
|
//get http post variables and set them to php variables
|
||||||
if (count($_POST)>0) {
|
if (count($_POST)>0) {
|
||||||
$relation_label = check_str($_POST["relation_label"]);
|
$relation_label = check_str($_POST["relation_label"]);
|
||||||
$relation_label_custom = check_str($_POST["relation_label_custom"]);
|
$relation_label_custom = check_str($_POST["relation_label_custom"]);
|
||||||
$relation_contact_uuid = check_str($_POST["relation_contact_uuid"]);
|
$relation_contact_uuid = check_str($_POST["relation_contact_uuid"]);
|
||||||
$relation_reciprocal = check_str($_POST["relation_reciprocal"]);
|
$relation_reciprocal = check_str($_POST["relation_reciprocal"]);
|
||||||
$relation_reciprocal_label = check_str($_POST["relation_reciprocal_label"]);
|
$relation_reciprocal_label = check_str($_POST["relation_reciprocal_label"]);
|
||||||
$relation_reciprocal_label_custom = check_str($_POST["relation_reciprocal_label_custom"]);
|
$relation_reciprocal_label_custom = check_str($_POST["relation_reciprocal_label_custom"]);
|
||||||
|
|
||||||
//use custom label(s), if set
|
//use custom label(s), if set
|
||||||
$relation_label = ($relation_label_custom != '') ? $relation_label_custom : $relation_label;
|
$relation_label = ($relation_label_custom != '') ? $relation_label_custom : $relation_label;
|
||||||
$relation_reciprocal_label = ($relation_reciprocal_label_custom != '') ? $relation_reciprocal_label_custom : $relation_reciprocal_label;
|
$relation_reciprocal_label = ($relation_reciprocal_label_custom != '') ? $relation_reciprocal_label_custom : $relation_reciprocal_label;
|
||||||
}
|
}
|
||||||
|
|
||||||
//process the form data
|
//process the form data
|
||||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
|
||||||
//set the uuid
|
//set the uuid
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
$contact_relation_uuid = check_str($_POST["contact_relation_uuid"]);
|
$contact_relation_uuid = check_str($_POST["contact_relation_uuid"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for all required data
|
//check for all required data
|
||||||
$msg = '';
|
$msg = '';
|
||||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
require_once "resources/persist_form_var.php";
|
require_once "resources/persist_form_var.php";
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
echo "<table><tr><td>\n";
|
echo "<table><tr><td>\n";
|
||||||
echo $msg."<br />";
|
echo $msg."<br />";
|
||||||
echo "</td></tr></table>\n";
|
echo "</td></tr></table>\n";
|
||||||
persistformvar($_POST);
|
persistformvar($_POST);
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add or update the database
|
//add or update the database
|
||||||
if ($_POST["persistformvar"] != "true") {
|
if ($_POST["persistformvar"] != "true") {
|
||||||
|
|
||||||
//update last modified
|
//update last modified
|
||||||
$sql = "update v_contacts set ";
|
$sql = "update v_contacts set ";
|
||||||
$sql .= "last_mod_date = now(), ";
|
$sql .= "last_mod_date = now(), ";
|
||||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
if ($action == "add") {
|
if ($action == "add") {
|
||||||
$contact_relation_uuid = uuid();
|
$contact_relation_uuid = uuid();
|
||||||
$sql = "insert into v_contact_relations ";
|
$sql = "insert into v_contact_relations ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "contact_relation_uuid, ";
|
$sql .= "contact_relation_uuid, ";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "contact_uuid, ";
|
$sql .= "contact_uuid, ";
|
||||||
$sql .= "relation_label, ";
|
$sql .= "relation_label, ";
|
||||||
$sql .= "relation_contact_uuid ";
|
$sql .= "relation_contact_uuid ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'".$contact_relation_uuid."', ";
|
$sql .= "'".$contact_relation_uuid."', ";
|
||||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||||
$sql .= "'".$contact_uuid."', ";
|
$sql .= "'".$contact_uuid."', ";
|
||||||
$sql .= "'".$relation_label."', ";
|
$sql .= "'".$relation_label."', ";
|
||||||
$sql .= "'".$relation_contact_uuid."' ";
|
$sql .= "'".$relation_contact_uuid."' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
if ($relation_reciprocal) {
|
if ($relation_reciprocal) {
|
||||||
$contact_relation_uuid = uuid();
|
$contact_relation_uuid = uuid();
|
||||||
$sql = "insert into v_contact_relations ";
|
$sql = "insert into v_contact_relations ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "contact_relation_uuid, ";
|
$sql .= "contact_relation_uuid, ";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "contact_uuid, ";
|
$sql .= "contact_uuid, ";
|
||||||
$sql .= "relation_label, ";
|
$sql .= "relation_label, ";
|
||||||
$sql .= "relation_contact_uuid ";
|
$sql .= "relation_contact_uuid ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'".$contact_relation_uuid."', ";
|
$sql .= "'".$contact_relation_uuid."', ";
|
||||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||||
$sql .= "'".$relation_contact_uuid."', ";
|
$sql .= "'".$relation_contact_uuid."', ";
|
||||||
$sql .= "'".$relation_reciprocal_label."', ";
|
$sql .= "'".$relation_reciprocal_label."', ";
|
||||||
$sql .= "'".$contact_uuid."' ";
|
$sql .= "'".$contact_uuid."' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["message"] = $text['message-add'];
|
$_SESSION["message"] = $text['message-add'];
|
||||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||||
return;
|
return;
|
||||||
} //if ($action == "add")
|
} //if ($action == "add")
|
||||||
|
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
$sql = "update v_contact_relations set ";
|
$sql = "update v_contact_relations set ";
|
||||||
$sql .= "relation_label = '".$relation_label."', ";
|
$sql .= "relation_label = '".$relation_label."', ";
|
||||||
$sql .= "relation_contact_uuid = '".$relation_contact_uuid."' ";
|
$sql .= "relation_contact_uuid = '".$relation_contact_uuid."' ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and contact_relation_uuid = '".$contact_relation_uuid."'";
|
$sql .= "and contact_relation_uuid = '".$contact_relation_uuid."'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
$_SESSION["message"] = $text['message-update'];
|
$_SESSION["message"] = $text['message-update'];
|
||||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||||
return;
|
return;
|
||||||
} //if ($action == "update")
|
} //if ($action == "update")
|
||||||
} //if ($_POST["persistformvar"] != "true")
|
} //if ($_POST["persistformvar"] != "true")
|
||||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||||
$contact_relation_uuid = $_GET["id"];
|
$contact_relation_uuid = $_GET["id"];
|
||||||
$sql = "select * from v_contact_relations ";
|
$sql = "select * from v_contact_relations ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and contact_relation_uuid = '".$contact_relation_uuid."' ";
|
$sql .= "and contact_relation_uuid = '".$contact_relation_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$relation_label = $row["relation_label"];
|
$relation_label = $row["relation_label"];
|
||||||
$relation_contact_uuid = $row["relation_contact_uuid"];
|
$relation_contact_uuid = $row["relation_contact_uuid"];
|
||||||
break; //limit to 1 row
|
break; //limit to 1 row
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
//show the header
|
//show the header
|
||||||
$document['title'] = $text['title-contact_relation'];
|
$document['title'] = $text['title-contact_relation'];
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
//javascript to toggle input/select boxes
|
//javascript to toggle input/select boxes
|
||||||
echo "<script type='text/javascript'>";
|
echo "<script type='text/javascript'>";
|
||||||
echo " function toggle_custom(field) {";
|
echo " function toggle_custom(field) {";
|
||||||
echo " $('#'+field).toggle();";
|
echo " $('#'+field).toggle();";
|
||||||
echo " document.getElementById(field).selectedIndex = 0;";
|
echo " document.getElementById(field).selectedIndex = 0;";
|
||||||
echo " document.getElementById(field+'_custom').value = '';";
|
echo " document.getElementById(field+'_custom').value = '';";
|
||||||
echo " $('#'+field+'_custom').toggle();";
|
echo " $('#'+field+'_custom').toggle();";
|
||||||
echo " if ($('#'+field+'_custom').is(':visible')) { $('#'+field+'_custom').focus(); } else { $('#'+field).focus(); }";
|
echo " if ($('#'+field+'_custom').is(':visible')) { $('#'+field+'_custom').focus(); } else { $('#'+field).focus(); }";
|
||||||
echo " }";
|
echo " }";
|
||||||
echo "</script>";
|
echo "</script>";
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<form method='post' name='frm' action=''>\n";
|
echo "<form method='post' name='frm' action=''>\n";
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td align='left' valign='top' nowrap='nowrap'>";
|
echo "<td align='left' valign='top' nowrap='nowrap'>";
|
||||||
echo " <b>".$text['header-contact_relation']."</b>";
|
echo " <b>".$text['header-contact_relation']."</b>";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td align='right' valign='top'>";
|
echo "<td align='right' valign='top'>";
|
||||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='contact_edit.php?id=".$contact_uuid."'\" value='".$text['button-back']."'>";
|
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='contact_edit.php?id=".$contact_uuid."'\" value='".$text['button-back']."'>";
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-contact_relation_label']."\n";
|
echo " ".$text['label-contact_relation_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
if (is_array($_SESSION["contact"]["relation_label"])) {
|
if (is_array($_SESSION["contact"]["relation_label"])) {
|
||||||
sort($_SESSION["contact"]["relation_label"]);
|
sort($_SESSION["contact"]["relation_label"]);
|
||||||
foreach($_SESSION["contact"]["relation_label"] as $row) {
|
foreach($_SESSION["contact"]["relation_label"] as $row) {
|
||||||
$relation_label_options[] = "<option value='".$row."' ".(($row == $relation_label) ? "selected='selected'" : null).">".$row."</option>";
|
$relation_label_options[] = "<option value='".$row."' ".(($row == $relation_label) ? "selected='selected'" : null).">".$row."</option>";
|
||||||
}
|
}
|
||||||
$relation_label_found = (in_array($relation_label, $_SESSION["contact"]["relation_label"])) ? true : false;
|
$relation_label_found = (in_array($relation_label, $_SESSION["contact"]["relation_label"])) ? true : false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$selected[$relation_label] = "selected";
|
$selected[$relation_label] = "selected";
|
||||||
$default_labels[] = $text['label-contact_relation_option_parent'];
|
$default_labels[] = $text['label-contact_relation_option_parent'];
|
||||||
$default_labels[] = $text['label-contact_relation_option_child'];
|
$default_labels[] = $text['label-contact_relation_option_child'];
|
||||||
$default_labels[] = $text['label-contact_relation_option_employee'];
|
$default_labels[] = $text['label-contact_relation_option_employee'];
|
||||||
$default_labels[] = $text['label-contact_relation_option_member'];
|
$default_labels[] = $text['label-contact_relation_option_member'];
|
||||||
$default_labels[] = $text['label-contact_relation_option_associate'];
|
$default_labels[] = $text['label-contact_relation_option_associate'];
|
||||||
$default_labels[] = $text['label-contact_relation_option_other'];
|
$default_labels[] = $text['label-contact_relation_option_other'];
|
||||||
foreach ($default_labels as $default_label) {
|
foreach ($default_labels as $default_label) {
|
||||||
$relation_label_options[] = "<option value='".$default_label."' ".$selected[$default_label].">".$default_label."</option>";
|
$relation_label_options[] = "<option value='".$default_label."' ".$selected[$default_label].">".$default_label."</option>";
|
||||||
}
|
}
|
||||||
$relation_label_found = (in_array($relation_label, $default_labels)) ? true : false;
|
$relation_label_found = (in_array($relation_label, $default_labels)) ? true : false;
|
||||||
}
|
}
|
||||||
echo " <select class='formfld' ".((!$relation_label_found && $relation_label != '') ? "style='display: none;'" : null)." name='relation_label' id='relation_label' onchange=\"getElementById('relation_label_custom').value='';\">\n";
|
echo " <select class='formfld' ".((!$relation_label_found && $relation_label != '') ? "style='display: none;'" : null)." name='relation_label' id='relation_label' onchange=\"getElementById('relation_label_custom').value='';\">\n";
|
||||||
echo " <option value=''></option>\n";
|
echo " <option value=''></option>\n";
|
||||||
echo (is_array($relation_label_options)) ? implode("\n", $relation_label_options) : null;
|
echo (is_array($relation_label_options)) ? implode("\n", $relation_label_options) : null;
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo " <input type='text' class='formfld' ".(($relation_label_found || $relation_label == '') ? "style='display: none;'" : null)." name='relation_label_custom' id='relation_label_custom' value=\"".((!$relation_label_found) ? htmlentities($relation_label) : null)."\">\n";
|
echo " <input type='text' class='formfld' ".(($relation_label_found || $relation_label == '') ? "style='display: none;'" : null)." name='relation_label_custom' id='relation_label_custom' value=\"".((!$relation_label_found) ? htmlentities($relation_label) : null)."\">\n";
|
||||||
echo " <input type='button' id='btn_toggle_label' class='btn' alt='".$text['button-back']."' value='◁' onclick=\"toggle_custom('relation_label');\">\n";
|
echo " <input type='button' id='btn_toggle_label' class='btn' alt='".$text['button-back']."' value='◁' onclick=\"toggle_custom('relation_label');\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-relation_label']."\n";
|
echo $text['description-relation_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-contact_relation_contact']."\n";
|
echo " ".$text['label-contact_relation_contact']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
$sql = "select contact_uuid, contact_organization, contact_name_given, contact_name_family from v_contacts ";
|
$sql = "select contact_uuid, contact_organization, contact_name_given, contact_name_family from v_contacts ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and contact_uuid <> '".$contact_uuid."' ";
|
$sql .= "and contact_uuid <> '".$contact_uuid."' ";
|
||||||
$sql .= "order by contact_organization desc, contact_name_given asc, contact_name_family asc ";
|
$sql .= "order by contact_organization desc, contact_name_given asc, contact_name_family asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
echo "<select class='formfld' name='relation_contact_uuid' id='relation_contact_uuid'>\n";
|
echo "<select class='formfld' name='relation_contact_uuid' id='relation_contact_uuid'>\n";
|
||||||
echo "<option value=''></option>\n";
|
echo "<option value=''></option>\n";
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$contact_name = $row['contact_name_given'].(($row['contact_name_given'] != '' && $row['contact_name_family'] != '') ? ' ' : null).$row['contact_name_family'];
|
$contact_name = $row['contact_name_given'].(($row['contact_name_given'] != '' && $row['contact_name_family'] != '') ? ' ' : null).$row['contact_name_family'];
|
||||||
if ($row['contact_organization'] != '') {
|
if ($row['contact_organization'] != '') {
|
||||||
if ($contact_name != '') {
|
if ($contact_name != '') {
|
||||||
$contact_name = $row['contact_organization'].', '.$contact_name;
|
$contact_name = $row['contact_organization'].', '.$contact_name;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$contact_name = $row['contact_organization'];
|
$contact_name = $row['contact_organization'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<option value='".$row['contact_uuid']."' ".(($row['contact_uuid'] == $relation_contact_uuid) ? "selected='selected'" : null).">".$contact_name."</option>\n";
|
echo "<option value='".$row['contact_uuid']."' ".(($row['contact_uuid'] == $relation_contact_uuid) ? "selected='selected'" : null).">".$contact_name."</option>\n";
|
||||||
}
|
}
|
||||||
unset($sql, $result, $row_count);
|
unset($sql, $result, $row_count);
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
// echo "<br />\n";
|
// echo "<br />\n";
|
||||||
// echo $text['description-related_contact']."\n";
|
// echo $text['description-related_contact']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($action == 'add') {
|
if ($action == 'add') {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-contact_relation_reciprocal']."\n";
|
echo " ".$text['label-contact_relation_reciprocal']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='relation_reciprocal' id='relation_reciprocal' onchange=\"$('#reciprocal_label').slideToggle(400);\">\n";
|
echo " <select class='formfld' name='relation_reciprocal' id='relation_reciprocal' onchange=\"$('#reciprocal_label').slideToggle(400);\">\n";
|
||||||
echo " <option value='0'>".$text['option-false']."</option>\n";
|
echo " <option value='0'>".$text['option-false']."</option>\n";
|
||||||
echo " <option value='1'>".$text['option-true']."</option>\n";
|
echo " <option value='1'>".$text['option-true']."</option>\n";
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-contact_relation_reciprocal']."\n";
|
echo $text['description-contact_relation_reciprocal']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
echo "<div id='reciprocal_label' style='display: none;'>\n";
|
echo "<div id='reciprocal_label' style='display: none;'>\n";
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-contact_relation_reciprocal_label']."\n";
|
echo " ".$text['label-contact_relation_reciprocal_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='relation_reciprocal_label' id='relation_reciprocal_label' onchange=\"getElementById('relation_reciprocal_label_custom').value='';\">\n";
|
echo " <select class='formfld' name='relation_reciprocal_label' id='relation_reciprocal_label' onchange=\"getElementById('relation_reciprocal_label_custom').value='';\">\n";
|
||||||
echo " <option value=''></option>\n";
|
echo " <option value=''></option>\n";
|
||||||
echo (is_array($relation_label_options)) ? implode("\n", $relation_label_options) : null;
|
echo (is_array($relation_label_options)) ? implode("\n", $relation_label_options) : null;
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo " <input type='text' class='formfld' style='display: none;' name='relation_reciprocal_label_custom' id='relation_reciprocal_label_custom' value=''>\n";
|
echo " <input type='text' class='formfld' style='display: none;' name='relation_reciprocal_label_custom' id='relation_reciprocal_label_custom' value=''>\n";
|
||||||
echo " <input type='button' id='btn_toggle_reciprocal_label' class='btn' alt='".$text['button-back']."' value='◁' onclick=\"toggle_custom('relation_reciprocal_label');\">\n";
|
echo " <input type='button' id='btn_toggle_reciprocal_label' class='btn' alt='".$text['button-back']."' value='◁' onclick=\"toggle_custom('relation_reciprocal_label');\">\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-contact_relation_reciprocal_label']."\n";
|
echo $text['description-contact_relation_reciprocal_label']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td colspan='2' align='right'>\n";
|
echo " <td colspan='2' align='right'>\n";
|
||||||
echo " <br>\n";
|
echo " <br>\n";
|
||||||
echo " <input type='hidden' name='contact_uuid' value='".$contact_uuid."'>\n";
|
echo " <input type='hidden' name='contact_uuid' value='".$contact_uuid."'>\n";
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
echo " <input type='hidden' name='contact_relation_uuid' value='".$contact_relation_uuid."'>\n";
|
echo " <input type='hidden' name='contact_relation_uuid' value='".$contact_relation_uuid."'>\n";
|
||||||
}
|
}
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|||||||
+112
-112
@@ -1,113 +1,113 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('contact_relation_view')) {
|
if (permission_exists('contact_relation_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<table width='100%' border='0'>\n";
|
echo "<table width='100%' border='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='50%' align='left' nowrap='nowrap'><b>".$text['header-contact_relations']."</b></td>\n";
|
echo "<td width='50%' align='left' nowrap='nowrap'><b>".$text['header-contact_relations']."</b></td>\n";
|
||||||
echo "<td width='50%' align='right'> </td>\n";
|
echo "<td width='50%' align='right'> </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
//get the related contacts
|
//get the related contacts
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "cr.contact_relation_uuid, ";
|
$sql .= "cr.contact_relation_uuid, ";
|
||||||
$sql .= "cr.relation_label, ";
|
$sql .= "cr.relation_label, ";
|
||||||
$sql .= "c.contact_uuid, ";
|
$sql .= "c.contact_uuid, ";
|
||||||
$sql .= "c.contact_organization, ";
|
$sql .= "c.contact_organization, ";
|
||||||
$sql .= "c.contact_name_given, ";
|
$sql .= "c.contact_name_given, ";
|
||||||
$sql .= "c.contact_name_family ";
|
$sql .= "c.contact_name_family ";
|
||||||
$sql .= "from ";
|
$sql .= "from ";
|
||||||
$sql .= "v_contact_relations as cr, ";
|
$sql .= "v_contact_relations as cr, ";
|
||||||
$sql .= "v_contacts as c ";
|
$sql .= "v_contacts as c ";
|
||||||
$sql .= "where ";
|
$sql .= "where ";
|
||||||
$sql .= "cr.relation_contact_uuid = c.contact_uuid ";
|
$sql .= "cr.relation_contact_uuid = c.contact_uuid ";
|
||||||
$sql .= "and cr.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "and cr.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and cr.contact_uuid = '".$contact_uuid."' ";
|
$sql .= "and cr.contact_uuid = '".$contact_uuid."' ";
|
||||||
$sql .= "order by ";
|
$sql .= "order by ";
|
||||||
$sql .= "c.contact_organization desc, ";
|
$sql .= "c.contact_organization desc, ";
|
||||||
$sql .= "c.contact_name_given asc, ";
|
$sql .= "c.contact_name_given asc, ";
|
||||||
$sql .= "c.contact_name_family asc ";
|
$sql .= "c.contact_name_family asc ";
|
||||||
//echo $sql."<br><br>";
|
//echo $sql."<br><br>";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
echo "<table class='tr_hover' style='margin-bottom: 20px;' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table class='tr_hover' style='margin-bottom: 20px;' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<th>".$text['label-contact_relation_label']."</th>\n";
|
echo "<th>".$text['label-contact_relation_label']."</th>\n";
|
||||||
echo "<th>".$text['label-contact_relation_organization']."</th>\n";
|
echo "<th>".$text['label-contact_relation_organization']."</th>\n";
|
||||||
echo "<th>".$text['label-contact_relation_name']."</th>\n";
|
echo "<th>".$text['label-contact_relation_name']."</th>\n";
|
||||||
echo "<td class='list_control_icons'>";
|
echo "<td class='list_control_icons'>";
|
||||||
if (permission_exists('contact_relation_add')) {
|
if (permission_exists('contact_relation_add')) {
|
||||||
echo "<a href='contact_relation_edit.php?contact_uuid=".$contact_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
echo "<a href='contact_relation_edit.php?contact_uuid=".$contact_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
}
|
}
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
if (permission_exists('contact_relation_edit')) {
|
if (permission_exists('contact_relation_edit')) {
|
||||||
$tr_link = "href='contact_relation_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['contact_relation_uuid']."' ";
|
$tr_link = "href='contact_relation_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['contact_relation_uuid']."' ";
|
||||||
}
|
}
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['relation_label']." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['relation_label']." </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'><a href='contact_edit.php?id=".$row['contact_uuid']."'>".$row['contact_organization']."</a> </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'><a href='contact_edit.php?id=".$row['contact_uuid']."'>".$row['contact_organization']."</a> </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'><a href='contact_edit.php?id=".$row['contact_uuid']."'>".$row['contact_name_given'].(($row['contact_name_given'] != '' && $row['contact_name_family'] != '') ? ' ' : null).$row['contact_name_family']."</a> </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'><a href='contact_edit.php?id=".$row['contact_uuid']."'>".$row['contact_name_given'].(($row['contact_name_given'] != '' && $row['contact_name_family'] != '') ? ' ' : null).$row['contact_name_family']."</a> </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('contact_relation_edit')) {
|
if (permission_exists('contact_relation_edit')) {
|
||||||
echo "<a href='contact_relation_edit.php?contact_uuid=".$contact_uuid."&id=".$row['contact_relation_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
echo "<a href='contact_relation_edit.php?contact_uuid=".$contact_uuid."&id=".$row['contact_relation_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||||
}
|
}
|
||||||
if (permission_exists('contact_relation_delete')) {
|
if (permission_exists('contact_relation_delete')) {
|
||||||
echo "<a href='contact_relation_delete.php?contact_uuid=".$contact_uuid."&id=".$row['contact_relation_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
echo "<a href='contact_relation_delete.php?contact_uuid=".$contact_uuid."&id=".$row['contact_relation_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$c = ($c) ? 0 : 1;
|
$c = ($c) ? 0 : 1;
|
||||||
} //end foreach
|
} //end foreach
|
||||||
unset($sql, $result, $row_count);
|
unset($sql, $result, $row_count);
|
||||||
} //end if results
|
} //end if results
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+360
-360
@@ -1,361 +1,361 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get contact uuid
|
//get contact uuid
|
||||||
$domain_uuid = check_str($_REQUEST['domain_uuid']);
|
$domain_uuid = check_str($_REQUEST['domain_uuid']);
|
||||||
$contact_uuid = check_str($_REQUEST['contact_uuid']);
|
$contact_uuid = check_str($_REQUEST['contact_uuid']);
|
||||||
|
|
||||||
//get posted variables & set time status
|
//get posted variables & set time status
|
||||||
if (sizeof($_POST) > 0) {
|
if (sizeof($_POST) > 0) {
|
||||||
$contact_time_uuid = check_str($_POST['contact_time_uuid']);
|
$contact_time_uuid = check_str($_POST['contact_time_uuid']);
|
||||||
$contact_uuid = check_str($_POST['contact_uuid']);
|
$contact_uuid = check_str($_POST['contact_uuid']);
|
||||||
$time_action = check_str($_POST['time_action']);
|
$time_action = check_str($_POST['time_action']);
|
||||||
$time_description = check_str($_POST['time_description']);
|
$time_description = check_str($_POST['time_description']);
|
||||||
|
|
||||||
if ($time_description == 'Description...') { unset($time_description); }
|
if ($time_description == 'Description...') { unset($time_description); }
|
||||||
|
|
||||||
if ($time_action == 'start') {
|
if ($time_action == 'start') {
|
||||||
$contact_time_uuid = uuid();
|
$contact_time_uuid = uuid();
|
||||||
$sql = "insert into v_contact_times ";
|
$sql = "insert into v_contact_times ";
|
||||||
$sql .= "( ";
|
$sql .= "( ";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "contact_time_uuid, ";
|
$sql .= "contact_time_uuid, ";
|
||||||
$sql .= "contact_uuid, ";
|
$sql .= "contact_uuid, ";
|
||||||
$sql .= "user_uuid, ";
|
$sql .= "user_uuid, ";
|
||||||
$sql .= "time_start, ";
|
$sql .= "time_start, ";
|
||||||
$sql .= "time_description ";
|
$sql .= "time_description ";
|
||||||
$sql .= ") ";
|
$sql .= ") ";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "( ";
|
$sql .= "( ";
|
||||||
$sql .= "'".$domain_uuid."', ";
|
$sql .= "'".$domain_uuid."', ";
|
||||||
$sql .= "'".$contact_time_uuid."', ";
|
$sql .= "'".$contact_time_uuid."', ";
|
||||||
$sql .= "'".$contact_uuid."', ";
|
$sql .= "'".$contact_uuid."', ";
|
||||||
$sql .= "'".$_SESSION["user"]["user_uuid"]."', ";
|
$sql .= "'".$_SESSION["user"]["user_uuid"]."', ";
|
||||||
$sql .= "'".date("Y-m-d H:i:s")."', ";
|
$sql .= "'".date("Y-m-d H:i:s")."', ";
|
||||||
$sql .= "'".$time_description."' ";
|
$sql .= "'".$time_description."' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
if ($time_action == 'stop') {
|
if ($time_action == 'stop') {
|
||||||
$sql = "update v_contact_times ";
|
$sql = "update v_contact_times ";
|
||||||
$sql .= "set ";
|
$sql .= "set ";
|
||||||
$sql .= "time_stop = '".date("Y-m-d H:i:s")."', ";
|
$sql .= "time_stop = '".date("Y-m-d H:i:s")."', ";
|
||||||
$sql .= "time_description = '".$time_description."' ";
|
$sql .= "time_description = '".$time_description."' ";
|
||||||
$sql .= "where ";
|
$sql .= "where ";
|
||||||
$sql .= "contact_time_uuid = '".$contact_time_uuid."' ";
|
$sql .= "contact_time_uuid = '".$contact_time_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||||
$sql .= "and user_uuid = '".$_SESSION["user"]["user_uuid"]."' ";
|
$sql .= "and user_uuid = '".$_SESSION["user"]["user_uuid"]."' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
header("Location: contact_timer.php?domain_uuid=".$domain_uuid."&contact_uuid=".$contact_uuid);
|
header("Location: contact_timer.php?domain_uuid=".$domain_uuid."&contact_uuid=".$contact_uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get contact details
|
//get contact details
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "contact_organization, ";
|
$sql .= "contact_organization, ";
|
||||||
$sql .= "contact_name_given, ";
|
$sql .= "contact_name_given, ";
|
||||||
$sql .= "contact_name_family, ";
|
$sql .= "contact_name_family, ";
|
||||||
$sql .= "contact_nickname ";
|
$sql .= "contact_nickname ";
|
||||||
$sql .= "from v_contacts ";
|
$sql .= "from v_contacts ";
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
if (sizeof($result) > 0) {
|
if (sizeof($result) > 0) {
|
||||||
$contact_organization = $result["contact_organization"];
|
$contact_organization = $result["contact_organization"];
|
||||||
$contact_name_given = $result["contact_name_given"];
|
$contact_name_given = $result["contact_name_given"];
|
||||||
$contact_name_family = $result["contact_name_family"];
|
$contact_name_family = $result["contact_name_family"];
|
||||||
$contact_nickname = $result["contact_nickname"];
|
$contact_nickname = $result["contact_nickname"];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
unset ($sql, $prep_statement, $result);
|
unset ($sql, $prep_statement, $result);
|
||||||
|
|
||||||
//determine timer state and action
|
//determine timer state and action
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "contact_time_uuid, ";
|
$sql .= "contact_time_uuid, ";
|
||||||
$sql .= "time_description ";
|
$sql .= "time_description ";
|
||||||
$sql .= "from v_contact_times ";
|
$sql .= "from v_contact_times ";
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
||||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||||
$sql .= "and time_start is not null ";
|
$sql .= "and time_start is not null ";
|
||||||
$sql .= "and time_stop is null ";
|
$sql .= "and time_stop is null ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
if (sizeof($result) > 0) {
|
if (sizeof($result) > 0) {
|
||||||
$contact_time_uuid = $result["contact_time_uuid"];
|
$contact_time_uuid = $result["contact_time_uuid"];
|
||||||
$time_description = $result["time_description"];
|
$time_description = $result["time_description"];
|
||||||
}
|
}
|
||||||
unset ($sql, $prep_statement, $result);
|
unset ($sql, $prep_statement, $result);
|
||||||
|
|
||||||
$timer_state = ($contact_time_uuid != '') ? 'running' : 'stopped';
|
$timer_state = ($contact_time_uuid != '') ? 'running' : 'stopped';
|
||||||
$timer_action = ($timer_state == 'running') ? 'stop' : 'start';
|
$timer_action = ($timer_state == 'running') ? 'stop' : 'start';
|
||||||
|
|
||||||
//determine contact name to display
|
//determine contact name to display
|
||||||
if ($contact_nickname != '') {
|
if ($contact_nickname != '') {
|
||||||
$contact = $contact_nickname;
|
$contact = $contact_nickname;
|
||||||
}
|
}
|
||||||
else if ($contact_name_given != '') {
|
else if ($contact_name_given != '') {
|
||||||
$contact = $contact_name_given;
|
$contact = $contact_name_given;
|
||||||
}
|
}
|
||||||
if ($contact_name_family != '') {
|
if ($contact_name_family != '') {
|
||||||
$contact .= ($contact != '') ? ' '.$contact_name_family : $contact_name_family;
|
$contact .= ($contact != '') ? ' '.$contact_name_family : $contact_name_family;
|
||||||
}
|
}
|
||||||
if ($contact_organization != '') {
|
if ($contact_organization != '') {
|
||||||
$contact .= ($contact != '') ? ', '.$contact_organization : $contact_organization;
|
$contact .= ($contact != '') ? ', '.$contact_organization : $contact_organization;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
|
||||||
<head>
|
<head>
|
||||||
<title><?php echo $text['label-time_timer']; ?>: <?php echo $contact; ?></title>
|
<title><?php echo $text['label-time_timer']; ?>: <?php echo $contact; ?></title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
color: #5f5f5f;
|
color: #5f5f5f;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: arial;
|
font-family: arial;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
b {
|
b {
|
||||||
color: #952424;
|
color: #952424;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-family: arial;
|
font-family: arial;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #004083;
|
color: #004083;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #5082ca;
|
color: #5082ca;
|
||||||
}
|
}
|
||||||
|
|
||||||
form {
|
form {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.btn, input.button {
|
input.btn, input.button {
|
||||||
font-family: Candara, Calibri, Segoe, "Segoe UI", Optima, Arial, sans-serif;
|
font-family: Candara, Calibri, Segoe, "Segoe UI", Optima, Arial, sans-serif;
|
||||||
padding: 2px 6px 3px 6px;
|
padding: 2px 6px 3px 6px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
-khtml-border-radius: 3px;
|
-khtml-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-image: -moz-linear-gradient(top, #524f59 25%, #000 64%);
|
background-image: -moz-linear-gradient(top, #524f59 25%, #000 64%);
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.25, #524f59), color-stop(0.64, #000));
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.25, #524f59), color-stop(0.64, #000));
|
||||||
border: 1px solid #26242a;
|
border: 1px solid #26242a;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);
|
text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
-moz-opacity: 0.9;
|
-moz-opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.btn:hover, input.button:hover, img.list_control_icon:hover {
|
input.btn:hover, input.button:hover, img.list_control_icon:hover {
|
||||||
box-shadow: 0 0 5px #cddaf0;
|
box-shadow: 0 0 5px #cddaf0;
|
||||||
-webkit-box-shadow: 0 0 5px #cddaf0;
|
-webkit-box-shadow: 0 0 5px #cddaf0;
|
||||||
-moz-box-shadow: 0 0 5px #cddaf0;
|
-moz-box-shadow: 0 0 5px #cddaf0;
|
||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
-moz-opacity: 1.0;
|
-moz-opacity: 1.0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.txt, textarea.txt, select.txt, .formfld {
|
input.txt, textarea.txt, select.txt, .formfld {
|
||||||
font-family: arial;
|
font-family: arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #000;
|
color: #000;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 1px solid #c0c0c0;
|
border: 1px solid #c0c0c0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0 0 3px #cddaf0 inset;
|
box-shadow: 0 0 3px #cddaf0 inset;
|
||||||
-moz-box-shadow: 0 0 3px #cddaf0 inset;
|
-moz-box-shadow: 0 0 3px #cddaf0 inset;
|
||||||
-webkit-box-shadow: 0 0 3px #cddaf0 inset;
|
-webkit-box-shadow: 0 0 3px #cddaf0 inset;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.txt, .formfld {
|
input.txt, .formfld {
|
||||||
transition: width 0.25s;
|
transition: width 0.25s;
|
||||||
-moz-transition: width 0.25s;
|
-moz-transition: width 0.25s;
|
||||||
-webkit-transition: width 0.25s;
|
-webkit-transition: width 0.25s;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.txt:focus, .formfld:focus {
|
input.txt:focus, .formfld:focus {
|
||||||
-webkit-box-shadow: 0 0 5px #cddaf0;
|
-webkit-box-shadow: 0 0 5px #cddaf0;
|
||||||
-moz-box-shadow: 0 0 5px #cddaf0;
|
-moz-box-shadow: 0 0 5px #cddaf0;
|
||||||
box-shadow: 0 0 5px #cddaf0;
|
box-shadow: 0 0 5px #cddaf0;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
color: #5f5f5f;
|
color: #5f5f5f;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: arial;
|
font-family: arial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vncell {
|
.vncell {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
background-color: #e5e9f0;
|
background-color: #e5e9f0;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: #000;
|
color: #000;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border-right: 3px solid #e5e9f0;
|
border-right: 3px solid #e5e9f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DIV.timer_running {
|
DIV.timer_running {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #2C9DE8;
|
background-color: #2C9DE8;
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
/*-webkit-text-shadow: 0px 0px 5px #000;*/
|
/*-webkit-text-shadow: 0px 0px 5px #000;*/
|
||||||
/*-moz-text-shadow: 0px 0px 5px #000;*/
|
/*-moz-text-shadow: 0px 0px 5px #000;*/
|
||||||
/*text-shadow: 0px 0px 5px #000;*/
|
/*text-shadow: 0px 0px 5px #000;*/
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
letter-spacing: -0.05em;
|
letter-spacing: -0.05em;
|
||||||
font-family: "Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",monospace;
|
font-family: "Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",monospace;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
DIV.timer_stopped {
|
DIV.timer_stopped {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 53px;
|
height: 53px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #2C9DE8;
|
background-color: #2C9DE8;
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
/*-webkit-text-shadow: 0px 0px 5px #000;*/
|
/*-webkit-text-shadow: 0px 0px 5px #000;*/
|
||||||
/*-moz-text-shadow: 0px 0px 5px #000;*/
|
/*-moz-text-shadow: 0px 0px 5px #000;*/
|
||||||
/*text-shadow: 0px 0px 5px #000;*/
|
/*text-shadow: 0px 0px 5px #000;*/
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
letter-spacing: -0.05em;
|
letter-spacing: -0.05em;
|
||||||
font-family: "Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",monospace;
|
font-family: "Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",monospace;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script language="JavaScript" type="text/javascript" src="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-1.11.1.js"></script>
|
<script language="JavaScript" type="text/javascript" src="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-1.11.1.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
//ajax for refresh
|
//ajax for refresh
|
||||||
var refresh = 1500;
|
var refresh = 1500;
|
||||||
var source_url = 'contact_timer_inc.php?domain_uuid=<?php echo $domain_uuid; ?>&contact_uuid=<?php echo $contact_uuid; ?>&contact_time_uuid=<?php echo $contact_time_uuid; ?>';
|
var source_url = 'contact_timer_inc.php?domain_uuid=<?php echo $domain_uuid; ?>&contact_uuid=<?php echo $contact_uuid; ?>&contact_time_uuid=<?php echo $contact_time_uuid; ?>';
|
||||||
|
|
||||||
var ajax_get = function () {
|
var ajax_get = function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: source_url, success: function(response){
|
url: source_url, success: function(response){
|
||||||
$("#ajax_reponse").html(response);
|
$("#ajax_reponse").html(response);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTimeout(ajax_get, refresh);
|
setTimeout(ajax_get, refresh);
|
||||||
};
|
};
|
||||||
<?php if ($timer_state == 'running') { ?>
|
<?php if ($timer_state == 'running') { ?>
|
||||||
ajax_get();
|
ajax_get();
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
});
|
});
|
||||||
|
|
||||||
//set window title to time when timer is running
|
//set window title to time when timer is running
|
||||||
function set_title(title_text) {
|
function set_title(title_text) {
|
||||||
window.document.title = title_text;
|
window.document.title = title_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<img src='resources/images/icon_timer.png' style='width: 24px; height: 24px; border: none; margin-left: 15px;' alt="<?php echo $text['label-time_timer']; ?>" align='right'>
|
<img src='resources/images/icon_timer.png' style='width: 24px; height: 24px; border: none; margin-left: 15px;' alt="<?php echo $text['label-time_timer']; ?>" align='right'>
|
||||||
<b><?php echo $text['label-time_timer']; ?></b>
|
<b><?php echo $text['label-time_timer']; ?></b>
|
||||||
<br><br>
|
<br><br>
|
||||||
<?php echo $text['description_timer']; ?>
|
<?php echo $text['description_timer']; ?>
|
||||||
<br><br>
|
<br><br>
|
||||||
<strong><a href="javascript:void(0);" onclick="window.opener.location.href='contact_edit.php?id=<?php echo $contact_uuid; ?>';"><?php echo $contact; ?></a></strong>
|
<strong><a href="javascript:void(0);" onclick="window.opener.location.href='contact_edit.php?id=<?php echo $contact_uuid; ?>';"><?php echo $contact; ?></a></strong>
|
||||||
<br><br>
|
<br><br>
|
||||||
<div id='ajax_reponse' class='timer_<?php echo $timer_state;?>'>00:00:00</div>
|
<div id='ajax_reponse' class='timer_<?php echo $timer_state;?>'>00:00:00</div>
|
||||||
<br>
|
<br>
|
||||||
<form name='frm' id='frm' method='post' action=''>
|
<form name='frm' id='frm' method='post' action=''>
|
||||||
<input type='hidden' name='domain_uuid' value="<?php echo $domain_uuid; ?>">
|
<input type='hidden' name='domain_uuid' value="<?php echo $domain_uuid; ?>">
|
||||||
<input type='hidden' name='contact_time_uuid' value="<?php echo $contact_time_uuid; ?>">
|
<input type='hidden' name='contact_time_uuid' value="<?php echo $contact_time_uuid; ?>">
|
||||||
<input type='hidden' name='contact_uuid' value="<?php echo $contact_uuid; ?>">
|
<input type='hidden' name='contact_uuid' value="<?php echo $contact_uuid; ?>">
|
||||||
<input type='hidden' name='time_action' value="<?php echo $timer_action; ?>">
|
<input type='hidden' name='time_action' value="<?php echo $timer_action; ?>">
|
||||||
<table cellpadding='0' cellspacing='0' border='0' style='width: 100%;'>
|
<table cellpadding='0' cellspacing='0' border='0' style='width: 100%;'>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='vncell' style='text-align: center; padding: 10px;'>
|
<td class='vncell' style='text-align: center; padding: 10px;'>
|
||||||
<?php echo $text['label-description']; ?>
|
<?php echo $text['label-description']; ?>
|
||||||
<textarea name='time_description' id='timer_description' class='formfld' style='width: 100%; height: 50px; margin-top: 5px;'><?php echo $time_description; ?></textarea>
|
<textarea name='time_description' id='timer_description' class='formfld' style='width: 100%; height: 50px; margin-top: 5px;'><?php echo $time_description; ?></textarea>
|
||||||
<? if ($timer_state == 'stopped') { ?><script>document.getElementById('timer_description').focus();</script><? } ?>
|
<? if ($timer_state == 'stopped') { ?><script>document.getElementById('timer_description').focus();</script><? } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<center>
|
<center>
|
||||||
<?php if ($timer_state == 'running') { ?>
|
<?php if ($timer_state == 'running') { ?>
|
||||||
<input type='submit' class='btn' value="<?php echo $text['button-stop']; ?>">
|
<input type='submit' class='btn' value="<?php echo $text['button-stop']; ?>">
|
||||||
<?php } else if ($timer_state == 'stopped') { ?>
|
<?php } else if ($timer_state == 'stopped') { ?>
|
||||||
<input type='submit' class='btn' value="<?php echo $text['button-start']; ?>">
|
<input type='submit' class='btn' value="<?php echo $text['button-start']; ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</center>
|
</center>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,57 +1,57 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
||||||
|
|
||||||
//get contact and time uuids
|
//get contact and time uuids
|
||||||
$domain_uuid = check_str($_REQUEST['domain_uuid']);
|
$domain_uuid = check_str($_REQUEST['domain_uuid']);
|
||||||
$contact_uuid = check_str($_REQUEST['contact_uuid']);
|
$contact_uuid = check_str($_REQUEST['contact_uuid']);
|
||||||
$contact_time_uuid = check_str($_REQUEST['contact_time_uuid']);
|
$contact_time_uuid = check_str($_REQUEST['contact_time_uuid']);
|
||||||
|
|
||||||
//get time quantity
|
//get time quantity
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "time_start ";
|
$sql .= "time_start ";
|
||||||
$sql .= "from v_contact_times ";
|
$sql .= "from v_contact_times ";
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
$sql .= "and contact_time_uuid = '".$contact_time_uuid."' ";
|
$sql .= "and contact_time_uuid = '".$contact_time_uuid."' ";
|
||||||
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
||||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||||
$sql .= "and time_start is not null ";
|
$sql .= "and time_start is not null ";
|
||||||
$sql .= "and time_stop is null ";
|
$sql .= "and time_stop is null ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
if (sizeof($result) > 0) {
|
if (sizeof($result) > 0) {
|
||||||
$time_start = strtotime($result["time_start"]);
|
$time_start = strtotime($result["time_start"]);
|
||||||
$time_now = strtotime(date("Y-m-d H:i:s"));
|
$time_now = strtotime(date("Y-m-d H:i:s"));
|
||||||
$time_diff = gmdate("H:i:s", ($time_now - $time_start));
|
$time_diff = gmdate("H:i:s", ($time_now - $time_start));
|
||||||
echo $time_diff;
|
echo $time_diff;
|
||||||
echo "<script id='title_script'>set_title('".$time_diff."');</script>";
|
echo "<script id='title_script'>set_title('".$time_diff."');</script>";
|
||||||
}
|
}
|
||||||
unset ($sql, $prep_statement, $result);
|
unset ($sql, $prep_statement, $result);
|
||||||
?>
|
?>
|
||||||
@@ -1,114 +1,114 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function google_get_contacts($token, $max_results = 50) {
|
function google_get_contacts($token, $max_results = 50) {
|
||||||
//global $records;
|
//global $records;
|
||||||
global $groups;
|
global $groups;
|
||||||
|
|
||||||
//$url = 'https://www.google.com/m8/feeds/contacts/default/full?max-results='.$max_results.'&oauth_token='.$_SESSION['contact_auth']['token']; // all contacts as xml
|
//$url = 'https://www.google.com/m8/feeds/contacts/default/full?max-results='.$max_results.'&oauth_token='.$_SESSION['contact_auth']['token']; // all contacts as xml
|
||||||
//$url = 'https://www.google.com/m8/feeds/contacts/default/full/78967d550d3fdd99?alt=json&v=3.0&oauth_token='.$_SESSION['contact_auth']['token']; // single contact
|
//$url = 'https://www.google.com/m8/feeds/contacts/default/full/78967d550d3fdd99?alt=json&v=3.0&oauth_token='.$_SESSION['contact_auth']['token']; // single contact
|
||||||
$url = 'https://www.google.com/m8/feeds/contacts/default/full?max-results='.$max_results.'&alt=json&v=3.0&oauth_token='.$token; // all contacts as json
|
$url = 'https://www.google.com/m8/feeds/contacts/default/full?max-results='.$max_results.'&alt=json&v=3.0&oauth_token='.$token; // all contacts as json
|
||||||
$xml_response = curl_file_get_contents($url);
|
$xml_response = curl_file_get_contents($url);
|
||||||
$records = json_decode($xml_response, true);
|
$records = json_decode($xml_response, true);
|
||||||
|
|
||||||
//check for authentication errors (logged out of google account, or app access permission revoked, etc)
|
//check for authentication errors (logged out of google account, or app access permission revoked, etc)
|
||||||
if ($records['error']['code']) {
|
if ($records['error']['code']) {
|
||||||
header("Location: contact_auth.php?source=google&target=".substr($_SERVER["PHP_SELF"], strrpos($_SERVER["PHP_SELF"],'/')+1));
|
header("Location: contact_auth.php?source=google&target=".substr($_SERVER["PHP_SELF"], strrpos($_SERVER["PHP_SELF"],'/')+1));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//create new array of contacts
|
//create new array of contacts
|
||||||
foreach($records['feed']['entry'] as $contact['number'] => $contact) {
|
foreach($records['feed']['entry'] as $contact['number'] => $contact) {
|
||||||
$contact_id = substr($contact['id']['$t'], strrpos($contact['id']['$t'], "/")+1);
|
$contact_id = substr($contact['id']['$t'], strrpos($contact['id']['$t'], "/")+1);
|
||||||
$contacts[$contact_id]['etag'] = $contact['gd$etag'];
|
$contacts[$contact_id]['etag'] = $contact['gd$etag'];
|
||||||
$contacts[$contact_id]['updated'] = $contact['updated']['$t'];
|
$contacts[$contact_id]['updated'] = $contact['updated']['$t'];
|
||||||
$contacts[$contact_id]['name_prefix'] = $contact['gd$name']['gd$namePrefix']['$t'];
|
$contacts[$contact_id]['name_prefix'] = $contact['gd$name']['gd$namePrefix']['$t'];
|
||||||
$contacts[$contact_id]['name_given'] = $contact['gd$name']['gd$givenName']['$t'];
|
$contacts[$contact_id]['name_given'] = $contact['gd$name']['gd$givenName']['$t'];
|
||||||
$contacts[$contact_id]['name_middle'] = $contact['gd$name']['gd$additionalName']['$t'];
|
$contacts[$contact_id]['name_middle'] = $contact['gd$name']['gd$additionalName']['$t'];
|
||||||
$contacts[$contact_id]['name_family'] = $contact['gd$name']['gd$familyName']['$t'];
|
$contacts[$contact_id]['name_family'] = $contact['gd$name']['gd$familyName']['$t'];
|
||||||
$contacts[$contact_id]['name_suffix'] = $contact['gd$name']['gd$nameSuffix']['$t'];
|
$contacts[$contact_id]['name_suffix'] = $contact['gd$name']['gd$nameSuffix']['$t'];
|
||||||
$contacts[$contact_id]['nickname'] = $contact['gContact$nickname']['$t'];
|
$contacts[$contact_id]['nickname'] = $contact['gContact$nickname']['$t'];
|
||||||
$contacts[$contact_id]['title'] = $contact['gd$organization'][0]['gd$orgTitle']['$t'];
|
$contacts[$contact_id]['title'] = $contact['gd$organization'][0]['gd$orgTitle']['$t'];
|
||||||
$contacts[$contact_id]['organization'] = $contact['gd$organization'][0]['gd$orgName']['$t'];
|
$contacts[$contact_id]['organization'] = $contact['gd$organization'][0]['gd$orgName']['$t'];
|
||||||
foreach ($contact['gd$email'] as $contact_email['number'] => $contact_email) {
|
foreach ($contact['gd$email'] as $contact_email['number'] => $contact_email) {
|
||||||
if ($contact_email['label']) {
|
if ($contact_email['label']) {
|
||||||
$contact_email_label = $contact_email['label'];
|
$contact_email_label = $contact_email['label'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$contact_email_label = substr($contact_email['rel'], strpos($contact_email['rel'], "#")+1);
|
$contact_email_label = substr($contact_email['rel'], strpos($contact_email['rel'], "#")+1);
|
||||||
$contact_email_label = ucwords(str_replace("_", " ", $contact_email_label));
|
$contact_email_label = ucwords(str_replace("_", " ", $contact_email_label));
|
||||||
}
|
}
|
||||||
$contacts[$contact_id]['emails'][$contact_email['number']]['label'] = $contact_email_label;
|
$contacts[$contact_id]['emails'][$contact_email['number']]['label'] = $contact_email_label;
|
||||||
$contacts[$contact_id]['emails'][$contact_email['number']]['address'] = $contact_email['address'];
|
$contacts[$contact_id]['emails'][$contact_email['number']]['address'] = $contact_email['address'];
|
||||||
$contacts[$contact_id]['emails'][$contact_email['number']]['primary'] = ($contact_email['primary']) ? 1 : 0;
|
$contacts[$contact_id]['emails'][$contact_email['number']]['primary'] = ($contact_email['primary']) ? 1 : 0;
|
||||||
}
|
}
|
||||||
foreach ($contact['gd$phoneNumber'] as $contact_phone['number'] => $contact_phone) {
|
foreach ($contact['gd$phoneNumber'] as $contact_phone['number'] => $contact_phone) {
|
||||||
if ($contact_phone['label']) {
|
if ($contact_phone['label']) {
|
||||||
$contact_phone_label = $contact_phone['label'];
|
$contact_phone_label = $contact_phone['label'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$contact_phone_label = substr($contact_phone['rel'], strpos($contact_phone['rel'], "#")+1);
|
$contact_phone_label = substr($contact_phone['rel'], strpos($contact_phone['rel'], "#")+1);
|
||||||
$contact_phone_label = ucwords(str_replace("_", " ", $contact_phone_label));
|
$contact_phone_label = ucwords(str_replace("_", " ", $contact_phone_label));
|
||||||
}
|
}
|
||||||
$contacts[$contact_id]['numbers'][$contact_phone['number']]['label'] = $contact_phone_label;
|
$contacts[$contact_id]['numbers'][$contact_phone['number']]['label'] = $contact_phone_label;
|
||||||
$contacts[$contact_id]['numbers'][$contact_phone['number']]['number'] = preg_replace('{\D}', '', $contact_phone['$t']);
|
$contacts[$contact_id]['numbers'][$contact_phone['number']]['number'] = preg_replace('{\D}', '', $contact_phone['$t']);
|
||||||
}
|
}
|
||||||
foreach ($contact['gContact$website'] as $contact_website['number'] => $contact_website) {
|
foreach ($contact['gContact$website'] as $contact_website['number'] => $contact_website) {
|
||||||
$contact_website_label = ($contact_website['label']) ? $contact_website['label'] : ucwords(str_replace("_", " ", $contact_website['rel']));
|
$contact_website_label = ($contact_website['label']) ? $contact_website['label'] : ucwords(str_replace("_", " ", $contact_website['rel']));
|
||||||
$contacts[$contact_id]['urls'][$contact_website['number']]['label'] = $contact_website_label;
|
$contacts[$contact_id]['urls'][$contact_website['number']]['label'] = $contact_website_label;
|
||||||
$contacts[$contact_id]['urls'][$contact_website['number']]['url'] = $contact_website['href'];
|
$contacts[$contact_id]['urls'][$contact_website['number']]['url'] = $contact_website['href'];
|
||||||
}
|
}
|
||||||
foreach ($contact['gd$structuredPostalAddress'] as $contact_address['number'] => $contact_address) {
|
foreach ($contact['gd$structuredPostalAddress'] as $contact_address['number'] => $contact_address) {
|
||||||
if ($contact_address['label']) {
|
if ($contact_address['label']) {
|
||||||
$contact_address_label = $contact_address['label'];
|
$contact_address_label = $contact_address['label'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$contact_address_label = substr($contact_address['rel'], strpos($contact_address['rel'], "#")+1);
|
$contact_address_label = substr($contact_address['rel'], strpos($contact_address['rel'], "#")+1);
|
||||||
$contact_address_label = ucwords(str_replace("_", " ", $contact_address_label));
|
$contact_address_label = ucwords(str_replace("_", " ", $contact_address_label));
|
||||||
}
|
}
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['label'] = $contact_address_label;
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['label'] = $contact_address_label;
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['street'] = $contact_address['gd$street']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['street'] = $contact_address['gd$street']['$t'];
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['extended'] = $contact_address['gd$pobox']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['extended'] = $contact_address['gd$pobox']['$t'];
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['community'] = $contact_address['gd$neighborhood']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['community'] = $contact_address['gd$neighborhood']['$t'];
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['locality'] = $contact_address['gd$city']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['locality'] = $contact_address['gd$city']['$t'];
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['region'] = $contact_address['gd$region']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['region'] = $contact_address['gd$region']['$t'];
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['postal_code'] = $contact_address['gd$postcode']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['postal_code'] = $contact_address['gd$postcode']['$t'];
|
||||||
$contacts[$contact_id]['addresses'][$contact_address['number']]['country'] = $contact_address['gd$country']['$t'];
|
$contacts[$contact_id]['addresses'][$contact_address['number']]['country'] = $contact_address['gd$country']['$t'];
|
||||||
}
|
}
|
||||||
foreach ($contact['gContact$groupMembershipInfo'] as $contact_group['number'] => $contact_group) {
|
foreach ($contact['gContact$groupMembershipInfo'] as $contact_group['number'] => $contact_group) {
|
||||||
$contact_group_id = substr($contact_group['href'], strrpos($contact_group['href'], "/")+1);
|
$contact_group_id = substr($contact_group['href'], strrpos($contact_group['href'], "/")+1);
|
||||||
$contacts[$contact_id]['groups'][$contact_group_id] = $groups[$contact_group_id]['name'];
|
$contacts[$contact_id]['groups'][$contact_group_id] = $groups[$contact_group_id]['name'];
|
||||||
}
|
}
|
||||||
$contacts[$contact_id]['notes'] = $contact['content']['$t'];
|
$contacts[$contact_id]['notes'] = $contact['content']['$t'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//set account holder info
|
//set account holder info
|
||||||
$_SESSION['contact_auth']['name'] = $records['feed']['author'][0]['name']['$t'];
|
$_SESSION['contact_auth']['name'] = $records['feed']['author'][0]['name']['$t'];
|
||||||
$_SESSION['contact_auth']['email'] = $records['feed']['author'][0]['email']['$t'];
|
$_SESSION['contact_auth']['email'] = $records['feed']['author'][0]['email']['$t'];
|
||||||
|
|
||||||
return $contacts;
|
return $contacts;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,54 +1,54 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function google_get_groups($token) {
|
function google_get_groups($token) {
|
||||||
// retrieve groups
|
// retrieve groups
|
||||||
$url = 'https://www.google.com/m8/feeds/groups/default/full?alt=json&v=3.0&oauth_token='.$token;
|
$url = 'https://www.google.com/m8/feeds/groups/default/full?alt=json&v=3.0&oauth_token='.$token;
|
||||||
$xml_response = curl_file_get_contents($url);
|
$xml_response = curl_file_get_contents($url);
|
||||||
$records = json_decode($xml_response, true);
|
$records = json_decode($xml_response, true);
|
||||||
|
|
||||||
//check for authentication errors
|
//check for authentication errors
|
||||||
if ($records['error']['code']) {
|
if ($records['error']['code']) {
|
||||||
header("Location: contact_auth.php?source=google&target=".substr($_SERVER["PHP_SELF"], strrpos($_SERVER["PHP_SELF"],'/')+1));
|
header("Location: contact_auth.php?source=google&target=".substr($_SERVER["PHP_SELF"], strrpos($_SERVER["PHP_SELF"],'/')+1));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//create new array of groups
|
//create new array of groups
|
||||||
foreach($records['feed']['entry'] as $group['number'] => $group) {
|
foreach($records['feed']['entry'] as $group['number'] => $group) {
|
||||||
$group_id = substr($group['id']['$t'], strrpos($group['id']['$t'], "/")+1);
|
$group_id = substr($group['id']['$t'], strrpos($group['id']['$t'], "/")+1);
|
||||||
$groups[$group_id]['name'] = ($group['gContact$systemGroup']['id']) ? $group['gContact$systemGroup']['id'] : $group['title']['$t'];
|
$groups[$group_id]['name'] = ($group['gContact$systemGroup']['id']) ? $group['gContact$systemGroup']['id'] : $group['title']['$t'];
|
||||||
$groups[$group_id]['count'] = 0;
|
$groups[$group_id]['count'] = 0;
|
||||||
unset($group_id);
|
unset($group_id);
|
||||||
}
|
}
|
||||||
unset($group);
|
unset($group);
|
||||||
|
|
||||||
//set account holder info
|
//set account holder info
|
||||||
$_SESSION['contact_auth']['name'] = $records['feed']['author'][0]['name']['$t'];
|
$_SESSION['contact_auth']['name'] = $records['feed']['author'][0]['name']['$t'];
|
||||||
$_SESSION['contact_auth']['email'] = $records['feed']['author'][0]['email']['$t'];
|
$_SESSION['contact_auth']['email'] = $records['feed']['author'][0]['email']['$t'];
|
||||||
|
|
||||||
return $groups;
|
return $groups;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,54 +1,54 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
//set all lines to enabled (true) where null or empty string
|
//set all lines to enabled (true) where null or empty string
|
||||||
$sql = "update v_device_lines set ";
|
$sql = "update v_device_lines set ";
|
||||||
$sql .= "enabled = 'true' ";
|
$sql .= "enabled = 'true' ";
|
||||||
$sql .= "where enabled is null ";
|
$sql .= "where enabled is null ";
|
||||||
$sql .= "or enabled = '' ";
|
$sql .= "or enabled = '' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//set the device key vendor
|
//set the device key vendor
|
||||||
$sql = "select * from v_device_keys as k, v_devices as d ";
|
$sql = "select * from v_device_keys as k, v_devices as d ";
|
||||||
$sql .= "where d.device_uuid = k.device_uuid ";
|
$sql .= "where d.device_uuid = k.device_uuid ";
|
||||||
$sql .= "and k.device_uuid is not null ";
|
$sql .= "and k.device_uuid is not null ";
|
||||||
$sql .= "and k.device_key_vendor is null ";
|
$sql .= "and k.device_key_vendor is null ";
|
||||||
$s = $db->prepare($sql);
|
$s = $db->prepare($sql);
|
||||||
$s->execute();
|
$s->execute();
|
||||||
$device_keys = $s->fetchAll(PDO::FETCH_ASSOC);
|
$device_keys = $s->fetchAll(PDO::FETCH_ASSOC);
|
||||||
foreach ($device_keys as &$row) {
|
foreach ($device_keys as &$row) {
|
||||||
$sql = "update v_device_keys ";
|
$sql = "update v_device_keys ";
|
||||||
$sql .= "set device_key_vendor = '".$row["device_vendor"]."' ";
|
$sql .= "set device_key_vendor = '".$row["device_vendor"]."' ";
|
||||||
$sql .= "where device_key_uuid = '".$row["device_key_uuid"]."';\n ";
|
$sql .= "where device_key_uuid = '".$row["device_key_uuid"]."';\n ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
}
|
}
|
||||||
unset($device_keys, $sql);
|
unset($device_keys, $sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+2347
-2347
File diff suppressed because it is too large
Load Diff
+160
-160
@@ -1,161 +1,161 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('device_add')) {
|
if (permission_exists('device_add')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//set the http get/post variable(s) to a php variable
|
//set the http get/post variable(s) to a php variable
|
||||||
if (isset($_REQUEST["id"]) && isset($_REQUEST["mac"])) {
|
if (isset($_REQUEST["id"]) && isset($_REQUEST["mac"])) {
|
||||||
$device_uuid = check_str($_REQUEST["id"]);
|
$device_uuid = check_str($_REQUEST["id"]);
|
||||||
$mac_address_new = check_str($_REQUEST["mac"]);
|
$mac_address_new = check_str($_REQUEST["mac"]);
|
||||||
$mac_address_new = preg_replace('#[^a-fA-F0-9./]#', '', $mac_address_new);
|
$mac_address_new = preg_replace('#[^a-fA-F0-9./]#', '', $mac_address_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the default
|
//set the default
|
||||||
$save = true;
|
$save = true;
|
||||||
|
|
||||||
//check to see if the mac address exists
|
//check to see if the mac address exists
|
||||||
if ($mac_address_new == "" || $mac_address_new == "000000000000") {
|
if ($mac_address_new == "" || $mac_address_new == "000000000000") {
|
||||||
//allow duplicates to be used as templaes
|
//allow duplicates to be used as templaes
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = "SELECT count(*) AS num_rows FROM v_devices ";
|
$sql = "SELECT count(*) AS num_rows FROM v_devices ";
|
||||||
$sql .= "WHERE device_mac_address = '".$mac_address_new."' ";
|
$sql .= "WHERE device_mac_address = '".$mac_address_new."' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
if ($row['num_rows'] == "0") {
|
if ($row['num_rows'] == "0") {
|
||||||
$save = true;
|
$save = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$save = false;
|
$save = false;
|
||||||
$_SESSION['message'] = $text['message-duplicate'];
|
$_SESSION['message'] = $text['message-duplicate'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the device
|
//get the device
|
||||||
$sql = "SELECT * FROM v_devices ";
|
$sql = "SELECT * FROM v_devices ";
|
||||||
$sql .= "where device_uuid = '".$device_uuid."' ";
|
$sql .= "where device_uuid = '".$device_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$devices = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$devices = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//get device lines
|
//get device lines
|
||||||
$sql = "SELECT * FROM v_device_lines ";
|
$sql = "SELECT * FROM v_device_lines ";
|
||||||
$sql .= "where device_uuid = '".$device_uuid."' ";
|
$sql .= "where device_uuid = '".$device_uuid."' ";
|
||||||
$sql .= "order by line_number asc ";
|
$sql .= "order by line_number asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//get device keys
|
//get device keys
|
||||||
$sql = "SELECT * FROM v_device_keys ";
|
$sql = "SELECT * FROM v_device_keys ";
|
||||||
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
||||||
$sql .= "ORDER by ";
|
$sql .= "ORDER by ";
|
||||||
$sql .= "CASE device_key_category ";
|
$sql .= "CASE device_key_category ";
|
||||||
$sql .= "WHEN 'line' THEN 1 ";
|
$sql .= "WHEN 'line' THEN 1 ";
|
||||||
$sql .= "WHEN 'memort' THEN 2 ";
|
$sql .= "WHEN 'memort' THEN 2 ";
|
||||||
$sql .= "WHEN 'programmable' THEN 3 ";
|
$sql .= "WHEN 'programmable' THEN 3 ";
|
||||||
$sql .= "WHEN 'expansion' THEN 4 ";
|
$sql .= "WHEN 'expansion' THEN 4 ";
|
||||||
$sql .= "ELSE 100 END, ";
|
$sql .= "ELSE 100 END, ";
|
||||||
$sql .= "cast(device_key_id as numeric) asc ";
|
$sql .= "cast(device_key_id as numeric) asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$device_keys = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$device_keys = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//get device settings
|
//get device settings
|
||||||
$sql = "SELECT * FROM v_device_settings ";
|
$sql = "SELECT * FROM v_device_settings ";
|
||||||
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
||||||
$sql .= "ORDER by device_setting_subcategory asc ";
|
$sql .= "ORDER by device_setting_subcategory asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$device_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$device_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//prepare the devices array
|
//prepare the devices array
|
||||||
unset($devices[0]["device_uuid"]);
|
unset($devices[0]["device_uuid"]);
|
||||||
|
|
||||||
//add copy to the device description
|
//add copy to the device description
|
||||||
$devices[0]["device_description"] = $text['button-copy']." ".$devices[0]["device_description"];
|
$devices[0]["device_description"] = $text['button-copy']." ".$devices[0]["device_description"];
|
||||||
|
|
||||||
//prepare the device_lines array
|
//prepare the device_lines array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($device_lines as $row) {
|
foreach ($device_lines as $row) {
|
||||||
unset($device_lines[$x]["device_uuid"]);
|
unset($device_lines[$x]["device_uuid"]);
|
||||||
unset($device_lines[$x]["device_line_uuid"]);
|
unset($device_lines[$x]["device_line_uuid"]);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare the device_keys array
|
//prepare the device_keys array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($device_keys as $row) {
|
foreach ($device_keys as $row) {
|
||||||
unset($device_keys[$x]["device_uuid"]);
|
unset($device_keys[$x]["device_uuid"]);
|
||||||
unset($device_keys[$x]["device_key_uuid"]);
|
unset($device_keys[$x]["device_key_uuid"]);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare the device_settings array
|
//prepare the device_settings array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($device_settings as $row) {
|
foreach ($device_settings as $row) {
|
||||||
unset($device_settings[$x]["device_uuid"]);
|
unset($device_settings[$x]["device_uuid"]);
|
||||||
unset($device_settings[$x]["device_setting_uuid"]);
|
unset($device_settings[$x]["device_setting_uuid"]);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//create the device array
|
//create the device array
|
||||||
$device = $devices[0];
|
$device = $devices[0];
|
||||||
$device["device_mac_address"] = $mac_address_new;
|
$device["device_mac_address"] = $mac_address_new;
|
||||||
$device["device_lines"] = $device_lines;
|
$device["device_lines"] = $device_lines;
|
||||||
$device["device_keys"] = $device_keys;
|
$device["device_keys"] = $device_keys;
|
||||||
$device["device_settings"] = $device_settings;
|
$device["device_settings"] = $device_settings;
|
||||||
|
|
||||||
//copy the device
|
//copy the device
|
||||||
if ($save) {
|
if ($save) {
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('devices');
|
$orm->name('devices');
|
||||||
$orm->save($device);
|
$orm->save($device);
|
||||||
$response = $orm->message;
|
$response = $orm->message;
|
||||||
$_SESSION["message"] = $text['message-copy'];
|
$_SESSION["message"] = $text['message-copy'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect
|
//redirect
|
||||||
header("Location: devices.php");
|
header("Location: devices.php");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+160
-160
@@ -1,161 +1,161 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('device_add')) {
|
if (permission_exists('device_add')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//set the http get/post variable(s) to a php variable
|
//set the http get/post variable(s) to a php variable
|
||||||
if (isset($_REQUEST["id"]) && isset($_REQUEST["mac"])) {
|
if (isset($_REQUEST["id"]) && isset($_REQUEST["mac"])) {
|
||||||
$device_uuid = check_str($_REQUEST["id"]);
|
$device_uuid = check_str($_REQUEST["id"]);
|
||||||
$mac_address_new = check_str($_REQUEST["mac"]);
|
$mac_address_new = check_str($_REQUEST["mac"]);
|
||||||
$mac_address_new = preg_replace('#[^a-fA-F0-9./]#', '', $mac_address_new);
|
$mac_address_new = preg_replace('#[^a-fA-F0-9./]#', '', $mac_address_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the default
|
//set the default
|
||||||
$save = true;
|
$save = true;
|
||||||
|
|
||||||
//check to see if the mac address exists
|
//check to see if the mac address exists
|
||||||
if ($mac_address_new == "" || $mac_address_new == "000000000000") {
|
if ($mac_address_new == "" || $mac_address_new == "000000000000") {
|
||||||
//allow duplicates to be used as templaes
|
//allow duplicates to be used as templaes
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = "SELECT count(*) AS num_rows FROM v_devices ";
|
$sql = "SELECT count(*) AS num_rows FROM v_devices ";
|
||||||
$sql .= "WHERE device_mac_address = '".$mac_address_new."' ";
|
$sql .= "WHERE device_mac_address = '".$mac_address_new."' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
if ($row['num_rows'] == "0") {
|
if ($row['num_rows'] == "0") {
|
||||||
$save = true;
|
$save = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$save = false;
|
$save = false;
|
||||||
$_SESSION['message'] = $text['message-duplicate'];
|
$_SESSION['message'] = $text['message-duplicate'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the device
|
//get the device
|
||||||
$sql = "SELECT * FROM v_devices ";
|
$sql = "SELECT * FROM v_devices ";
|
||||||
$sql .= "where device_uuid = '".$device_uuid."' ";
|
$sql .= "where device_uuid = '".$device_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$devices = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$devices = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//get device lines
|
//get device lines
|
||||||
$sql = "SELECT * FROM v_device_lines ";
|
$sql = "SELECT * FROM v_device_lines ";
|
||||||
$sql .= "where device_uuid = '".$device_uuid."' ";
|
$sql .= "where device_uuid = '".$device_uuid."' ";
|
||||||
$sql .= "order by line_number asc ";
|
$sql .= "order by line_number asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//get device keys
|
//get device keys
|
||||||
$sql = "SELECT * FROM v_device_keys ";
|
$sql = "SELECT * FROM v_device_keys ";
|
||||||
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
||||||
$sql .= "ORDER by ";
|
$sql .= "ORDER by ";
|
||||||
$sql .= "CASE device_key_category ";
|
$sql .= "CASE device_key_category ";
|
||||||
$sql .= "WHEN 'line' THEN 1 ";
|
$sql .= "WHEN 'line' THEN 1 ";
|
||||||
$sql .= "WHEN 'memort' THEN 2 ";
|
$sql .= "WHEN 'memort' THEN 2 ";
|
||||||
$sql .= "WHEN 'programmable' THEN 3 ";
|
$sql .= "WHEN 'programmable' THEN 3 ";
|
||||||
$sql .= "WHEN 'expansion' THEN 4 ";
|
$sql .= "WHEN 'expansion' THEN 4 ";
|
||||||
$sql .= "ELSE 100 END, ";
|
$sql .= "ELSE 100 END, ";
|
||||||
$sql .= "cast(device_key_id as numeric) asc ";
|
$sql .= "cast(device_key_id as numeric) asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$device_keys = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$device_keys = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//get device settings
|
//get device settings
|
||||||
$sql = "SELECT * FROM v_device_settings ";
|
$sql = "SELECT * FROM v_device_settings ";
|
||||||
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
|
||||||
$sql .= "ORDER by device_setting_subcategory asc ";
|
$sql .= "ORDER by device_setting_subcategory asc ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$device_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$device_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
|
||||||
//prepare the devices array
|
//prepare the devices array
|
||||||
unset($devices[0]["device_uuid"]);
|
unset($devices[0]["device_uuid"]);
|
||||||
|
|
||||||
//add copy to the device description
|
//add copy to the device description
|
||||||
$devices[0]["device_description"] = $text['button-copy']." ".$devices[0]["device_description"];
|
$devices[0]["device_description"] = $text['button-copy']." ".$devices[0]["device_description"];
|
||||||
|
|
||||||
//prepare the device_lines array
|
//prepare the device_lines array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($device_lines as $row) {
|
foreach ($device_lines as $row) {
|
||||||
unset($device_lines[$x]["device_uuid"]);
|
unset($device_lines[$x]["device_uuid"]);
|
||||||
unset($device_lines[$x]["device_line_uuid"]);
|
unset($device_lines[$x]["device_line_uuid"]);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare the device_keys array
|
//prepare the device_keys array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($device_keys as $row) {
|
foreach ($device_keys as $row) {
|
||||||
unset($device_keys[$x]["device_uuid"]);
|
unset($device_keys[$x]["device_uuid"]);
|
||||||
unset($device_keys[$x]["device_key_uuid"]);
|
unset($device_keys[$x]["device_key_uuid"]);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare the device_settings array
|
//prepare the device_settings array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($device_settings as $row) {
|
foreach ($device_settings as $row) {
|
||||||
unset($device_settings[$x]["device_uuid"]);
|
unset($device_settings[$x]["device_uuid"]);
|
||||||
unset($device_settings[$x]["device_setting_uuid"]);
|
unset($device_settings[$x]["device_setting_uuid"]);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//create the device array
|
//create the device array
|
||||||
$device = $devices[0];
|
$device = $devices[0];
|
||||||
$device["device_mac_address"] = $mac_address_new;
|
$device["device_mac_address"] = $mac_address_new;
|
||||||
$device["device_lines"] = $device_lines;
|
$device["device_lines"] = $device_lines;
|
||||||
$device["device_keys"] = $device_keys;
|
$device["device_keys"] = $device_keys;
|
||||||
$device["device_settings"] = $device_settings;
|
$device["device_settings"] = $device_settings;
|
||||||
|
|
||||||
//copy the device
|
//copy the device
|
||||||
if ($save) {
|
if ($save) {
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('devices');
|
$orm->name('devices');
|
||||||
$orm->save($device);
|
$orm->save($device);
|
||||||
$response = $orm->message;
|
$response = $orm->message;
|
||||||
$_SESSION["message"] = $text['message-copy'];
|
$_SESSION["message"] = $text['message-copy'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect
|
//redirect
|
||||||
header("Location: devices.php");
|
header("Location: devices.php");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,76 +1,76 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2008-2015 All Rights Reserved.
|
Copyright (C) 2008-2015 All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('device_profile_delete')) {
|
if (permission_exists('device_profile_delete')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get the id
|
//get the id
|
||||||
if (isset($_GET["id"])) {
|
if (isset($_GET["id"])) {
|
||||||
$id = $_GET["id"];
|
$id = $_GET["id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the data and subdata
|
//delete the data and subdata
|
||||||
if (is_uuid($id)) {
|
if (is_uuid($id)) {
|
||||||
|
|
||||||
//delete device profile keys
|
//delete device profile keys
|
||||||
$sql = "delete from v_device_keys ";
|
$sql = "delete from v_device_keys ";
|
||||||
$sql .= "where device_profile_uuid = '".$id."' ";
|
$sql .= "where device_profile_uuid = '".$id."' ";
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//delete device profile
|
//delete device profile
|
||||||
$sql = "delete from v_device_profiles ";
|
$sql = "delete from v_device_profiles ";
|
||||||
$sql .= "where device_profile_uuid = '".$id."' ";
|
$sql .= "where device_profile_uuid = '".$id."' ";
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//remove device profile uuid from any assigned devices
|
//remove device profile uuid from any assigned devices
|
||||||
$sql = "update v_devices set ";
|
$sql = "update v_devices set ";
|
||||||
$sql .= "device_profile_uuid = null ";
|
$sql .= "device_profile_uuid = null ";
|
||||||
$sql .= "where device_profile_uuid = '".$id."' ";
|
$sql .= "where device_profile_uuid = '".$id."' ";
|
||||||
$db->exec($sql);
|
$db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
//write the provision files
|
//write the provision files
|
||||||
require_once "app/provision/provision_write.php";
|
require_once "app/provision/provision_write.php";
|
||||||
|
|
||||||
//set the message and redirect the user
|
//set the message and redirect the user
|
||||||
$_SESSION["message"] = $text['message-delete'];
|
$_SESSION["message"] = $text['message-delete'];
|
||||||
header("Location: device_profiles.php");
|
header("Location: device_profiles.php");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+707
-707
File diff suppressed because it is too large
Load Diff
+176
-176
@@ -1,177 +1,177 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2008-2012 All Rights Reserved.
|
Copyright (C) 2008-2012 All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('device_profile_view')) {
|
if (permission_exists('device_profile_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get the http values and set them as variables
|
//get the http values and set them as variables
|
||||||
$search = check_str($_GET["search"]);
|
$search = check_str($_GET["search"]);
|
||||||
if (isset($_GET["order_by"])) {
|
if (isset($_GET["order_by"])) {
|
||||||
$order_by = check_str($_GET["order_by"]);
|
$order_by = check_str($_GET["order_by"]);
|
||||||
$order = check_str($_GET["order"]);
|
$order = check_str($_GET["order"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
$document['title'] = $text['title-profiles'];
|
$document['title'] = $text['title-profiles'];
|
||||||
require_once "resources/paging.php";
|
require_once "resources/paging.php";
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
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='100%' align='left' valign='top'>";
|
echo " <td width='100%' align='left' valign='top'>";
|
||||||
echo " <b>".$text['header-profiles']."</b>";
|
echo " <b>".$text['header-profiles']."</b>";
|
||||||
echo " <br /><br />";
|
echo " <br /><br />";
|
||||||
echo " ".$text['description-profiles'];
|
echo " ".$text['description-profiles'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td align='right' nowrap='nowrap' valign='top'>\n";
|
echo " <td align='right' nowrap='nowrap' valign='top'>\n";
|
||||||
echo " <form method='get' action=''>\n";
|
echo " <form method='get' action=''>\n";
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"document.location='devices.php'\" value='".$text['button-back']."'> ";
|
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"document.location='devices.php'\" value='".$text['button-back']."'> ";
|
||||||
echo " <input type='text' class='txt' style='width: 150px' name='search' value='".$search."'>";
|
echo " <input type='text' class='txt' style='width: 150px' name='search' value='".$search."'>";
|
||||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>";
|
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>";
|
||||||
echo " </form>\n";
|
echo " </form>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$sql = "select count(*) as num_rows from v_device_profiles ";
|
$sql = "select count(*) as num_rows from v_device_profiles ";
|
||||||
$sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
|
$sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
|
||||||
if (strlen($search) > 0) {
|
if (strlen($search) > 0) {
|
||||||
$sql .= "and (";
|
$sql .= "and (";
|
||||||
$sql .= " device_profile_name like '%".$search."%' ";
|
$sql .= " device_profile_name like '%".$search."%' ";
|
||||||
$sql .= " or device_profile_description like '%".$search."%' ";
|
$sql .= " or device_profile_description like '%".$search."%' ";
|
||||||
$sql .= ") ";
|
$sql .= ") ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
$num_rows = ($row['num_rows'] > 0) ? $row['num_rows'] : 0;
|
$num_rows = ($row['num_rows'] > 0) ? $row['num_rows'] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
$param = "";
|
$param = "";
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||||
$offset = $rows_per_page * $page;
|
$offset = $rows_per_page * $page;
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select * from v_device_profiles ";
|
$sql = "select * from v_device_profiles ";
|
||||||
$sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
|
$sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
|
||||||
if (strlen($search) > 0) {
|
if (strlen($search) > 0) {
|
||||||
$sql .= "and (";
|
$sql .= "and (";
|
||||||
$sql .= " device_profile_name like '%".$search."%' ";
|
$sql .= " device_profile_name like '%".$search."%' ";
|
||||||
$sql .= " or device_profile_description like '%".$search."%' ";
|
$sql .= " or device_profile_description like '%".$search."%' ";
|
||||||
$sql .= ") ";
|
$sql .= ") ";
|
||||||
}
|
}
|
||||||
if (strlen($order_by) == 0) {
|
if (strlen($order_by) == 0) {
|
||||||
$sql .= "order by device_profile_name asc ";
|
$sql .= "order by device_profile_name asc ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql .= "order by ".$order_by." ".$order." ";
|
$sql .= "order by ".$order_by." ".$order." ";
|
||||||
}
|
}
|
||||||
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo th_order_by('name', $text['label-profile_name'], $order_by, $order);
|
echo th_order_by('name', $text['label-profile_name'], $order_by, $order);
|
||||||
echo th_order_by('enabled', $text['label-profile_enabled'], $order_by, $order);
|
echo th_order_by('enabled', $text['label-profile_enabled'], $order_by, $order);
|
||||||
echo th_order_by('description', $text['label-profile_description'], $order_by, $order);
|
echo th_order_by('description', $text['label-profile_description'], $order_by, $order);
|
||||||
echo "<td class='list_control_icons'>\n";
|
echo "<td class='list_control_icons'>\n";
|
||||||
if (permission_exists('device_profile_add')) {
|
if (permission_exists('device_profile_add')) {
|
||||||
echo " <a href='device_profile_edit.php' alt='".$text['button-add']."'>".$v_link_label_add."</a>\n";
|
echo " <a href='device_profile_edit.php' alt='".$text['button-add']."'>".$v_link_label_add."</a>\n";
|
||||||
}
|
}
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
|
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$tr_link = (permission_exists('device_profile_edit')) ? "href='device_profile_edit.php?id=".$row['device_profile_uuid']."'" : null;
|
$tr_link = (permission_exists('device_profile_edit')) ? "href='device_profile_edit.php?id=".$row['device_profile_uuid']."'" : null;
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||||
echo (permission_exists('device_profile_edit')) ? "<a href='device_profile_edit.php?id=".$row['device_profile_uuid']."'>".$row['device_profile_name']."</a>" : $row['device_profile_name'];
|
echo (permission_exists('device_profile_edit')) ? "<a href='device_profile_edit.php?id=".$row['device_profile_uuid']."'>".$row['device_profile_name']."</a>" : $row['device_profile_name'];
|
||||||
echo ($row['domain_uuid'] == '') ? " <span style='color: #888; font-size: 80%'>".$text['select-global']."</span>" : null;
|
echo ($row['domain_uuid'] == '') ? " <span style='color: #888; font-size: 80%'>".$text['select-global']."</span>" : null;
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['device_profile_enabled']]." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['device_profile_enabled']]." </td>\n";
|
||||||
echo " <td valign='top' class='row_stylebg'>".$row['device_profile_description']." </td>\n";
|
echo " <td valign='top' class='row_stylebg'>".$row['device_profile_description']." </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('device_profile_edit')) {
|
if (permission_exists('device_profile_edit')) {
|
||||||
echo "<a href='device_profile_edit.php?id=".$row['device_profile_uuid']."' alt='".$text['button-edit']."'>".$v_link_label_edit."</a>";
|
echo "<a href='device_profile_edit.php?id=".$row['device_profile_uuid']."' alt='".$text['button-edit']."'>".$v_link_label_edit."</a>";
|
||||||
}
|
}
|
||||||
if (permission_exists('device_profile_delete')) {
|
if (permission_exists('device_profile_delete')) {
|
||||||
echo "<a href='device_profile_delete.php?id=".$row['device_profile_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
|
echo "<a href='device_profile_delete.php?id=".$row['device_profile_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$c = ($c == 0) ? 1 : 0;
|
$c = ($c == 0) ? 1 : 0;
|
||||||
} //end foreach
|
} //end foreach
|
||||||
unset($sql, $result, $row_count);
|
unset($sql, $result, $row_count);
|
||||||
} //end if results
|
} //end if results
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td colspan='4'>\n";
|
echo "<td colspan='4'>\n";
|
||||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>".$paging_controls."</td>\n";
|
echo " <td width='33.3%' align='center' nowrap='nowrap'>".$paging_controls."</td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('device_profile_add')) {
|
if (permission_exists('device_profile_add')) {
|
||||||
echo " <a href='device_profile_edit.php' alt='".$text['button-add']."'>".$v_link_label_add."</a>";
|
echo " <a href='device_profile_edit.php' alt='".$text['button-add']."'>".$v_link_label_add."</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " </table>\n";
|
echo " </table>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
+88
-88
@@ -1,89 +1,89 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
|
|
||||||
//define array of editor settings
|
//define array of editor settings
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$array[$x]['default_setting_category'] = 'editor';
|
$array[$x]['default_setting_category'] = 'editor';
|
||||||
$array[$x]['default_setting_subcategory'] = 'font_size';
|
$array[$x]['default_setting_subcategory'] = 'font_size';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = '14px';
|
$array[$x]['default_setting_value'] = '14px';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default text size for Editor.';
|
$array[$x]['default_setting_description'] = 'Set the default text size for Editor.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'editor';
|
$array[$x]['default_setting_category'] = 'editor';
|
||||||
$array[$x]['default_setting_subcategory'] = 'indent_guides';
|
$array[$x]['default_setting_subcategory'] = 'indent_guides';
|
||||||
$array[$x]['default_setting_name'] = 'boolean';
|
$array[$x]['default_setting_name'] = 'boolean';
|
||||||
$array[$x]['default_setting_value'] = 'false';
|
$array[$x]['default_setting_value'] = 'false';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default visibility of indent guides for Editor.';
|
$array[$x]['default_setting_description'] = 'Set the default visibility of indent guides for Editor.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'editor';
|
$array[$x]['default_setting_category'] = 'editor';
|
||||||
$array[$x]['default_setting_subcategory'] = 'invisibles';
|
$array[$x]['default_setting_subcategory'] = 'invisibles';
|
||||||
$array[$x]['default_setting_name'] = 'boolean';
|
$array[$x]['default_setting_name'] = 'boolean';
|
||||||
$array[$x]['default_setting_value'] = 'false';
|
$array[$x]['default_setting_value'] = 'false';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default state of invisible characters for Editor.';
|
$array[$x]['default_setting_description'] = 'Set the default state of invisible characters for Editor.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'editor';
|
$array[$x]['default_setting_category'] = 'editor';
|
||||||
$array[$x]['default_setting_subcategory'] = 'line_numbers';
|
$array[$x]['default_setting_subcategory'] = 'line_numbers';
|
||||||
$array[$x]['default_setting_name'] = 'boolean';
|
$array[$x]['default_setting_name'] = 'boolean';
|
||||||
$array[$x]['default_setting_value'] = 'false';
|
$array[$x]['default_setting_value'] = 'false';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default visibility of line numbers for Editor.';
|
$array[$x]['default_setting_description'] = 'Set the default visibility of line numbers for Editor.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'editor';
|
$array[$x]['default_setting_category'] = 'editor';
|
||||||
$array[$x]['default_setting_subcategory'] = 'live_previews';
|
$array[$x]['default_setting_subcategory'] = 'live_previews';
|
||||||
$array[$x]['default_setting_name'] = 'boolean';
|
$array[$x]['default_setting_name'] = 'boolean';
|
||||||
$array[$x]['default_setting_value'] = 'false';
|
$array[$x]['default_setting_value'] = 'false';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Enable or disable live previewing of syntax, text size and theme changes.';
|
$array[$x]['default_setting_description'] = 'Enable or disable live previewing of syntax, text size and theme changes.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'editor';
|
$array[$x]['default_setting_category'] = 'editor';
|
||||||
$array[$x]['default_setting_subcategory'] = 'theme';
|
$array[$x]['default_setting_subcategory'] = 'theme';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'Cobalt';
|
$array[$x]['default_setting_value'] = 'Cobalt';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default theme.';
|
$array[$x]['default_setting_description'] = 'Set the default theme.';
|
||||||
|
|
||||||
//get an array of the default settings
|
//get an array of the default settings
|
||||||
$sql = "select * from v_default_settings ";
|
$sql = "select * from v_default_settings ";
|
||||||
$sql .= "where default_setting_category = 'editor' ";
|
$sql .= "where default_setting_category = 'editor' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
//find the missing default settings
|
//find the missing default settings
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($array as $setting) {
|
foreach ($array as $setting) {
|
||||||
$found = false;
|
$found = false;
|
||||||
$missing[$x] = $setting;
|
$missing[$x] = $setting;
|
||||||
foreach ($default_settings as $row) {
|
foreach ($default_settings as $row) {
|
||||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||||
$found = true;
|
$found = true;
|
||||||
//remove items from the array that were found
|
//remove items from the array that were found
|
||||||
unset($missing[$x]);
|
unset($missing[$x]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the missing default settings
|
//add the missing default settings
|
||||||
foreach ($missing as $row) {
|
foreach ($missing as $row) {
|
||||||
//add the default settings
|
//add the default settings
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->save($row);
|
$orm->save($row);
|
||||||
$message = $orm->message;
|
$message = $orm->message;
|
||||||
unset($orm);
|
unset($orm);
|
||||||
//print_r($message);
|
//print_r($message);
|
||||||
}
|
}
|
||||||
unset($missing);
|
unset($missing);
|
||||||
|
|
||||||
//unset the array variable
|
//unset the array variable
|
||||||
unset($array);
|
unset($array);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+88
-88
@@ -1,89 +1,89 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Script Editor";
|
$apps[$x]['menu'][$y]['title']['en-us'] = "Script Editor";
|
||||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor de Scripts";
|
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor de Scripts";
|
||||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur de script";
|
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur de script";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor de Scripts";
|
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor de Scripts";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][$y]['uuid'] = "f1905fec-0577-daef-6045-59d09b7d3f94";
|
$apps[$x]['menu'][$y]['uuid'] = "f1905fec-0577-daef-6045-59d09b7d3f94";
|
||||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][$y]['category'] = "external";
|
$apps[$x]['menu'][$y]['category'] = "external";
|
||||||
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=scripts";
|
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=scripts";
|
||||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['menu'][$y]['title']['en-us'] = "XML Editor";
|
$apps[$x]['menu'][$y]['title']['en-us'] = "XML Editor";
|
||||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor XML";
|
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor XML";
|
||||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur XML";
|
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur XML";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor XML";
|
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor XML";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][$y]['uuid'] = "16013877-606a-2a05-7d6a-c1b215839131";
|
$apps[$x]['menu'][$y]['uuid'] = "16013877-606a-2a05-7d6a-c1b215839131";
|
||||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][$y]['category'] = "external";
|
$apps[$x]['menu'][$y]['category'] = "external";
|
||||||
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=xml";
|
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=xml";
|
||||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Provision Editor";
|
$apps[$x]['menu'][$y]['title']['en-us'] = "Provision Editor";
|
||||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor de Provisionamiento";
|
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor de Provisionamiento";
|
||||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur de Provisioning";
|
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur de Provisioning";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor de Provisionamento";
|
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor de Provisionamento";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][$y]['uuid'] = "57773542-a565-1a29-605d-6535da1a0870";
|
$apps[$x]['menu'][$y]['uuid'] = "57773542-a565-1a29-605d-6535da1a0870";
|
||||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][$y]['category'] = "external";
|
$apps[$x]['menu'][$y]['category'] = "external";
|
||||||
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=provision";
|
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=provision";
|
||||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['menu'][$y]['title']['en-us'] = "PHP Editor";
|
$apps[$x]['menu'][$y]['title']['en-us'] = "PHP Editor";
|
||||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor PHP";
|
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor PHP";
|
||||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur PHP";
|
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur PHP";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor de PHP";
|
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor de PHP";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][$y]['uuid'] = "eae1f2d6-789b-807c-cc26-44501e848693";
|
$apps[$x]['menu'][$y]['uuid'] = "eae1f2d6-789b-807c-cc26-44501e848693";
|
||||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][$y]['category'] = "external";
|
$apps[$x]['menu'][$y]['category'] = "external";
|
||||||
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=php";
|
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=php";
|
||||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['menu'][$y]['title']['en-us'] = "Grammar Editor";
|
$apps[$x]['menu'][$y]['title']['en-us'] = "Grammar Editor";
|
||||||
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor Gramático";
|
$apps[$x]['menu'][$y]['title']['es-cl'] = "Editor Gramático";
|
||||||
$apps[$x]['menu'][$y]['title']['es-mx'] = "Editor Gramático";
|
$apps[$x]['menu'][$y]['title']['es-mx'] = "Editor Gramático";
|
||||||
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
$apps[$x]['menu'][$y]['title']['de-de'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
$apps[$x]['menu'][$y]['title']['de-at'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur de Grammaire";
|
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Editeur de Grammaire";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][$y]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor Gramático";
|
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Editor Gramático";
|
||||||
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][$y]['uuid'] = "c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a";
|
$apps[$x]['menu'][$y]['uuid'] = "c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a";
|
||||||
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][$y]['category'] = "external";
|
$apps[$x]['menu'][$y]['category'] = "external";
|
||||||
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=grammar";
|
$apps[$x]['menu'][$y]['path'] = "/app/edit/index.php?dir=grammar";
|
||||||
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+93
-93
@@ -1,93 +1,93 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//application details
|
//application details
|
||||||
$apps[$x]['name'] = "Emails";
|
$apps[$x]['name'] = "Emails";
|
||||||
$apps[$x]['uuid'] = "bd64f590-9a24-468d-951f-6639ac728694";
|
$apps[$x]['uuid'] = "bd64f590-9a24-468d-951f-6639ac728694";
|
||||||
$apps[$x]['category'] = "Switch";
|
$apps[$x]['category'] = "Switch";
|
||||||
$apps[$x]['subcategory'] = "";
|
$apps[$x]['subcategory'] = "";
|
||||||
$apps[$x]['version'] = "";
|
$apps[$x]['version'] = "";
|
||||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||||
$apps[$x]['description']['en-us'] = "Manage failed email messages.";
|
$apps[$x]['description']['en-us'] = "Manage failed email messages.";
|
||||||
$apps[$x]['description']['es-cl'] = "Gestionar los mensajes fallidos.";
|
$apps[$x]['description']['es-cl'] = "Gestionar los mensajes fallidos.";
|
||||||
$apps[$x]['description']['es-mx'] = "";
|
$apps[$x]['description']['es-mx'] = "";
|
||||||
$apps[$x]['description']['de-de'] = "";
|
$apps[$x]['description']['de-de'] = "";
|
||||||
$apps[$x]['description']['de-ch'] = "";
|
$apps[$x]['description']['de-ch'] = "";
|
||||||
$apps[$x]['description']['de-at'] = "";
|
$apps[$x]['description']['de-at'] = "";
|
||||||
$apps[$x]['description']['fr-fr'] = "GÈrer les messages Èlectroniques ÈchouÈ.";
|
$apps[$x]['description']['fr-fr'] = "GÈrer les messages Èlectroniques ÈchouÈ.";
|
||||||
$apps[$x]['description']['fr-ca'] = "";
|
$apps[$x]['description']['fr-ca'] = "";
|
||||||
$apps[$x]['description']['fr-ch'] = "";
|
$apps[$x]['description']['fr-ch'] = "";
|
||||||
$apps[$x]['description']['pt-pt'] = "Gerenciar mensagens de e-mail falhou.";
|
$apps[$x]['description']['pt-pt'] = "Gerenciar mensagens de e-mail falhou.";
|
||||||
$apps[$x]['description']['pt-br'] = "";
|
$apps[$x]['description']['pt-br'] = "";
|
||||||
|
|
||||||
//permission details
|
//permission details
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "email_view";
|
$apps[$x]['permissions'][$y]['name'] = "email_view";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "email_delete";
|
$apps[$x]['permissions'][$y]['name'] = "email_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "email_download";
|
$apps[$x]['permissions'][$y]['name'] = "email_download";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "email_resend";
|
$apps[$x]['permissions'][$y]['name'] = "email_resend";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "emails_all";
|
$apps[$x]['permissions'][$y]['name'] = "emails_all";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
|
|
||||||
|
|
||||||
//schema details
|
//schema details
|
||||||
$y = 1; //table array index
|
$y = 1; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
$apps[$x]['db'][$y]['table'] = "v_emails";
|
$apps[$x]['db'][$y]['table'] = "v_emails";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_xml_cdr";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_xml_cdr";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sent_date";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sent_date";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "timestamp";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "timestamp";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "date";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "date";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "timestamp";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "timestamp";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "type";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "type";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "status";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "status";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
+64
-64
@@ -1,65 +1,65 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2008-2015
|
Copyright (C) 2008-2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('email_delete')) {
|
if (permission_exists('email_delete')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get posted values, if any
|
//get posted values, if any
|
||||||
$email_uuid = $_REQUEST["id"];
|
$email_uuid = $_REQUEST["id"];
|
||||||
|
|
||||||
if ($email_uuid != '') {
|
if ($email_uuid != '') {
|
||||||
$sql = "delete from v_emails ";
|
$sql = "delete from v_emails ";
|
||||||
$sql .= "where email_uuid = '".$email_uuid."' ";
|
$sql .= "where email_uuid = '".$email_uuid."' ";
|
||||||
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
||||||
$sql .= "";
|
$sql .= "";
|
||||||
} else {
|
} else {
|
||||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset($sql, $prep_statement);
|
unset($sql, $prep_statement);
|
||||||
|
|
||||||
//set message
|
//set message
|
||||||
if ($_SESSION["message"] == '') {
|
if ($_SESSION["message"] == '') {
|
||||||
$_SESSION["message"] = $text['message-delete'];
|
$_SESSION["message"] = $text['message-delete'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect user
|
//redirect user
|
||||||
header("Location: emails.php");
|
header("Location: emails.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+206
-206
@@ -1,207 +1,207 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2008-2015
|
Copyright (C) 2008-2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('email_view')) {
|
if (permission_exists('email_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get email
|
//get email
|
||||||
$email_uuid = check_str($_REQUEST["id"]);
|
$email_uuid = check_str($_REQUEST["id"]);
|
||||||
|
|
||||||
$msg_found = false;
|
$msg_found = false;
|
||||||
|
|
||||||
if ($email_uuid != '') {
|
if ($email_uuid != '') {
|
||||||
$sql = "select * from v_emails ";
|
$sql = "select * from v_emails ";
|
||||||
$sql .= "where email_uuid = '".$email_uuid."' ";
|
$sql .= "where email_uuid = '".$email_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$sent = $row['sent_date'];
|
$sent = $row['sent_date'];
|
||||||
$type = $row['type'];
|
$type = $row['type'];
|
||||||
$status = $row['status'];
|
$status = $row['status'];
|
||||||
$email = $row['email'];
|
$email = $row['email'];
|
||||||
$msg_found = true;
|
$msg_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$msg_found) {
|
if (!$msg_found) {
|
||||||
$_SESSION["message"] = $text['message-invalid_email'];
|
$_SESSION["message"] = $text['message-invalid_email'];
|
||||||
header("Location: emails.php");
|
header("Location: emails.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//includes
|
//includes
|
||||||
require('resources/pop3/mime_parser.php');
|
require('resources/pop3/mime_parser.php');
|
||||||
require('resources/pop3/rfc822_addresses.php');
|
require('resources/pop3/rfc822_addresses.php');
|
||||||
|
|
||||||
//parse the email message
|
//parse the email message
|
||||||
$mime = new mime_parser_class;
|
$mime = new mime_parser_class;
|
||||||
$mime->decode_bodies = 1;
|
$mime->decode_bodies = 1;
|
||||||
$parameters = array('Data' => $email);
|
$parameters = array('Data' => $email);
|
||||||
$success = $mime->Decode($parameters, $decoded);
|
$success = $mime->Decode($parameters, $decoded);
|
||||||
|
|
||||||
if ($success) {
|
if ($success) {
|
||||||
//get the headers
|
//get the headers
|
||||||
$headers = json_decode($decoded[0]["Headers"]["x-headers:"], true);
|
$headers = json_decode($decoded[0]["Headers"]["x-headers:"], true);
|
||||||
$subject = $decoded[0]["Headers"]["subject:"];
|
$subject = $decoded[0]["Headers"]["subject:"];
|
||||||
$from = $decoded[0]["Headers"]["from:"];
|
$from = $decoded[0]["Headers"]["from:"];
|
||||||
$reply_to = $decoded[0]["Headers"]["reply-to:"];
|
$reply_to = $decoded[0]["Headers"]["reply-to:"];
|
||||||
$to = $decoded[0]["Headers"]["to:"];
|
$to = $decoded[0]["Headers"]["to:"];
|
||||||
$subject = $decoded[0]["Headers"]["subject:"];
|
$subject = $decoded[0]["Headers"]["subject:"];
|
||||||
|
|
||||||
if (substr_count($subject, '=?utf-8?B?') > 0) {
|
if (substr_count($subject, '=?utf-8?B?') > 0) {
|
||||||
$subject = str_replace('=?utf-8?B?', '', $subject);
|
$subject = str_replace('=?utf-8?B?', '', $subject);
|
||||||
$subject = str_replace('?=', '', $subject);
|
$subject = str_replace('?=', '', $subject);
|
||||||
$subject = base64_decode($subject);
|
$subject = base64_decode($subject);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the body
|
//get the body
|
||||||
$body = '';
|
$body = '';
|
||||||
$content_type = $decoded[0]['Headers']['content-type:'];
|
$content_type = $decoded[0]['Headers']['content-type:'];
|
||||||
if (substr($content_type, 0, 15) == "multipart/mixed" || substr($content_type, 0, 21) == "multipart/alternative") {
|
if (substr($content_type, 0, 15) == "multipart/mixed" || substr($content_type, 0, 21) == "multipart/alternative") {
|
||||||
foreach($decoded[0]["Parts"] as $row) {
|
foreach($decoded[0]["Parts"] as $row) {
|
||||||
$body_content_type = $row["Headers"]["content-type:"];
|
$body_content_type = $row["Headers"]["content-type:"];
|
||||||
if (substr($body_content_type, 0, 9) == "text/html") { $body = $row["Body"]; }
|
if (substr($body_content_type, 0, 9) == "text/html") { $body = $row["Body"]; }
|
||||||
if (substr($body_content_type, 0, 10) == "text/plain") { $body_plain = $row["Body"]; $body = $body_plain; }
|
if (substr($body_content_type, 0, 10) == "text/plain") { $body_plain = $row["Body"]; $body = $body_plain; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$content_type_array = explode(";", $content_type);
|
$content_type_array = explode(";", $content_type);
|
||||||
$body = $decoded[0]["Body"];
|
$body = $decoded[0]["Body"];
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the attachments (if any)
|
//get the attachments (if any)
|
||||||
foreach ($decoded[0]['Parts'] as &$parts_array) {
|
foreach ($decoded[0]['Parts'] as &$parts_array) {
|
||||||
$content_type = $parts_array["Parts"][0]["Headers"]["content-type:"]; //audio/wav; name="msg_b64f97e0-8570-11e4-8400-35da04cdaa74.wav"
|
$content_type = $parts_array["Parts"][0]["Headers"]["content-type:"]; //audio/wav; name="msg_b64f97e0-8570-11e4-8400-35da04cdaa74.wav"
|
||||||
$content_transfer_encoding = $parts_array["Parts"][0]["Headers"]["content-transfer-encoding:"]; //base64
|
$content_transfer_encoding = $parts_array["Parts"][0]["Headers"]["content-transfer-encoding:"]; //base64
|
||||||
$content_disposition = $parts_array["Parts"][0]["Headers"]["content-disposition"]; //attachment; filename="msg_b64f97e0-8570-11e4-8400-35da04cdaa74.wav"
|
$content_disposition = $parts_array["Parts"][0]["Headers"]["content-disposition"]; //attachment; filename="msg_b64f97e0-8570-11e4-8400-35da04cdaa74.wav"
|
||||||
$file_name = $parts_array["FileName"];
|
$file_name = $parts_array["FileName"];
|
||||||
$file_size = $parts_array["BodyLength"];
|
$file_size = $parts_array["BodyLength"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_SESSION["message"] = $text['message-decoding_error'].(($mime->error != '') ? ': '.htmlspecialchars($mime->error) : null);
|
$_SESSION["message"] = $text['message-decoding_error'].(($mime->error != '') ? ': '.htmlspecialchars($mime->error) : null);
|
||||||
header("Location: emails.php");
|
header("Location: emails.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//show the header
|
//show the header
|
||||||
$document['title'] = $text['title-view_email'];
|
$document['title'] = $text['title-view_email'];
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
//show content
|
//show content
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>";
|
echo " <tr>";
|
||||||
echo " <td valign='top' align='left' nowrap>";
|
echo " <td valign='top' align='left' nowrap>";
|
||||||
echo " <b>".$text['header-view_email']."</b>\n";
|
echo " <b>".$text['header-view_email']."</b>\n";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td valign='top' align='right' nowrap>";
|
echo " <td valign='top' align='right' nowrap>";
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"document.location.href='emails.php';\" value='".$text['button-back']."'>";
|
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"document.location.href='emails.php';\" value='".$text['button-back']."'>";
|
||||||
if (permission_exists('email_download')) {
|
if (permission_exists('email_download')) {
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-download']."' onclick=\"document.location.href='emails.php?id=".$email_uuid."&a=download';\" value='".$text['button-download']."'>";
|
echo " <input type='button' class='btn' alt='".$text['button-download']."' onclick=\"document.location.href='emails.php?id=".$email_uuid."&a=download';\" value='".$text['button-download']."'>";
|
||||||
}
|
}
|
||||||
if (permission_exists('email_resend')) {
|
if (permission_exists('email_resend')) {
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-resend']."' onclick=\"document.location.href='emails.php?id=".$email_uuid."&a=resend';\" value='".$text['button-resend']."'>";
|
echo " <input type='button' class='btn' alt='".$text['button-resend']."' onclick=\"document.location.href='emails.php?id=".$email_uuid."&a=resend';\" value='".$text['button-resend']."'>";
|
||||||
}
|
}
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>".$text['label-sent']."</td>\n";
|
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>".$text['label-sent']."</td>\n";
|
||||||
echo "<td width='70%' class='vtable' align='left'>".$sent."</td>\n";
|
echo "<td width='70%' class='vtable' align='left'>".$sent."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-type']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-type']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>".$text['label-type_'.$type]."</td>\n";
|
echo "<td class='vtable' align='left'>".$text['label-type_'.$type]."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-status']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-status']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>".$text['label-status_'.$status]."</td>\n";
|
echo "<td class='vtable' align='left'>".$text['label-status_'.$status]."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-from']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-from']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>".$from."</td>\n";
|
echo "<td class='vtable' align='left'>".$from."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-to']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-to']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>".$to."</td>\n";
|
echo "<td class='vtable' align='left'>".$to."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-subject']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-subject']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>".$subject."</td>\n";
|
echo "<td class='vtable' align='left'>".$subject."</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-message']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-message']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>";
|
echo "<td class='vtable' align='left'>";
|
||||||
echo " <iframe id='msg_display' width='100%' height='250' scrolling='auto' cellspacing='0' style='border: 1px solid #c5d1e5; overflow: scroll;'></iframe>\n";
|
echo " <iframe id='msg_display' width='100%' height='250' scrolling='auto' cellspacing='0' style='border: 1px solid #c5d1e5; overflow: scroll;'></iframe>\n";
|
||||||
echo " <textarea id='msg' width='1' height='1' style='width: 1px; height: 1px; display: none;'>".$body."</textarea>\n";
|
echo " <textarea id='msg' width='1' height='1' style='width: 1px; height: 1px; display: none;'>".$body."</textarea>\n";
|
||||||
echo " <script>";
|
echo " <script>";
|
||||||
echo " var iframe = document.getElementById('msg_display');";
|
echo " var iframe = document.getElementById('msg_display');";
|
||||||
echo " iframe.contentDocument.write(document.getElementById('msg').value);";
|
echo " iframe.contentDocument.write(document.getElementById('msg').value);";
|
||||||
echo " iframe.contentDocument.close();";
|
echo " iframe.contentDocument.close();";
|
||||||
echo " </script>\n";
|
echo " </script>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-attachment']."</td>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>".$text['label-attachment']."</td>\n";
|
||||||
echo "<td class='vtable' align='left'>".$file_name." (".round($file_size/1024,2)." KB)</td>\n";
|
echo "<td class='vtable' align='left'>".$file_name." (".round($file_size/1024,2)." KB)</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
+271
-271
@@ -1,271 +1,271 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('email_view')) {
|
if (permission_exists('email_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get variables used to control the order
|
//get variables used to control the order
|
||||||
$order_by = ($_GET["order_by"] != '') ? $_GET["order_by"] : 'sent_date';
|
$order_by = ($_GET["order_by"] != '') ? $_GET["order_by"] : 'sent_date';
|
||||||
$order = ($_GET["order"] != '') ? $_GET["order"] : 'desc';
|
$order = ($_GET["order"] != '') ? $_GET["order"] : 'desc';
|
||||||
|
|
||||||
//download email
|
//download email
|
||||||
if ($_REQUEST['a'] == 'download' && permission_exists('email_download')) {
|
if ($_REQUEST['a'] == 'download' && permission_exists('email_download')) {
|
||||||
$email_uuid = check_str($_REQUEST["id"]);
|
$email_uuid = check_str($_REQUEST["id"]);
|
||||||
|
|
||||||
$msg_found = false;
|
$msg_found = false;
|
||||||
|
|
||||||
if ($email_uuid != '') {
|
if ($email_uuid != '') {
|
||||||
$sql = "select call_uuid, email from v_emails ";
|
$sql = "select call_uuid, email from v_emails ";
|
||||||
$sql .= "where email_uuid = '".$email_uuid."' ";
|
$sql .= "where email_uuid = '".$email_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$call_uuid = $row['call_uuid'];
|
$call_uuid = $row['call_uuid'];
|
||||||
$email = $row['email'];
|
$email = $row['email'];
|
||||||
$msg_found = true;
|
$msg_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset ($prep_statement, $sql, $result, $result_count);
|
unset ($prep_statement, $sql, $result, $result_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg_found) {
|
if ($msg_found) {
|
||||||
header("Content-Type: message/rfc822");
|
header("Content-Type: message/rfc822");
|
||||||
header('Content-Disposition: attachment; filename="'.$call_uuid.'.eml"');
|
header('Content-Disposition: attachment; filename="'.$call_uuid.'.eml"');
|
||||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
||||||
header("Content-Length: ".strlen($email));
|
header("Content-Length: ".strlen($email));
|
||||||
echo $email;
|
echo $email;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//resend email
|
//resend email
|
||||||
if ($_REQUEST['a'] == 'resend' && permission_exists('email_resend')) {
|
if ($_REQUEST['a'] == 'resend' && permission_exists('email_resend')) {
|
||||||
$email_uuid = check_str($_REQUEST["id"]);
|
$email_uuid = check_str($_REQUEST["id"]);
|
||||||
$resend = true;
|
$resend = true;
|
||||||
|
|
||||||
$msg_found = false;
|
$msg_found = false;
|
||||||
|
|
||||||
if ($email_uuid != '') {
|
if ($email_uuid != '') {
|
||||||
$sql = "select email from v_emails ";
|
$sql = "select email from v_emails ";
|
||||||
$sql .= "where email_uuid = '".$email_uuid."' ";
|
$sql .= "where email_uuid = '".$email_uuid."' ";
|
||||||
if (!permission_exists('emails_all') || $_REQUEST['showall'] != 'true') {
|
if (!permission_exists('emails_all') || $_REQUEST['showall'] != 'true') {
|
||||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$email = $row['email'];
|
$email = $row['email'];
|
||||||
$msg_found = true;
|
$msg_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset ($prep_statement, $sql, $result, $result_count);
|
unset ($prep_statement, $sql, $result, $result_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg_found) {
|
if ($msg_found) {
|
||||||
$msg = $email;
|
$msg = $email;
|
||||||
require_once "secure/v_mailto.php";
|
require_once "secure/v_mailto.php";
|
||||||
if ($mailer_error == '') {
|
if ($mailer_error == '') {
|
||||||
$_SESSION["message"] = $text['message-message_resent'];
|
$_SESSION["message"] = $text['message-message_resent'];
|
||||||
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
||||||
header("Location: email_delete.php?id=".$email_uuid."&showall=true");
|
header("Location: email_delete.php?id=".$email_uuid."&showall=true");
|
||||||
} else {
|
} else {
|
||||||
header("Location: email_delete.php?id=".$email_uuid);
|
header("Location: email_delete.php?id=".$email_uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_SESSION["message_mood"] = 'negative';
|
$_SESSION["message_mood"] = 'negative';
|
||||||
$_SESSION["message_delay"] = '4'; //sec
|
$_SESSION["message_delay"] = '4'; //sec
|
||||||
$_SESSION["message"] = $text['message-resend_failed'].": ".$mailer_error;
|
$_SESSION["message"] = $text['message-resend_failed'].": ".$mailer_error;
|
||||||
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
||||||
header("Location: emails.php?showall=true");
|
header("Location: emails.php?showall=true");
|
||||||
} else {
|
} else {
|
||||||
header("Location: emails.php");
|
header("Location: emails.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
$document['title'] = $text['title-emails'];
|
$document['title'] = $text['title-emails'];
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
require_once "resources/paging.php";
|
require_once "resources/paging.php";
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='50%' align='left' valign='top' nowrap='nowrap'>";
|
echo " <td width='50%' align='left' valign='top' nowrap='nowrap'>";
|
||||||
echo " <b>".$text['header-emails']."</b>";
|
echo " <b>".$text['header-emails']."</b>";
|
||||||
echo " <br /><br />";
|
echo " <br /><br />";
|
||||||
echo " ".$text['description-emails'];
|
echo " ".$text['description-emails'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='50%' align='right' valign='top'>\n";
|
echo " <td width='50%' align='right' valign='top'>\n";
|
||||||
if (permission_exists('emails_all')) {
|
if (permission_exists('emails_all')) {
|
||||||
if ($_REQUEST['showall'] != 'true') {
|
if ($_REQUEST['showall'] != 'true') {
|
||||||
echo " <input type='button' class='btn' value='".$text['button-show_all']."' onclick=\"window.location='emails.php?showall=true';\">\n";
|
echo " <input type='button' class='btn' value='".$text['button-show_all']."' onclick=\"window.location='emails.php?showall=true';\">\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo " <input type='button' class='btn' alt=\"".$text['button-refresh']."\" onclick=\"document.location.reload();\" value='".$text['button-refresh']."'>\n";
|
echo " <input type='button' class='btn' alt=\"".$text['button-refresh']."\" onclick=\"document.location.reload();\" value='".$text['button-refresh']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$sql = "select count(*) as num_rows from v_emails ";
|
$sql = "select count(*) as num_rows from v_emails ";
|
||||||
if (permission_exists('emails_all')) {
|
if (permission_exists('emails_all')) {
|
||||||
if ($_REQUEST['showall'] != 'true') {
|
if ($_REQUEST['showall'] != 'true') {
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
$num_rows = ($row['num_rows'] > 0) ? $row['num_rows'] : 0;
|
$num_rows = ($row['num_rows'] > 0) ? $row['num_rows'] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
||||||
$param .= "&showall=true";
|
$param .= "&showall=true";
|
||||||
} else {
|
} else {
|
||||||
$param = "";
|
$param = "";
|
||||||
}
|
}
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||||
$offset = $rows_per_page * $page;
|
$offset = $rows_per_page * $page;
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select * from v_emails ";
|
$sql = "select * from v_emails ";
|
||||||
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
||||||
$sql .= " join v_domains on v_emails.domain_uuid = v_domains.domain_uuid ";
|
$sql .= " join v_domains on v_emails.domain_uuid = v_domains.domain_uuid ";
|
||||||
} else {
|
} else {
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
}
|
}
|
||||||
if (strlen($order_by)> 0) { $sql .= "order by ".$order_by." ".$order." "; }
|
if (strlen($order_by)> 0) { $sql .= "order by ".$order_by." ".$order." "; }
|
||||||
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
$result_count = count($result);
|
$result_count = count($result);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
if ($_REQUEST['showall'] == true && permission_exists('emails_all')) {
|
if ($_REQUEST['showall'] == true && permission_exists('emails_all')) {
|
||||||
echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, null, null, $param);
|
echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, null, null, $param);
|
||||||
}
|
}
|
||||||
echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param);
|
echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param);
|
||||||
echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param);
|
echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param);
|
||||||
echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param);
|
echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param);
|
||||||
echo "<th>".$text['label-message']."</th>\n";
|
echo "<th>".$text['label-message']."</th>\n";
|
||||||
echo "<th>".$text['label-reference']."</th>\n";
|
echo "<th>".$text['label-reference']."</th>\n";
|
||||||
echo "<td class='list_control_icons'> </td>\n";
|
echo "<td class='list_control_icons'> </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
|
|
||||||
//get call details
|
//get call details
|
||||||
$sql = "select caller_id_name, caller_id_number, destination_number from v_xml_cdr ";
|
$sql = "select caller_id_name, caller_id_number, destination_number from v_xml_cdr ";
|
||||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||||
$sql .= "and uuid = '".$row['call_uuid']."' ";
|
$sql .= "and uuid = '".$row['call_uuid']."' ";
|
||||||
//echo "<tr><td colspan='40'>".$sql."</td></tr>";
|
//echo "<tr><td colspan='40'>".$sql."</td></tr>";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach($result2 as $row2) {
|
foreach($result2 as $row2) {
|
||||||
$caller_id_name = ($row2['caller_id_name'] != '') ? $row2['caller_id_name'] : null;
|
$caller_id_name = ($row2['caller_id_name'] != '') ? $row2['caller_id_name'] : null;
|
||||||
$caller_id_number = ($row2['caller_id_number'] != '') ? $row2['caller_id_number'] : null;
|
$caller_id_number = ($row2['caller_id_number'] != '') ? $row2['caller_id_number'] : null;
|
||||||
$destination_number = ($row2['destination_number'] != '') ? $row2['destination_number'] : null;
|
$destination_number = ($row2['destination_number'] != '') ? $row2['destination_number'] : null;
|
||||||
}
|
}
|
||||||
unset($prep_statement, $sql);
|
unset($prep_statement, $sql);
|
||||||
|
|
||||||
$tr_link = "href='email_view.php?id=".$row['email_uuid']."'";
|
$tr_link = "href='email_view.php?id=".$row['email_uuid']."'";
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
if ($_REQUEST['showall'] == true && permission_exists('emails_all')) {
|
if ($_REQUEST['showall'] == true && permission_exists('emails_all')) {
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['domain_name']."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['domain_name']."</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||||
$sent_date = explode('.', $row['sent_date']);
|
$sent_date = explode('.', $row['sent_date']);
|
||||||
echo $sent_date[0];
|
echo $sent_date[0];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-type_'.$row['type']]."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-type_'.$row['type']]."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-status_'.$row['status']]."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-status_'.$row['status']]."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'>";
|
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'>";
|
||||||
echo " <a href='email_view.php?id=".$row['email_uuid']."'>".$text['label-message_view']."</a> ";
|
echo " <a href='email_view.php?id=".$row['email_uuid']."'>".$text['label-message_view']."</a> ";
|
||||||
if (permission_exists('email_download')) {
|
if (permission_exists('email_download')) {
|
||||||
echo " <a href='?id=".$row['email_uuid']."&a=download'>".$text['label-download']."</a> ";
|
echo " <a href='?id=".$row['email_uuid']."&a=download'>".$text['label-download']."</a> ";
|
||||||
}
|
}
|
||||||
if (permission_exists('email_resend')) {
|
if (permission_exists('email_resend')) {
|
||||||
echo " <a href='?id=".$row['email_uuid']."&a=resend";
|
echo " <a href='?id=".$row['email_uuid']."&a=resend";
|
||||||
if ($_REQUEST['showall'] == true && permission_exists('emails_all')) {
|
if ($_REQUEST['showall'] == true && permission_exists('emails_all')) {
|
||||||
echo "&showall=true";
|
echo "&showall=true";
|
||||||
}
|
}
|
||||||
echo "'>" . $text['label-resend']."</a>";
|
echo "'>" . $text['label-resend']."</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td valign='top' class='row_stylebg tr_link_void' style='white-space: nowrap; vertical-align: top;'>";
|
echo " <td valign='top' class='row_stylebg tr_link_void' style='white-space: nowrap; vertical-align: top;'>";
|
||||||
echo " <a href='".PROJECT_PATH."/app/xml_cdr/xml_cdr_details.php?uuid=".$row['call_uuid']."'>".$text['label-reference_cdr']."</a>";
|
echo " <a href='".PROJECT_PATH."/app/xml_cdr/xml_cdr_details.php?uuid=".$row['call_uuid']."'>".$text['label-reference_cdr']."</a>";
|
||||||
echo " ".($caller_id_name != '') ? " ".$caller_id_name." (".format_phone($caller_id_number).")" : $caller_id_number;
|
echo " ".($caller_id_name != '') ? " ".$caller_id_name." (".format_phone($caller_id_number).")" : $caller_id_number;
|
||||||
echo " <span style='font-size: 150%; line-height: 10px;'>⇢</span> ".$destination_number;
|
echo " <span style='font-size: 150%; line-height: 10px;'>⇢</span> ".$destination_number;
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
echo "<a href='email_view.php?id=".$row['email_uuid']."' alt='".$text['label-message_view']."'>$v_link_label_view</a>";
|
echo "<a href='email_view.php?id=".$row['email_uuid']."' alt='".$text['label-message_view']."'>$v_link_label_view</a>";
|
||||||
if (permission_exists('email_delete')) {
|
if (permission_exists('email_delete')) {
|
||||||
echo "<a href='email_delete.php?id=".$row['email_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
echo "<a href='email_delete.php?id=".$row['email_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
} //end foreach
|
} //end foreach
|
||||||
unset($sql, $result, $row_count);
|
unset($sql, $result, $row_count);
|
||||||
} //end if results
|
} //end if results
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td colspan='21' align='left'>\n";
|
echo "<td colspan='21' align='left'>\n";
|
||||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " </table>\n";
|
echo " </table>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|||||||
+42
-42
@@ -1,43 +1,43 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//application details
|
//application details
|
||||||
$apps[$x]['name'] = "Exec";
|
$apps[$x]['name'] = "Exec";
|
||||||
$apps[$x]['uuid'] = "1dd98ca6-95f1-e728-7e8f-137fe18dc23c";
|
$apps[$x]['uuid'] = "1dd98ca6-95f1-e728-7e8f-137fe18dc23c";
|
||||||
$apps[$x]['category'] = "System";
|
$apps[$x]['category'] = "System";
|
||||||
$apps[$x]['subcategory'] = "";
|
$apps[$x]['subcategory'] = "";
|
||||||
$apps[$x]['version'] = "";
|
$apps[$x]['version'] = "";
|
||||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||||
$apps[$x]['description']['en-us'] = "Provides a conventient way to execute system, PHP, switch and SQL commands.";
|
$apps[$x]['description']['en-us'] = "Provides a conventient way to execute system, PHP, switch and SQL commands.";
|
||||||
$apps[$x]['description']['es-cl'] = "Provee un modo conveniente de ejecutar comandos de sistema, PHP o del switch.";
|
$apps[$x]['description']['es-cl'] = "Provee un modo conveniente de ejecutar comandos de sistema, PHP o del switch.";
|
||||||
$apps[$x]['description']['es-mx'] = "Provee un modo conveniente de ejecutar comandos de sistema, PHP o del switch.";
|
$apps[$x]['description']['es-mx'] = "Provee un modo conveniente de ejecutar comandos de sistema, PHP o del switch.";
|
||||||
$apps[$x]['description']['de-de'] = "";
|
$apps[$x]['description']['de-de'] = "";
|
||||||
$apps[$x]['description']['de-ch'] = "";
|
$apps[$x]['description']['de-ch'] = "";
|
||||||
$apps[$x]['description']['de-at'] = "";
|
$apps[$x]['description']['de-at'] = "";
|
||||||
$apps[$x]['description']['fr-fr'] = "Offre un mode pour exécuter des commandes système, PHP ou switch.";
|
$apps[$x]['description']['fr-fr'] = "Offre un mode pour exécuter des commandes système, PHP ou switch.";
|
||||||
$apps[$x]['description']['fr-ca'] = "Il offre un mode d'exécuter des commandes du système, PHP ou switch.";
|
$apps[$x]['description']['fr-ca'] = "Il offre un mode d'exécuter des commandes du système, PHP ou switch.";
|
||||||
$apps[$x]['description']['fr-ch'] = "";
|
$apps[$x]['description']['fr-ch'] = "";
|
||||||
$apps[$x]['description']['pt-pt'] = "Ofereçe uma forma conveniente para executar comandos de sistema, PHP e switch.";
|
$apps[$x]['description']['pt-pt'] = "Ofereçe uma forma conveniente para executar comandos de sistema, PHP e switch.";
|
||||||
$apps[$x]['description']['pt-br'] = "";
|
$apps[$x]['description']['pt-br'] = "";
|
||||||
|
|
||||||
//permission details
|
//permission details
|
||||||
$apps[$x]['permissions'][0]['name'] = "exec_view";
|
$apps[$x]['permissions'][0]['name'] = "exec_view";
|
||||||
$apps[$x]['permissions'][0]['menu']['uuid'] = "06493580-9131-ce57-23cd-d42d69dd8526";
|
$apps[$x]['permissions'][0]['menu']['uuid'] = "06493580-9131-ce57-23cd-d42d69dd8526";
|
||||||
$apps[$x]['permissions'][0]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['permissions'][1]['name'] = "exec_command";
|
$apps[$x]['permissions'][1]['name'] = "exec_command";
|
||||||
$apps[$x]['permissions'][1]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][1]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['permissions'][2]['name'] = "exec_php";
|
$apps[$x]['permissions'][2]['name'] = "exec_php";
|
||||||
$apps[$x]['permissions'][2]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][2]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['permissions'][3]['name'] = "exec_switch";
|
$apps[$x]['permissions'][3]['name'] = "exec_switch";
|
||||||
$apps[$x]['permissions'][3]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][3]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['permissions'][4]['name'] = "exec_sql";
|
$apps[$x]['permissions'][4]['name'] = "exec_sql";
|
||||||
$apps[$x]['permissions'][4]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][4]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['permissions'][5]['name'] = "exec_sql_backup";
|
$apps[$x]['permissions'][5]['name'] = "exec_sql_backup";
|
||||||
$apps[$x]['permissions'][5]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][5]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+276
-276
@@ -1,277 +1,277 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$text['title-databases']['en-us'] = "Databases";
|
$text['title-databases']['en-us'] = "Databases";
|
||||||
$text['title-databases']['es-cl'] = "Bases de datos";
|
$text['title-databases']['es-cl'] = "Bases de datos";
|
||||||
$text['title-databases']['pt-pt'] = "Bases de Dados";
|
$text['title-databases']['pt-pt'] = "Bases de Dados";
|
||||||
$text['title-databases']['fr-fr'] = "Bases de données";
|
$text['title-databases']['fr-fr'] = "Bases de données";
|
||||||
$text['title-databases']['pt-br'] = "Base de dados";
|
$text['title-databases']['pt-br'] = "Base de dados";
|
||||||
$text['title-databases']['pl'] = "Bazy danych";
|
$text['title-databases']['pl'] = "Bazy danych";
|
||||||
$text['title-databases']['sv-se'] = "Databaser";
|
$text['title-databases']['sv-se'] = "Databaser";
|
||||||
$text['title-databases']['uk'] = "Бази даних";
|
$text['title-databases']['uk'] = "Бази даних";
|
||||||
$text['title-databases']['de-at'] = "Datenbanken";
|
$text['title-databases']['de-at'] = "Datenbanken";
|
||||||
|
|
||||||
$text['title-command']['en-us'] = "Command";
|
$text['title-command']['en-us'] = "Command";
|
||||||
$text['title-command']['es-cl'] = "Comando";
|
$text['title-command']['es-cl'] = "Comando";
|
||||||
$text['title-command']['pt-pt'] = "Comando";
|
$text['title-command']['pt-pt'] = "Comando";
|
||||||
$text['title-command']['fr-fr'] = "Commande";
|
$text['title-command']['fr-fr'] = "Commande";
|
||||||
$text['title-command']['pt-br'] = "Comando";
|
$text['title-command']['pt-br'] = "Comando";
|
||||||
$text['title-command']['pl'] = "Polecenie";
|
$text['title-command']['pl'] = "Polecenie";
|
||||||
$text['title-command']['sv-se'] = "Kommando";
|
$text['title-command']['sv-se'] = "Kommando";
|
||||||
$text['title-command']['uk'] = "Команди";
|
$text['title-command']['uk'] = "Команди";
|
||||||
$text['title-command']['de-at'] = "Befehl";
|
$text['title-command']['de-at'] = "Befehl";
|
||||||
|
|
||||||
$text['option-result_type_view']['en-us'] = "View";
|
$text['option-result_type_view']['en-us'] = "View";
|
||||||
$text['option-result_type_view']['es-cl'] = "Ver";
|
$text['option-result_type_view']['es-cl'] = "Ver";
|
||||||
$text['option-result_type_view']['pt-pt'] = "Ver";
|
$text['option-result_type_view']['pt-pt'] = "Ver";
|
||||||
$text['option-result_type_view']['fr-fr'] = "Voir";
|
$text['option-result_type_view']['fr-fr'] = "Voir";
|
||||||
$text['option-result_type_view']['pt-br'] = "Visualizar";
|
$text['option-result_type_view']['pt-br'] = "Visualizar";
|
||||||
$text['option-result_type_view']['pl'] = "Widok";
|
$text['option-result_type_view']['pl'] = "Widok";
|
||||||
$text['option-result_type_view']['sv-se'] = "Granska";
|
$text['option-result_type_view']['sv-se'] = "Granska";
|
||||||
$text['option-result_type_view']['uk'] = "Перегляд";
|
$text['option-result_type_view']['uk'] = "Перегляд";
|
||||||
$text['option-result_type_view']['de-at'] = "Ansicht";
|
$text['option-result_type_view']['de-at'] = "Ansicht";
|
||||||
|
|
||||||
$text['option-result_type_insert']['en-us'] = "SQL";
|
$text['option-result_type_insert']['en-us'] = "SQL";
|
||||||
$text['option-result_type_insert']['es-cl'] = "SQL";
|
$text['option-result_type_insert']['es-cl'] = "SQL";
|
||||||
$text['option-result_type_insert']['pt-pt'] = "SQL";
|
$text['option-result_type_insert']['pt-pt'] = "SQL";
|
||||||
$text['option-result_type_insert']['fr-fr'] = "SQL";
|
$text['option-result_type_insert']['fr-fr'] = "SQL";
|
||||||
$text['option-result_type_insert']['pt-br'] = "SQL";
|
$text['option-result_type_insert']['pt-br'] = "SQL";
|
||||||
$text['option-result_type_insert']['pl'] = "SQL";
|
$text['option-result_type_insert']['pl'] = "SQL";
|
||||||
$text['option-result_type_insert']['sv-se'] = "SQL";
|
$text['option-result_type_insert']['sv-se'] = "SQL";
|
||||||
$text['option-result_type_insert']['uk'] = "SQL ";
|
$text['option-result_type_insert']['uk'] = "SQL ";
|
||||||
$text['option-result_type_insert']['de-at'] = "SQL";
|
$text['option-result_type_insert']['de-at'] = "SQL";
|
||||||
|
|
||||||
$text['option-result_type_csv']['en-us'] = "CSV";
|
$text['option-result_type_csv']['en-us'] = "CSV";
|
||||||
$text['option-result_type_csv']['es-cl'] = "CSV";
|
$text['option-result_type_csv']['es-cl'] = "CSV";
|
||||||
$text['option-result_type_csv']['pt-pt'] = "CSV";
|
$text['option-result_type_csv']['pt-pt'] = "CSV";
|
||||||
$text['option-result_type_csv']['fr-fr'] = "CSV";
|
$text['option-result_type_csv']['fr-fr'] = "CSV";
|
||||||
$text['option-result_type_csv']['pt-br'] = "CSV";
|
$text['option-result_type_csv']['pt-br'] = "CSV";
|
||||||
$text['option-result_type_csv']['pl'] = "CSV";
|
$text['option-result_type_csv']['pl'] = "CSV";
|
||||||
$text['option-result_type_csv']['sv-se'] = "CSV";
|
$text['option-result_type_csv']['sv-se'] = "CSV";
|
||||||
$text['option-result_type_csv']['uk'] = "CSV ";
|
$text['option-result_type_csv']['uk'] = "CSV ";
|
||||||
$text['option-result_type_csv']['de-at'] = "CSV";
|
$text['option-result_type_csv']['de-at'] = "CSV";
|
||||||
|
|
||||||
$text['label-table']['en-us'] = "Table";
|
$text['label-table']['en-us'] = "Table";
|
||||||
$text['label-table']['es-cl'] = "Tabla";
|
$text['label-table']['es-cl'] = "Tabla";
|
||||||
$text['label-table']['pt-pt'] = "Tabela";
|
$text['label-table']['pt-pt'] = "Tabela";
|
||||||
$text['label-table']['fr-fr'] = "Table";
|
$text['label-table']['fr-fr'] = "Table";
|
||||||
$text['label-table']['pt-br'] = "Tabela";
|
$text['label-table']['pt-br'] = "Tabela";
|
||||||
$text['label-table']['pl'] = "Tabela";
|
$text['label-table']['pl'] = "Tabela";
|
||||||
$text['label-table']['sv-se'] = "TAbell";
|
$text['label-table']['sv-se'] = "TAbell";
|
||||||
$text['label-table']['uk'] = "Таблиця";
|
$text['label-table']['uk'] = "Таблиця";
|
||||||
$text['label-table']['de-at'] = "Tabelle";
|
$text['label-table']['de-at'] = "Tabelle";
|
||||||
|
|
||||||
$text['label-switch']['en-us'] = "Switch";
|
$text['label-switch']['en-us'] = "Switch";
|
||||||
$text['label-switch']['es-cl'] = "Comando de switch";
|
$text['label-switch']['es-cl'] = "Comando de switch";
|
||||||
$text['label-switch']['pt-pt'] = "Comando Freeswitch";
|
$text['label-switch']['pt-pt'] = "Comando Freeswitch";
|
||||||
$text['label-switch']['fr-fr'] = "Commande CLI Freeswitch";
|
$text['label-switch']['fr-fr'] = "Commande CLI Freeswitch";
|
||||||
$text['label-switch']['pt-br'] = "Comando Freeswitch ";
|
$text['label-switch']['pt-br'] = "Comando Freeswitch ";
|
||||||
$text['label-switch']['pl'] = "PBX";
|
$text['label-switch']['pl'] = "PBX";
|
||||||
$text['label-switch']['sv-se'] = "Switch";
|
$text['label-switch']['sv-se'] = "Switch";
|
||||||
$text['label-switch']['uk'] = "FreeSwitch";
|
$text['label-switch']['uk'] = "FreeSwitch";
|
||||||
$text['label-switch']['de-at'] = "Switch";
|
$text['label-switch']['de-at'] = "Switch";
|
||||||
|
|
||||||
$text['label-shell']['en-us'] = "Shell";
|
$text['label-shell']['en-us'] = "Shell";
|
||||||
$text['label-shell']['es-cl'] = "Terminal de Comandos";
|
$text['label-shell']['es-cl'] = "Terminal de Comandos";
|
||||||
$text['label-shell']['pt-pt'] = "Comando Shell";
|
$text['label-shell']['pt-pt'] = "Comando Shell";
|
||||||
$text['label-shell']['fr-fr'] = "Commande Shell";
|
$text['label-shell']['fr-fr'] = "Commande Shell";
|
||||||
$text['label-shell']['pt-br'] = "Comando Shell ";
|
$text['label-shell']['pt-br'] = "Comando Shell ";
|
||||||
$text['label-shell']['pl'] = "Powłoka (shell)";
|
$text['label-shell']['pl'] = "Powłoka (shell)";
|
||||||
$text['label-shell']['sv-se'] = "Shell";
|
$text['label-shell']['sv-se'] = "Shell";
|
||||||
$text['label-shell']['uk'] = "Консоль";
|
$text['label-shell']['uk'] = "Консоль";
|
||||||
$text['label-shell']['de-at'] = "Shell";
|
$text['label-shell']['de-at'] = "Shell";
|
||||||
|
|
||||||
$text['label-results']['en-us'] = "Results";
|
$text['label-results']['en-us'] = "Results";
|
||||||
$text['label-results']['es-cl'] = "Resultados";
|
$text['label-results']['es-cl'] = "Resultados";
|
||||||
$text['label-results']['pt-pt'] = "Resultados";
|
$text['label-results']['pt-pt'] = "Resultados";
|
||||||
$text['label-results']['fr-fr'] = "Résultats";
|
$text['label-results']['fr-fr'] = "Résultats";
|
||||||
$text['label-results']['pt-br'] = "Resultados";
|
$text['label-results']['pt-br'] = "Resultados";
|
||||||
$text['label-results']['pl'] = "Rezultaty";
|
$text['label-results']['pl'] = "Rezultaty";
|
||||||
$text['label-results']['sv-se'] = "Resultat";
|
$text['label-results']['sv-se'] = "Resultat";
|
||||||
$text['label-results']['uk'] = "Результати";
|
$text['label-results']['uk'] = "Результати";
|
||||||
$text['label-results']['de-at'] = "Ergebnisse";
|
$text['label-results']['de-at'] = "Ergebnisse";
|
||||||
|
|
||||||
$text['label-result_type']['en-us'] = "Result";
|
$text['label-result_type']['en-us'] = "Result";
|
||||||
$text['label-result_type']['es-cl'] = "Resultado";
|
$text['label-result_type']['es-cl'] = "Resultado";
|
||||||
$text['label-result_type']['pt-pt'] = "Resultado";
|
$text['label-result_type']['pt-pt'] = "Resultado";
|
||||||
$text['label-result_type']['fr-fr'] = "Résultat";
|
$text['label-result_type']['fr-fr'] = "Résultat";
|
||||||
$text['label-result_type']['pt-br'] = "Resultado";
|
$text['label-result_type']['pt-br'] = "Resultado";
|
||||||
$text['label-result_type']['pl'] = "Rezultat";
|
$text['label-result_type']['pl'] = "Rezultat";
|
||||||
$text['label-result_type']['sv-se'] = "Resultat";
|
$text['label-result_type']['sv-se'] = "Resultat";
|
||||||
$text['label-result_type']['uk'] = "Результат";
|
$text['label-result_type']['uk'] = "Результат";
|
||||||
$text['label-result_type']['de-at'] = "Ergebnis";
|
$text['label-result_type']['de-at'] = "Ergebnis";
|
||||||
|
|
||||||
$text['label-response']['en-us'] = "Response";
|
$text['label-response']['en-us'] = "Response";
|
||||||
$text['label-response']['es-cl'] = "Respuesta";
|
$text['label-response']['es-cl'] = "Respuesta";
|
||||||
$text['label-response']['pt-pt'] = "Resposta";
|
$text['label-response']['pt-pt'] = "Resposta";
|
||||||
$text['label-response']['fr-fr'] = "Réponse";
|
$text['label-response']['fr-fr'] = "Réponse";
|
||||||
$text['label-response']['pt-br'] = "Resposta";
|
$text['label-response']['pt-br'] = "Resposta";
|
||||||
$text['label-response']['pl'] = "Odpowiedź";
|
$text['label-response']['pl'] = "Odpowiedź";
|
||||||
$text['label-response']['sv-se'] = "Respons";
|
$text['label-response']['sv-se'] = "Respons";
|
||||||
$text['label-response']['uk'] = "Відповідь";
|
$text['label-response']['uk'] = "Відповідь";
|
||||||
$text['label-response']['de-at'] = "Antwort";
|
$text['label-response']['de-at'] = "Antwort";
|
||||||
|
|
||||||
$text['label-reset']['en-us'] = "Reset";
|
$text['label-reset']['en-us'] = "Reset";
|
||||||
$text['label-reset']['es-cl'] = "Reajustar";
|
$text['label-reset']['es-cl'] = "Reajustar";
|
||||||
$text['label-reset']['pt-pt'] = "Restabelecer";
|
$text['label-reset']['pt-pt'] = "Restabelecer";
|
||||||
$text['label-reset']['fr-fr'] = "Remettre";
|
$text['label-reset']['fr-fr'] = "Remettre";
|
||||||
$text['label-reset']['pt-br'] = "Restabelecer";
|
$text['label-reset']['pt-br'] = "Restabelecer";
|
||||||
$text['label-reset']['pl'] = "Resetuj";
|
$text['label-reset']['pl'] = "Resetuj";
|
||||||
$text['label-reset']['he'] = "אפס";
|
$text['label-reset']['he'] = "אפס";
|
||||||
$text['label-reset']['uk'] = "Скинути";
|
$text['label-reset']['uk'] = "Скинути";
|
||||||
$text['label-reset']['sv-se'] = "Återställ";
|
$text['label-reset']['sv-se'] = "Återställ";
|
||||||
$text['label-reset']['de-at'] = "Zurücksetzen";
|
$text['label-reset']['de-at'] = "Zurücksetzen";
|
||||||
$text['label-reset']['ro'] = "Inițializare";
|
$text['label-reset']['ro'] = "Inițializare";
|
||||||
$text['label-reset']['fa'] = "";
|
$text['label-reset']['fa'] = "";
|
||||||
$text['label-reset']['ar-eg'] = "إعادة تعيين";
|
$text['label-reset']['ar-eg'] = "إعادة تعيين";
|
||||||
|
|
||||||
$text['label-records']['en-us'] = "Records";
|
$text['label-records']['en-us'] = "Records";
|
||||||
$text['label-records']['es-cl'] = "Archivos";
|
$text['label-records']['es-cl'] = "Archivos";
|
||||||
$text['label-records']['pt-pt'] = "Registros";
|
$text['label-records']['pt-pt'] = "Registros";
|
||||||
$text['label-records']['fr-fr'] = "Enregistrements";
|
$text['label-records']['fr-fr'] = "Enregistrements";
|
||||||
$text['label-records']['pt-br'] = "Registros";
|
$text['label-records']['pt-br'] = "Registros";
|
||||||
$text['label-records']['pl'] = "Dokumentacja";
|
$text['label-records']['pl'] = "Dokumentacja";
|
||||||
$text['label-records']['sv-se'] = "Uppgifter";
|
$text['label-records']['sv-se'] = "Uppgifter";
|
||||||
$text['label-records']['uk'] = "документація";
|
$text['label-records']['uk'] = "документація";
|
||||||
$text['label-records']['de-at'] = "Aufzeichnungen";
|
$text['label-records']['de-at'] = "Aufzeichnungen";
|
||||||
|
|
||||||
$text['label-sql']['en-us'] = "SQL";
|
$text['label-sql']['en-us'] = "SQL";
|
||||||
$text['label-sql']['es-cl'] = "SQL";
|
$text['label-sql']['es-cl'] = "SQL";
|
||||||
$text['label-sql']['pt-pt'] = "SQL";
|
$text['label-sql']['pt-pt'] = "SQL";
|
||||||
$text['label-sql']['fr-fr'] = "SQL";
|
$text['label-sql']['fr-fr'] = "SQL";
|
||||||
$text['label-sql']['pt-br'] = "SQL";
|
$text['label-sql']['pt-br'] = "SQL";
|
||||||
$text['label-sql']['pl'] = "SQL";
|
$text['label-sql']['pl'] = "SQL";
|
||||||
$text['label-sql']['sv-se'] = "SQL";
|
$text['label-sql']['sv-se'] = "SQL";
|
||||||
$text['label-sql']['uk'] = "SQL";
|
$text['label-sql']['uk'] = "SQL";
|
||||||
$text['label-sql']['de-at'] = "SQL";
|
$text['label-sql']['de-at'] = "SQL";
|
||||||
|
|
||||||
$text['label-php']['en-us'] = "PHP";
|
$text['label-php']['en-us'] = "PHP";
|
||||||
$text['label-php']['es-cl'] = "Comando PHP";
|
$text['label-php']['es-cl'] = "Comando PHP";
|
||||||
$text['label-php']['pt-pt'] = "Comandos PHP";
|
$text['label-php']['pt-pt'] = "Comandos PHP";
|
||||||
$text['label-php']['fr-fr'] = "Commande PHP";
|
$text['label-php']['fr-fr'] = "Commande PHP";
|
||||||
$text['label-php']['pt-br'] = "Comandos PHP ";
|
$text['label-php']['pt-br'] = "Comandos PHP ";
|
||||||
$text['label-php']['pl'] = "PHP";
|
$text['label-php']['pl'] = "PHP";
|
||||||
$text['label-php']['sv-se'] = "PHP";
|
$text['label-php']['sv-se'] = "PHP";
|
||||||
$text['label-php']['uk'] = "PHP";
|
$text['label-php']['uk'] = "PHP";
|
||||||
$text['label-php']['de-at'] = "PHP";
|
$text['label-php']['de-at'] = "PHP";
|
||||||
|
|
||||||
$text['label-execute']['en-us'] = "Execute Command";
|
$text['label-execute']['en-us'] = "Execute Command";
|
||||||
$text['label-execute']['es-cl'] = "Ejecutar Comando";
|
$text['label-execute']['es-cl'] = "Ejecutar Comando";
|
||||||
$text['label-execute']['pt-pt'] = "Executar Comando";
|
$text['label-execute']['pt-pt'] = "Executar Comando";
|
||||||
$text['label-execute']['fr-fr'] = "Executer la Commande";
|
$text['label-execute']['fr-fr'] = "Executer la Commande";
|
||||||
$text['label-execute']['pt-br'] = "Executar";
|
$text['label-execute']['pt-br'] = "Executar";
|
||||||
$text['label-execute']['pl'] = "Wykonywanie poleceń";
|
$text['label-execute']['pl'] = "Wykonywanie poleceń";
|
||||||
$text['label-execute']['sv-se'] = "Utför Kommando";
|
$text['label-execute']['sv-se'] = "Utför Kommando";
|
||||||
$text['label-execute']['uk'] = "Виконання команд";
|
$text['label-execute']['uk'] = "Виконання команд";
|
||||||
$text['label-execute']['de-at'] = "Ausführen";
|
$text['label-execute']['de-at'] = "Ausführen";
|
||||||
|
|
||||||
$text['label-error']['en-us'] = "Error";
|
$text['label-error']['en-us'] = "Error";
|
||||||
$text['label-error']['es-cl'] = "Error";
|
$text['label-error']['es-cl'] = "Error";
|
||||||
$text['label-error']['pt-pt'] = "Erro";
|
$text['label-error']['pt-pt'] = "Erro";
|
||||||
$text['label-error']['fr-fr'] = "Erreur";
|
$text['label-error']['fr-fr'] = "Erreur";
|
||||||
$text['label-error']['pt-br'] = "Erro";
|
$text['label-error']['pt-br'] = "Erro";
|
||||||
$text['label-error']['pl'] = "Błąd";
|
$text['label-error']['pl'] = "Błąd";
|
||||||
$text['label-error']['sv-se'] = "Fel";
|
$text['label-error']['sv-se'] = "Fel";
|
||||||
$text['label-error']['uk'] = "Помилка";
|
$text['label-error']['uk'] = "Помилка";
|
||||||
$text['label-error']['de-at'] = "Fehler";
|
$text['label-error']['de-at'] = "Fehler";
|
||||||
|
|
||||||
$text['header-databases']['en-us'] = "Databases";
|
$text['header-databases']['en-us'] = "Databases";
|
||||||
$text['header-databases']['es-cl'] = "Bases de datos";
|
$text['header-databases']['es-cl'] = "Bases de datos";
|
||||||
$text['header-databases']['pt-pt'] = "Bases de Dados";
|
$text['header-databases']['pt-pt'] = "Bases de Dados";
|
||||||
$text['header-databases']['fr-fr'] = "Bases de données";
|
$text['header-databases']['fr-fr'] = "Bases de données";
|
||||||
$text['header-databases']['pt-br'] = "Base de dados";
|
$text['header-databases']['pt-br'] = "Base de dados";
|
||||||
$text['header-databases']['pl'] = "Bazy danych";
|
$text['header-databases']['pl'] = "Bazy danych";
|
||||||
$text['header-databases']['sv-se'] = "Databaser";
|
$text['header-databases']['sv-se'] = "Databaser";
|
||||||
$text['header-databases']['uk'] = "Бази даних";
|
$text['header-databases']['uk'] = "Бази даних";
|
||||||
$text['header-databases']['de-at'] = "Datenbanken";
|
$text['header-databases']['de-at'] = "Datenbanken";
|
||||||
|
|
||||||
$text['description-switch']['en-us'] = "Switch CLI. View valid commands with: 'help'.";
|
$text['description-switch']['en-us'] = "Switch CLI. View valid commands with: 'help'.";
|
||||||
$text['description-switch']['es-cl'] = "Para un listado de comandos válidos use: help";
|
$text['description-switch']['es-cl'] = "Para un listado de comandos válidos use: help";
|
||||||
$text['description-switch']['pt-pt'] = "Para uma lista dos comandos válidos utilize: help";
|
$text['description-switch']['pt-pt'] = "Para uma lista dos comandos válidos utilize: help";
|
||||||
$text['description-switch']['fr-fr'] = "Pour la liste des commandes valides, utiliser : help";
|
$text['description-switch']['fr-fr'] = "Pour la liste des commandes valides, utiliser : help";
|
||||||
$text['description-switch']['pt-br'] = "Para verificar a lista de comandos válidos utilize: Ajuda";
|
$text['description-switch']['pt-br'] = "Para verificar a lista de comandos válidos utilize: Ajuda";
|
||||||
$text['description-switch']['pl'] = "Aby uzyskać listę poprawnych poleceń użyj pomocy";
|
$text['description-switch']['pl'] = "Aby uzyskać listę poprawnych poleceń użyj pomocy";
|
||||||
$text['description-switch']['sv-se'] = "För en lista med giltiga kommandon använd: help";
|
$text['description-switch']['sv-se'] = "För en lista med giltiga kommandon använd: help";
|
||||||
$text['description-switch']['uk'] = "Для перегляду списку команд виконайте команду: help";
|
$text['description-switch']['uk'] = "Для перегляду списку команд виконайте команду: help";
|
||||||
$text['description-switch']['de-at'] = "Um eine Liste der gültigen Befehle zu bekommen tippen Sie: 'help'";
|
$text['description-switch']['de-at'] = "Um eine Liste der gültigen Befehle zu bekommen tippen Sie: 'help'";
|
||||||
|
|
||||||
$text['description-shell']['en-us'] = "Execute system commands.";
|
$text['description-shell']['en-us'] = "Execute system commands.";
|
||||||
$text['description-shell']['es-cl'] = "Comandos de sistema";
|
$text['description-shell']['es-cl'] = "Comandos de sistema";
|
||||||
$text['description-shell']['pt-pt'] = "Comandos do sistema.";
|
$text['description-shell']['pt-pt'] = "Comandos do sistema.";
|
||||||
$text['description-shell']['fr-fr'] = "Commande Système";
|
$text['description-shell']['fr-fr'] = "Commande Système";
|
||||||
$text['description-shell']['pt-br'] = "Comando do sistema";
|
$text['description-shell']['pt-br'] = "Comando do sistema";
|
||||||
$text['description-shell']['pl'] = "Polecenia systemowe.";
|
$text['description-shell']['pl'] = "Polecenia systemowe.";
|
||||||
$text['description-shell']['sv-se'] = "System Kommandon.";
|
$text['description-shell']['sv-se'] = "System Kommandon.";
|
||||||
$text['description-shell']['uk'] = "Системні команди";
|
$text['description-shell']['uk'] = "Системні команди";
|
||||||
$text['description-shell']['de-at'] = "System Befehle";
|
$text['description-shell']['de-at'] = "System Befehle";
|
||||||
|
|
||||||
$text['description-sql']['en-us'] = "Execute statements against the database.";
|
$text['description-sql']['en-us'] = "Execute statements against the database.";
|
||||||
$text['description-sql']['es-cl'] = "Ejecutar instrucciones de consulta contra la base de datos.";
|
$text['description-sql']['es-cl'] = "Ejecutar instrucciones de consulta contra la base de datos.";
|
||||||
$text['description-sql']['pt-pt'] = "Executar instruções de consulta no banco de dados.";
|
$text['description-sql']['pt-pt'] = "Executar instruções de consulta no banco de dados.";
|
||||||
$text['description-sql']['fr-fr'] = "Exécuter les instructions de requête contre la base de données.";
|
$text['description-sql']['fr-fr'] = "Exécuter les instructions de requête contre la base de données.";
|
||||||
$text['description-sql']['pt-br'] = "Executar instruções de consulta no banco de dados.";
|
$text['description-sql']['pt-br'] = "Executar instruções de consulta no banco de dados.";
|
||||||
$text['description-sql']['pl'] = "Wykonać polecenie zapytania do bazy danych.";
|
$text['description-sql']['pl'] = "Wykonać polecenie zapytania do bazy danych.";
|
||||||
$text['description-sql']['sv-se'] = "Utför fråge uttalanden mot databasen.";
|
$text['description-sql']['sv-se'] = "Utför fråge uttalanden mot databasen.";
|
||||||
$text['description-sql']['uk'] = "Виконання операторів запитів до бази даних.";
|
$text['description-sql']['uk'] = "Виконання операторів запитів до бази даних.";
|
||||||
$text['description-sql']['de-at'] = "Führen Sie Abfrage-Anweisungen für die Datenbank.";
|
$text['description-sql']['de-at'] = "Führen Sie Abfrage-Anweisungen für die Datenbank.";
|
||||||
|
|
||||||
$text['description-php']['en-us'] = "Execute PHP commands. See: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
$text['description-php']['en-us'] = "Execute PHP commands. See: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
||||||
$text['description-php']['es-cl'] = "Utilice el siguiente enlace como referencia para PHP: <a href='http://php.net/manual/' target='_blank'>Manual PHP</a>";
|
$text['description-php']['es-cl'] = "Utilice el siguiente enlace como referencia para PHP: <a href='http://php.net/manual/' target='_blank'>Manual PHP</a>";
|
||||||
$text['description-php']['pt-pt'] = "Utilize a ligação seguinte como referência para o PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
$text['description-php']['pt-pt'] = "Utilize a ligação seguinte como referência para o PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
||||||
$text['description-php']['fr-fr'] = "Utiliser le lien suivant comme référence pour le PHP: <a href='http://php.net/manual/' target='_blank'>Manuel PHP</a>";
|
$text['description-php']['fr-fr'] = "Utiliser le lien suivant comme référence pour le PHP: <a href='http://php.net/manual/' target='_blank'>Manuel PHP</a>";
|
||||||
$text['description-php']['pt-br'] = "Utilize a ligação seguinte como referência para o PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
$text['description-php']['pt-br'] = "Utilize a ligação seguinte como referência para o PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
||||||
$text['description-php']['pl'] = "Aby użyć odniesienia do PHP kliknij na ten link: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
$text['description-php']['pl'] = "Aby użyć odniesienia do PHP kliknij na ten link: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
||||||
$text['description-php']['sv-se'] = "Använd följande länk som en referens gällande PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
$text['description-php']['sv-se'] = "Använd följande länk som en referens gällande PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
||||||
$text['description-php']['uk'] = "Посилання на довідку PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
$text['description-php']['uk'] = "Посилання на довідку PHP: <a href='http://php.net/manual/' target='_blank'>PHP Manual</a>";
|
||||||
$text['description-php']['de-at'] = "Benutzen Sie folgenden Link als PHP Referenz: <a href='http://php.net/manual/>PHP Manual</a>";
|
$text['description-php']['de-at'] = "Benutzen Sie folgenden Link als PHP Referenz: <a href='http://php.net/manual/>PHP Manual</a>";
|
||||||
|
|
||||||
$text['description-execute']['en-us'] = "Provides a conventient way to execute system, PHP, switch and SQL commands.";
|
$text['description-execute']['en-us'] = "Provides a conventient way to execute system, PHP, switch and SQL commands.";
|
||||||
$text['description-execute']['es-cl'] = "Provee un modo conveniente de ejecutar comandos de sistema, PHP o del switch.";
|
$text['description-execute']['es-cl'] = "Provee un modo conveniente de ejecutar comandos de sistema, PHP o del switch.";
|
||||||
$text['description-execute']['pt-pt'] = "Oferece uma maneira fácil de executar comandos de sistema, PHP, e switch.";
|
$text['description-execute']['pt-pt'] = "Oferece uma maneira fácil de executar comandos de sistema, PHP, e switch.";
|
||||||
$text['description-execute']['fr-fr'] = "Fournir un moyen pour executer des commandes système, PHP et switch. ";
|
$text['description-execute']['fr-fr'] = "Fournir un moyen pour executer des commandes système, PHP et switch. ";
|
||||||
$text['description-execute']['pt-br'] = "Utilize facilmente a execução de comandos do sistema, PHP e switch ";
|
$text['description-execute']['pt-br'] = "Utilize facilmente a execução de comandos do sistema, PHP e switch ";
|
||||||
$text['description-execute']['pl'] = "Ta funkcja zapewnia dogodny sposób wykonywania poleceń systemowych, PHP oraz switch.";
|
$text['description-execute']['pl'] = "Ta funkcja zapewnia dogodny sposób wykonywania poleceń systemowych, PHP oraz switch.";
|
||||||
$text['description-execute']['sv-se'] = "Erbjuder ett smidigt sätt att köra system, PHP och switch kommandon.";
|
$text['description-execute']['sv-se'] = "Erbjuder ett smidigt sätt att köra system, PHP och switch kommandon.";
|
||||||
$text['description-execute']['uk'] = "Забезпечує зручний спосіб виконати команди PHP, switch, а також системні команди";
|
$text['description-execute']['uk'] = "Забезпечує зручний спосіб виконати команди PHP, switch, а також системні команди";
|
||||||
$text['description-execute']['de-at'] = "Bietet die Möglichkeit System, PHP und Switch Kommandos auszuführen.";
|
$text['description-execute']['de-at'] = "Bietet die Möglichkeit System, PHP und Switch Kommandos auszuführen.";
|
||||||
|
|
||||||
$text['description-databases']['en-us'] = "Select the database to execute SQL query statements against.";
|
$text['description-databases']['en-us'] = "Select the database to execute SQL query statements against.";
|
||||||
$text['description-databases']['es-cl'] = "Seleccione la base de datos para ejecutar la consulta SQL.";
|
$text['description-databases']['es-cl'] = "Seleccione la base de datos para ejecutar la consulta SQL.";
|
||||||
$text['description-databases']['pt-pt'] = "Escolha a base de dados a utilizar.";
|
$text['description-databases']['pt-pt'] = "Escolha a base de dados a utilizar.";
|
||||||
$text['description-databases']['fr-fr'] = "Choisir la base de données utilisée par la requête SQL.";
|
$text['description-databases']['fr-fr'] = "Choisir la base de données utilisée par la requête SQL.";
|
||||||
$text['description-databases']['pt-br'] = "Informações sobre a base de dados";
|
$text['description-databases']['pt-br'] = "Informações sobre a base de dados";
|
||||||
$text['description-databases']['pl'] = "Informacje o bazie danych.";
|
$text['description-databases']['pl'] = "Informacje o bazie danych.";
|
||||||
$text['description-databases']['sv-se'] = "Välj databas att använda för SQL Fråga.";
|
$text['description-databases']['sv-se'] = "Välj databas att använda för SQL Fråga.";
|
||||||
$text['description-databases']['uk'] = "Інформація про базу даних.";
|
$text['description-databases']['uk'] = "Інформація про базу даних.";
|
||||||
$text['description-databases']['de-at'] = "Wählen Sie die Datenbank für die SQL Abfrage aus.";
|
$text['description-databases']['de-at'] = "Wählen Sie die Datenbank für die SQL Abfrage aus.";
|
||||||
|
|
||||||
$text['button-select_database']['en-us'] = "Select Database";
|
$text['button-select_database']['en-us'] = "Select Database";
|
||||||
$text['button-select_database']['es-cl'] = "Seleccionar Base de Datos";
|
$text['button-select_database']['es-cl'] = "Seleccionar Base de Datos";
|
||||||
$text['button-select_database']['pt-pt'] = "Seleccionar Base de Dados";
|
$text['button-select_database']['pt-pt'] = "Seleccionar Base de Dados";
|
||||||
$text['button-select_database']['fr-fr'] = "Choisir la Base de données";
|
$text['button-select_database']['fr-fr'] = "Choisir la Base de données";
|
||||||
$text['button-select_database']['pt-br'] = "Selecionar base de dados";
|
$text['button-select_database']['pt-br'] = "Selecionar base de dados";
|
||||||
$text['button-select_database']['pl'] = "Wybierz bazę danych";
|
$text['button-select_database']['pl'] = "Wybierz bazę danych";
|
||||||
$text['button-select_database']['sv-se'] = "Välj Databas";
|
$text['button-select_database']['sv-se'] = "Välj Databas";
|
||||||
$text['button-select_database']['uk'] = "Вибрати БД";
|
$text['button-select_database']['uk'] = "Вибрати БД";
|
||||||
$text['button-select_database']['de-at'] = "Datenbank wählen";
|
$text['button-select_database']['de-at'] = "Datenbank wählen";
|
||||||
|
|
||||||
$text['button-manage']['en-us'] = "Manage";
|
$text['button-manage']['en-us'] = "Manage";
|
||||||
$text['button-manage']['es-cl'] = "Administrar";
|
$text['button-manage']['es-cl'] = "Administrar";
|
||||||
$text['button-manage']['pt-pt'] = "Gerir";
|
$text['button-manage']['pt-pt'] = "Gerir";
|
||||||
$text['button-manage']['fr-fr'] = "Gérer";
|
$text['button-manage']['fr-fr'] = "Gérer";
|
||||||
$text['button-manage']['pt-br'] = "Gerenciar";
|
$text['button-manage']['pt-br'] = "Gerenciar";
|
||||||
$text['button-manage']['pl'] = "Zarządzaj";
|
$text['button-manage']['pl'] = "Zarządzaj";
|
||||||
$text['button-manage']['sv-se'] = "Hantera";
|
$text['button-manage']['sv-se'] = "Hantera";
|
||||||
$text['button-manage']['uk'] = "Керувати";
|
$text['button-manage']['uk'] = "Керувати";
|
||||||
$text['button-manage']['de-at'] = "Verwalten";
|
$text['button-manage']['de-at'] = "Verwalten";
|
||||||
|
|
||||||
$text['button-backup']['en-us'] = "Backup";
|
$text['button-backup']['en-us'] = "Backup";
|
||||||
$text['button-backup']['es-cl'] = "Respaldar";
|
$text['button-backup']['es-cl'] = "Respaldar";
|
||||||
$text['button-backup']['pt-pt'] = "Backup";
|
$text['button-backup']['pt-pt'] = "Backup";
|
||||||
$text['button-backup']['fr-fr'] = "Sauvegarder";
|
$text['button-backup']['fr-fr'] = "Sauvegarder";
|
||||||
$text['button-backup']['pt-br'] = "Backup";
|
$text['button-backup']['pt-br'] = "Backup";
|
||||||
$text['button-backup']['pl'] = "Kopia Zapasowa";
|
$text['button-backup']['pl'] = "Kopia Zapasowa";
|
||||||
$text['button-backup']['sv-se'] = "Backup";
|
$text['button-backup']['sv-se'] = "Backup";
|
||||||
$text['button-backup']['uk'] = "Резервна копія";
|
$text['button-backup']['uk'] = "Резервна копія";
|
||||||
$text['button-backup']['de-at'] = "Sichern";
|
$text['button-backup']['de-at'] = "Sichern";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+1561
-1561
File diff suppressed because it is too large
Load Diff
+174
-174
@@ -1,175 +1,175 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
|
|
||||||
//define array of settings
|
//define array of settings
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '.pdf';
|
$array[$x]['default_setting_value'] = '.pdf';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = '';
|
$array[$x]['default_setting_description'] = '';
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '.tif';
|
$array[$x]['default_setting_value'] = '.tif';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = '';
|
$array[$x]['default_setting_description'] = '';
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '.tiff';
|
$array[$x]['default_setting_value'] = '.tiff';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = '';
|
$array[$x]['default_setting_description'] = '';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'cover_logo';
|
$array[$x]['default_setting_subcategory'] = 'cover_logo';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = '';
|
$array[$x]['default_setting_value'] = '';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Path to image/logo file displayed in the header of the cover sheet.';
|
$array[$x]['default_setting_description'] = 'Path to image/logo file displayed in the header of the cover sheet.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'cover_font';
|
$array[$x]['default_setting_subcategory'] = 'cover_font';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'times';
|
$array[$x]['default_setting_value'] = 'times';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Font used to generate cover page. Can be full path to .ttf file or font name alredy installed.';
|
$array[$x]['default_setting_description'] = 'Font used to generate cover page. Can be full path to .ttf file or font name alredy installed.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'cover_footer';
|
$array[$x]['default_setting_subcategory'] = 'cover_footer';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = "The information contained in this facsimile is intended for the sole confidential use of the recipient(s) designated above, and may contain confidential and legally privileged information. If you are not the intended recipient, you are hereby notified that the review, disclosure, dissemination, distribution, copying, duplication in any form, and taking of any action in regards to the contents of this document - except with respect to its direct delivery to the intended recipient - is strictly prohibited. Please notify the sender immediately and destroy this cover sheet and all attachments. If stored or viewed electronically, please permanently delete it from your system.";
|
$array[$x]['default_setting_value'] = "The information contained in this facsimile is intended for the sole confidential use of the recipient(s) designated above, and may contain confidential and legally privileged information. If you are not the intended recipient, you are hereby notified that the review, disclosure, dissemination, distribution, copying, duplication in any form, and taking of any action in regards to the contents of this document - except with respect to its direct delivery to the intended recipient - is strictly prohibited. Please notify the sender immediately and destroy this cover sheet and all attachments. If stored or viewed electronically, please permanently delete it from your system.";
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Notice displayed in the footer of the cover sheet.';
|
$array[$x]['default_setting_description'] = 'Notice displayed in the footer of the cover sheet.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'cover_header';
|
$array[$x]['default_setting_subcategory'] = 'cover_header';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = '';
|
$array[$x]['default_setting_value'] = '';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Default information displayed beneath the logo in the header of the cover sheet.';
|
$array[$x]['default_setting_description'] = 'Default information displayed beneath the logo in the header of the cover sheet.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'page_size';
|
$array[$x]['default_setting_subcategory'] = 'page_size';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'letter';
|
$array[$x]['default_setting_value'] = 'letter';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default page size of new faxes.';
|
$array[$x]['default_setting_description'] = 'Set the default page size of new faxes.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'resolution';
|
$array[$x]['default_setting_subcategory'] = 'resolution';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'normal';
|
$array[$x]['default_setting_value'] = 'normal';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Set the default transmission quality of new faxes.';
|
$array[$x]['default_setting_description'] = 'Set the default transmission quality of new faxes.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'variable';
|
$array[$x]['default_setting_subcategory'] = 'variable';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = 'fax_enable_t38=true';
|
$array[$x]['default_setting_value'] = 'fax_enable_t38=true';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Enable T.38';
|
$array[$x]['default_setting_description'] = 'Enable T.38';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'variable';
|
$array[$x]['default_setting_subcategory'] = 'variable';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = 'fax_enable_t38_request=false';
|
$array[$x]['default_setting_value'] = 'fax_enable_t38_request=false';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Send a T38 reinvite when a fax tone is detected.';
|
$array[$x]['default_setting_description'] = 'Send a T38 reinvite when a fax tone is detected.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'keep_local';
|
$array[$x]['default_setting_subcategory'] = 'keep_local';
|
||||||
$array[$x]['default_setting_name'] = 'boolean';
|
$array[$x]['default_setting_name'] = 'boolean';
|
||||||
$array[$x]['default_setting_value'] = 'true';
|
$array[$x]['default_setting_value'] = 'true';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Keep the file after sending or receiving the fax.';
|
$array[$x]['default_setting_description'] = 'Keep the file after sending or receiving the fax.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_mode';
|
$array[$x]['default_setting_subcategory'] = 'send_mode';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'queue';
|
$array[$x]['default_setting_value'] = 'queue';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = '';
|
$array[$x]['default_setting_description'] = '';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_retry_limit';
|
$array[$x]['default_setting_subcategory'] = 'send_retry_limit';
|
||||||
$array[$x]['default_setting_name'] = 'numeric';
|
$array[$x]['default_setting_name'] = 'numeric';
|
||||||
$array[$x]['default_setting_value'] = '5';
|
$array[$x]['default_setting_value'] = '5';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Number of attempts to send fax (count only calls with answer)';
|
$array[$x]['default_setting_description'] = 'Number of attempts to send fax (count only calls with answer)';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_retry_interval';
|
$array[$x]['default_setting_subcategory'] = 'send_retry_interval';
|
||||||
$array[$x]['default_setting_name'] = 'numeric';
|
$array[$x]['default_setting_name'] = 'numeric';
|
||||||
$array[$x]['default_setting_value'] = '15';
|
$array[$x]['default_setting_value'] = '15';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Delay before we make next call after answered call';
|
$array[$x]['default_setting_description'] = 'Delay before we make next call after answered call';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_retry_limit';
|
$array[$x]['default_setting_subcategory'] = 'send_no_answer_retry_limit';
|
||||||
$array[$x]['default_setting_name'] = 'numeric';
|
$array[$x]['default_setting_name'] = 'numeric';
|
||||||
$array[$x]['default_setting_value'] = '3';
|
$array[$x]['default_setting_value'] = '3';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Number of unanswered attempts in sequence';
|
$array[$x]['default_setting_description'] = 'Number of unanswered attempts in sequence';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_retry_interval';
|
$array[$x]['default_setting_subcategory'] = 'send_no_answer_retry_interval';
|
||||||
$array[$x]['default_setting_name'] = 'numeric';
|
$array[$x]['default_setting_name'] = 'numeric';
|
||||||
$array[$x]['default_setting_value'] = '30';
|
$array[$x]['default_setting_value'] = '30';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Delay before we make next call after no answered call';
|
$array[$x]['default_setting_description'] = 'Delay before we make next call after no answered call';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_limit';
|
$array[$x]['default_setting_subcategory'] = 'send_no_answer_limit';
|
||||||
$array[$x]['default_setting_name'] = 'numeric';
|
$array[$x]['default_setting_name'] = 'numeric';
|
||||||
$array[$x]['default_setting_value'] = '3';
|
$array[$x]['default_setting_value'] = '3';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Giveup reach the destination after this number of sequences';
|
$array[$x]['default_setting_description'] = 'Giveup reach the destination after this number of sequences';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'fax';
|
$array[$x]['default_setting_category'] = 'fax';
|
||||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_interval';
|
$array[$x]['default_setting_subcategory'] = 'send_no_answer_interval';
|
||||||
$array[$x]['default_setting_name'] = 'numeric';
|
$array[$x]['default_setting_name'] = 'numeric';
|
||||||
$array[$x]['default_setting_value'] = '300';
|
$array[$x]['default_setting_value'] = '300';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Delay before next call sequence';
|
$array[$x]['default_setting_description'] = 'Delay before next call sequence';
|
||||||
$x++;
|
$x++;
|
||||||
//get an array of the default settings
|
//get an array of the default settings
|
||||||
$sql = "select * from v_default_settings ";
|
$sql = "select * from v_default_settings ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
//find the missing default settings
|
//find the missing default settings
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($array as $setting) {
|
foreach ($array as $setting) {
|
||||||
$found = false;
|
$found = false;
|
||||||
$missing[$x] = $setting;
|
$missing[$x] = $setting;
|
||||||
foreach ($default_settings as $row) {
|
foreach ($default_settings as $row) {
|
||||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||||
$found = true;
|
$found = true;
|
||||||
//remove items from the array that were found
|
//remove items from the array that were found
|
||||||
unset($missing[$x]);
|
unset($missing[$x]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the missing default settings
|
//add the missing default settings
|
||||||
foreach ($missing as $row) {
|
foreach ($missing as $row) {
|
||||||
//add the default settings
|
//add the default settings
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->save($row);
|
$orm->save($row);
|
||||||
$message = $orm->message;
|
$message = $orm->message;
|
||||||
unset($orm);
|
unset($orm);
|
||||||
}
|
}
|
||||||
unset($missing);
|
unset($missing);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+145
-145
@@ -1,146 +1,146 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
require_once "resources/paging.php";
|
require_once "resources/paging.php";
|
||||||
if (permission_exists('fax_extension_add')) {
|
if (permission_exists('fax_extension_add')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//set the http get/post variable(s) to a php variable
|
//set the http get/post variable(s) to a php variable
|
||||||
if (isset($_REQUEST["id"])) {
|
if (isset($_REQUEST["id"])) {
|
||||||
$fax_uuid = check_str($_REQUEST["id"]);
|
$fax_uuid = check_str($_REQUEST["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the data
|
//get the data
|
||||||
$sql = "select * from v_fax ";
|
$sql = "select * from v_fax ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and fax_uuid = '$fax_uuid' ";
|
$sql .= "and fax_uuid = '$fax_uuid' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) == 0) {
|
if (count($result) == 0) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$fax_extension = $row["fax_extension"];
|
$fax_extension = $row["fax_extension"];
|
||||||
$fax_name = $row["fax_name"];
|
$fax_name = $row["fax_name"];
|
||||||
$fax_email = $row["fax_email"];
|
$fax_email = $row["fax_email"];
|
||||||
$fax_email_connection_type = $row["fax_email_connection_type"];
|
$fax_email_connection_type = $row["fax_email_connection_type"];
|
||||||
$fax_email_connection_host = $row["fax_email_connection_host"];
|
$fax_email_connection_host = $row["fax_email_connection_host"];
|
||||||
$fax_email_connection_port = $row["fax_email_connection_port"];
|
$fax_email_connection_port = $row["fax_email_connection_port"];
|
||||||
$fax_email_connection_security = $row["fax_email_connection_security"];
|
$fax_email_connection_security = $row["fax_email_connection_security"];
|
||||||
$fax_email_connection_validate = $row["fax_email_connection_validate"];
|
$fax_email_connection_validate = $row["fax_email_connection_validate"];
|
||||||
$fax_email_connection_username = $row["fax_email_connection_username"];
|
$fax_email_connection_username = $row["fax_email_connection_username"];
|
||||||
$fax_email_connection_password = $row["fax_email_connection_password"];
|
$fax_email_connection_password = $row["fax_email_connection_password"];
|
||||||
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
||||||
$fax_email_inbound_subject_tag = $row["fax_email_inbound_subject_tag"];
|
$fax_email_inbound_subject_tag = $row["fax_email_inbound_subject_tag"];
|
||||||
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
||||||
$fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"];
|
$fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"];
|
||||||
$fax_pin_number = $row["fax_pin_number"];
|
$fax_pin_number = $row["fax_pin_number"];
|
||||||
$fax_caller_id_name = $row["fax_caller_id_name"];
|
$fax_caller_id_name = $row["fax_caller_id_name"];
|
||||||
$fax_caller_id_number = $row["fax_caller_id_number"];
|
$fax_caller_id_number = $row["fax_caller_id_number"];
|
||||||
$fax_forward_number = $row["fax_forward_number"];
|
$fax_forward_number = $row["fax_forward_number"];
|
||||||
$fax_description = 'copy: '.$row["fax_description"];
|
$fax_description = 'copy: '.$row["fax_description"];
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
|
|
||||||
//copy the fax extension
|
//copy the fax extension
|
||||||
$fax_uuid = uuid();
|
$fax_uuid = uuid();
|
||||||
$dialplan_uuid = uuid();
|
$dialplan_uuid = uuid();
|
||||||
$sql = "insert into v_fax ";
|
$sql = "insert into v_fax ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
$sql .= "fax_uuid, ";
|
$sql .= "fax_uuid, ";
|
||||||
$sql .= "dialplan_uuid, ";
|
$sql .= "dialplan_uuid, ";
|
||||||
$sql .= "fax_extension, ";
|
$sql .= "fax_extension, ";
|
||||||
$sql .= "fax_name, ";
|
$sql .= "fax_name, ";
|
||||||
$sql .= "fax_email, ";
|
$sql .= "fax_email, ";
|
||||||
$sql .= "fax_email_connection_type, ";
|
$sql .= "fax_email_connection_type, ";
|
||||||
$sql .= "fax_email_connection_host, ";
|
$sql .= "fax_email_connection_host, ";
|
||||||
$sql .= "fax_email_connection_port, ";
|
$sql .= "fax_email_connection_port, ";
|
||||||
$sql .= "fax_email_connection_security, ";
|
$sql .= "fax_email_connection_security, ";
|
||||||
$sql .= "fax_email_connection_validate, ";
|
$sql .= "fax_email_connection_validate, ";
|
||||||
$sql .= "fax_email_connection_username, ";
|
$sql .= "fax_email_connection_username, ";
|
||||||
$sql .= "fax_email_connection_password, ";
|
$sql .= "fax_email_connection_password, ";
|
||||||
$sql .= "fax_email_connection_mailbox, ";
|
$sql .= "fax_email_connection_mailbox, ";
|
||||||
$sql .= "fax_email_inbound_subject_tag, ";
|
$sql .= "fax_email_inbound_subject_tag, ";
|
||||||
$sql .= "fax_email_outbound_subject_tag, ";
|
$sql .= "fax_email_outbound_subject_tag, ";
|
||||||
$sql .= "fax_email_outbound_authorized_senders, ";
|
$sql .= "fax_email_outbound_authorized_senders, ";
|
||||||
$sql .= "fax_pin_number, ";
|
$sql .= "fax_pin_number, ";
|
||||||
$sql .= "fax_caller_id_name, ";
|
$sql .= "fax_caller_id_name, ";
|
||||||
$sql .= "fax_caller_id_number, ";
|
$sql .= "fax_caller_id_number, ";
|
||||||
if (strlen($fax_forward_number) > 0) {
|
if (strlen($fax_forward_number) > 0) {
|
||||||
$sql .= "fax_forward_number, ";
|
$sql .= "fax_forward_number, ";
|
||||||
}
|
}
|
||||||
$sql .= "fax_description ";
|
$sql .= "fax_description ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$sql .= "values ";
|
$sql .= "values ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||||
$sql .= "'$fax_uuid', ";
|
$sql .= "'$fax_uuid', ";
|
||||||
$sql .= "'$dialplan_uuid', ";
|
$sql .= "'$dialplan_uuid', ";
|
||||||
$sql .= "'$fax_extension', ";
|
$sql .= "'$fax_extension', ";
|
||||||
$sql .= "'$fax_name', ";
|
$sql .= "'$fax_name', ";
|
||||||
$sql .= "'$fax_email', ";
|
$sql .= "'$fax_email', ";
|
||||||
$sql .= "'$fax_email_connection_type', ";
|
$sql .= "'$fax_email_connection_type', ";
|
||||||
$sql .= "'$fax_email_connection_host', ";
|
$sql .= "'$fax_email_connection_host', ";
|
||||||
$sql .= "'$fax_email_connection_port', ";
|
$sql .= "'$fax_email_connection_port', ";
|
||||||
$sql .= "'$fax_email_connection_security', ";
|
$sql .= "'$fax_email_connection_security', ";
|
||||||
$sql .= "'$fax_email_connection_validate', ";
|
$sql .= "'$fax_email_connection_validate', ";
|
||||||
$sql .= "'$fax_email_connection_username', ";
|
$sql .= "'$fax_email_connection_username', ";
|
||||||
$sql .= "'$fax_email_connection_password', ";
|
$sql .= "'$fax_email_connection_password', ";
|
||||||
$sql .= "'$fax_email_connection_mailbox', ";
|
$sql .= "'$fax_email_connection_mailbox', ";
|
||||||
$sql .= "'$fax_email_inbound_subject_tag', ";
|
$sql .= "'$fax_email_inbound_subject_tag', ";
|
||||||
$sql .= "'$fax_email_outbound_subject_tag', ";
|
$sql .= "'$fax_email_outbound_subject_tag', ";
|
||||||
$sql .= "'$fax_email_outbound_authorized_senders', ";
|
$sql .= "'$fax_email_outbound_authorized_senders', ";
|
||||||
$sql .= "'$fax_pin_number', ";
|
$sql .= "'$fax_pin_number', ";
|
||||||
$sql .= "'$fax_caller_id_name', ";
|
$sql .= "'$fax_caller_id_name', ";
|
||||||
$sql .= "'$fax_caller_id_number', ";
|
$sql .= "'$fax_caller_id_number', ";
|
||||||
if (strlen($fax_forward_number) > 0) {
|
if (strlen($fax_forward_number) > 0) {
|
||||||
$sql .= "'$fax_forward_number', ";
|
$sql .= "'$fax_forward_number', ";
|
||||||
}
|
}
|
||||||
$sql .= "'$fax_description' ";
|
$sql .= "'$fax_description' ";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
$_SESSION["message"] = $text['confirm-copy'];
|
$_SESSION["message"] = $text['confirm-copy'];
|
||||||
header("Location: fax.php");
|
header("Location: fax.php");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+1041
-1041
File diff suppressed because it is too large
Load Diff
+386
-386
@@ -1,387 +1,387 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015
|
Portions created by the Initial Developer are Copyright (C) 2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/functions/object_to_array.php";
|
require_once "resources/functions/object_to_array.php";
|
||||||
require_once "resources/functions/parse_message.php";
|
require_once "resources/functions/parse_message.php";
|
||||||
require_once "resources/classes/text.php";
|
require_once "resources/classes/text.php";
|
||||||
|
|
||||||
//get accounts to monitor
|
//get accounts to monitor
|
||||||
$sql = "select * from v_fax ";
|
$sql = "select * from v_fax ";
|
||||||
$sql .= "where fax_email_connection_host <> '' ";
|
$sql .= "where fax_email_connection_host <> '' ";
|
||||||
$sql .= "and fax_email_connection_host is not null ";
|
$sql .= "and fax_email_connection_host is not null ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset($sql, $prep_statement);
|
unset($sql, $prep_statement);
|
||||||
|
|
||||||
function arr_to_map(&$arr){
|
function arr_to_map(&$arr){
|
||||||
if(is_array($arr)){
|
if(is_array($arr)){
|
||||||
$map = Array();
|
$map = Array();
|
||||||
foreach($arr as &$val){
|
foreach($arr as &$val){
|
||||||
$map[$val] = true;
|
$map[$val] = true;
|
||||||
}
|
}
|
||||||
return $map;
|
return $map;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($result) != 0) {
|
if (sizeof($result) != 0) {
|
||||||
|
|
||||||
//load default settings
|
//load default settings
|
||||||
$default_settings = load_default_settings();
|
$default_settings = load_default_settings();
|
||||||
|
|
||||||
//get event socket connection parameters
|
//get event socket connection parameters
|
||||||
$sql = "select event_socket_ip_address, event_socket_port, event_socket_password from v_settings";
|
$sql = "select event_socket_ip_address, event_socket_port, event_socket_password from v_settings";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$record = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$record = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
$event_socket['ip_address'] = $record['event_socket_ip_address'];
|
$event_socket['ip_address'] = $record['event_socket_ip_address'];
|
||||||
$event_socket['port'] = $record['event_socket_port'];
|
$event_socket['port'] = $record['event_socket_port'];
|
||||||
$event_socket['password'] = $record['event_socket_password'];
|
$event_socket['password'] = $record['event_socket_password'];
|
||||||
unset($sql, $prep_statement, $record);
|
unset($sql, $prep_statement, $record);
|
||||||
|
|
||||||
$fax_send_mode_default = $_SESSION['fax']['send_mode']['text'];
|
$fax_send_mode_default = $_SESSION['fax']['send_mode']['text'];
|
||||||
if(strlen($fax_send_mode_default) == 0){
|
if(strlen($fax_send_mode_default) == 0){
|
||||||
$fax_send_mode_default = 'direct';
|
$fax_send_mode_default = 'direct';
|
||||||
}
|
}
|
||||||
$fax_cover_font_default = $_SESSION['fax']['cover_font']['text'];
|
$fax_cover_font_default = $_SESSION['fax']['cover_font']['text'];
|
||||||
|
|
||||||
$fax_allowed_extension_default = arr_to_map($_SESSION['fax']['allowed_extension']);
|
$fax_allowed_extension_default = arr_to_map($_SESSION['fax']['allowed_extension']);
|
||||||
if($fax_allowed_extension_default == false){
|
if($fax_allowed_extension_default == false){
|
||||||
$tmp = Array('.pdf', '.tiff', '.tif');
|
$tmp = Array('.pdf', '.tiff', '.tif');
|
||||||
$fax_allowed_extension_default = arr_to_map($tmp);
|
$fax_allowed_extension_default = arr_to_map($tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
//get fax server and account connection details
|
//get fax server and account connection details
|
||||||
$fax_uuid = $row["fax_uuid"];
|
$fax_uuid = $row["fax_uuid"];
|
||||||
$domain_uuid = $row["domain_uuid"];
|
$domain_uuid = $row["domain_uuid"];
|
||||||
$fax_extension = $row["fax_extension"];
|
$fax_extension = $row["fax_extension"];
|
||||||
$fax_email = $row["fax_email"];
|
$fax_email = $row["fax_email"];
|
||||||
$fax_pin_number = $row["fax_pin_number"];
|
$fax_pin_number = $row["fax_pin_number"];
|
||||||
$fax_caller_id_name = $row["fax_caller_id_name"];
|
$fax_caller_id_name = $row["fax_caller_id_name"];
|
||||||
$fax_caller_id_number = $row["fax_caller_id_number"];
|
$fax_caller_id_number = $row["fax_caller_id_number"];
|
||||||
$fax_email_connection_type = $row["fax_email_connection_type"];
|
$fax_email_connection_type = $row["fax_email_connection_type"];
|
||||||
$fax_email_connection_host = $row["fax_email_connection_host"];
|
$fax_email_connection_host = $row["fax_email_connection_host"];
|
||||||
$fax_email_connection_port = $row["fax_email_connection_port"];
|
$fax_email_connection_port = $row["fax_email_connection_port"];
|
||||||
$fax_email_connection_security = $row["fax_email_connection_security"];
|
$fax_email_connection_security = $row["fax_email_connection_security"];
|
||||||
$fax_email_connection_validate = $row["fax_email_connection_validate"];
|
$fax_email_connection_validate = $row["fax_email_connection_validate"];
|
||||||
$fax_email_connection_username = $row["fax_email_connection_username"];
|
$fax_email_connection_username = $row["fax_email_connection_username"];
|
||||||
$fax_email_connection_password = $row["fax_email_connection_password"];
|
$fax_email_connection_password = $row["fax_email_connection_password"];
|
||||||
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
||||||
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
||||||
$fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"];
|
$fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"];
|
||||||
$fax_send_greeting = $row["fax_send_greeting"];
|
$fax_send_greeting = $row["fax_send_greeting"];
|
||||||
|
|
||||||
//load default settings, then domain settings over top
|
//load default settings, then domain settings over top
|
||||||
unset($_SESSION);
|
unset($_SESSION);
|
||||||
$_SESSION = $default_settings;
|
$_SESSION = $default_settings;
|
||||||
load_domain_settings($domain_uuid);
|
load_domain_settings($domain_uuid);
|
||||||
|
|
||||||
$fax_send_mode = $_SESSION['fax']['send_mode']['text'];
|
$fax_send_mode = $_SESSION['fax']['send_mode']['text'];
|
||||||
if(strlen($fax_send_mode) == 0){
|
if(strlen($fax_send_mode) == 0){
|
||||||
$fax_send_mode = $fax_send_mode_default;
|
$fax_send_mode = $fax_send_mode_default;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fax_cover_font = $_SESSION['fax']['cover_font']['text'];
|
$fax_cover_font = $_SESSION['fax']['cover_font']['text'];
|
||||||
if(strlen($fax_cover_font) == 0){
|
if(strlen($fax_cover_font) == 0){
|
||||||
$fax_cover_font = $fax_cover_font_default;
|
$fax_cover_font = $fax_cover_font_default;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fax_allowed_extension = arr_to_map($_SESSION['fax']['allowed_extension']);
|
$fax_allowed_extension = arr_to_map($_SESSION['fax']['allowed_extension']);
|
||||||
if($fax_allowed_extension == false){
|
if($fax_allowed_extension == false){
|
||||||
$fax_allowed_extension = $fax_allowed_extension_default;
|
$fax_allowed_extension = $fax_allowed_extension_default;
|
||||||
}
|
}
|
||||||
|
|
||||||
//load event socket connection parameters
|
//load event socket connection parameters
|
||||||
$_SESSION['event_socket_ip_address'] = $event_socket['ip_address'];
|
$_SESSION['event_socket_ip_address'] = $event_socket['ip_address'];
|
||||||
$_SESSION['event_socket_port'] = $event_socket['port'];
|
$_SESSION['event_socket_port'] = $event_socket['port'];
|
||||||
$_SESSION['event_socket_password'] = $event_socket['password'];
|
$_SESSION['event_socket_password'] = $event_socket['password'];
|
||||||
|
|
||||||
//get domain name, set local and session variables
|
//get domain name, set local and session variables
|
||||||
$sql = "select domain_name from v_domains where domain_uuid = '".$domain_uuid."'";
|
$sql = "select domain_name from v_domains where domain_uuid = '".$domain_uuid."'";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$record = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$record = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
$domain_name = $record['domain_name'];
|
$domain_name = $record['domain_name'];
|
||||||
$_SESSION['domain_name'] = $record['domain_name'];
|
$_SESSION['domain_name'] = $record['domain_name'];
|
||||||
$_SESSION['domain_uuid'] = $domain_uuid;
|
$_SESSION['domain_uuid'] = $domain_uuid;
|
||||||
unset($sql, $prep_statement, $record);
|
unset($sql, $prep_statement, $record);
|
||||||
|
|
||||||
//set needed variables
|
//set needed variables
|
||||||
$fax_page_size = $_SESSION['fax']['page_size']['text'];
|
$fax_page_size = $_SESSION['fax']['page_size']['text'];
|
||||||
$fax_resolution = $_SESSION['fax']['resolution']['text'];
|
$fax_resolution = $_SESSION['fax']['resolution']['text'];
|
||||||
$fax_header = $_SESSION['fax']['cover_header']['text'];
|
$fax_header = $_SESSION['fax']['cover_header']['text'];
|
||||||
$fax_footer = $_SESSION['fax']['cover_footer']['text'];
|
$fax_footer = $_SESSION['fax']['cover_footer']['text'];
|
||||||
$fax_sender = $fax_caller_id_name;
|
$fax_sender = $fax_caller_id_name;
|
||||||
|
|
||||||
//open account connection
|
//open account connection
|
||||||
$fax_email_connection = "{".$fax_email_connection_host.":".$fax_email_connection_port."/".$fax_email_connection_type;
|
$fax_email_connection = "{".$fax_email_connection_host.":".$fax_email_connection_port."/".$fax_email_connection_type;
|
||||||
$fax_email_connection .= ($fax_email_connection_security != '') ? "/".$fax_email_connection_security : "/notls";
|
$fax_email_connection .= ($fax_email_connection_security != '') ? "/".$fax_email_connection_security : "/notls";
|
||||||
$fax_email_connection .= "/".(($fax_email_connection_validate == 'false') ? "no" : null)."validate-cert";
|
$fax_email_connection .= "/".(($fax_email_connection_validate == 'false') ? "no" : null)."validate-cert";
|
||||||
$fax_email_connection .= "}".$fax_email_connection_mailbox;
|
$fax_email_connection .= "}".$fax_email_connection_mailbox;
|
||||||
if (!$connection = imap_open($fax_email_connection, $fax_email_connection_username, $fax_email_connection_password)) {
|
if (!$connection = imap_open($fax_email_connection, $fax_email_connection_username, $fax_email_connection_password)) {
|
||||||
print_r(imap_errors());
|
print_r(imap_errors());
|
||||||
continue; // try next account
|
continue; // try next account
|
||||||
}
|
}
|
||||||
|
|
||||||
//get emails
|
//get emails
|
||||||
if ($emails = imap_search($connection, "SUBJECT \"[".$fax_email_outbound_subject_tag."]\"", SE_UID)) {
|
if ($emails = imap_search($connection, "SUBJECT \"[".$fax_email_outbound_subject_tag."]\"", SE_UID)) {
|
||||||
|
|
||||||
//get authorized sender(s)
|
//get authorized sender(s)
|
||||||
if (substr_count($fax_email_outbound_authorized_senders, ',') > 0) {
|
if (substr_count($fax_email_outbound_authorized_senders, ',') > 0) {
|
||||||
$authorized_senders = explode(',', $fax_email_outbound_authorized_senders);
|
$authorized_senders = explode(',', $fax_email_outbound_authorized_senders);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$authorized_senders[] = $fax_email_outbound_authorized_senders;
|
$authorized_senders[] = $fax_email_outbound_authorized_senders;
|
||||||
}
|
}
|
||||||
|
|
||||||
sort($emails); // oldest first
|
sort($emails); // oldest first
|
||||||
foreach ($emails as $email_id) {
|
foreach ($emails as $email_id) {
|
||||||
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
||||||
|
|
||||||
//format from address
|
//format from address
|
||||||
$tmp = object_to_array(imap_rfc822_parse_adrlist($metadata[0]['from'], null));
|
$tmp = object_to_array(imap_rfc822_parse_adrlist($metadata[0]['from'], null));
|
||||||
$metadata[0]['from'] = $tmp[0]['mailbox']."@".$tmp[0]['host'];
|
$metadata[0]['from'] = $tmp[0]['mailbox']."@".$tmp[0]['host'];
|
||||||
|
|
||||||
//check sender
|
//check sender
|
||||||
$sender_authorized = false;
|
$sender_authorized = false;
|
||||||
foreach ($authorized_senders as $authorized_sender) {
|
foreach ($authorized_senders as $authorized_sender) {
|
||||||
if (substr_count($metadata[0]['from'], $authorized_sender) > 0) { $sender_authorized = true; }
|
if (substr_count($metadata[0]['from'], $authorized_sender) > 0) { $sender_authorized = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sender_authorized) {
|
if ($sender_authorized) {
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//sent sender address (used in api call)
|
//sent sender address (used in api call)
|
||||||
$mailto_address_user = $metadata[0]['from'];
|
$mailto_address_user = $metadata[0]['from'];
|
||||||
|
|
||||||
//parse recipient fax number(s)
|
//parse recipient fax number(s)
|
||||||
$fax_subject = $metadata[0]['subject'];
|
$fax_subject = $metadata[0]['subject'];
|
||||||
$tmp = explode(']', $fax_subject); //closing bracket of subject tag
|
$tmp = explode(']', $fax_subject); //closing bracket of subject tag
|
||||||
$tmp = $tmp[1];
|
$tmp = $tmp[1];
|
||||||
$tmp = str_replace(':', ',', $tmp);
|
$tmp = str_replace(':', ',', $tmp);
|
||||||
$tmp = str_replace(';', ',', $tmp);
|
$tmp = str_replace(';', ',', $tmp);
|
||||||
$tmp = str_replace('|', ',', $tmp);
|
$tmp = str_replace('|', ',', $tmp);
|
||||||
if (substr_count($tmp, ',') > 0) {
|
if (substr_count($tmp, ',') > 0) {
|
||||||
$fax_numbers = explode(',', $tmp);
|
$fax_numbers = explode(',', $tmp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$fax_numbers[] = $tmp;
|
$fax_numbers[] = $tmp;
|
||||||
}
|
}
|
||||||
unset($fax_subject); //clear so not on cover page
|
unset($fax_subject); //clear so not on cover page
|
||||||
|
|
||||||
$message = parse_message($connection, $email_id, FT_UID);
|
$message = parse_message($connection, $email_id, FT_UID);
|
||||||
|
|
||||||
//get email body (if any) for cover page
|
//get email body (if any) for cover page
|
||||||
$fax_message = '';
|
$fax_message = '';
|
||||||
|
|
||||||
//Debug print
|
//Debug print
|
||||||
print('attachments:' . "\n");
|
print('attachments:' . "\n");
|
||||||
foreach($message['attachments'] as &$attachment){
|
foreach($message['attachments'] as &$attachment){
|
||||||
print(' - ' . $attachment['type'] . ' - ' . $attachment['name'] . ': ' . $attachment['size'] . ' disposition: ' . $attachment['disposition'] . "\n");
|
print(' - ' . $attachment['type'] . ' - ' . $attachment['name'] . ': ' . $attachment['size'] . ' disposition: ' . $attachment['disposition'] . "\n");
|
||||||
}
|
}
|
||||||
print('messages:' . "\n");
|
print('messages:' . "\n");
|
||||||
foreach($message['messages'] as &$msg){
|
foreach($message['messages'] as &$msg){
|
||||||
print(' - ' . $msg['type'] . ' - ' . $msg['size'] . "\n");
|
print(' - ' . $msg['type'] . ' - ' . $msg['size'] . "\n");
|
||||||
// print($msg['data']);
|
// print($msg['data']);
|
||||||
// print("\n--------------------------------------------------------\n");
|
// print("\n--------------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($message['messages'] as &$msg){
|
foreach($message['messages'] as &$msg){
|
||||||
if(($msg['size'] > 0) && ($msg['type'] == 'text/plain')) {
|
if(($msg['size'] > 0) && ($msg['type'] == 'text/plain')) {
|
||||||
$fax_message = $msg['data'];
|
$fax_message = $msg['data'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fax_message != '') {
|
if ($fax_message != '') {
|
||||||
$fax_message = strip_tags($fax_message);
|
$fax_message = strip_tags($fax_message);
|
||||||
$fax_message = str_replace("\r\n\r\n", "\r\n", $fax_message);
|
$fax_message = str_replace("\r\n\r\n", "\r\n", $fax_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set fax directory (used for pdf creation - cover and/or attachments)
|
// set fax directory (used for pdf creation - cover and/or attachments)
|
||||||
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.(($domain_name != '') ? '/'.$domain_name : null);
|
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.(($domain_name != '') ? '/'.$domain_name : null);
|
||||||
|
|
||||||
//handle attachments (if any)
|
//handle attachments (if any)
|
||||||
$emailed_files = Array();
|
$emailed_files = Array();
|
||||||
$attachments = $message['attachments'];
|
$attachments = $message['attachments'];
|
||||||
if (sizeof($attachments) > 0) {
|
if (sizeof($attachments) > 0) {
|
||||||
foreach ($attachments as &$attachment) {
|
foreach ($attachments as &$attachment) {
|
||||||
$fax_file_extension = pathinfo($attachment['name'], PATHINFO_EXTENSION);
|
$fax_file_extension = pathinfo($attachment['name'], PATHINFO_EXTENSION);
|
||||||
|
|
||||||
//block unknown files
|
//block unknown files
|
||||||
if ($fax_file_extension == '') {continue; }
|
if ($fax_file_extension == '') {continue; }
|
||||||
//block unauthorized files
|
//block unauthorized files
|
||||||
if (!$fax_allowed_extension['.' . $fax_file_extension]) { continue; }
|
if (!$fax_allowed_extension['.' . $fax_file_extension]) { continue; }
|
||||||
//support only attachments
|
//support only attachments
|
||||||
if($attachment['disposition'] != 'attachment'){ continue; }
|
if($attachment['disposition'] != 'attachment'){ continue; }
|
||||||
|
|
||||||
//store attachment in local fax temp folder
|
//store attachment in local fax temp folder
|
||||||
$local_filepath = $fax_dir.'/'.$fax_extension.'/temp/'.$attachment['name'];
|
$local_filepath = $fax_dir.'/'.$fax_extension.'/temp/'.$attachment['name'];
|
||||||
file_put_contents($local_filepath, $attachment['data']);
|
file_put_contents($local_filepath, $attachment['data']);
|
||||||
|
|
||||||
//load files array with attachments
|
//load files array with attachments
|
||||||
$emailed_files['error'][] = 0;
|
$emailed_files['error'][] = 0;
|
||||||
$emailed_files['size'][] = $attachment['size'];
|
$emailed_files['size'][] = $attachment['size'];
|
||||||
$emailed_files['tmp_name'][] = $attachment['name'];
|
$emailed_files['tmp_name'][] = $attachment['name'];
|
||||||
$emailed_files['name'][] = $attachment['name'];
|
$emailed_files['name'][] = $attachment['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug print
|
//Debug print
|
||||||
print('***********************' . "\n");
|
print('***********************' . "\n");
|
||||||
print('fax message:' . "\n");
|
print('fax message:' . "\n");
|
||||||
print(' - length: ' . strlen($fax_message) . "\n");
|
print(' - length: ' . strlen($fax_message) . "\n");
|
||||||
print('fax files [' . sizeof($emailed_files['name']) . ']:' . "\n");
|
print('fax files [' . sizeof($emailed_files['name']) . ']:' . "\n");
|
||||||
for($i = 0; $i < sizeof($emailed_files['name']);++$i){
|
for($i = 0; $i < sizeof($emailed_files['name']);++$i){
|
||||||
print(' - ' . $emailed_files['name'][$i] . ' - ' . $emailed_files['size'][$i] . "\n");
|
print(' - ' . $emailed_files['name'][$i] . ' - ' . $emailed_files['size'][$i] . "\n");
|
||||||
}
|
}
|
||||||
print('***********************' . "\n");
|
print('***********************' . "\n");
|
||||||
|
|
||||||
//send fax
|
//send fax
|
||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
$included = true;
|
$included = true;
|
||||||
require("fax_send.php");
|
require("fax_send.php");
|
||||||
if($cwd){
|
if($cwd){
|
||||||
chdir($cwd);
|
chdir($cwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//reset variables
|
//reset variables
|
||||||
unset($fax_numbers);
|
unset($fax_numbers);
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete email
|
//delete email
|
||||||
if (imap_delete($connection, $email_id, FT_UID)) {
|
if (imap_delete($connection, $email_id, FT_UID)) {
|
||||||
imap_expunge($connection);
|
imap_expunge($connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($authorized_senders);
|
unset($authorized_senders);
|
||||||
}
|
}
|
||||||
|
|
||||||
//close account connection
|
//close account connection
|
||||||
imap_close($connection);
|
imap_close($connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//functions used above
|
//functions used above
|
||||||
function load_default_settings() {
|
function load_default_settings() {
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$sql = "select * from v_default_settings ";
|
$sql = "select * from v_default_settings ";
|
||||||
$sql .= "where default_setting_enabled = 'true' ";
|
$sql .= "where default_setting_enabled = 'true' ";
|
||||||
try {
|
try {
|
||||||
$prep_statement = $db->prepare($sql . " order by default_setting_order asc ");
|
$prep_statement = $db->prepare($sql . " order by default_setting_order asc ");
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
}
|
}
|
||||||
catch(PDOException $e) {
|
catch(PDOException $e) {
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
}
|
}
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
//load the settings into an array
|
//load the settings into an array
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$name = $row['default_setting_name'];
|
$name = $row['default_setting_name'];
|
||||||
$category = $row['default_setting_category'];
|
$category = $row['default_setting_category'];
|
||||||
$subcategory = $row['default_setting_subcategory'];
|
$subcategory = $row['default_setting_subcategory'];
|
||||||
if (strlen($subcategory) == 0) {
|
if (strlen($subcategory) == 0) {
|
||||||
if ($name == "array") {
|
if ($name == "array") {
|
||||||
$settings[$category][] = $row['default_setting_value'];
|
$settings[$category][] = $row['default_setting_value'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$settings[$category][$name] = $row['default_setting_value'];
|
$settings[$category][$name] = $row['default_setting_value'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($name == "array") {
|
if ($name == "array") {
|
||||||
$settings[$category][$subcategory][] = $row['default_setting_value'];
|
$settings[$category][$subcategory][] = $row['default_setting_value'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$settings[$category][$subcategory][$name] = $row['default_setting_value'];
|
$settings[$category][$subcategory][$name] = $row['default_setting_value'];
|
||||||
$settings[$category][$subcategory][$name] = $row['default_setting_value'];
|
$settings[$category][$subcategory][$name] = $row['default_setting_value'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $settings;
|
return $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
function load_domain_settings($domain_uuid) {
|
function load_domain_settings($domain_uuid) {
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
if ($domain_uuid) {
|
if ($domain_uuid) {
|
||||||
$sql = "select * from v_domain_settings ";
|
$sql = "select * from v_domain_settings ";
|
||||||
$sql .= "where domain_uuid = '" . $domain_uuid . "' ";
|
$sql .= "where domain_uuid = '" . $domain_uuid . "' ";
|
||||||
$sql .= "and domain_setting_enabled = 'true' ";
|
$sql .= "and domain_setting_enabled = 'true' ";
|
||||||
try {
|
try {
|
||||||
$prep_statement = $db->prepare($sql . " order by domain_setting_order asc ");
|
$prep_statement = $db->prepare($sql . " order by domain_setting_order asc ");
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
}
|
}
|
||||||
catch(PDOException $e) {
|
catch(PDOException $e) {
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
}
|
}
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
//unset the arrays that domains are overriding
|
//unset the arrays that domains are overriding
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$name = $row['domain_setting_name'];
|
$name = $row['domain_setting_name'];
|
||||||
$category = $row['domain_setting_category'];
|
$category = $row['domain_setting_category'];
|
||||||
$subcategory = $row['domain_setting_subcategory'];
|
$subcategory = $row['domain_setting_subcategory'];
|
||||||
if ($name == "array") {
|
if ($name == "array") {
|
||||||
unset($_SESSION[$category][$subcategory]);
|
unset($_SESSION[$category][$subcategory]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//set the settings as a session
|
//set the settings as a session
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$name = $row['domain_setting_name'];
|
$name = $row['domain_setting_name'];
|
||||||
$category = $row['domain_setting_category'];
|
$category = $row['domain_setting_category'];
|
||||||
$subcategory = $row['domain_setting_subcategory'];
|
$subcategory = $row['domain_setting_subcategory'];
|
||||||
if (strlen($subcategory) == 0) {
|
if (strlen($subcategory) == 0) {
|
||||||
//$$category[$name] = $row['domain_setting_value'];
|
//$$category[$name] = $row['domain_setting_value'];
|
||||||
if ($name == "array") {
|
if ($name == "array") {
|
||||||
$_SESSION[$category][] = $row['domain_setting_value'];
|
$_SESSION[$category][] = $row['domain_setting_value'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_SESSION[$category][$name] = $row['domain_setting_value'];
|
$_SESSION[$category][$name] = $row['domain_setting_value'];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//$$category[$subcategory][$name] = $row['domain_setting_value'];
|
//$$category[$subcategory][$name] = $row['domain_setting_value'];
|
||||||
if ($name == "array") {
|
if ($name == "array") {
|
||||||
$_SESSION[$category][$subcategory][] = $row['domain_setting_value'];
|
$_SESSION[$category][$subcategory][] = $row['domain_setting_value'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_SESSION[$category][$subcategory][$name] = $row['domain_setting_value'];
|
$_SESSION[$category][$subcategory][$name] = $row['domain_setting_value'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+102
-102
@@ -1,103 +1,103 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015
|
Portions created by the Initial Developer are Copyright (C) 2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('fax_file_delete')) {
|
if (permission_exists('fax_file_delete')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
require_once "app_languages.php";
|
require_once "app_languages.php";
|
||||||
foreach($text as $key => $value) {
|
foreach($text as $key => $value) {
|
||||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the id
|
//get the id
|
||||||
if (isset($_REQUEST["id"])) {
|
if (isset($_REQUEST["id"])) {
|
||||||
$fax_file_uuid = check_str($_REQUEST["id"]);
|
$fax_file_uuid = check_str($_REQUEST["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//validate the id
|
//validate the id
|
||||||
if (strlen($fax_file_uuid) > 0) {
|
if (strlen($fax_file_uuid) > 0) {
|
||||||
//get the fax file data
|
//get the fax file data
|
||||||
$sql = "select * from v_fax_files ";
|
$sql = "select * from v_fax_files ";
|
||||||
$sql .= "where fax_file_uuid = '".$fax_file_uuid."' ";
|
$sql .= "where fax_file_uuid = '".$fax_file_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$fax_uuid = $row["fax_uuid"];
|
$fax_uuid = $row["fax_uuid"];
|
||||||
$fax_mode = $row["fax_mode"];
|
$fax_mode = $row["fax_mode"];
|
||||||
$fax_file_path = $row["fax_file_path"];
|
$fax_file_path = $row["fax_file_path"];
|
||||||
$fax_file_type = $row["fax_file_type"];
|
$fax_file_type = $row["fax_file_type"];
|
||||||
}
|
}
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
|
|
||||||
//set the type
|
//set the type
|
||||||
if ($fax_mode == 'rx') { $type = 'inbox'; }
|
if ($fax_mode == 'rx') { $type = 'inbox'; }
|
||||||
if ($fax_mode == 'tx') { $type = 'sent'; }
|
if ($fax_mode == 'tx') { $type = 'sent'; }
|
||||||
|
|
||||||
//delete fax file(s)
|
//delete fax file(s)
|
||||||
if (substr_count($fax_file_path, '/temp/') > 0) {
|
if (substr_count($fax_file_path, '/temp/') > 0) {
|
||||||
$fax_file_path = str_replace('/temp/', '/'.$type.'/', $fax_file_path);
|
$fax_file_path = str_replace('/temp/', '/'.$type.'/', $fax_file_path);
|
||||||
}
|
}
|
||||||
if (file_exists($fax_file_path)) {
|
if (file_exists($fax_file_path)) {
|
||||||
@unlink($fax_file_path);
|
@unlink($fax_file_path);
|
||||||
}
|
}
|
||||||
if ($fax_file_type == 'tif') {
|
if ($fax_file_type == 'tif') {
|
||||||
$fax_file_path = str_replace('.tif', '.pdf', $fax_file_path);
|
$fax_file_path = str_replace('.tif', '.pdf', $fax_file_path);
|
||||||
if (file_exists($fax_file_path)) {
|
if (file_exists($fax_file_path)) {
|
||||||
@unlink($fax_file_path);
|
@unlink($fax_file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($fax_file_type == 'pdf') {
|
else if ($fax_file_type == 'pdf') {
|
||||||
$fax_file_path = str_replace('.pdf', '.tif', $fax_file_path);
|
$fax_file_path = str_replace('.pdf', '.tif', $fax_file_path);
|
||||||
if (file_exists($fax_file_path)) {
|
if (file_exists($fax_file_path)) {
|
||||||
@unlink($fax_file_path);
|
@unlink($fax_file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete fax file record
|
//delete fax file record
|
||||||
$sql = "delete from v_fax_files ";
|
$sql = "delete from v_fax_files ";
|
||||||
$sql .= "where fax_file_uuid = '".$fax_file_uuid."' ";
|
$sql .= "where fax_file_uuid = '".$fax_file_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
|
|
||||||
$_SESSION['message'] = $text['message-delete'];
|
$_SESSION['message'] = $text['message-delete'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
header('Location: fax_files.php?id='.$fax_uuid.'&box='.$type);
|
header('Location: fax_files.php?id='.$fax_uuid.'&box='.$type);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+393
-393
@@ -1,394 +1,394 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015
|
Portions created by the Initial Developer are Copyright (C) 2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('fax_file_view')) {
|
if (permission_exists('fax_file_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get variables used to control the order
|
//get variables used to control the order
|
||||||
$order_by = check_str($_GET["order_by"]);
|
$order_by = check_str($_GET["order_by"]);
|
||||||
$order = check_str($_GET["order"]);
|
$order = check_str($_GET["order"]);
|
||||||
|
|
||||||
//get fax extension
|
//get fax extension
|
||||||
if (strlen($_GET['id']) > 0) {
|
if (strlen($_GET['id']) > 0) {
|
||||||
if (is_uuid($_GET["id"])) {
|
if (is_uuid($_GET["id"])) {
|
||||||
$fax_uuid = $_GET["id"];
|
$fax_uuid = $_GET["id"];
|
||||||
}
|
}
|
||||||
if (if_group("superadmin") || if_group("admin")) {
|
if (if_group("superadmin") || if_group("admin")) {
|
||||||
//show all fax extensions
|
//show all fax extensions
|
||||||
$sql = "select fax_name, fax_extension from v_fax ";
|
$sql = "select fax_name, fax_extension from v_fax ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and fax_uuid = '$fax_uuid' ";
|
$sql .= "and fax_uuid = '$fax_uuid' ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//show only assigned fax extensions
|
//show only assigned fax extensions
|
||||||
$sql = "select fax_name, fax_extension from v_fax as f, v_fax_users as u ";
|
$sql = "select fax_name, fax_extension from v_fax as f, v_fax_users as u ";
|
||||||
$sql .= "where f.fax_uuid = u.fax_uuid ";
|
$sql .= "where f.fax_uuid = u.fax_uuid ";
|
||||||
$sql .= "and f.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "and f.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and f.fax_uuid = '$fax_uuid' ";
|
$sql .= "and f.fax_uuid = '$fax_uuid' ";
|
||||||
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
|
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) == 0) {
|
if (count($result) == 0) {
|
||||||
if (if_group("superadmin") || if_group("admin")) {
|
if (if_group("superadmin") || if_group("admin")) {
|
||||||
//allow access
|
//allow access
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
//set database fields as variables
|
//set database fields as variables
|
||||||
$fax_name = $row["fax_name"];
|
$fax_name = $row["fax_name"];
|
||||||
$fax_extension = $row["fax_extension"];
|
$fax_extension = $row["fax_extension"];
|
||||||
//limit to one row
|
//limit to one row
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the fax directory
|
//set the fax directory
|
||||||
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
||||||
|
|
||||||
//download the fax
|
//download the fax
|
||||||
if ($_GET['a'] == "download") {
|
if ($_GET['a'] == "download") {
|
||||||
session_cache_limiter('public');
|
session_cache_limiter('public');
|
||||||
//test to see if it is in the inbox or sent directory.
|
//test to see if it is in the inbox or sent directory.
|
||||||
if ($_GET['type'] == "fax_inbox") {
|
if ($_GET['type'] == "fax_inbox") {
|
||||||
if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']))) {
|
if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']))) {
|
||||||
$tmp_faxdownload_file = $fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']);
|
$tmp_faxdownload_file = $fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($_GET['type'] == "fax_sent") {
|
else if ($_GET['type'] == "fax_sent") {
|
||||||
if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']))) {
|
if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']))) {
|
||||||
$tmp_faxdownload_file = $fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']);
|
$tmp_faxdownload_file = $fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//let's see if we found it.
|
//let's see if we found it.
|
||||||
if (strlen($tmp_faxdownload_file) > 0) {
|
if (strlen($tmp_faxdownload_file) > 0) {
|
||||||
$fd = fopen($tmp_faxdownload_file, "rb");
|
$fd = fopen($tmp_faxdownload_file, "rb");
|
||||||
if ($_GET['t'] == "bin") {
|
if ($_GET['t'] == "bin") {
|
||||||
header("Content-Type: application/force-download");
|
header("Content-Type: application/force-download");
|
||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Description: File Transfer");
|
header("Content-Description: File Transfer");
|
||||||
header('Content-Disposition: attachment; filename="'.check_str($_GET['filename']).'"');
|
header('Content-Disposition: attachment; filename="'.check_str($_GET['filename']).'"');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$file_ext = substr(check_str($_GET['filename']), -3);
|
$file_ext = substr(check_str($_GET['filename']), -3);
|
||||||
if ($file_ext == "tif") {
|
if ($file_ext == "tif") {
|
||||||
header("Content-Type: image/tiff");
|
header("Content-Type: image/tiff");
|
||||||
}
|
}
|
||||||
else if ($file_ext == "png") {
|
else if ($file_ext == "png") {
|
||||||
header("Content-Type: image/png");
|
header("Content-Type: image/png");
|
||||||
}
|
}
|
||||||
else if ($file_ext == "jpg") {
|
else if ($file_ext == "jpg") {
|
||||||
header('Content-Type: image/jpeg');
|
header('Content-Type: image/jpeg');
|
||||||
}
|
}
|
||||||
else if ($file_ext == "pdf") {
|
else if ($file_ext == "pdf") {
|
||||||
header("Content-Type: application/pdf");
|
header("Content-Type: application/pdf");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header('Accept-Ranges: bytes');
|
header('Accept-Ranges: bytes');
|
||||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
|
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
|
||||||
header("Content-Length: " . filesize($tmp_faxdownload_file));
|
header("Content-Length: " . filesize($tmp_faxdownload_file));
|
||||||
fpassthru($fd);
|
fpassthru($fd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "".$text['label-file']."";
|
echo "".$text['label-file']."";
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the fax extension
|
//get the fax extension
|
||||||
if (strlen($fax_extension) > 0) {
|
if (strlen($fax_extension) > 0) {
|
||||||
//set the fax directories. example /usr/local/freeswitch/storage/fax/329/inbox
|
//set the fax directories. example /usr/local/freeswitch/storage/fax/329/inbox
|
||||||
$dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox';
|
$dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox';
|
||||||
$dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent';
|
$dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent';
|
||||||
$dir_fax_temp = $fax_dir.'/'.$fax_extension.'/temp';
|
$dir_fax_temp = $fax_dir.'/'.$fax_extension.'/temp';
|
||||||
|
|
||||||
//make sure the directories exist
|
//make sure the directories exist
|
||||||
if (!is_dir($_SESSION['switch']['storage']['dir'])) {
|
if (!is_dir($_SESSION['switch']['storage']['dir'])) {
|
||||||
mkdir($_SESSION['switch']['storage']['dir']);
|
mkdir($_SESSION['switch']['storage']['dir']);
|
||||||
chmod($dir_fax_sent,0774);
|
chmod($dir_fax_sent,0774);
|
||||||
}
|
}
|
||||||
if (!is_dir($fax_dir.'/'.$fax_extension)) {
|
if (!is_dir($fax_dir.'/'.$fax_extension)) {
|
||||||
mkdir($fax_dir.'/'.$fax_extension,0774,true);
|
mkdir($fax_dir.'/'.$fax_extension,0774,true);
|
||||||
chmod($fax_dir.'/'.$fax_extension,0774);
|
chmod($fax_dir.'/'.$fax_extension,0774);
|
||||||
}
|
}
|
||||||
if (!is_dir($dir_fax_inbox)) {
|
if (!is_dir($dir_fax_inbox)) {
|
||||||
mkdir($dir_fax_inbox,0774,true);
|
mkdir($dir_fax_inbox,0774,true);
|
||||||
chmod($dir_fax_inbox,0774);
|
chmod($dir_fax_inbox,0774);
|
||||||
}
|
}
|
||||||
if (!is_dir($dir_fax_sent)) {
|
if (!is_dir($dir_fax_sent)) {
|
||||||
mkdir($dir_fax_sent,0774,true);
|
mkdir($dir_fax_sent,0774,true);
|
||||||
chmod($dir_fax_sent,0774);
|
chmod($dir_fax_sent,0774);
|
||||||
}
|
}
|
||||||
if (!is_dir($dir_fax_temp)) {
|
if (!is_dir($dir_fax_temp)) {
|
||||||
mkdir($dir_fax_temp,0774,true);
|
mkdir($dir_fax_temp,0774,true);
|
||||||
chmod($dir_fax_temp,0774);
|
chmod($dir_fax_temp,0774);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
require_once "resources/paging.php";
|
require_once "resources/paging.php";
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$sql = "select count(*) as num_rows from v_fax_files ";
|
$sql = "select count(*) as num_rows from v_fax_files ";
|
||||||
$sql .= "where fax_uuid = '$fax_uuid' ";
|
$sql .= "where fax_uuid = '$fax_uuid' ";
|
||||||
$sql .= "and domain_uuid = '$domain_uuid' ";
|
$sql .= "and domain_uuid = '$domain_uuid' ";
|
||||||
if ($_REQUEST['box'] == 'inbox') {
|
if ($_REQUEST['box'] == 'inbox') {
|
||||||
$sql .= "and fax_mode = 'rx' ";
|
$sql .= "and fax_mode = 'rx' ";
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
$sql .= "and fax_mode = 'tx' ";
|
$sql .= "and fax_mode = 'tx' ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
if ($row['num_rows'] > 0) {
|
if ($row['num_rows'] > 0) {
|
||||||
$num_rows = $row['num_rows'];
|
$num_rows = $row['num_rows'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$num_rows = '0';
|
$num_rows = '0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
$param = "&id=".$_GET['id']."&box=".$_GET['box']."&order_by=".$_GET['order_by']."&order=".$_GET['order'];
|
$param = "&id=".$_GET['id']."&box=".$_GET['box']."&order_by=".$_GET['order_by']."&order=".$_GET['order'];
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||||
$offset = $rows_per_page * $page;
|
$offset = $rows_per_page * $page;
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select * from v_fax_files ";
|
$sql = "select * from v_fax_files ";
|
||||||
$sql .= "where fax_uuid = '$fax_uuid' ";
|
$sql .= "where fax_uuid = '$fax_uuid' ";
|
||||||
$sql .= "and domain_uuid = '$domain_uuid' ";
|
$sql .= "and domain_uuid = '$domain_uuid' ";
|
||||||
if ($_REQUEST['box'] == 'inbox') {
|
if ($_REQUEST['box'] == 'inbox') {
|
||||||
$sql .= "and fax_mode = 'rx' ";
|
$sql .= "and fax_mode = 'rx' ";
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
$sql .= "and fax_mode = 'tx' ";
|
$sql .= "and fax_mode = 'tx' ";
|
||||||
}
|
}
|
||||||
$sql .= "order by ".((strlen($order_by) > 0) ? $order_by.' '.$order : "fax_date desc")." ";
|
$sql .= "order by ".((strlen($order_by) > 0) ? $order_by.' '.$order : "fax_date desc")." ";
|
||||||
$sql .= "limit $rows_per_page offset $offset ";
|
$sql .= "limit $rows_per_page offset $offset ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$fax_files = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$fax_files = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
//show the header
|
//show the header
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' valign='top'>\n";
|
echo " <td align='left' valign='top'>\n";
|
||||||
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
||||||
echo " <b>".$text['header-inbox'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
|
echo " <b>".$text['header-inbox'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
||||||
echo " <b>".$text['header-sent'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
|
echo " <b>".$text['header-sent'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' align='right' valign='top'>\n";
|
echo " <td width='70%' align='right' valign='top'>\n";
|
||||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
|
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
|
|
||||||
//show the table and content
|
//show the table and content
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
||||||
echo th_order_by('fax_caller_id_number', $text['label-fax_caller_id_number'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
echo th_order_by('fax_caller_id_number', $text['label-fax_caller_id_number'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
echo th_order_by('fax_destination', $text['label-fax_destination'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
echo th_order_by('fax_destination', $text['label-fax_destination'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
||||||
}
|
}
|
||||||
echo "<th width=''>".$text['table-file']."</th>\n";
|
echo "<th width=''>".$text['table-file']."</th>\n";
|
||||||
echo "<th width='10%'>".$text['table-view']."</th>\n";
|
echo "<th width='10%'>".$text['table-view']."</th>\n";
|
||||||
echo th_order_by('fax_date', $text['label-fax_date'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
echo th_order_by('fax_date', $text['label-fax_date'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']);
|
||||||
echo "<td style='width: 25px;' class='list_control_icons'> </td>\n";
|
echo "<td style='width: 25px;' class='list_control_icons'> </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if ($num_rows > 0) {
|
if ($num_rows > 0) {
|
||||||
foreach($fax_files as $row) {
|
foreach($fax_files as $row) {
|
||||||
$file = basename($row['fax_file_path']);
|
$file = basename($row['fax_file_path']);
|
||||||
if (strtolower(substr($file, -3)) == "tif" || strtolower(substr($file, -3)) == "pdf") {
|
if (strtolower(substr($file, -3)) == "tif" || strtolower(substr($file, -3)) == "pdf") {
|
||||||
$file_name = substr($file, 0, (strlen($file) -4));
|
$file_name = substr($file, 0, (strlen($file) -4));
|
||||||
}
|
}
|
||||||
$file_ext = $row['fax_file_type'];
|
$file_ext = $row['fax_file_type'];
|
||||||
|
|
||||||
//decode the base64
|
//decode the base64
|
||||||
if (strlen($row['fax_base64']) > 0) {
|
if (strlen($row['fax_base64']) > 0) {
|
||||||
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
||||||
if (!file_exists($dir_fax_inbox.'/'.$file)) {
|
if (!file_exists($dir_fax_inbox.'/'.$file)) {
|
||||||
file_put_contents($dir_fax_inbox.'/'.$file, base64_decode($row['fax_base64']));
|
file_put_contents($dir_fax_inbox.'/'.$file, base64_decode($row['fax_base64']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
||||||
if (!file_exists($dir_fax_sent.'/'.$file)) {
|
if (!file_exists($dir_fax_sent.'/'.$file)) {
|
||||||
//decode the base64
|
//decode the base64
|
||||||
file_put_contents($dir_fax_sent.'/'.$file, base64_decode($row['fax_base64']));
|
file_put_contents($dir_fax_sent.'/'.$file, base64_decode($row['fax_base64']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//convert the tif to pdf
|
//convert the tif to pdf
|
||||||
unset($dir_fax);
|
unset($dir_fax);
|
||||||
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
||||||
if (!file_exists($dir_fax_inbox.'/'.$file_name.".pdf")) {
|
if (!file_exists($dir_fax_inbox.'/'.$file_name.".pdf")) {
|
||||||
$dir_fax = $dir_fax_inbox;
|
$dir_fax = $dir_fax_inbox;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
||||||
if (!file_exists($dir_fax_sent.'/'.$file_name.".pdf")) {
|
if (!file_exists($dir_fax_sent.'/'.$file_name.".pdf")) {
|
||||||
$dir_fax = $dir_fax_sent;
|
$dir_fax = $dir_fax_sent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($dir_fax != '') {
|
if ($dir_fax != '') {
|
||||||
chdir($dir_fax);
|
chdir($dir_fax);
|
||||||
//get fax resolution (ppi, W & H)
|
//get fax resolution (ppi, W & H)
|
||||||
$resp = exec("tiffinfo ".$file_name.".tif | grep 'Resolution:'");
|
$resp = exec("tiffinfo ".$file_name.".tif | grep 'Resolution:'");
|
||||||
$resp_array = explode(' ', trim($resp));
|
$resp_array = explode(' ', trim($resp));
|
||||||
$ppi_w = (int) $resp_array[1];
|
$ppi_w = (int) $resp_array[1];
|
||||||
$ppi_h = (int) $resp_array[2];
|
$ppi_h = (int) $resp_array[2];
|
||||||
unset($resp_array);
|
unset($resp_array);
|
||||||
$gs_r = $ppi_w.'x'.$ppi_h; //used by ghostscript
|
$gs_r = $ppi_w.'x'.$ppi_h; //used by ghostscript
|
||||||
//get page dimensions/size (pixels/inches, W & H)
|
//get page dimensions/size (pixels/inches, W & H)
|
||||||
$resp = exec("tiffinfo ".$file_name.".tif | grep 'Image Width:'");
|
$resp = exec("tiffinfo ".$file_name.".tif | grep 'Image Width:'");
|
||||||
$resp_array = explode(' ', trim($resp));
|
$resp_array = explode(' ', trim($resp));
|
||||||
$pix_w = $resp_array[2];
|
$pix_w = $resp_array[2];
|
||||||
$pix_h = $resp_array[5];
|
$pix_h = $resp_array[5];
|
||||||
unset($resp_array);
|
unset($resp_array);
|
||||||
$gs_g = $pix_w.'x'.$pix_h; //used by ghostscript
|
$gs_g = $pix_w.'x'.$pix_h; //used by ghostscript
|
||||||
$page_width = $pix_w / $ppi_w;
|
$page_width = $pix_w / $ppi_w;
|
||||||
$page_height = $pix_h / $ppi_h;
|
$page_height = $pix_h / $ppi_h;
|
||||||
if ($page_width > 8.4 && $page_height > 13) {
|
if ($page_width > 8.4 && $page_height > 13) {
|
||||||
$page_width = 8.5;
|
$page_width = 8.5;
|
||||||
$page_height = 14;
|
$page_height = 14;
|
||||||
$page_size = 'legal';
|
$page_size = 'legal';
|
||||||
}
|
}
|
||||||
else if ($page_width > 8.4 && $page_height < 12) {
|
else if ($page_width > 8.4 && $page_height < 12) {
|
||||||
$page_width = 8.5;
|
$page_width = 8.5;
|
||||||
$page_height = 11;
|
$page_height = 11;
|
||||||
$page_size = 'letter';
|
$page_size = 'letter';
|
||||||
}
|
}
|
||||||
else if ($page_width < 8.4 && $page_height > 11) {
|
else if ($page_width < 8.4 && $page_height > 11) {
|
||||||
$page_width = 8.3;
|
$page_width = 8.3;
|
||||||
$page_height = 11.7;
|
$page_height = 11.7;
|
||||||
$page_size = 'a4';
|
$page_size = 'a4';
|
||||||
}
|
}
|
||||||
//generate pdf (a work around, as tiff2pdf improperly inverts the colors)
|
//generate pdf (a work around, as tiff2pdf improperly inverts the colors)
|
||||||
$cmd_tif2pdf = "tiff2pdf -i -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax_temp.'/'.$file_name.".pdf ".$dir_fax.'/'.$file_name.".tif";
|
$cmd_tif2pdf = "tiff2pdf -i -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax_temp.'/'.$file_name.".pdf ".$dir_fax.'/'.$file_name.".tif";
|
||||||
//echo $cmd_tif2pdf."<br>";
|
//echo $cmd_tif2pdf."<br>";
|
||||||
exec($cmd_tif2pdf);
|
exec($cmd_tif2pdf);
|
||||||
chdir($dir_fax_temp);
|
chdir($dir_fax_temp);
|
||||||
$cmd_pdf2tif = "gs -q -sDEVICE=tiffg3 -r".$gs_r." -g".$gs_g." -dNOPAUSE -sOutputFile=".$file_name."_temp.tif -- ".$file_name.".pdf -c quit";
|
$cmd_pdf2tif = "gs -q -sDEVICE=tiffg3 -r".$gs_r." -g".$gs_g." -dNOPAUSE -sOutputFile=".$file_name."_temp.tif -- ".$file_name.".pdf -c quit";
|
||||||
//echo $cmd_pdf2tif."<br>";
|
//echo $cmd_pdf2tif."<br>";
|
||||||
exec($cmd_pdf2tif); //convert pdf to tif
|
exec($cmd_pdf2tif); //convert pdf to tif
|
||||||
@unlink($dir_fax_temp.'/'.$file_name.".pdf");
|
@unlink($dir_fax_temp.'/'.$file_name.".pdf");
|
||||||
$cmd_tif2pdf = "tiff2pdf -i -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax.'/'.$file_name.".pdf ".$dir_fax_temp.'/'.$file_name."_temp.tif";
|
$cmd_tif2pdf = "tiff2pdf -i -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax.'/'.$file_name.".pdf ".$dir_fax_temp.'/'.$file_name."_temp.tif";
|
||||||
//echo $cmd_tif2pdf."<br>";
|
//echo $cmd_tif2pdf."<br>";
|
||||||
exec($cmd_tif2pdf);
|
exec($cmd_tif2pdf);
|
||||||
@unlink($dir_fax_temp.'/'.$file_name."_temp.tif");
|
@unlink($dir_fax_temp.'/'.$file_name."_temp.tif");
|
||||||
}
|
}
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_caller_id_name']." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_caller_id_name']." </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".format_phone($row['fax_caller_id_number'])." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".format_phone($row['fax_caller_id_number'])." </td>\n";
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".format_phone($row['fax_destination'])." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".format_phone($row['fax_destination'])." </td>\n";
|
||||||
}
|
}
|
||||||
echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
|
echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
|
||||||
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
||||||
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
|
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
||||||
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
|
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
|
||||||
}
|
}
|
||||||
echo " $file_name";
|
echo " $file_name";
|
||||||
echo " </a>";
|
echo " </a>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='".$row_style[$c]."' ondblclick=''>\n";
|
echo " <td class='".$row_style[$c]."' ondblclick=''>\n";
|
||||||
if ($_REQUEST['box'] == 'inbox') {
|
if ($_REQUEST['box'] == 'inbox') {
|
||||||
$dir_fax = $dir_fax_inbox;
|
$dir_fax = $dir_fax_inbox;
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
$dir_fax = $dir_fax_sent;
|
$dir_fax = $dir_fax_sent;
|
||||||
}
|
}
|
||||||
if (file_exists($dir_fax.'/'.$file_name.".pdf")) {
|
if (file_exists($dir_fax.'/'.$file_name.".pdf")) {
|
||||||
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
|
||||||
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">PDF</a>\n";
|
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">PDF</a>\n";
|
||||||
}
|
}
|
||||||
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
|
||||||
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">PDF</a>\n";
|
echo " <a href=\"fax_files.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">PDF</a>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " \n";
|
echo " \n";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".date("F d Y H:i:s", strtotime($row['fax_date']))." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".date("F d Y H:i:s", strtotime($row['fax_date']))." </td>\n";
|
||||||
echo " <td style='width: 25px;' class='list_control_icons'>";
|
echo " <td style='width: 25px;' class='list_control_icons'>";
|
||||||
if (permission_exists('fax_file_delete')) {
|
if (permission_exists('fax_file_delete')) {
|
||||||
echo "<a href='fax_file_delete.php?id=".$row['fax_file_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
echo "<a href='fax_file_delete.php?id=".$row['fax_file_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$c = ($c) ? 0 : 1;
|
$c = ($c) ? 0 : 1;
|
||||||
} //end foreach
|
} //end foreach
|
||||||
unset($sql, $fax_files);
|
unset($sql, $fax_files);
|
||||||
} //end if results
|
} //end if results
|
||||||
|
|
||||||
//show the paging controls
|
//show the paging controls
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
echo "<div align='center'>".$paging_controls."</div>\n";
|
echo "<div align='center'>".$paging_controls."</div>\n";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
+243
-243
@@ -1,243 +1,243 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
require_once "resources/functions/object_to_array.php";
|
require_once "resources/functions/object_to_array.php";
|
||||||
require_once "resources/functions/parse_attachments.php";
|
require_once "resources/functions/parse_attachments.php";
|
||||||
if (permission_exists('fax_inbox_view')) {
|
if (permission_exists('fax_inbox_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get fax server uuid, set connection parameters
|
//get fax server uuid, set connection parameters
|
||||||
if (strlen($_GET['id']) > 0) {
|
if (strlen($_GET['id']) > 0) {
|
||||||
$fax_uuid = check_str($_GET["id"]);
|
$fax_uuid = check_str($_GET["id"]);
|
||||||
|
|
||||||
if (if_group("superadmin") || if_group("admin")) {
|
if (if_group("superadmin") || if_group("admin")) {
|
||||||
//show all fax extensions
|
//show all fax extensions
|
||||||
$sql = "select * from v_fax ";
|
$sql = "select * from v_fax ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and fax_uuid = '$fax_uuid' ";
|
$sql .= "and fax_uuid = '$fax_uuid' ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//show only assigned fax extensions
|
//show only assigned fax extensions
|
||||||
$sql = "select * from v_fax as f, v_fax_users as u ";
|
$sql = "select * from v_fax as f, v_fax_users as u ";
|
||||||
$sql .= "where f.fax_uuid = u.fax_uuid ";
|
$sql .= "where f.fax_uuid = u.fax_uuid ";
|
||||||
$sql .= "and f.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "and f.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and f.fax_uuid = '$fax_uuid' ";
|
$sql .= "and f.fax_uuid = '$fax_uuid' ";
|
||||||
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
|
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) == 0) {
|
if (count($result) == 0) {
|
||||||
if (!if_group("superadmin") && !if_group("admin")) {
|
if (!if_group("superadmin") && !if_group("admin")) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$fax_name = $row["fax_name"];
|
$fax_name = $row["fax_name"];
|
||||||
$fax_extension = $row["fax_extension"];
|
$fax_extension = $row["fax_extension"];
|
||||||
$fax_email_connection_type = $row["fax_email_connection_type"];
|
$fax_email_connection_type = $row["fax_email_connection_type"];
|
||||||
$fax_email_connection_host = $row["fax_email_connection_host"];
|
$fax_email_connection_host = $row["fax_email_connection_host"];
|
||||||
$fax_email_connection_port = $row["fax_email_connection_port"];
|
$fax_email_connection_port = $row["fax_email_connection_port"];
|
||||||
$fax_email_connection_security = $row["fax_email_connection_security"];
|
$fax_email_connection_security = $row["fax_email_connection_security"];
|
||||||
$fax_email_connection_validate = $row["fax_email_connection_validate"];
|
$fax_email_connection_validate = $row["fax_email_connection_validate"];
|
||||||
$fax_email_connection_username = $row["fax_email_connection_username"];
|
$fax_email_connection_username = $row["fax_email_connection_username"];
|
||||||
$fax_email_connection_password = $row["fax_email_connection_password"];
|
$fax_email_connection_password = $row["fax_email_connection_password"];
|
||||||
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
||||||
$fax_email_inbound_subject_tag = $row["fax_email_inbound_subject_tag"];
|
$fax_email_inbound_subject_tag = $row["fax_email_inbound_subject_tag"];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
|
|
||||||
// make connection
|
// make connection
|
||||||
$fax_email_connection = "{".$fax_email_connection_host.":".$fax_email_connection_port."/".$fax_email_connection_type;
|
$fax_email_connection = "{".$fax_email_connection_host.":".$fax_email_connection_port."/".$fax_email_connection_type;
|
||||||
$fax_email_connection .= ($fax_email_connection_security != '') ? "/".$fax_email_connection_security : "/notls";
|
$fax_email_connection .= ($fax_email_connection_security != '') ? "/".$fax_email_connection_security : "/notls";
|
||||||
$fax_email_connection .= "/".(($fax_email_connection_validate == 'false') ? "no" : null)."validate-cert";
|
$fax_email_connection .= "/".(($fax_email_connection_validate == 'false') ? "no" : null)."validate-cert";
|
||||||
$fax_email_connection .= "}".$fax_email_connection_mailbox;
|
$fax_email_connection .= "}".$fax_email_connection_mailbox;
|
||||||
if (!$connection = imap_open($fax_email_connection, $fax_email_connection_username, $fax_email_connection_password)) {
|
if (!$connection = imap_open($fax_email_connection, $fax_email_connection_username, $fax_email_connection_password)) {
|
||||||
$_SESSION["message_mood"] = 'negative';
|
$_SESSION["message_mood"] = 'negative';
|
||||||
$_SESSION["message"] = $text['message-cannot_connect']."(".imap_last_error().")";
|
$_SESSION["message"] = $text['message-cannot_connect']."(".imap_last_error().")";
|
||||||
header("Location: fax.php");
|
header("Location: fax.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header("Location: fax.php");
|
header("Location: fax.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//message action
|
//message action
|
||||||
if ($_GET['email_id'] != '') {
|
if ($_GET['email_id'] != '') {
|
||||||
$email_id = check_str($_GET['email_id']);
|
$email_id = check_str($_GET['email_id']);
|
||||||
|
|
||||||
//download attachment
|
//download attachment
|
||||||
if (isset($_GET['download'])) {
|
if (isset($_GET['download'])) {
|
||||||
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
||||||
$file_type = pathinfo($attachment[0]['filename'], PATHINFO_EXTENSION);
|
$file_type = pathinfo($attachment[0]['filename'], PATHINFO_EXTENSION);
|
||||||
switch ($file_type) {
|
switch ($file_type) {
|
||||||
case "pdf" : header("Content-Type: application/pdf"); break;
|
case "pdf" : header("Content-Type: application/pdf"); break;
|
||||||
case "tif" : header("Contet-Type: image/tiff"); break;
|
case "tif" : header("Contet-Type: image/tiff"); break;
|
||||||
}
|
}
|
||||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
|
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
|
||||||
header("Content-Length: ".strlen($attachment[0]['attachment']));
|
header("Content-Length: ".strlen($attachment[0]['attachment']));
|
||||||
$browser = $_SERVER["HTTP_USER_AGENT"];
|
$browser = $_SERVER["HTTP_USER_AGENT"];
|
||||||
if (preg_match("/MSIE 5.5/", $browser) || preg_match("/MSIE 6.0/", $browser)) {
|
if (preg_match("/MSIE 5.5/", $browser) || preg_match("/MSIE 6.0/", $browser)) {
|
||||||
header("Content-Disposition: filename=\"".$attachment[0]['filename']."\"");
|
header("Content-Disposition: filename=\"".$attachment[0]['filename']."\"");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header("Content-Disposition: attachment; filename=\"".$attachment[0]['filename']."\"");
|
header("Content-Disposition: attachment; filename=\"".$attachment[0]['filename']."\"");
|
||||||
}
|
}
|
||||||
header("Content-Transfer-Encoding: binary");
|
header("Content-Transfer-Encoding: binary");
|
||||||
echo $attachment[0]['attachment'];
|
echo $attachment[0]['attachment'];
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete email
|
//delete email
|
||||||
if (isset($_GET['delete']) && permission_exists('fax_inbox_delete')) {
|
if (isset($_GET['delete']) && permission_exists('fax_inbox_delete')) {
|
||||||
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
||||||
if (imap_delete($connection, $email_id, FT_UID)) {
|
if (imap_delete($connection, $email_id, FT_UID)) {
|
||||||
if (imap_expunge($connection)) {
|
if (imap_expunge($connection)) {
|
||||||
//clean up local inbox copy
|
//clean up local inbox copy
|
||||||
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
|
||||||
@unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$attachment[0]['filename']);
|
@unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$attachment[0]['filename']);
|
||||||
//redirect user
|
//redirect user
|
||||||
$_SESSION["message"] = $text['message-delete'];
|
$_SESSION["message"] = $text['message-delete'];
|
||||||
header("Location: ?id=".$fax_uuid);
|
header("Location: ?id=".$fax_uuid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//redirect user
|
//redirect user
|
||||||
$_SESSION["message_mood"] = "negative";
|
$_SESSION["message_mood"] = "negative";
|
||||||
$_SESSION["message"] = $text['message-delete_failed'];
|
$_SESSION["message"] = $text['message-delete_failed'];
|
||||||
header("Location: ?id=".$fax_uuid);
|
header("Location: ?id=".$fax_uuid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//redirect user
|
//redirect user
|
||||||
$_SESSION["message_mood"] = "negative";
|
$_SESSION["message_mood"] = "negative";
|
||||||
$_SESSION["message"] = $text['message-delete_failed'];
|
$_SESSION["message"] = $text['message-delete_failed'];
|
||||||
header("Location: ?id=".$fax_uuid);
|
header("Location: ?id=".$fax_uuid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//get emails
|
//get emails
|
||||||
$emails = imap_search($connection, "SUBJECT \"".$fax_email_inbound_subject_tag."\"", SE_UID);
|
$emails = imap_search($connection, "SUBJECT \"".$fax_email_inbound_subject_tag."\"", SE_UID);
|
||||||
|
|
||||||
//show the header
|
//show the header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
//show the inbox
|
//show the inbox
|
||||||
$c = 0;
|
$c = 0;
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' valign='top'>\n";
|
echo " <td align='left' valign='top'>\n";
|
||||||
echo " <b>".$text['header-inbox'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
|
echo " <b>".$text['header-inbox'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' align='right' valign='top'>\n";
|
echo " <td width='70%' align='right' valign='top'>\n";
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"window.location='fax.php';\" value='".$text['button-back']."'>\n";
|
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"window.location='fax.php';\" value='".$text['button-back']."'>\n";
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-refresh']."' onclick=\"document.location.reload();\" value='".$text['button-refresh']."'>\n";
|
echo " <input type='button' class='btn' alt='".$text['button-refresh']."' onclick=\"document.location.reload();\" value='".$text['button-refresh']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br><br>\n";
|
echo "<br><br>\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <th>".$text['label-fax_caller_id_name']."</th>\n";
|
echo " <th>".$text['label-fax_caller_id_name']."</th>\n";
|
||||||
echo " <th>".$text['label-fax_caller_id_number']."</th>\n";
|
echo " <th>".$text['label-fax_caller_id_number']."</th>\n";
|
||||||
echo " <th>".$text['table-file']."</th>\n";
|
echo " <th>".$text['table-file']."</th>\n";
|
||||||
echo " <th>".$text['label-email_size']."</th>\n";
|
echo " <th>".$text['label-email_size']."</th>\n";
|
||||||
echo " <th>".$text['label-email_received']."</th>\n";
|
echo " <th>".$text['label-email_received']."</th>\n";
|
||||||
if (permission_exists('fax_inbox_delete')) {
|
if (permission_exists('fax_inbox_delete')) {
|
||||||
echo " <td style='width: 25px;' class='list_control_icons'> </td>\n";
|
echo " <td style='width: 25px;' class='list_control_icons'> </td>\n";
|
||||||
}
|
}
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
|
|
||||||
if ($emails) {
|
if ($emails) {
|
||||||
|
|
||||||
rsort($emails); // most recent on top
|
rsort($emails); // most recent on top
|
||||||
|
|
||||||
foreach ($emails as $email_id) {
|
foreach ($emails as $email_id) {
|
||||||
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
||||||
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
||||||
$file_name = $attachment[0]['filename'];
|
$file_name = $attachment[0]['filename'];
|
||||||
$caller_id_name = substr($file_name, 0, strpos($file_name, '-'));
|
$caller_id_name = substr($file_name, 0, strpos($file_name, '-'));
|
||||||
$caller_id_number = (is_numeric($caller_id_name)) ? format_phone((int) $caller_id_name) : null;
|
$caller_id_number = (is_numeric($caller_id_name)) ? format_phone((int) $caller_id_name) : null;
|
||||||
echo " <tr ".(($metadata[0]['seen'] == 0) ? "style='font-weight: bold;'" : null).">\n";
|
echo " <tr ".(($metadata[0]['seen'] == 0) ? "style='font-weight: bold;'" : null).">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$caller_id_name."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$caller_id_name."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$caller_id_number."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$caller_id_number."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'><a href='?id=".$fax_uuid."&email_id=".$email_id."&download'>".$file_name."</a></td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'><a href='?id=".$fax_uuid."&email_id=".$email_id."&download'>".$file_name."</a></td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".byte_convert(strlen($attachment[0]['attachment']))."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".byte_convert(strlen($attachment[0]['attachment']))."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$metadata[0]['date']."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$metadata[0]['date']."</td>\n";
|
||||||
if (permission_exists('fax_inbox_delete')) {
|
if (permission_exists('fax_inbox_delete')) {
|
||||||
echo " <td style='width: 25px;' class='list_control_icons'><a href='?id=".$fax_uuid."&email_id=".$email_id."&delete' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a></td>\n";
|
echo " <td style='width: 25px;' class='list_control_icons'><a href='?id=".$fax_uuid."&email_id=".$email_id."&delete' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a></td>\n";
|
||||||
}
|
}
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
// $fax_message = imap_fetchbody($connection, $email_id, '1.1', FT_UID);
|
// $fax_message = imap_fetchbody($connection, $email_id, '1.1', FT_UID);
|
||||||
// if ($fax_message == '') {
|
// if ($fax_message == '') {
|
||||||
// $fax_message = imap_fetchbody($connection, $email_id, '1', FT_UID);
|
// $fax_message = imap_fetchbody($connection, $email_id, '1', FT_UID);
|
||||||
// }
|
// }
|
||||||
$c = ($c) ? 0 : 1;
|
$c = ($c) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<tr valign='top'>\n";
|
echo "<tr valign='top'>\n";
|
||||||
echo " <td colspan='4' style='text-align: center;'><br><br>".$text['message-no_faxes_found']."<br><br></td>\n";
|
echo " <td colspan='4' style='text-align: center;'><br><br>".$text['message-no_faxes_found']."<br><br></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
/* close the connection */
|
/* close the connection */
|
||||||
imap_close($connection);
|
imap_close($connection);
|
||||||
|
|
||||||
|
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|||||||
+1103
-1103
File diff suppressed because it is too large
Load Diff
+247
-247
@@ -1,248 +1,248 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2015
|
Copyright (C) 2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cache class provides an abstracted cache
|
* cache class provides an abstracted cache
|
||||||
*
|
*
|
||||||
* @method string dialplan - builds the dialplan for the fax servers
|
* @method string dialplan - builds the dialplan for the fax servers
|
||||||
*/
|
*/
|
||||||
//define the fax class
|
//define the fax class
|
||||||
if (!class_exists('fax')) {
|
if (!class_exists('fax')) {
|
||||||
class fax {
|
class fax {
|
||||||
/**
|
/**
|
||||||
* define the variables
|
* define the variables
|
||||||
*/
|
*/
|
||||||
public $domain_uuid;
|
public $domain_uuid;
|
||||||
public $fax_uuid;
|
public $fax_uuid;
|
||||||
public $dialplan_uuid;
|
public $dialplan_uuid;
|
||||||
public $fax_name;
|
public $fax_name;
|
||||||
public $fax_description;
|
public $fax_description;
|
||||||
public $fax_extension;
|
public $fax_extension;
|
||||||
public $fax_forward_number;
|
public $fax_forward_number;
|
||||||
public $destination_number;
|
public $destination_number;
|
||||||
private $forward_prefix;
|
private $forward_prefix;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//place holder
|
//place holder
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a dialplan for call center
|
* Add a dialplan for call center
|
||||||
* @var string $domain_uuid the multi-tenant id
|
* @var string $domain_uuid the multi-tenant id
|
||||||
* @var string $value string to be cached
|
* @var string $value string to be cached
|
||||||
*/
|
*/
|
||||||
public function dialplan() {
|
public function dialplan() {
|
||||||
|
|
||||||
//normalize the fax forward number
|
//normalize the fax forward number
|
||||||
if (strlen($this->fax_forward_number) > 3) {
|
if (strlen($this->fax_forward_number) > 3) {
|
||||||
//$fax_forward_number = preg_replace("~[^0-9]~", "",$fax_forward_number);
|
//$fax_forward_number = preg_replace("~[^0-9]~", "",$fax_forward_number);
|
||||||
$this->fax_forward_number = str_replace(" ", "", $this->fax_forward_number);
|
$this->fax_forward_number = str_replace(" ", "", $this->fax_forward_number);
|
||||||
$this->fax_forward_number = str_replace("-", "", $this->fax_forward_number);
|
$this->fax_forward_number = str_replace("-", "", $this->fax_forward_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the forward prefix
|
//set the forward prefix
|
||||||
if (strripos($this->fax_forward_number, '$1') === false) {
|
if (strripos($this->fax_forward_number, '$1') === false) {
|
||||||
$this->forward_prefix = ''; //not found
|
$this->forward_prefix = ''; //not found
|
||||||
} else {
|
} else {
|
||||||
$this->forward_prefix = $this->forward_prefix.$this->fax_forward_number.'#'; //found
|
$this->forward_prefix = $this->forward_prefix.$this->fax_forward_number.'#'; //found
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete previous dialplan
|
//delete previous dialplan
|
||||||
if (strlen($this->dialplan_uuid) > 0) {
|
if (strlen($this->dialplan_uuid) > 0) {
|
||||||
//delete the previous dialplan
|
//delete the previous dialplan
|
||||||
$sql = "delete from v_dialplans ";
|
$sql = "delete from v_dialplans ";
|
||||||
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$this->db->exec($sql);
|
$this->db->exec($sql);
|
||||||
|
|
||||||
$sql = "delete from v_dialplan_details ";
|
$sql = "delete from v_dialplan_details ";
|
||||||
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$this->db->exec($sql);
|
$this->db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
|
|
||||||
//build the dialplan array
|
//build the dialplan array
|
||||||
$dialplan["app_uuid"] = "24108154-4ac3-1db6-1551-4731703a4440";
|
$dialplan["app_uuid"] = "24108154-4ac3-1db6-1551-4731703a4440";
|
||||||
$dialplan["domain_uuid"] = $this->domain_uuid;
|
$dialplan["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_name"] = ($this->fax_name != '') ? $this->fax_name : format_phone($this->destination_number);
|
$dialplan["dialplan_name"] = ($this->fax_name != '') ? $this->fax_name : format_phone($this->destination_number);
|
||||||
$dialplan["dialplan_number"] = $this->fax_extension;
|
$dialplan["dialplan_number"] = $this->fax_extension;
|
||||||
$dialplan["dialplan_context"] = $_SESSION['context'];
|
$dialplan["dialplan_context"] = $_SESSION['context'];
|
||||||
$dialplan["dialplan_continue"] = "false";
|
$dialplan["dialplan_continue"] = "false";
|
||||||
$dialplan["dialplan_order"] = "310";
|
$dialplan["dialplan_order"] = "310";
|
||||||
$dialplan["dialplan_enabled"] = "true";
|
$dialplan["dialplan_enabled"] = "true";
|
||||||
$dialplan["dialplan_description"] = $this->fax_description;
|
$dialplan["dialplan_description"] = $this->fax_description;
|
||||||
$dialplan_detail_order = 10;
|
$dialplan_detail_order = 10;
|
||||||
|
|
||||||
//add the public condition
|
//add the public condition
|
||||||
$y = 1;
|
$y = 1;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^".$this->destination_number."\$";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "^".$this->destination_number."\$";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_break"] = "";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "answer";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "fax_uuid=".$this->fax_uuid;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "fax_uuid=".$this->fax_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "api_hangup_hook=lua app/fax/resources/scripts/hangup_rx.lua";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "api_hangup_hook=lua app/fax/resources/scripts/hangup_rx.lua";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
foreach($_SESSION['fax']['variable'] as $data) {
|
foreach($_SESSION['fax']['variable'] as $data) {
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
if (substr($data,0,8) == "inbound:") {
|
if (substr($data,0,8) == "inbound:") {
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = substr($data,8,strlen($data));
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = substr($data,8,strlen($data));
|
||||||
}
|
}
|
||||||
elseif (substr($data,0,9) == "outbound:") {}
|
elseif (substr($data,0,9) == "outbound:") {}
|
||||||
else {
|
else {
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $data;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $data;
|
||||||
}
|
}
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
}
|
}
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||||
if (strlen($_SESSION['fax']['last_fax']['text']) > 0) {
|
if (strlen($_SESSION['fax']['last_fax']['text']) > 0) {
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=".$_SESSION['fax']['last_fax']['text'];
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=".$_SESSION['fax']['last_fax']['text'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=\${caller_id_number}-\${strftime(%Y-%m-%d-%H-%M-%S)}";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "last_fax=\${caller_id_number}-\${strftime(%Y-%m-%d-%H-%M-%S)}";
|
||||||
}
|
}
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "playback";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "playback";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "silence_stream://2000";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "silence_stream://2000";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "rxfax";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "rxfax";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'].'/'.$this->fax_extension.'/inbox/'.$this->forward_prefix.'${last_fax}.tif';
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'].'/'.$this->fax_extension.'/inbox/'.$this->forward_prefix.'${last_fax}.tif';
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "hangup";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "hangup";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
|
||||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||||
$y++;
|
$y++;
|
||||||
|
|
||||||
//add the dialplan permission
|
//add the dialplan permission
|
||||||
$p = new permissions;
|
$p = new permissions;
|
||||||
$p->add("dialplan_add", 'temp');
|
$p->add("dialplan_add", 'temp');
|
||||||
$p->add("dialplan_detail_add", 'temp');
|
$p->add("dialplan_detail_add", 'temp');
|
||||||
$p->add("dialplan_edit", 'temp');
|
$p->add("dialplan_edit", 'temp');
|
||||||
$p->add("dialplan_detail_edit", 'temp');
|
$p->add("dialplan_detail_edit", 'temp');
|
||||||
|
|
||||||
//save the dialplan
|
//save the dialplan
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('dialplans');
|
$orm->name('dialplans');
|
||||||
$orm->save($dialplan);
|
$orm->save($dialplan);
|
||||||
$dialplan_response = $orm->message;
|
$dialplan_response = $orm->message;
|
||||||
$this->dialplan_uuid = $dialplan_response['uuid'];
|
$this->dialplan_uuid = $dialplan_response['uuid'];
|
||||||
|
|
||||||
//if new dialplan uuid then update the call center queue
|
//if new dialplan uuid then update the call center queue
|
||||||
$sql = "update v_fax ";
|
$sql = "update v_fax ";
|
||||||
$sql .= "set dialplan_uuid = '".$this->dialplan_uuid."' ";
|
$sql .= "set dialplan_uuid = '".$this->dialplan_uuid."' ";
|
||||||
$sql .= "where fax_uuid = '".$this->fax_uuid."' ";
|
$sql .= "where fax_uuid = '".$this->fax_uuid."' ";
|
||||||
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
|
||||||
$this->db->exec($sql);
|
$this->db->exec($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//remove the temporary permission
|
//remove the temporary permission
|
||||||
$p->delete("dialplan_add", 'temp');
|
$p->delete("dialplan_add", 'temp');
|
||||||
$p->delete("dialplan_detail_add", 'temp');
|
$p->delete("dialplan_detail_add", 'temp');
|
||||||
$p->delete("dialplan_edit", 'temp');
|
$p->delete("dialplan_edit", 'temp');
|
||||||
$p->delete("dialplan_detail_edit", 'temp');
|
$p->delete("dialplan_detail_edit", 'temp');
|
||||||
|
|
||||||
//synchronize the xml config
|
//synchronize the xml config
|
||||||
save_dialplan_xml();
|
save_dialplan_xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("dialplan:".$_SESSION['context']);
|
$cache->delete("dialplan:".$_SESSION['context']);
|
||||||
|
|
||||||
//return the dialplan_uuid
|
//return the dialplan_uuid
|
||||||
return $dialplan_response;
|
return $dialplan_response;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$o = new fax;
|
$o = new fax;
|
||||||
$c->domain_uuid = "";
|
$c->domain_uuid = "";
|
||||||
$c->dialplan_uuid = "";
|
$c->dialplan_uuid = "";
|
||||||
$c->fax_name = "";
|
$c->fax_name = "";
|
||||||
$c->fax_extension = $fax_extension;
|
$c->fax_extension = $fax_extension;
|
||||||
$c->fax_forward_number = $fax_forward_number;
|
$c->fax_forward_number = $fax_forward_number;
|
||||||
$c->destination_number = $fax_destination_number;
|
$c->destination_number = $fax_destination_number;
|
||||||
$c->fax_description = $fax_description;
|
$c->fax_description = $fax_description;
|
||||||
$c->dialplan();
|
$c->dialplan();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function object_to_array($obj) {
|
function object_to_array($obj) {
|
||||||
if (!is_object($obj) && !is_array($obj)) { return $obj; }
|
if (!is_object($obj) && !is_array($obj)) { return $obj; }
|
||||||
if (is_object($obj)) { $obj = get_object_vars($obj); }
|
if (is_object($obj)) { $obj = get_object_vars($obj); }
|
||||||
return array_map('object_to_array', $obj);
|
return array_map('object_to_array', $obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,145 +1,145 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function parse_message($connection, $message_number, $option = null, $to_charset = 'UTF-8') {
|
function parse_message($connection, $message_number, $option = null, $to_charset = 'UTF-8') {
|
||||||
$result = Array('messages'=>Array(),'attachments'=>Array());
|
$result = Array('messages'=>Array(),'attachments'=>Array());
|
||||||
$structure = imap_fetchstructure($connection, $message_number, $option);
|
$structure = imap_fetchstructure($connection, $message_number, $option);
|
||||||
|
|
||||||
if (isset($structure->parts)) {
|
if (isset($structure->parts)) {
|
||||||
$flatten = parse_message_flatten($structure->parts);
|
$flatten = parse_message_flatten($structure->parts);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$flatten = Array(1 => $structure);
|
$flatten = Array(1 => $structure);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($flatten as $id => &$part){
|
foreach($flatten as $id => &$part){
|
||||||
switch($part->type) {
|
switch($part->type) {
|
||||||
case TYPETEXT:
|
case TYPETEXT:
|
||||||
$message = parse_message_decode_text($connection, $part, $message_number, $id, $option, $to_charset);
|
$message = parse_message_decode_text($connection, $part, $message_number, $id, $option, $to_charset);
|
||||||
$result['messages'][] = $message;
|
$result['messages'][] = $message;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPEAPPLICATION: case TYPEAUDIO: case TYPEIMAGE: case TYPEVIDEO: case TYPEOTHER:
|
case TYPEAPPLICATION: case TYPEAUDIO: case TYPEIMAGE: case TYPEVIDEO: case TYPEOTHER:
|
||||||
$attachment = parse_message_decode_attach($connection, $part, $message_number, $id, $option);
|
$attachment = parse_message_decode_attach($connection, $part, $message_number, $id, $option);
|
||||||
if($attachment){
|
if($attachment){
|
||||||
$result['attachments'][] = $attachment;
|
$result['attachments'][] = $attachment;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPEMULTIPART: case TYPEMESSAGE:
|
case TYPEMULTIPART: case TYPEMESSAGE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_message_decode_text($connection, &$part, $message_number, $id, $option, $to_charset){
|
function parse_message_decode_text($connection, &$part, $message_number, $id, $option, $to_charset){
|
||||||
$msg = parse_message_fetch_body($connection, $part, $message_number, $id, $option);
|
$msg = parse_message_fetch_body($connection, $part, $message_number, $id, $option);
|
||||||
|
|
||||||
if($msg && $to_charset){
|
if($msg && $to_charset){
|
||||||
$charset = '';
|
$charset = '';
|
||||||
if(isset($part->parameters) && count($part->parameters)) {
|
if(isset($part->parameters) && count($part->parameters)) {
|
||||||
foreach($part->parameters as &$parameter){
|
foreach($part->parameters as &$parameter){
|
||||||
if($parameter->attribute == 'CHARSET') {
|
if($parameter->attribute == 'CHARSET') {
|
||||||
$charset = $parameter->value;
|
$charset = $parameter->value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($charset){
|
if($charset){
|
||||||
$msg = mb_convert_encoding($msg, $to_charset, $charset);
|
$msg = mb_convert_encoding($msg, $to_charset, $charset);
|
||||||
}
|
}
|
||||||
$msg = trim($msg);
|
$msg = trim($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array(
|
return Array(
|
||||||
'data' => $msg,
|
'data' => $msg,
|
||||||
'type' => parse_message_get_type($part),
|
'type' => parse_message_get_type($part),
|
||||||
'size' => strlen($msg),
|
'size' => strlen($msg),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_message_decode_attach($connection, &$part, $message_number, $id, $option){
|
function parse_message_decode_attach($connection, &$part, $message_number, $id, $option){
|
||||||
$filename = false;
|
$filename = false;
|
||||||
|
|
||||||
if($part->ifdparameters) {
|
if($part->ifdparameters) {
|
||||||
foreach($part->dparameters as $object) {
|
foreach($part->dparameters as $object) {
|
||||||
if(strtolower($object->attribute) == 'filename') {
|
if(strtolower($object->attribute) == 'filename') {
|
||||||
$filename = $object->value;
|
$filename = $object->value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($part->ifparameters) {
|
if($part->ifparameters) {
|
||||||
foreach($part->parameters as $object) {
|
foreach($part->parameters as $object) {
|
||||||
if(strtolower($object->attribute) == 'name') {
|
if(strtolower($object->attribute) == 'name') {
|
||||||
$filename = $object->value;
|
$filename = $object->value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$filename) {
|
if(!$filename) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = parse_message_fetch_body($connection, $part, $message_number, $id, $option);
|
$body = parse_message_fetch_body($connection, $part, $message_number, $id, $option);
|
||||||
|
|
||||||
return Array(
|
return Array(
|
||||||
'data' => $body,
|
'data' => $body,
|
||||||
'type' => parse_message_get_type($part),
|
'type' => parse_message_get_type($part),
|
||||||
'name' => $filename,
|
'name' => $filename,
|
||||||
'size' => strlen($body),
|
'size' => strlen($body),
|
||||||
'disposition' => $part->disposition,
|
'disposition' => $part->disposition,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_message_fetch_body($connection, &$part, $message_number, $id, $option){
|
function parse_message_fetch_body($connection, &$part, $message_number, $id, $option){
|
||||||
$body = imap_fetchbody($connection, $message_number, $id, $option);
|
$body = imap_fetchbody($connection, $message_number, $id, $option);
|
||||||
if($part->encoding == ENCBASE64){
|
if($part->encoding == ENCBASE64){
|
||||||
$body = base64_decode($body);
|
$body = base64_decode($body);
|
||||||
}
|
}
|
||||||
else if($part->encoding == ENCQUOTEDPRINTABLE){
|
else if($part->encoding == ENCQUOTEDPRINTABLE){
|
||||||
$body = quoted_printable_decode($body);
|
$body = quoted_printable_decode($body);
|
||||||
}
|
}
|
||||||
return $body;
|
return $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_message_get_type(&$part){
|
function parse_message_get_type(&$part){
|
||||||
$types = Array(
|
$types = Array(
|
||||||
TYPEMESSAGE => 'message',
|
TYPEMESSAGE => 'message',
|
||||||
TYPEMULTIPART => 'multipart',
|
TYPEMULTIPART => 'multipart',
|
||||||
TYPEAPPLICATION => 'application',
|
TYPEAPPLICATION => 'application',
|
||||||
TYPEAUDIO => 'audio',
|
TYPEAUDIO => 'audio',
|
||||||
TYPEIMAGE => 'image',
|
TYPEIMAGE => 'image',
|
||||||
TYPETEXT => 'text',
|
TYPETEXT => 'text',
|
||||||
TYPEVIDEO => 'video',
|
TYPEVIDEO => 'video',
|
||||||
TYPEMODEL => 'model',
|
TYPEMODEL => 'model',
|
||||||
TYPEOTHER => 'other',
|
TYPEOTHER => 'other',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $types[$part->type] . '/' . strtolower($part->subtype);
|
return $types[$part->type] . '/' . strtolower($part->subtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_message_flatten(&$structure, &$result = array(), $prefix = '', $index = 1, $fullPrefix = true) {
|
function parse_message_flatten(&$structure, &$result = array(), $prefix = '', $index = 1, $fullPrefix = true) {
|
||||||
foreach($structure as &$part) {
|
foreach($structure as &$part) {
|
||||||
if(isset($part->parts)) {
|
if(isset($part->parts)) {
|
||||||
if($part->type == TYPEMESSAGE) {
|
if($part->type == TYPEMESSAGE) {
|
||||||
parse_message_flatten($part->parts, $result, $prefix.$index.'.', 0, false);
|
parse_message_flatten($part->parts, $result, $prefix.$index.'.', 0, false);
|
||||||
}
|
}
|
||||||
elseif($fullPrefix) {
|
elseif($fullPrefix) {
|
||||||
parse_message_flatten($part->parts, $result, $prefix.$index.'.');
|
parse_message_flatten($part->parts, $result, $prefix.$index.'.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
parse_message_flatten($part->parts, $result, $prefix);
|
parse_message_flatten($part->parts, $result, $prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result[$prefix.$index] = $part;
|
$result[$prefix.$index] = $part;
|
||||||
}
|
}
|
||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
-21
@@ -1,21 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][0]['title']['en-us'] = "Follow Me";
|
$apps[$x]['menu'][0]['title']['en-us'] = "Follow Me";
|
||||||
$apps[$x]['menu'][0]['title']['es-mx'] = "Sígueme";
|
$apps[$x]['menu'][0]['title']['es-mx'] = "Sígueme";
|
||||||
$apps[$x]['menu'][0]['title']['de-de'] = "Follow Me";
|
$apps[$x]['menu'][0]['title']['de-de'] = "Follow Me";
|
||||||
$apps[$x]['menu'][0]['title']['de-ch'] = "Follow Me";
|
$apps[$x]['menu'][0]['title']['de-ch'] = "Follow Me";
|
||||||
$apps[$x]['menu'][0]['title']['de-at'] = "Follow Me";
|
$apps[$x]['menu'][0]['title']['de-at'] = "Follow Me";
|
||||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "Follow Me";
|
$apps[$x]['menu'][0]['title']['fr-fr'] = "Follow Me";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "";
|
$apps[$x]['menu'][0]['title']['pt-pt'] = "";
|
||||||
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
||||||
$apps[$x]['menu'][0]['uuid'] = "a1144e12-873e-4722-9818-02da1adb6ba3";
|
$apps[$x]['menu'][0]['uuid'] = "a1144e12-873e-4722-9818-02da1adb6ba3";
|
||||||
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||||
$apps[$x]['menu'][0]['category'] = "internal";
|
$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
$apps[$x]['menu'][0]['path'] = "/app/calls/calls.php";
|
$apps[$x]['menu'][0]['path'] = "/app/calls/calls.php";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "user";
|
$apps[$x]['menu'][0]['groups'][] = "user";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "admin";
|
$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,44 +1,44 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2010
|
Portions created by the Initial Developer are Copyright (C) 2008-2010
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//process this only one time
|
//process this only one time
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
//set the sip_profiles directory for older installs
|
//set the sip_profiles directory for older installs
|
||||||
if (isset($_SESSION['switch']['gateways']['dir'])) {
|
if (isset($_SESSION['switch']['gateways']['dir'])) {
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->uuid($_SESSION['switch']['gateways']['uuid']);
|
$orm->uuid($_SESSION['switch']['gateways']['uuid']);
|
||||||
$array['default_setting_category'] = 'switch';
|
$array['default_setting_category'] = 'switch';
|
||||||
$array['default_setting_subcategory'] = 'sip_profiles';
|
$array['default_setting_subcategory'] = 'sip_profiles';
|
||||||
$array['default_setting_name'] = 'dir';
|
$array['default_setting_name'] = 'dir';
|
||||||
//$array['default_setting_value'] = '';
|
//$array['default_setting_value'] = '';
|
||||||
//$array['default_setting_enabled'] = 'true';
|
//$array['default_setting_enabled'] = 'true';
|
||||||
$orm->save($array);
|
$orm->save($array);
|
||||||
unset($array);
|
unset($array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+11
-11
@@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//$apps[$x]['menu'][0]['title']['en-us'] = "Users";
|
//$apps[$x]['menu'][0]['title']['en-us'] = "Users";
|
||||||
//$apps[$x]['menu'][0]['uuid'] = "8d4920dc-7077-47ab-86c7-cc377ba2a5f5";
|
//$apps[$x]['menu'][0]['uuid'] = "8d4920dc-7077-47ab-86c7-cc377ba2a5f5";
|
||||||
//$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
//$apps[$x]['menu'][0]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
|
||||||
//$apps[$x]['menu'][0]['category'] = "internal";
|
//$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
//$apps[$x]['menu'][0]['path'] = "/app/meeting_users/meeting_users.php";
|
//$apps[$x]['menu'][0]['path'] = "/app/meeting_users/meeting_users.php";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "user";
|
//$apps[$x]['menu'][0]['groups'][] = "user";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "admin";
|
//$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+442
-442
@@ -1,443 +1,443 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
|
|
||||||
if (permission_exists('operator_panel_view')) {
|
if (permission_exists('operator_panel_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//set user status
|
//set user status
|
||||||
if (isset($_REQUEST['status']) && $_REQUEST['status'] != '') {
|
if (isset($_REQUEST['status']) && $_REQUEST['status'] != '') {
|
||||||
$user_status = check_str($_REQUEST['status']);
|
$user_status = check_str($_REQUEST['status']);
|
||||||
//sql update
|
//sql update
|
||||||
$sql = "update v_users set ";
|
$sql = "update v_users set ";
|
||||||
$sql .= "user_status = '".$user_status."' ";
|
$sql .= "user_status = '".$user_status."' ";
|
||||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
||||||
if (permission_exists("user_account_setting_edit")) {
|
if (permission_exists("user_account_setting_edit")) {
|
||||||
$count = $db->exec(check_sql($sql));
|
$count = $db->exec(check_sql($sql));
|
||||||
}
|
}
|
||||||
|
|
||||||
//if call center app is installed then update the user_status
|
//if call center app is installed then update the user_status
|
||||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/call_center')) {
|
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/call_center')) {
|
||||||
//update the user_status
|
//update the user_status
|
||||||
$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']);
|
||||||
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." '".$user_status."'";
|
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." '".$user_status."'";
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
|
|
||||||
//update the user state
|
//update the user state
|
||||||
$cmd = "api callcenter_config agent set state ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." Waiting";
|
$cmd = "api callcenter_config agent set state ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." Waiting";
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$document['title'] = $text['title-operator_panel'];
|
$document['title'] = $text['title-operator_panel'];
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- virtual_drag function holding elements -->
|
<!-- virtual_drag function holding elements -->
|
||||||
<input type='hidden' class='formfld' id='vd_call_id' value=''>
|
<input type='hidden' class='formfld' id='vd_call_id' value=''>
|
||||||
<input type='hidden' class='formfld' id='vd_ext_from' value=''>
|
<input type='hidden' class='formfld' id='vd_ext_from' value=''>
|
||||||
<input type='hidden' class='formfld' id='vd_ext_to' value=''>
|
<input type='hidden' class='formfld' id='vd_ext_to' value=''>
|
||||||
|
|
||||||
<!-- autocomplete for contact lookup -->
|
<!-- autocomplete for contact lookup -->
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-ui.css">
|
<link rel="stylesheet" type="text/css" href="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-ui.css">
|
||||||
<script language="JavaScript" type="text/javascript" src="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-ui-1.9.2.min.js"></script>
|
<script language="JavaScript" type="text/javascript" src="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-ui-1.9.2.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
//ajax refresh
|
//ajax refresh
|
||||||
var refresh = 1500;
|
var refresh = 1500;
|
||||||
var source_url = 'index_inc.php?' <?php if (isset($_GET['debug'])) { echo " + '&debug'"; } ?>;
|
var source_url = 'index_inc.php?' <?php if (isset($_GET['debug'])) { echo " + '&debug'"; } ?>;
|
||||||
var interval_timer_id;
|
var interval_timer_id;
|
||||||
|
|
||||||
function loadXmlHttp(url, id) {
|
function loadXmlHttp(url, id) {
|
||||||
var f = this;
|
var f = this;
|
||||||
f.xmlHttp = null;
|
f.xmlHttp = null;
|
||||||
/*@cc_on @*/ // used here and below, limits try/catch to those IE browsers that both benefit from and support it
|
/*@cc_on @*/ // used here and below, limits try/catch to those IE browsers that both benefit from and support it
|
||||||
/*@if(@_jscript_version >= 5) // prevents errors in old browsers that barf on try/catch & problems in IE if Active X disabled
|
/*@if(@_jscript_version >= 5) // prevents errors in old browsers that barf on try/catch & problems in IE if Active X disabled
|
||||||
try {f.ie = window.ActiveXObject}catch(e){f.ie = false;}
|
try {f.ie = window.ActiveXObject}catch(e){f.ie = false;}
|
||||||
@end @*/
|
@end @*/
|
||||||
if (window.XMLHttpRequest&&!f.ie||/^http/.test(window.location.href))
|
if (window.XMLHttpRequest&&!f.ie||/^http/.test(window.location.href))
|
||||||
f.xmlHttp = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari, others, IE 7+ when live - this is the standard method
|
f.xmlHttp = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari, others, IE 7+ when live - this is the standard method
|
||||||
else if (/(object)|(function)/.test(typeof createRequest))
|
else if (/(object)|(function)/.test(typeof createRequest))
|
||||||
f.xmlHttp = createRequest(); // ICEBrowser, perhaps others
|
f.xmlHttp = createRequest(); // ICEBrowser, perhaps others
|
||||||
else {
|
else {
|
||||||
f.xmlHttp = null;
|
f.xmlHttp = null;
|
||||||
// Internet Explorer 5 to 6, includes IE 7+ when local //
|
// Internet Explorer 5 to 6, includes IE 7+ when local //
|
||||||
/*@cc_on @*/
|
/*@cc_on @*/
|
||||||
/*@if(@_jscript_version >= 5)
|
/*@if(@_jscript_version >= 5)
|
||||||
try{f.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
|
try{f.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
|
||||||
catch (e){try{f.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){f.xmlHttp=null;}}
|
catch (e){try{f.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){f.xmlHttp=null;}}
|
||||||
@end @*/
|
@end @*/
|
||||||
}
|
}
|
||||||
if(f.xmlHttp != null){
|
if(f.xmlHttp != null){
|
||||||
f.el = document.getElementById(id);
|
f.el = document.getElementById(id);
|
||||||
f.xmlHttp.open("GET",url,true);
|
f.xmlHttp.open("GET",url,true);
|
||||||
f.xmlHttp.onreadystatechange = function(){f.stateChanged();};
|
f.xmlHttp.onreadystatechange = function(){f.stateChanged();};
|
||||||
f.xmlHttp.send(null);
|
f.xmlHttp.send(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadXmlHttp.prototype.stateChanged=function () {
|
loadXmlHttp.prototype.stateChanged=function () {
|
||||||
if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
|
if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
|
||||||
//this.el.innerHTML = this.xmlHttp.responseText;
|
//this.el.innerHTML = this.xmlHttp.responseText;
|
||||||
document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
|
document.getElementById('ajax_reponse').innerHTML = this.xmlHttp.responseText;
|
||||||
}
|
}
|
||||||
|
|
||||||
var requestTime = function() {
|
var requestTime = function() {
|
||||||
var url = source_url;
|
var url = source_url;
|
||||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||||
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
||||||
<?php
|
<?php
|
||||||
if (isset($_GET['debug'])) {
|
if (isset($_GET['debug'])) {
|
||||||
echo "url += '&debug';";
|
echo "url += '&debug';";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
new loadXmlHttp(url, 'ajax_reponse');
|
new loadXmlHttp(url, 'ajax_reponse');
|
||||||
refresh_start();
|
refresh_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.addEventListener) {
|
if (window.addEventListener) {
|
||||||
window.addEventListener('load', requestTime, false);
|
window.addEventListener('load', requestTime, false);
|
||||||
}
|
}
|
||||||
else if (window.attachEvent) {
|
else if (window.attachEvent) {
|
||||||
window.attachEvent('onload', requestTime);
|
window.attachEvent('onload', requestTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//drag/drop functionality
|
//drag/drop functionality
|
||||||
var ie_workaround = false;
|
var ie_workaround = false;
|
||||||
|
|
||||||
function drag(ev, from_ext) {
|
function drag(ev, from_ext) {
|
||||||
refresh_stop();
|
refresh_stop();
|
||||||
try {
|
try {
|
||||||
ev.dataTransfer.setData("Call", ev.target.id);
|
ev.dataTransfer.setData("Call", ev.target.id);
|
||||||
ev.dataTransfer.setData("From", from_ext);
|
ev.dataTransfer.setData("From", from_ext);
|
||||||
virtual_drag_reset();
|
virtual_drag_reset();
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
// likely internet explorer being used, do workaround
|
// likely internet explorer being used, do workaround
|
||||||
virtual_drag(ev.target.id, from_ext);
|
virtual_drag(ev.target.id, from_ext);
|
||||||
ie_workaround = true;
|
ie_workaround = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function allowDrop(ev, target_id) {
|
function allowDrop(ev, target_id) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function discardDrop(ev, target_id) {
|
function discardDrop(ev, target_id) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function drop(ev, to_ext) {
|
function drop(ev, to_ext) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
if (ie_workaround) { // potentially set on drag() function above
|
if (ie_workaround) { // potentially set on drag() function above
|
||||||
var call_id = document.getElementById('vd_call_id').value;
|
var call_id = document.getElementById('vd_call_id').value;
|
||||||
var from_ext = document.getElementById('vd_ext_from').value;
|
var from_ext = document.getElementById('vd_ext_from').value;
|
||||||
virtual_drag_reset();
|
virtual_drag_reset();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var call_id = ev.dataTransfer.getData("Call");
|
var call_id = ev.dataTransfer.getData("Call");
|
||||||
var from_ext = ev.dataTransfer.getData("From");
|
var from_ext = ev.dataTransfer.getData("From");
|
||||||
}
|
}
|
||||||
var to_ext = to_ext;
|
var to_ext = to_ext;
|
||||||
var cmd;
|
var cmd;
|
||||||
|
|
||||||
if (call_id != '') {
|
if (call_id != '') {
|
||||||
cmd = get_transfer_cmd(call_id, to_ext); //transfer a call
|
cmd = get_transfer_cmd(call_id, to_ext); //transfer a call
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (from_ext != to_ext) { // prevent user from dragging extention onto self
|
if (from_ext != to_ext) { // prevent user from dragging extention onto self
|
||||||
cmd = get_originate_cmd(from_ext+'@<?php echo $_SESSION["domain_name"]?>', to_ext); //make a call
|
cmd = get_originate_cmd(from_ext+'@<?php echo $_SESSION["domain_name"]?>', to_ext); //make a call
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd != '') { send_cmd('exec.php?cmd='+escape(cmd)); }
|
if (cmd != '') { send_cmd('exec.php?cmd='+escape(cmd)); }
|
||||||
|
|
||||||
refresh_start();
|
refresh_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
//refresh controls
|
//refresh controls
|
||||||
function refresh_stop() {
|
function refresh_stop() {
|
||||||
clearInterval(interval_timer_id);
|
clearInterval(interval_timer_id);
|
||||||
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<img src='resources/images/refresh_paused.png' style='width: 16px; height: 16px; border: none; margin-top: 1px; cursor: pointer;' onclick='refresh_start();' alt=\"<?php echo $text['label-refresh_enable']?>\" title=\"<?php echo $text['label-refresh_enable']?>\">"; }
|
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<img src='resources/images/refresh_paused.png' style='width: 16px; height: 16px; border: none; margin-top: 1px; cursor: pointer;' onclick='refresh_start();' alt=\"<?php echo $text['label-refresh_enable']?>\" title=\"<?php echo $text['label-refresh_enable']?>\">"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh_start() {
|
function refresh_start() {
|
||||||
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<img src='resources/images/refresh_active.gif' style='width: 16px; height: 16px; border: none; margin-top: 3px; cursor: pointer;' alt=\"<?php echo $text['label-refresh_pause']?>\" title=\"<?php echo $text['label-refresh_pause']?>\">"; }
|
if (document.getElementById('refresh_state')) { document.getElementById('refresh_state').innerHTML = "<img src='resources/images/refresh_active.gif' style='width: 16px; height: 16px; border: none; margin-top: 3px; cursor: pointer;' alt=\"<?php echo $text['label-refresh_pause']?>\" title=\"<?php echo $text['label-refresh_pause']?>\">"; }
|
||||||
refresh_stop();
|
refresh_stop();
|
||||||
interval_timer_id = setInterval( function() {
|
interval_timer_id = setInterval( function() {
|
||||||
url = source_url;
|
url = source_url;
|
||||||
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
|
||||||
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
|
||||||
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
|
||||||
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
|
||||||
<?php
|
<?php
|
||||||
if (isset($_GET['debug'])) {
|
if (isset($_GET['debug'])) {
|
||||||
echo "url += '&debug';";
|
echo "url += '&debug';";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
new loadXmlHttp(url, 'ajax_reponse');
|
new loadXmlHttp(url, 'ajax_reponse');
|
||||||
}, refresh);
|
}, refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
//call or transfer to destination
|
//call or transfer to destination
|
||||||
function go_destination(from_ext, destination, which, call_id) {
|
function go_destination(from_ext, destination, which, call_id) {
|
||||||
call_id = typeof call_id !== 'undefined' ? call_id : '';
|
call_id = typeof call_id !== 'undefined' ? call_id : '';
|
||||||
if (destination != '') {
|
if (destination != '') {
|
||||||
if (!isNaN(parseFloat(destination)) && isFinite(destination)) {
|
if (!isNaN(parseFloat(destination)) && isFinite(destination)) {
|
||||||
if (call_id == '') {
|
if (call_id == '') {
|
||||||
cmd = get_originate_cmd(from_ext+'@<?php echo $_SESSION["domain_name"]?>', destination); //make a call
|
cmd = get_originate_cmd(from_ext+'@<?php echo $_SESSION["domain_name"]?>', destination); //make a call
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cmd = get_transfer_cmd(call_id, destination);
|
cmd = get_transfer_cmd(call_id, destination);
|
||||||
}
|
}
|
||||||
if (cmd != '') {
|
if (cmd != '') {
|
||||||
send_cmd('exec.php?cmd='+escape(cmd));
|
send_cmd('exec.php?cmd='+escape(cmd));
|
||||||
$('#destination_'+from_ext+'_'+which).removeAttr('onblur');
|
$('#destination_'+from_ext+'_'+which).removeAttr('onblur');
|
||||||
toggle_destination(from_ext, which);
|
toggle_destination(from_ext, which);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//kill call
|
//kill call
|
||||||
function kill_call(call_id) {
|
function kill_call(call_id) {
|
||||||
if (call_id != '') {
|
if (call_id != '') {
|
||||||
cmd = 'uuid_kill ' + call_id;
|
cmd = 'uuid_kill ' + call_id;
|
||||||
send_cmd('exec.php?cmd='+escape(cmd));
|
send_cmd('exec.php?cmd='+escape(cmd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//eavesdrop call
|
//eavesdrop call
|
||||||
function eavesdrop_call(ext, chan_uuid) {
|
function eavesdrop_call(ext, chan_uuid) {
|
||||||
if (ext != '' && chan_uuid != '') {
|
if (ext != '' && chan_uuid != '') {
|
||||||
cmd = get_eavesdrop_cmd(ext, chan_uuid);
|
cmd = get_eavesdrop_cmd(ext, chan_uuid);
|
||||||
if (cmd != '') {
|
if (cmd != '') {
|
||||||
send_cmd('exec.php?cmd='+escape(cmd));
|
send_cmd('exec.php?cmd='+escape(cmd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//record call
|
//record call
|
||||||
function record_call(chan_uuid) {
|
function record_call(chan_uuid) {
|
||||||
if (chan_uuid != '') {
|
if (chan_uuid != '') {
|
||||||
cmd = get_record_cmd(chan_uuid);
|
cmd = get_record_cmd(chan_uuid);
|
||||||
if (cmd != '') {
|
if (cmd != '') {
|
||||||
send_cmd('exec.php?cmd='+escape(cmd));
|
send_cmd('exec.php?cmd='+escape(cmd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//used by call control and ajax refresh functions
|
//used by call control and ajax refresh functions
|
||||||
function send_cmd(url) {
|
function send_cmd(url) {
|
||||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
}
|
}
|
||||||
else {// code for IE6, IE5
|
else {// code for IE6, IE5
|
||||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
xmlhttp.open("GET",url,false);
|
xmlhttp.open("GET",url,false);
|
||||||
xmlhttp.send(null);
|
xmlhttp.send(null);
|
||||||
document.getElementById('cmd_reponse').innerHTML=xmlhttp.responseText;
|
document.getElementById('cmd_reponse').innerHTML=xmlhttp.responseText;
|
||||||
}
|
}
|
||||||
|
|
||||||
//hide/show destination input field
|
//hide/show destination input field
|
||||||
function toggle_destination(ext, which) {
|
function toggle_destination(ext, which) {
|
||||||
refresh_stop();
|
refresh_stop();
|
||||||
if (which == 'call') {
|
if (which == 'call') {
|
||||||
if ($('#destination_'+ext+'_call').is(':visible')) {
|
if ($('#destination_'+ext+'_call').is(':visible')) {
|
||||||
$('#destination_'+ext+'_call').val('');
|
$('#destination_'+ext+'_call').val('');
|
||||||
$('#destination_'+ext+'_call').autocomplete('destroy');
|
$('#destination_'+ext+'_call').autocomplete('destroy');
|
||||||
$('#destination_'+ext+'_call').hide(0, function() {
|
$('#destination_'+ext+'_call').hide(0, function() {
|
||||||
$('.call_control').children().attr('onmouseout', "refresh_start();");
|
$('.call_control').children().attr('onmouseout', "refresh_start();");
|
||||||
$('.destination_control').attr('onmouseout', "refresh_start();");
|
$('.destination_control').attr('onmouseout', "refresh_start();");
|
||||||
refresh_start();
|
refresh_start();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#destination_'+ext+'_call').show(0, function() {
|
$('#destination_'+ext+'_call').show(0, function() {
|
||||||
$('#destination_'+ext+'_call').focus();
|
$('#destination_'+ext+'_call').focus();
|
||||||
$('#destination_'+ext+'_call').autocomplete({
|
$('#destination_'+ext+'_call').autocomplete({
|
||||||
source: "autocomplete.php",
|
source: "autocomplete.php",
|
||||||
minLength: 3,
|
minLength: 3,
|
||||||
select: function(event, ui) {
|
select: function(event, ui) {
|
||||||
$('#destination_'+ext+'_call').val(ui.item.value);
|
$('#destination_'+ext+'_call').val(ui.item.value);
|
||||||
$('#frm_destination_'+ext+'_call').submit();
|
$('#frm_destination_'+ext+'_call').submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.call_control').children().removeAttr('onmouseout');
|
$('.call_control').children().removeAttr('onmouseout');
|
||||||
$('.destination_control').removeAttr('onmouseout');
|
$('.destination_control').removeAttr('onmouseout');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (which == 'transfer') {
|
else if (which == 'transfer') {
|
||||||
if ($('#destination_'+ext+'_transfer').is(':visible')) {
|
if ($('#destination_'+ext+'_transfer').is(':visible')) {
|
||||||
$('#destination_'+ext+'_transfer').val('');
|
$('#destination_'+ext+'_transfer').val('');
|
||||||
$('#destination_'+ext+'_transfer').autocomplete('destroy');
|
$('#destination_'+ext+'_transfer').autocomplete('destroy');
|
||||||
$('#destination_'+ext+'_transfer').hide(0, function() {
|
$('#destination_'+ext+'_transfer').hide(0, function() {
|
||||||
$('#op_caller_details_'+ext).show();
|
$('#op_caller_details_'+ext).show();
|
||||||
$('.call_control').children().attr('onmouseout', "refresh_start();");
|
$('.call_control').children().attr('onmouseout', "refresh_start();");
|
||||||
$('.destination_control').attr('onmouseout', "refresh_start();");
|
$('.destination_control').attr('onmouseout', "refresh_start();");
|
||||||
refresh_start();
|
refresh_start();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#op_caller_details_'+ext).hide(0, function() {
|
$('#op_caller_details_'+ext).hide(0, function() {
|
||||||
$('#destination_'+ext+'_transfer').show(0, function() {
|
$('#destination_'+ext+'_transfer').show(0, function() {
|
||||||
$('#destination_'+ext+'_transfer').focus();
|
$('#destination_'+ext+'_transfer').focus();
|
||||||
$('#destination_'+ext+'_transfer').autocomplete({
|
$('#destination_'+ext+'_transfer').autocomplete({
|
||||||
source: "autocomplete.php",
|
source: "autocomplete.php",
|
||||||
minLength: 3,
|
minLength: 3,
|
||||||
select: function(event, ui) {
|
select: function(event, ui) {
|
||||||
$('#destination_'+ext+'_transfer').val(ui.item.value);
|
$('#destination_'+ext+'_transfer').val(ui.item.value);
|
||||||
$('#frm_destination_'+ext+'_transfer').submit();
|
$('#frm_destination_'+ext+'_transfer').submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.call_control').children().removeAttr('onmouseout');
|
$('.call_control').children().removeAttr('onmouseout');
|
||||||
$('.destination_control').removeAttr('onmouseout');
|
$('.destination_control').removeAttr('onmouseout');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_transfer_cmd(uuid, destination) {
|
function get_transfer_cmd(uuid, destination) {
|
||||||
cmd = "uuid_transfer " + uuid + " " + destination + " XML <?php echo trim($_SESSION['user_context'])?>";
|
cmd = "uuid_transfer " + uuid + " " + destination + " XML <?php echo trim($_SESSION['user_context'])?>";
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_originate_cmd(source, destination) {
|
function get_originate_cmd(source, destination) {
|
||||||
cmd = "bgapi originate {sip_auto_answer=true,origination_caller_id_number=" + destination + ",sip_h_Call-Info=_undef_}user/" + source + " " + destination + " XML <?php echo trim($_SESSION['user_context'])?>";
|
cmd = "bgapi originate {sip_auto_answer=true,origination_caller_id_number=" + destination + ",sip_h_Call-Info=_undef_}user/" + source + " " + destination + " XML <?php echo trim($_SESSION['user_context'])?>";
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_eavesdrop_cmd(ext, chan_uuid) {
|
function get_eavesdrop_cmd(ext, chan_uuid) {
|
||||||
cmd = "bgapi originate {origination_caller_id_name=<?php echo $text['label-eavesdrop']?>,origination_caller_id_number=" + ext + "}user/"+(document.getElementById('eavesdrop_dest').value)+"@<?php echo $_SESSION['domain_name']?> &eavesdrop(" + chan_uuid + ")";
|
cmd = "bgapi originate {origination_caller_id_name=<?php echo $text['label-eavesdrop']?>,origination_caller_id_number=" + ext + "}user/"+(document.getElementById('eavesdrop_dest').value)+"@<?php echo $_SESSION['domain_name']?> &eavesdrop(" + chan_uuid + ")";
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_record_cmd(uuid) {
|
function get_record_cmd(uuid) {
|
||||||
cmd = "uuid_record " + uuid + " start <?php echo $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']; ?>/archive/<?php echo date('Y')?>/<?php echo date('M')?>/<?php echo date('d')?>/" + uuid + ".wav";
|
cmd = "uuid_record " + uuid + " start <?php echo $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']; ?>/archive/<?php echo date('Y')?>/<?php echo date('M')?>/<?php echo date('d')?>/" + uuid + ".wav";
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
//virtual functions
|
//virtual functions
|
||||||
function virtual_drag(call_id, ext) {
|
function virtual_drag(call_id, ext) {
|
||||||
if (document.getElementById('vd_ext_from').value != '' && document.getElementById('vd_ext_to').value != '') {
|
if (document.getElementById('vd_ext_from').value != '' && document.getElementById('vd_ext_to').value != '') {
|
||||||
virtual_drag_reset();
|
virtual_drag_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (call_id != '') {
|
if (call_id != '') {
|
||||||
document.getElementById('vd_call_id').value = call_id;
|
document.getElementById('vd_call_id').value = call_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ext != '') {
|
if (ext != '') {
|
||||||
if (document.getElementById('vd_ext_from').value == '') {
|
if (document.getElementById('vd_ext_from').value == '') {
|
||||||
document.getElementById('vd_ext_from').value = ext;
|
document.getElementById('vd_ext_from').value = ext;
|
||||||
document.getElementById(ext).style.borderStyle = 'dotted';
|
document.getElementById(ext).style.borderStyle = 'dotted';
|
||||||
if (document.getElementById('vd_ext_to').value != '') {
|
if (document.getElementById('vd_ext_to').value != '') {
|
||||||
document.getElementById(document.getElementById('vd_ext_to').value).style.borderStyle = '';
|
document.getElementById(document.getElementById('vd_ext_to').value).style.borderStyle = '';
|
||||||
document.getElementById('vd_ext_to').value = '';
|
document.getElementById('vd_ext_to').value = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.getElementById('vd_ext_to').value = ext;
|
document.getElementById('vd_ext_to').value = ext;
|
||||||
if (document.getElementById('vd_ext_from').value != document.getElementById('vd_ext_to').value) {
|
if (document.getElementById('vd_ext_from').value != document.getElementById('vd_ext_to').value) {
|
||||||
if (document.getElementById('vd_call_id').value != '') {
|
if (document.getElementById('vd_call_id').value != '') {
|
||||||
cmd = get_transfer_cmd(document.getElementById('vd_call_id').value, document.getElementById('vd_ext_to').value); //transfer a call
|
cmd = get_transfer_cmd(document.getElementById('vd_call_id').value, document.getElementById('vd_ext_to').value); //transfer a call
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cmd = get_originate_cmd(document.getElementById('vd_ext_from').value + '@<?php echo $_SESSION["domain_name"]?>', document.getElementById('vd_ext_to').value); //originate a call
|
cmd = get_originate_cmd(document.getElementById('vd_ext_from').value + '@<?php echo $_SESSION["domain_name"]?>', document.getElementById('vd_ext_to').value); //originate a call
|
||||||
}
|
}
|
||||||
if (cmd != '') {
|
if (cmd != '') {
|
||||||
//alert(cmd);
|
//alert(cmd);
|
||||||
send_cmd('exec.php?cmd='+escape(cmd));
|
send_cmd('exec.php?cmd='+escape(cmd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual_drag_reset();
|
virtual_drag_reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function virtual_drag_reset(vd_var) {
|
function virtual_drag_reset(vd_var) {
|
||||||
if (!(vd_var === undefined)) {
|
if (!(vd_var === undefined)) {
|
||||||
document.getElementById(vd_var).value = '';
|
document.getElementById(vd_var).value = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.getElementById('vd_call_id').value = '';
|
document.getElementById('vd_call_id').value = '';
|
||||||
if (document.getElementById('vd_ext_from').value != '') {
|
if (document.getElementById('vd_ext_from').value != '') {
|
||||||
document.getElementById(document.getElementById('vd_ext_from').value).style.borderStyle = '';
|
document.getElementById(document.getElementById('vd_ext_from').value).style.borderStyle = '';
|
||||||
document.getElementById('vd_ext_from').value = '';
|
document.getElementById('vd_ext_from').value = '';
|
||||||
}
|
}
|
||||||
if (document.getElementById('vd_ext_to').value != '') {
|
if (document.getElementById('vd_ext_to').value != '') {
|
||||||
document.getElementById(document.getElementById('vd_ext_to').value).style.borderStyle = '';
|
document.getElementById(document.getElementById('vd_ext_to').value).style.borderStyle = '';
|
||||||
document.getElementById('vd_ext_to').value = '';
|
document.getElementById('vd_ext_to').value = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
TABLE {
|
TABLE {
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
//create simple array of users own extensions
|
//create simple array of users own extensions
|
||||||
unset($_SESSION['user']['extensions']);
|
unset($_SESSION['user']['extensions']);
|
||||||
foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
|
foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
|
||||||
$_SESSION['user']['extensions'][] = $assigned_extensions['user'];
|
$_SESSION['user']['extensions'][] = $assigned_extensions['user'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id='ajax_reponse'></div>
|
<div id='ajax_reponse'></div>
|
||||||
<div id='cmd_reponse' style='display: none;'></div>
|
<div id='cmd_reponse' style='display: none;'></div>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
+450
-450
@@ -1,450 +1,450 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
require_once "./resources/functions/get_call_activity.php";
|
require_once "./resources/functions/get_call_activity.php";
|
||||||
if (permission_exists('operator_panel_view')) {
|
if (permission_exists('operator_panel_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
$activity = get_call_activity();
|
$activity = get_call_activity();
|
||||||
|
|
||||||
foreach ($activity as $extension => $fields) {
|
foreach ($activity as $extension => $fields) {
|
||||||
if (substr_count($fields['call_group'], ',')) {
|
if (substr_count($fields['call_group'], ',')) {
|
||||||
$tmp = explode(',', $fields['call_group']);
|
$tmp = explode(',', $fields['call_group']);
|
||||||
foreach ($tmp as $tmp_index => $tmp_value) {
|
foreach ($tmp as $tmp_index => $tmp_value) {
|
||||||
if (trim($tmp_value) == '') { unset($tmp[$tmp_index]); }
|
if (trim($tmp_value) == '') { unset($tmp[$tmp_index]); }
|
||||||
else { $groups[] = $tmp_value; }
|
else { $groups[] = $tmp_value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($fields['call_group'] != '') {
|
else if ($fields['call_group'] != '') {
|
||||||
$groups[] = $fields['call_group'];
|
$groups[] = $fields['call_group'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$groups = array_unique($groups);
|
$groups = array_unique($groups);
|
||||||
sort($groups);
|
sort($groups);
|
||||||
|
|
||||||
$onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'";
|
$onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'";
|
||||||
|
|
||||||
echo "<table width='100%'>";
|
echo "<table width='100%'>";
|
||||||
echo " <tr>";
|
echo " <tr>";
|
||||||
echo " <td valign='top' align='left' width='50%' nowrap>";
|
echo " <td valign='top' align='left' width='50%' nowrap>";
|
||||||
echo " <b>".$text['title-operator_panel']."</b>";
|
echo " <b>".$text['title-operator_panel']."</b>";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td valign='top' align='center' nowrap>";
|
echo " <td valign='top' align='center' nowrap>";
|
||||||
|
|
||||||
if (sizeof($_SESSION['user']['extensions']) > 0) {
|
if (sizeof($_SESSION['user']['extensions']) > 0) {
|
||||||
$status_options[1]['status'] = "Available";
|
$status_options[1]['status'] = "Available";
|
||||||
$status_options[1]['label'] = $text['label-status_available'];
|
$status_options[1]['label'] = $text['label-status_available'];
|
||||||
$status_options[1]['style'] = "op_btn_status_available";
|
$status_options[1]['style'] = "op_btn_status_available";
|
||||||
if (permission_exists('operator_panel_on_demand')) {
|
if (permission_exists('operator_panel_on_demand')) {
|
||||||
$status_options[2]['status'] = "Available (On Demand)";
|
$status_options[2]['status'] = "Available (On Demand)";
|
||||||
$status_options[2]['label'] = $text['label-status_on_demand'];
|
$status_options[2]['label'] = $text['label-status_on_demand'];
|
||||||
$status_options[2]['style'] = "op_btn_status_available_on_demand";
|
$status_options[2]['style'] = "op_btn_status_available_on_demand";
|
||||||
}
|
}
|
||||||
$status_options[3]['status'] = "On Break";
|
$status_options[3]['status'] = "On Break";
|
||||||
$status_options[3]['label'] = $text['label-status_on_break'];
|
$status_options[3]['label'] = $text['label-status_on_break'];
|
||||||
$status_options[3]['style'] = "op_btn_status_on_break";
|
$status_options[3]['style'] = "op_btn_status_on_break";
|
||||||
$status_options[4]['status'] = "Do Not Disturb";
|
$status_options[4]['status'] = "Do Not Disturb";
|
||||||
$status_options[4]['label'] = $text['label-status_do_not_disturb'];
|
$status_options[4]['label'] = $text['label-status_do_not_disturb'];
|
||||||
$status_options[4]['style'] = "op_btn_status_do_not_disturb";
|
$status_options[4]['style'] = "op_btn_status_do_not_disturb";
|
||||||
$status_options[5]['status'] = "Logged Out";
|
$status_options[5]['status'] = "Logged Out";
|
||||||
$status_options[5]['label'] = $text['label-status_logged_out'];
|
$status_options[5]['label'] = $text['label-status_logged_out'];
|
||||||
$status_options[5]['style'] = "op_btn_status_logged_out";
|
$status_options[5]['style'] = "op_btn_status_logged_out";
|
||||||
|
|
||||||
foreach ($status_options as $status_option) {
|
foreach ($status_options as $status_option) {
|
||||||
echo " <input type='button' id='".$status_option['style']."' class='btn' value=\"".$status_option['label']."\" onclick=\"send_cmd('index.php?status='+escape('".$status_option['status']."')); this.disabled='disabled'; refresh_start();\" ".$onhover_pause_refresh.">\n";
|
echo " <input type='button' id='".$status_option['style']."' class='btn' value=\"".$status_option['label']."\" onclick=\"send_cmd('index.php?status='+escape('".$status_option['status']."')); this.disabled='disabled'; refresh_start();\" ".$onhover_pause_refresh.">\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td valign='top' align='right' width='50%' nowrap>";
|
echo " <td valign='top' align='right' width='50%' nowrap>";
|
||||||
echo " <table cellpadding='0' cellspacing='0' border='0'>";
|
echo " <table cellpadding='0' cellspacing='0' border='0'>";
|
||||||
echo " <tr>";
|
echo " <tr>";
|
||||||
echo " <td valign='middle' nowrap='nowrap' style='padding-right: 15px' id='refresh_state'>";
|
echo " <td valign='middle' nowrap='nowrap' style='padding-right: 15px' id='refresh_state'>";
|
||||||
echo " <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 " <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>";
|
||||||
|
|
||||||
if (permission_exists('operator_panel_eavesdrop')) {
|
if (permission_exists('operator_panel_eavesdrop')) {
|
||||||
echo " <td valign='top' nowrap='nowrap'>";
|
echo " <td valign='top' nowrap='nowrap'>";
|
||||||
if (sizeof($_SESSION['user']['extensions']) > 1) {
|
if (sizeof($_SESSION['user']['extensions']) > 1) {
|
||||||
echo " <input type='hidden' id='eavesdrop_dest' value=\"".(($_REQUEST['eavesdrop_dest'] == '') ? $_SESSION['user']['extension'][0]['destination'] : $_REQUEST['eavesdrop_dest'])."\">";
|
echo " <input type='hidden' id='eavesdrop_dest' value=\"".(($_REQUEST['eavesdrop_dest'] == '') ? $_SESSION['user']['extension'][0]['destination'] : $_REQUEST['eavesdrop_dest'])."\">";
|
||||||
echo " <img src='resources/images/eavesdrop.png' style='width: 12px; height: 12px; border: none; margin: 0px 5px; cursor: help;' title='".$text['description-eavesdrop_destination']."' align='absmiddle'>";
|
echo " <img src='resources/images/eavesdrop.png' style='width: 12px; height: 12px; border: none; margin: 0px 5px; cursor: help;' title='".$text['description-eavesdrop_destination']."' align='absmiddle'>";
|
||||||
echo " <select class='formfld' style='margin-right: 5px;' align='absmiddle' onchange=\"document.getElementById('eavesdrop_dest').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
|
echo " <select class='formfld' style='margin-right: 5px;' align='absmiddle' onchange=\"document.getElementById('eavesdrop_dest').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
|
||||||
foreach ($_SESSION['user']['extensions'] as $user_extension) {
|
foreach ($_SESSION['user']['extensions'] as $user_extension) {
|
||||||
echo " <option value='".$user_extension."' ".(($_REQUEST['eavesdrop_dest'] == $user_extension) ? "selected" : null).">".$user_extension."</option>\n";
|
echo " <option value='".$user_extension."' ".(($_REQUEST['eavesdrop_dest'] == $user_extension) ? "selected" : null).">".$user_extension."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
}
|
}
|
||||||
else if (sizeof($_SESSION['user']['extensions']) == 1) {
|
else if (sizeof($_SESSION['user']['extensions']) == 1) {
|
||||||
echo " <input type='hidden' id='eavesdrop_dest' value=\"".$_SESSION['user']['extension'][0]['destination']."\">";
|
echo " <input type='hidden' id='eavesdrop_dest' value=\"".$_SESSION['user']['extension'][0]['destination']."\">";
|
||||||
}
|
}
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($groups) > 0) {
|
if (sizeof($groups) > 0) {
|
||||||
echo " <td valign='top' nowrap='nowrap'>";
|
echo " <td valign='top' nowrap='nowrap'>";
|
||||||
echo " <input type='hidden' id='group' value=\"".$_REQUEST['group']."\">";
|
echo " <input type='hidden' id='group' value=\"".$_REQUEST['group']."\">";
|
||||||
if (sizeof($groups) > 5) {
|
if (sizeof($groups) > 5) {
|
||||||
//show select box
|
//show select box
|
||||||
echo " <select class='formfld' onchange=\"document.getElementById('group').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
|
echo " <select class='formfld' onchange=\"document.getElementById('group').value = this.options[this.selectedIndex].value; refresh_start();\" onfocus='refresh_stop();'>\n";
|
||||||
echo " <option value='' ".(($_REQUEST['group'] == '') ? "selected" : null).">".$text['label-call_group']."</option>";
|
echo " <option value='' ".(($_REQUEST['group'] == '') ? "selected" : null).">".$text['label-call_group']."</option>";
|
||||||
echo " <option value=''>".$text['button-all']."</option>";
|
echo " <option value=''>".$text['button-all']."</option>";
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
echo " <option value='".$group."' ".(($_REQUEST['group'] == $group) ? "selected" : null).">".$group."</option>\n";
|
echo " <option value='".$group."' ".(($_REQUEST['group'] == $group) ? "selected" : null).">".$group."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//show buttons
|
//show buttons
|
||||||
echo " <input type='button' class='btn' title=\"".$text['label-call_group']."\" value=\"".$text['button-all']."\" onclick=\"document.getElementById('group').value = '';\" ".$onhover_pause_refresh.">";
|
echo " <input type='button' class='btn' title=\"".$text['label-call_group']."\" value=\"".$text['button-all']."\" onclick=\"document.getElementById('group').value = '';\" ".$onhover_pause_refresh.">";
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
echo " <input type='button' class='btn' title=\"".$text['label-call_group']."\" value=\"".$group."\" ".(($_REQUEST['group'] == $group) ? "disabled='disabled'" : null)." onclick=\"document.getElementById('group').value = this.value;\" ".$onhover_pause_refresh.">";
|
echo " <input type='button' class='btn' title=\"".$text['label-call_group']."\" value=\"".$group."\" ".(($_REQUEST['group'] == $group) ? "disabled='disabled'" : null)." onclick=\"document.getElementById('group').value = this.value;\" ".$onhover_pause_refresh.">";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo " </table>";
|
echo " </table>";
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
|
||||||
foreach ($activity as $extension => $ext) {
|
foreach ($activity as $extension => $ext) {
|
||||||
unset($block);
|
unset($block);
|
||||||
|
|
||||||
//filter by group, if defined
|
//filter by group, if defined
|
||||||
if ($_REQUEST['group'] != '' && substr_count($ext['call_group'], $_REQUEST['group']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; }
|
if ($_REQUEST['group'] != '' && substr_count($ext['call_group'], $_REQUEST['group']) == 0 && !in_array($extension, $_SESSION['user']['extensions'])) { continue; }
|
||||||
|
|
||||||
//check if feature code being called
|
//check if feature code being called
|
||||||
$format_number = (substr($ext['dest'], 0, 1) == '*') ? false : true;
|
$format_number = (substr($ext['dest'], 0, 1) == '*') ? false : true;
|
||||||
|
|
||||||
//determine extension state, direction icon, and displayed name/number for caller/callee
|
//determine extension state, direction icon, and displayed name/number for caller/callee
|
||||||
if ($ext['state'] == 'CS_EXECUTE') {
|
if ($ext['state'] == 'CS_EXECUTE') {
|
||||||
if (($ext['callstate'] == 'RINGING' || $ext['callstate'] == 'EARLY' || $ext['callstate'] == 'RING_WAIT') && $ext['direction'] == 'inbound') {
|
if (($ext['callstate'] == 'RINGING' || $ext['callstate'] == 'EARLY' || $ext['callstate'] == 'RING_WAIT') && $ext['direction'] == 'inbound') {
|
||||||
$ext_state = 'ringing';
|
$ext_state = 'ringing';
|
||||||
}
|
}
|
||||||
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
}
|
}
|
||||||
else if ($ext['callstate'] == 'RING_WAIT' && $ext['direction'] == 'outbound') {
|
else if ($ext['callstate'] == 'RING_WAIT' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'ringing';
|
$ext_state = 'ringing';
|
||||||
}
|
}
|
||||||
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'inbound') {
|
else if ($ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'inbound') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
}
|
}
|
||||||
if (!$format_number) {
|
if (!$format_number) {
|
||||||
$call_name = 'System';
|
$call_name = 'System';
|
||||||
$call_number = $ext['dest'];
|
$call_number = $ext['dest'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
|
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
|
||||||
$call_number = format_phone($ext['dest']);
|
$call_number = format_phone($ext['dest']);
|
||||||
}
|
}
|
||||||
$dir_icon = 'outbound';
|
$dir_icon = 'outbound';
|
||||||
}
|
}
|
||||||
else if ($ext['state'] == 'CS_HIBERNATE') {
|
else if ($ext['state'] == 'CS_HIBERNATE') {
|
||||||
if ($ext['callstate'] == 'ACTIVE') {
|
if ($ext['callstate'] == 'ACTIVE') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
if ($ext['direction'] == 'inbound') {
|
if ($ext['direction'] == 'inbound') {
|
||||||
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
|
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
|
||||||
$call_number = format_phone($ext['dest']);
|
$call_number = format_phone($ext['dest']);
|
||||||
$dir_icon = 'outbound';
|
$dir_icon = 'outbound';
|
||||||
}
|
}
|
||||||
else if ($ext['direction'] == 'outbound') {
|
else if ($ext['direction'] == 'outbound') {
|
||||||
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
||||||
$call_number = format_phone($ext['cid_num']);
|
$call_number = format_phone($ext['cid_num']);
|
||||||
$dir_icon = 'inbound';
|
$dir_icon = 'inbound';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($ext['state'] == 'CS_CONSUME_MEDIA' || $ext['state'] == 'CS_EXCHANGE_MEDIA') {
|
else if ($ext['state'] == 'CS_CONSUME_MEDIA' || $ext['state'] == 'CS_EXCHANGE_MEDIA') {
|
||||||
if ($ext['state'] == 'CS_CONSUME_MEDIA' && $ext['callstate'] == 'RINGING' && $ext['direction'] == 'outbound') {
|
if ($ext['state'] == 'CS_CONSUME_MEDIA' && $ext['callstate'] == 'RINGING' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'ringing';
|
$ext_state = 'ringing';
|
||||||
}
|
}
|
||||||
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
else if ($ext['state'] == 'CS_EXCHANGE_MEDIA' && $ext['callstate'] == 'ACTIVE' && $ext['direction'] == 'outbound') {
|
||||||
$ext_state = 'active';
|
$ext_state = 'active';
|
||||||
}
|
}
|
||||||
$dir_icon = 'inbound';
|
$dir_icon = 'inbound';
|
||||||
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
||||||
$call_number = format_phone($ext['cid_num']);
|
$call_number = format_phone($ext['cid_num']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unset($ext_state, $dir_icon, $call_name, $call_number);
|
unset($ext_state, $dir_icon, $call_name, $call_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
//determine block style by state (if any)
|
//determine block style by state (if any)
|
||||||
$style = ($ext_state != '') ? "op_state_".$ext_state : null;
|
$style = ($ext_state != '') ? "op_state_".$ext_state : null;
|
||||||
|
|
||||||
//determine the call identifier passed on drop
|
//determine the call identifier passed on drop
|
||||||
if ($ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') { // transfer an outbound internal call
|
if ($ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') { // transfer an outbound internal call
|
||||||
$call_identifier = $activity[$call_number]['uuid'];
|
$call_identifier = $activity[$call_number]['uuid'];
|
||||||
}
|
}
|
||||||
else if (($ext['variable_call_direction'] == 'outbound' || $ext['variable_call_direction'] == 'local') && $ext['variable_bridge_uuid'] != '') { // transfer an outbound external call
|
else if (($ext['variable_call_direction'] == 'outbound' || $ext['variable_call_direction'] == 'local') && $ext['variable_bridge_uuid'] != '') { // transfer an outbound external call
|
||||||
$call_identifier = $ext['variable_bridge_uuid'];
|
$call_identifier = $ext['variable_bridge_uuid'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if( $ext['call_uuid'] ) {
|
if( $ext['call_uuid'] ) {
|
||||||
$call_identifier = $ext['call_uuid']; // transfer all other call types
|
$call_identifier = $ext['call_uuid']; // transfer all other call types
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$call_identifier = $ext['uuid']; // e.g. voice menus
|
$call_identifier = $ext['uuid']; // e.g. voice menus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//determine extension draggable state
|
//determine extension draggable state
|
||||||
if (permission_exists('operator_panel_manage')) {
|
if (permission_exists('operator_panel_manage')) {
|
||||||
if (!in_array($extension, $_SESSION['user']['extensions'])) {
|
if (!in_array($extension, $_SESSION['user']['extensions'])) {
|
||||||
//other extension
|
//other extension
|
||||||
if ($ext_state == "ringing") {
|
if ($ext_state == "ringing") {
|
||||||
if ($_GET['vd_ext_from'] == '' && $dir_icon == 'inbound') {
|
if ($_GET['vd_ext_from'] == '' && $dir_icon == 'inbound') {
|
||||||
$draggable = true; // selectable - is ringing and not outbound so can transfer away the call (can set as vd_ext_from)
|
$draggable = true; // selectable - is ringing and not outbound so can transfer away the call (can set as vd_ext_from)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$draggable = false; // unselectable - is ringing so can't send a call to the ext (can't set as vd_ext_to)
|
$draggable = false; // unselectable - is ringing so can't send a call to the ext (can't set as vd_ext_to)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($ext_state == 'active') {
|
else if ($ext_state == 'active') {
|
||||||
$draggable = false; // unselectable - on a call already so can't transfer or send a call to the ext (can't set as vd_ext_from or vd_ext_to)
|
$draggable = false; // unselectable - on a call already so can't transfer or send a call to the ext (can't set as vd_ext_from or vd_ext_to)
|
||||||
}
|
}
|
||||||
else { // idle
|
else { // idle
|
||||||
if ($_GET['vd_ext_from'] == '') {
|
if ($_GET['vd_ext_from'] == '') {
|
||||||
$draggable = false; // unselectable - is idle, but can't initiate a call from the ext as is not assigned to user (can't set as vd_ext_from)
|
$draggable = false; // unselectable - is idle, but can't initiate a call from the ext as is not assigned to user (can't set as vd_ext_from)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$draggable = true; // selectable - is idle, so can transfer a call in to ext (can set as vd_ext_to).
|
$draggable = true; // selectable - is idle, so can transfer a call in to ext (can set as vd_ext_to).
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//user extension
|
//user extension
|
||||||
if ($ext['uuid'] != '' && $ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') {
|
if ($ext['uuid'] != '' && $ext['uuid'] == $ext['call_uuid'] && $ext['variable_bridge_uuid'] == '') {
|
||||||
$draggable = false;
|
$draggable = false;
|
||||||
}
|
}
|
||||||
else if ($ext_state == 'ringing' && $ext['variable_call_direction'] == 'local') {
|
else if ($ext_state == 'ringing' && $ext['variable_call_direction'] == 'local') {
|
||||||
$draggable = false;
|
$draggable = false;
|
||||||
}
|
}
|
||||||
else if ($ext_state != '' && !$format_number) {
|
else if ($ext_state != '' && !$format_number) {
|
||||||
$draggable = false;
|
$draggable = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$draggable = true;
|
$draggable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$draggable = false;
|
$draggable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//determine extension (user) status
|
//determine extension (user) status
|
||||||
$ext_status = (in_array($extension, $_SESSION['user']['extensions'])) ? $ext_user_status[$_SESSION['user_uuid']] : $ext_user_status[$ext['user_uuid']];
|
$ext_status = (in_array($extension, $_SESSION['user']['extensions'])) ? $ext_user_status[$_SESSION['user_uuid']] : $ext_user_status[$ext['user_uuid']];
|
||||||
switch ($ext_status) {
|
switch ($ext_status) {
|
||||||
case "Available" :
|
case "Available" :
|
||||||
$status_icon = "available";
|
$status_icon = "available";
|
||||||
$status_hover = $text['label-status_available'];
|
$status_hover = $text['label-status_available'];
|
||||||
break;
|
break;
|
||||||
case "Available (On Demand)" :
|
case "Available (On Demand)" :
|
||||||
$status_icon = "available_on_demand";
|
$status_icon = "available_on_demand";
|
||||||
$status_hover = $text['label-status_available_on_demand'];
|
$status_hover = $text['label-status_available_on_demand'];
|
||||||
break;
|
break;
|
||||||
case "On Break" :
|
case "On Break" :
|
||||||
$status_icon = "on_break";
|
$status_icon = "on_break";
|
||||||
$status_hover = $text['label-status_on_break'];
|
$status_hover = $text['label-status_on_break'];
|
||||||
break;
|
break;
|
||||||
case "Do Not Disturb" :
|
case "Do Not Disturb" :
|
||||||
$status_icon = "do_not_disturb";
|
$status_icon = "do_not_disturb";
|
||||||
$status_hover = $text['label-status_do_not_disturb'];
|
$status_hover = $text['label-status_do_not_disturb'];
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
$status_icon = "logged_out";
|
$status_icon = "logged_out";
|
||||||
$status_hover = $text['label-status_logged_out_or_unknown'];
|
$status_hover = $text['label-status_logged_out_or_unknown'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$block .= "<div id='".$extension."' class='op_ext ".$style."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ".(($ext_state != 'active' && $ext_state != 'ringing') ? "ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'" : null).">"; // DRAG TO
|
$block .= "<div id='".$extension."' class='op_ext ".$style."' ".(($_GET['vd_ext_from'] == $extension || $_GET['vd_ext_to'] == $extension) ? "style='border-style: dotted;'" : null)." ".(($ext_state != 'active' && $ext_state != 'ringing') ? "ondrop='drop(event, this.id);' ondragover='allowDrop(event, this.id);' ondragleave='discardDrop(event, this.id);'" : null).">"; // DRAG TO
|
||||||
$block .= "<table class='op_ext ".$style."'>";
|
$block .= "<table class='op_ext ".$style."'>";
|
||||||
$block .= " <tr>";
|
$block .= " <tr>";
|
||||||
$block .= " <td class='op_ext_icon'>";
|
$block .= " <td class='op_ext_icon'>";
|
||||||
$block .= " <span name='".$extension."'>"; // DRAG FROM
|
$block .= " <span name='".$extension."'>"; // DRAG FROM
|
||||||
$block .= "<img id='".$call_identifier."' class='op_ext_icon' src='resources/images/status_".$status_icon.".png' title='".$status_hover."' ".(($draggable) ? "draggable='true' ondragstart=\"drag(event, this.parentNode.getAttribute('name'));\" onclick=\"virtual_drag('".$call_identifier."', '".$extension."');\"" : "onfocus='this.blur();' draggable='false' style='cursor: not-allowed;'").">";
|
$block .= "<img id='".$call_identifier."' class='op_ext_icon' src='resources/images/status_".$status_icon.".png' title='".$status_hover."' ".(($draggable) ? "draggable='true' ondragstart=\"drag(event, this.parentNode.getAttribute('name'));\" onclick=\"virtual_drag('".$call_identifier."', '".$extension."');\"" : "onfocus='this.blur();' draggable='false' style='cursor: not-allowed;'").">";
|
||||||
$block .= "</span>";
|
$block .= "</span>";
|
||||||
$block .= " </td>";
|
$block .= " </td>";
|
||||||
$block .= " <td class='op_ext_info ".$style."'>";
|
$block .= " <td class='op_ext_info ".$style."'>";
|
||||||
if ($dir_icon != '') {
|
if ($dir_icon != '') {
|
||||||
$block .= " <img src='resources/images/".$dir_icon.".png' align='right' style='margin-top: 3px; margin-right: 1px; width: 12px; height: 12px; cursor: help;' draggable='false' alt=\"".$text['label-call_direction']."\" title=\"".$text['label-call_direction']."\">";
|
$block .= " <img src='resources/images/".$dir_icon.".png' align='right' style='margin-top: 3px; margin-right: 1px; width: 12px; height: 12px; cursor: help;' draggable='false' alt=\"".$text['label-call_direction']."\" title=\"".$text['label-call_direction']."\">";
|
||||||
}
|
}
|
||||||
$block .= " <span class='op_user_info'>";
|
$block .= " <span class='op_user_info'>";
|
||||||
if ($ext['effective_caller_id_name'] != '' && $ext['effective_caller_id_name'] != $extension) {
|
if ($ext['effective_caller_id_name'] != '' && $ext['effective_caller_id_name'] != $extension) {
|
||||||
$block .= " <strong class='strong'>".$ext['effective_caller_id_name']."</strong> (".$extension.")";
|
$block .= " <strong class='strong'>".$ext['effective_caller_id_name']."</strong> (".$extension.")";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$block .= " <strong class='strong'>".$extension."</strong>";
|
$block .= " <strong class='strong'>".$extension."</strong>";
|
||||||
}
|
}
|
||||||
$block .= " </span><br>";
|
$block .= " </span><br>";
|
||||||
if ($ext_state != '') {
|
if ($ext_state != '') {
|
||||||
$block .= " <span class='op_caller_info'>";
|
$block .= " <span class='op_caller_info'>";
|
||||||
$block .= " <table align='right'><tr><td style='text-align: right;'>";
|
$block .= " <table align='right'><tr><td style='text-align: right;'>";
|
||||||
$block .= " <span class='op_call_info'>".$ext['call_length']."</span><br>";
|
$block .= " <span class='op_call_info'>".$ext['call_length']."</span><br>";
|
||||||
$block .= " <span class='call_control'>";
|
$block .= " <span class='call_control'>";
|
||||||
//record
|
//record
|
||||||
if (permission_exists('operator_panel_record') && $ext_state == 'active') {
|
if (permission_exists('operator_panel_record') && $ext_state == 'active') {
|
||||||
$call_identifier_record = $ext['call_uuid'];
|
$call_identifier_record = $ext['call_uuid'];
|
||||||
$rec_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$call_identifier_record.".wav";
|
$rec_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$call_identifier_record.".wav";
|
||||||
if (file_exists($rec_file)) {
|
if (file_exists($rec_file)) {
|
||||||
$block .= "<img src='resources/images/recording.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: help;' title=\"".$text['label-recording']."\" ".$onhover_pause_refresh.">";
|
$block .= "<img src='resources/images/recording.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: help;' title=\"".$text['label-recording']."\" ".$onhover_pause_refresh.">";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$block .= "<img src='resources/images/record.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' title=\"".$text['label-record']."\" onclick=\"record_call('".$call_identifier_record."');\" ".$onhover_pause_refresh.">";
|
$block .= "<img src='resources/images/record.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' title=\"".$text['label-record']."\" onclick=\"record_call('".$call_identifier_record."');\" ".$onhover_pause_refresh.">";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//eavesdrop
|
//eavesdrop
|
||||||
if (permission_exists('operator_panel_eavesdrop') && $ext_state == 'active' && sizeof($_SESSION['user']['extensions']) > 0 && !in_array($extension, $_SESSION['user']['extensions'])) {
|
if (permission_exists('operator_panel_eavesdrop') && $ext_state == 'active' && sizeof($_SESSION['user']['extensions']) > 0 && !in_array($extension, $_SESSION['user']['extensions'])) {
|
||||||
$block .= "<img src='resources/images/eavesdrop.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' title='".$text['label-eavesdrop']."' onclick=\"eavesdrop_call('".$ext['destination']."','".$call_identifier."');\" ".$onhover_pause_refresh.">";
|
$block .= "<img src='resources/images/eavesdrop.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' title='".$text['label-eavesdrop']."' onclick=\"eavesdrop_call('".$ext['destination']."','".$call_identifier."');\" ".$onhover_pause_refresh.">";
|
||||||
}
|
}
|
||||||
//kill
|
//kill
|
||||||
if (permission_exists('operator_panel_kill') || in_array($extension, $_SESSION['user']['extensions'])) {
|
if (permission_exists('operator_panel_kill') || in_array($extension, $_SESSION['user']['extensions'])) {
|
||||||
if ($ext['variable_bridge_uuid'] == '' && $ext_state == 'ringing') {
|
if ($ext['variable_bridge_uuid'] == '' && $ext_state == 'ringing') {
|
||||||
$call_identifier_kill = $ext['uuid'];
|
$call_identifier_kill = $ext['uuid'];
|
||||||
}
|
}
|
||||||
else if ($dir_icon == 'outbound') {
|
else if ($dir_icon == 'outbound') {
|
||||||
$call_identifier_kill = $ext['uuid'];
|
$call_identifier_kill = $ext['uuid'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$call_identifier_kill = $call_identifier;
|
$call_identifier_kill = $call_identifier;
|
||||||
}
|
}
|
||||||
$block .= "<img src='resources/images/kill.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' title='".$text['label-kill']."' onclick=\"kill_call('".$call_identifier_kill."');\" ".$onhover_pause_refresh.">";
|
$block .= "<img src='resources/images/kill.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' title='".$text['label-kill']."' onclick=\"kill_call('".$call_identifier_kill."');\" ".$onhover_pause_refresh.">";
|
||||||
}
|
}
|
||||||
$block .= "</span>";
|
$block .= "</span>";
|
||||||
//transfer
|
//transfer
|
||||||
if (in_array($extension, $_SESSION['user']['extensions']) && $ext_state == 'active') {
|
if (in_array($extension, $_SESSION['user']['extensions']) && $ext_state == 'active') {
|
||||||
$block .= "<img id='destination_control_".$extension."_transfer' class='destination_control' src='resources/images/keypad_transfer.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' onclick=\"toggle_destination('".$extension."', 'transfer');\" ".$onhover_pause_refresh.">";
|
$block .= "<img id='destination_control_".$extension."_transfer' class='destination_control' src='resources/images/keypad_transfer.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: pointer;' onclick=\"toggle_destination('".$extension."', 'transfer');\" ".$onhover_pause_refresh.">";
|
||||||
}
|
}
|
||||||
$block .= " </td></tr></table>";
|
$block .= " </td></tr></table>";
|
||||||
$block .= " <span id='op_caller_details_".$extension."'><strong>".$call_name."</strong><br>".$call_number."</span>";
|
$block .= " <span id='op_caller_details_".$extension."'><strong>".$call_name."</strong><br>".$call_number."</span>";
|
||||||
$block .= " </span>";
|
$block .= " </span>";
|
||||||
//transfer
|
//transfer
|
||||||
if (in_array($extension, $_SESSION['user']['extensions']) && $ext_state == 'active') {
|
if (in_array($extension, $_SESSION['user']['extensions']) && $ext_state == 'active') {
|
||||||
$call_identifier_transfer = $ext['variable_bridge_uuid'];
|
$call_identifier_transfer = $ext['variable_bridge_uuid'];
|
||||||
$block .= " <form id='frm_destination_".$extension."_transfer' onsubmit=\"go_destination('".$extension."', document.getElementById('destination_".$extension."_transfer').value, 'transfer', '".$call_identifier_transfer."'); return false;\">";
|
$block .= " <form id='frm_destination_".$extension."_transfer' onsubmit=\"go_destination('".$extension."', document.getElementById('destination_".$extension."_transfer').value, 'transfer', '".$call_identifier_transfer."'); return false;\">";
|
||||||
$block .= " <input type='text' class='formfld' id='destination_".$extension."_transfer' style='width: 100px; min-width: 100px; max-width: 100px; margin-top: 3px; text-align: center; display: none;' onblur=\"toggle_destination('".$extension."', 'transfer');\">";
|
$block .= " <input type='text' class='formfld' id='destination_".$extension."_transfer' style='width: 100px; min-width: 100px; max-width: 100px; margin-top: 3px; text-align: center; display: none;' onblur=\"toggle_destination('".$extension."', 'transfer');\">";
|
||||||
$block .= " </form>\n";
|
$block .= " </form>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//call
|
//call
|
||||||
if (in_array($extension, $_SESSION['user']['extensions'])) {
|
if (in_array($extension, $_SESSION['user']['extensions'])) {
|
||||||
$block .= " <img id='destination_control_".$extension."_call' class='destination_control' src='resources/images/keypad_call.png' style='width: 12px; height: 12px; border: none; margin-top: 26px; margin-right: 1px; cursor: pointer;' align='right' onclick=\"toggle_destination('".$extension."', 'call');\" ".$onhover_pause_refresh.">";
|
$block .= " <img id='destination_control_".$extension."_call' class='destination_control' src='resources/images/keypad_call.png' style='width: 12px; height: 12px; border: none; margin-top: 26px; margin-right: 1px; cursor: pointer;' align='right' onclick=\"toggle_destination('".$extension."', 'call');\" ".$onhover_pause_refresh.">";
|
||||||
$block .= " <form id='frm_destination_".$extension."_call' onsubmit=\"go_destination('".$extension."', document.getElementById('destination_".$extension."_call').value, 'call'); return false;\">";
|
$block .= " <form id='frm_destination_".$extension."_call' onsubmit=\"go_destination('".$extension."', document.getElementById('destination_".$extension."_call').value, 'call'); return false;\">";
|
||||||
$block .= " <input type='text' class='formfld' id='destination_".$extension."_call' style='width: 100px; min-width: 100px; max-width: 100px; margin-top: 10px; text-align: center; display: none;' onblur=\"toggle_destination('".$extension."', 'call');\">";
|
$block .= " <input type='text' class='formfld' id='destination_".$extension."_call' style='width: 100px; min-width: 100px; max-width: 100px; margin-top: 10px; text-align: center; display: none;' onblur=\"toggle_destination('".$extension."', 'call');\">";
|
||||||
$block .= " </form>\n";
|
$block .= " </form>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$block .= " </td>";
|
$block .= " </td>";
|
||||||
$block .= " </tr>";
|
$block .= " </tr>";
|
||||||
$block .= "</table>";
|
$block .= "</table>";
|
||||||
|
|
||||||
if (if_group("superadmin") && isset($_GET['debug'])) {
|
if (if_group("superadmin") && isset($_GET['debug'])) {
|
||||||
$block .= "<span style='font-size: 10px;'>";
|
$block .= "<span style='font-size: 10px;'>";
|
||||||
$block .= "From ID<br> <strong style='color: maroon'>".$extension."</strong><br>";
|
$block .= "From ID<br> <strong style='color: maroon'>".$extension."</strong><br>";
|
||||||
$block .= "uuid<br> <strong style='color: ".($call_identifier == $ext['uuid'] ? 'blue' : 'black').";'>".$ext['uuid']."</strong><br>";
|
$block .= "uuid<br> <strong style='color: ".($call_identifier == $ext['uuid'] ? 'blue' : 'black').";'>".$ext['uuid']."</strong><br>";
|
||||||
$block .= "call_uuid<br> <strong style='color: ".($call_identifier == $ext['call_uuid'] ? 'blue' : 'black').";'>".$ext['call_uuid']."</strong><br>";
|
$block .= "call_uuid<br> <strong style='color: ".($call_identifier == $ext['call_uuid'] ? 'blue' : 'black').";'>".$ext['call_uuid']."</strong><br>";
|
||||||
$block .= "variable_bridge_uuid<br> <strong style='color: ".($call_identifier == $ext['variable_bridge_uuid'] ? 'blue' : 'black').";'>".$ext['variable_bridge_uuid']."</strong><br>";
|
$block .= "variable_bridge_uuid<br> <strong style='color: ".($call_identifier == $ext['variable_bridge_uuid'] ? 'blue' : 'black').";'>".$ext['variable_bridge_uuid']."</strong><br>";
|
||||||
$block .= "direction<br> <strong style='color: black;'>".$ext['direction']."</strong><br>";
|
$block .= "direction<br> <strong style='color: black;'>".$ext['direction']."</strong><br>";
|
||||||
$block .= "variable_call_direction<br> <strong style='color: black;'>".$ext['variable_call_direction']."</strong><br>";
|
$block .= "variable_call_direction<br> <strong style='color: black;'>".$ext['variable_call_direction']."</strong><br>";
|
||||||
$block .= "state<br> <strong style='color: black;'>".$ext['state']."</strong><br>";
|
$block .= "state<br> <strong style='color: black;'>".$ext['state']."</strong><br>";
|
||||||
$block .= "cid_num<br> <strong style='color: black;'>".$ext['cid_num']."</strong><br>";
|
$block .= "cid_num<br> <strong style='color: black;'>".$ext['cid_num']."</strong><br>";
|
||||||
$block .= "dest<br> <strong style='color: black;'>".$ext['dest']."</strong><br>";
|
$block .= "dest<br> <strong style='color: black;'>".$ext['dest']."</strong><br>";
|
||||||
$block .= "context<br> <strong style='color: black;'>".$ext['context']."</strong><br>";
|
$block .= "context<br> <strong style='color: black;'>".$ext['context']."</strong><br>";
|
||||||
$block .= "presence_id<br> <strong style='color: black;'>".$ext['presence_id']."</strong><br>";
|
$block .= "presence_id<br> <strong style='color: black;'>".$ext['presence_id']."</strong><br>";
|
||||||
$block .= "callstate<br> <strong style='color: black;'>".$ext['callstate']."</strong><br>";
|
$block .= "callstate<br> <strong style='color: black;'>".$ext['callstate']."</strong><br>";
|
||||||
$block .= "</span>";
|
$block .= "</span>";
|
||||||
}
|
}
|
||||||
$block .= "</div>";
|
$block .= "</div>";
|
||||||
|
|
||||||
if (in_array($extension, $_SESSION['user']['extensions'])) {
|
if (in_array($extension, $_SESSION['user']['extensions'])) {
|
||||||
$user_extensions[] = $block;
|
$user_extensions[] = $block;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$other_extensions[] = $block;
|
$other_extensions[] = $block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sizeof($user_extensions) > 0) {
|
if (sizeof($user_extensions) > 0) {
|
||||||
echo "<table width='100%'><tr><td>";
|
echo "<table width='100%'><tr><td>";
|
||||||
foreach ($user_extensions as $ext_block) {
|
foreach ($user_extensions as $ext_block) {
|
||||||
echo $ext_block;
|
echo $ext_block;
|
||||||
}
|
}
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST['group'] != '') {
|
if ($_REQUEST['group'] != '') {
|
||||||
if (sizeof($user_extensions) > 0) { echo "<br>"; }
|
if (sizeof($user_extensions) > 0) { echo "<br>"; }
|
||||||
echo "<strong style='color: black;'>".ucwords($_REQUEST['group'])."</strong>";
|
echo "<strong style='color: black;'>".ucwords($_REQUEST['group'])."</strong>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
}
|
}
|
||||||
else if (sizeof($user_extensions) > 0) {
|
else if (sizeof($user_extensions) > 0) {
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
echo "<strong style='color: black;'>".$text['label-other_extensions']."</strong>";
|
echo "<strong style='color: black;'>".$text['label-other_extensions']."</strong>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($other_extensions) > 0) {
|
if (sizeof($other_extensions) > 0) {
|
||||||
echo "<table width='100%'><tr><td>";
|
echo "<table width='100%'><tr><td>";
|
||||||
foreach ($other_extensions as $ext_block) {
|
foreach ($other_extensions as $ext_block) {
|
||||||
echo $ext_block;
|
echo $ext_block;
|
||||||
}
|
}
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo $text['label-no_extensions_found'];
|
echo $text['label-no_extensions_found'];
|
||||||
}
|
}
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
if (if_group("superadmin") && isset($_GET['debug'])) {
|
if (if_group("superadmin") && isset($_GET['debug'])) {
|
||||||
echo '$activity<br>';
|
echo '$activity<br>';
|
||||||
echo "<textarea style='width: 100%; height: 600px; overflow: scroll;' onfocus='refresh_stop();' onblur='refresh_start();'>";
|
echo "<textarea style='width: 100%; height: 600px; overflow: scroll;' onfocus='refresh_stop();' onblur='refresh_start();'>";
|
||||||
print_r($activity);
|
print_r($activity);
|
||||||
echo "</textarea>";
|
echo "</textarea>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
echo '$_SESSION<br>';
|
echo '$_SESSION<br>';
|
||||||
echo "<textarea style='width: 100%; height: 600px; overflow: scroll;' onfocus='refresh_stop();' onblur='refresh_start();'>";
|
echo "<textarea style='width: 100%; height: 600px; overflow: scroll;' onfocus='refresh_stop();' onblur='refresh_start();'>";
|
||||||
print_r($_SESSION);
|
print_r($_SESSION);
|
||||||
echo "</textarea>";
|
echo "</textarea>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,182 +1,182 @@
|
|||||||
<?php
|
<?php
|
||||||
function get_call_activity() {
|
function get_call_activity() {
|
||||||
global $db;
|
global $db;
|
||||||
global $ext_user_status;
|
global $ext_user_status;
|
||||||
|
|
||||||
//get the extensions and their user status
|
//get the extensions and their user status
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "e.extension, ";
|
$sql .= "e.extension, ";
|
||||||
$sql .= "e.number_alias, ";
|
$sql .= "e.number_alias, ";
|
||||||
$sql .= "e.effective_caller_id_name, ";
|
$sql .= "e.effective_caller_id_name, ";
|
||||||
$sql .= "e.effective_caller_id_number, ";
|
$sql .= "e.effective_caller_id_number, ";
|
||||||
$sql .= "e.call_group, ";
|
$sql .= "e.call_group, ";
|
||||||
$sql .= "e.description, ";
|
$sql .= "e.description, ";
|
||||||
$sql .= "u.user_uuid, ";
|
$sql .= "u.user_uuid, ";
|
||||||
$sql .= "u.user_status ";
|
$sql .= "u.user_status ";
|
||||||
$sql .= "from ";
|
$sql .= "from ";
|
||||||
$sql .= "v_extensions as e ";
|
$sql .= "v_extensions as e ";
|
||||||
$sql .= "left outer join v_extension_users as eu on ( eu.extension_uuid = e.extension_uuid and eu.domain_uuid = '".$_SESSION['domain_uuid']."' ) ";
|
$sql .= "left outer join v_extension_users as eu on ( eu.extension_uuid = e.extension_uuid and eu.domain_uuid = '".$_SESSION['domain_uuid']."' ) ";
|
||||||
$sql .= "left outer join v_users as u on ( u.user_uuid = eu.user_uuid and u.domain_uuid = '".$_SESSION['domain_uuid']."' ) ";
|
$sql .= "left outer join v_users as u on ( u.user_uuid = eu.user_uuid and u.domain_uuid = '".$_SESSION['domain_uuid']."' ) ";
|
||||||
$sql .= "where ";
|
$sql .= "where ";
|
||||||
$sql .= "e.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$sql .= "e.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
$sql .= "order by ";
|
$sql .= "order by ";
|
||||||
$sql .= "e.extension asc ";
|
$sql .= "e.extension asc ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$extensions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$extensions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
//store extension status by user uuid
|
//store extension status by user uuid
|
||||||
foreach($extensions as &$row) {
|
foreach($extensions as &$row) {
|
||||||
if ($row['user_uuid'] != '') {
|
if ($row['user_uuid'] != '') {
|
||||||
$ext_user_status[$row['user_uuid']] = $row['user_status'];
|
$ext_user_status[$row['user_uuid']] = $row['user_status'];
|
||||||
unset($row['user_status']);
|
unset($row['user_status']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//send the command
|
//send the command
|
||||||
$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) {
|
||||||
$switch_cmd = 'show channels as json';
|
$switch_cmd = 'show channels as json';
|
||||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
$json_array = json_decode($switch_result, true);
|
$json_array = json_decode($switch_result, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//build the response
|
//build the response
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach($extensions as &$row) {
|
foreach($extensions as &$row) {
|
||||||
$user = $row['extension'];
|
$user = $row['extension'];
|
||||||
if (strlen($row['number_alias']) >0 ) {
|
if (strlen($row['number_alias']) >0 ) {
|
||||||
$user = $row['number_alias'];
|
$user = $row['number_alias'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the extension details
|
//add the extension details
|
||||||
$array[$x] = $row;
|
$array[$x] = $row;
|
||||||
|
|
||||||
//set the call detail defaults
|
//set the call detail defaults
|
||||||
$array[$x]["uuid"] = null;
|
$array[$x]["uuid"] = null;
|
||||||
$array[$x]["direction"] = null;
|
$array[$x]["direction"] = null;
|
||||||
$array[$x]["created"] = null;
|
$array[$x]["created"] = null;
|
||||||
$array[$x]["created_epoch"] = null;
|
$array[$x]["created_epoch"] = null;
|
||||||
$array[$x]["name"] = null;
|
$array[$x]["name"] = null;
|
||||||
$array[$x]["state"] = null;
|
$array[$x]["state"] = null;
|
||||||
$array[$x]["cid_name"] = null;
|
$array[$x]["cid_name"] = null;
|
||||||
$array[$x]["cid_num"] = null;
|
$array[$x]["cid_num"] = null;
|
||||||
$array[$x]["ip_addr"] = null;
|
$array[$x]["ip_addr"] = null;
|
||||||
$array[$x]["dest"] = null;
|
$array[$x]["dest"] = null;
|
||||||
$array[$x]["application"] = null;
|
$array[$x]["application"] = null;
|
||||||
$array[$x]["application_data"] = null;
|
$array[$x]["application_data"] = null;
|
||||||
$array[$x]["dialplan"] = null;
|
$array[$x]["dialplan"] = null;
|
||||||
$array[$x]["context"] = null;
|
$array[$x]["context"] = null;
|
||||||
$array[$x]["read_codec"] = null;
|
$array[$x]["read_codec"] = null;
|
||||||
$array[$x]["read_rate"] = null;
|
$array[$x]["read_rate"] = null;
|
||||||
$array[$x]["read_bit_rate"] = null;
|
$array[$x]["read_bit_rate"] = null;
|
||||||
$array[$x]["write_codec"] = null;
|
$array[$x]["write_codec"] = null;
|
||||||
$array[$x]["write_rate"] = null;
|
$array[$x]["write_rate"] = null;
|
||||||
$array[$x]["write_bit_rate"] = null;
|
$array[$x]["write_bit_rate"] = null;
|
||||||
$array[$x]["secure"] = null;
|
$array[$x]["secure"] = null;
|
||||||
$array[$x]["hostname"] = null;
|
$array[$x]["hostname"] = null;
|
||||||
$array[$x]["presence_id"] = null;
|
$array[$x]["presence_id"] = null;
|
||||||
$array[$x]["presence_data"] = null;
|
$array[$x]["presence_data"] = null;
|
||||||
$array[$x]["callstate"] = null;
|
$array[$x]["callstate"] = null;
|
||||||
$array[$x]["callee_name"] = null;
|
$array[$x]["callee_name"] = null;
|
||||||
$array[$x]["callee_num"] = null;
|
$array[$x]["callee_num"] = null;
|
||||||
$array[$x]["callee_direction"] = null;
|
$array[$x]["callee_direction"] = null;
|
||||||
$array[$x]["call_uuid"] = null;
|
$array[$x]["call_uuid"] = null;
|
||||||
$array[$x]["sent_callee_name"] = null;
|
$array[$x]["sent_callee_name"] = null;
|
||||||
$array[$x]["sent_callee_num"] = null;
|
$array[$x]["sent_callee_num"] = null;
|
||||||
$array[$x]["destination"] = null;
|
$array[$x]["destination"] = null;
|
||||||
|
|
||||||
//add the active call details
|
//add the active call details
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach($json_array['rows'] as &$field) {
|
foreach($json_array['rows'] as &$field) {
|
||||||
$presence_id = $field['presence_id'];
|
$presence_id = $field['presence_id'];
|
||||||
$presence = explode("@", $presence_id);
|
$presence = explode("@", $presence_id);
|
||||||
$presence_id = $presence[0];
|
$presence_id = $presence[0];
|
||||||
$presence_domain = $presence[1];
|
$presence_domain = $presence[1];
|
||||||
if ($user == $presence_id) {
|
if ($user == $presence_id) {
|
||||||
if ($presence_domain == $_SESSION['domain_name']) {
|
if ($presence_domain == $_SESSION['domain_name']) {
|
||||||
$found = true;
|
$found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//normalize the array
|
//normalize the array
|
||||||
if ($found) {
|
if ($found) {
|
||||||
$array[$x]["uuid"] = $field['uuid'];
|
$array[$x]["uuid"] = $field['uuid'];
|
||||||
$array[$x]["direction"] = $field['direction'];
|
$array[$x]["direction"] = $field['direction'];
|
||||||
$array[$x]["created"] = $field['created'];
|
$array[$x]["created"] = $field['created'];
|
||||||
$array[$x]["created_epoch"] = $field['created_epoch'];
|
$array[$x]["created_epoch"] = $field['created_epoch'];
|
||||||
$array[$x]["name"] = $field['name'];
|
$array[$x]["name"] = $field['name'];
|
||||||
$array[$x]["state"] = $field['state'];
|
$array[$x]["state"] = $field['state'];
|
||||||
$array[$x]["cid_name"] = $field['cid_name'];
|
$array[$x]["cid_name"] = $field['cid_name'];
|
||||||
$array[$x]["cid_num"] = $field['cid_num'];
|
$array[$x]["cid_num"] = $field['cid_num'];
|
||||||
$array[$x]["ip_addr"] = $field['ip_addr'];
|
$array[$x]["ip_addr"] = $field['ip_addr'];
|
||||||
$array[$x]["dest"] = $field['dest'];
|
$array[$x]["dest"] = $field['dest'];
|
||||||
$array[$x]["application"] = $field['application'];
|
$array[$x]["application"] = $field['application'];
|
||||||
$array[$x]["application_data"] = $field['application_data'];
|
$array[$x]["application_data"] = $field['application_data'];
|
||||||
$array[$x]["dialplan"] = $field['dialplan'];
|
$array[$x]["dialplan"] = $field['dialplan'];
|
||||||
$array[$x]["context"] = $field['context'];
|
$array[$x]["context"] = $field['context'];
|
||||||
$array[$x]["read_codec"] = $field['read_codec'];
|
$array[$x]["read_codec"] = $field['read_codec'];
|
||||||
$array[$x]["read_rate"] = $field['read_rate'];
|
$array[$x]["read_rate"] = $field['read_rate'];
|
||||||
$array[$x]["read_bit_rate"] = $field['read_bit_rate'];
|
$array[$x]["read_bit_rate"] = $field['read_bit_rate'];
|
||||||
$array[$x]["write_codec"] = $field['write_codec'];
|
$array[$x]["write_codec"] = $field['write_codec'];
|
||||||
$array[$x]["write_rate"] = $field['write_rate'];
|
$array[$x]["write_rate"] = $field['write_rate'];
|
||||||
$array[$x]["write_bit_rate"] = $field['write_bit_rate'];
|
$array[$x]["write_bit_rate"] = $field['write_bit_rate'];
|
||||||
$array[$x]["secure"] = $field['secure'];
|
$array[$x]["secure"] = $field['secure'];
|
||||||
$array[$x]["hostname"] = $field['hostname'];
|
$array[$x]["hostname"] = $field['hostname'];
|
||||||
$array[$x]["presence_id"] = $field['presence_id'];
|
$array[$x]["presence_id"] = $field['presence_id'];
|
||||||
$array[$x]["presence_data"] = $field['presence_data'];
|
$array[$x]["presence_data"] = $field['presence_data'];
|
||||||
$array[$x]["callstate"] = $field['callstate'];
|
$array[$x]["callstate"] = $field['callstate'];
|
||||||
$array[$x]["callee_name"] = $field['callee_name'];
|
$array[$x]["callee_name"] = $field['callee_name'];
|
||||||
$array[$x]["callee_num"] = $field['callee_num'];
|
$array[$x]["callee_num"] = $field['callee_num'];
|
||||||
$array[$x]["callee_direction"] = $field['callee_direction'];
|
$array[$x]["callee_direction"] = $field['callee_direction'];
|
||||||
$array[$x]["call_uuid"] = $field['call_uuid'];
|
$array[$x]["call_uuid"] = $field['call_uuid'];
|
||||||
$array[$x]["sent_callee_name"] = $field['sent_callee_name'];
|
$array[$x]["sent_callee_name"] = $field['sent_callee_name'];
|
||||||
$array[$x]["sent_callee_num"] = $field['sent_callee_num'];
|
$array[$x]["sent_callee_num"] = $field['sent_callee_num'];
|
||||||
$array[$x]["destination"] = $user;
|
$array[$x]["destination"] = $user;
|
||||||
|
|
||||||
//calculate and set the call length
|
//calculate and set the call length
|
||||||
$call_length_seconds = time() - $array[$x]["created_epoch"];
|
$call_length_seconds = time() - $array[$x]["created_epoch"];
|
||||||
$call_length_hour = floor($call_length_seconds/3600);
|
$call_length_hour = floor($call_length_seconds/3600);
|
||||||
$call_length_min = floor($call_length_seconds/60 - ($call_length_hour * 60));
|
$call_length_min = floor($call_length_seconds/60 - ($call_length_hour * 60));
|
||||||
$call_length_sec = $call_length_seconds - (($call_length_hour * 3600) + ($call_length_min * 60));
|
$call_length_sec = $call_length_seconds - (($call_length_hour * 3600) + ($call_length_min * 60));
|
||||||
$call_length_min = sprintf("%02d", $call_length_min);
|
$call_length_min = sprintf("%02d", $call_length_min);
|
||||||
$call_length_sec = sprintf("%02d", $call_length_sec);
|
$call_length_sec = sprintf("%02d", $call_length_sec);
|
||||||
$call_length = $call_length_hour.':'.$call_length_min.':'.$call_length_sec;
|
$call_length = $call_length_hour.':'.$call_length_min.':'.$call_length_sec;
|
||||||
$array[$x]['call_length'] = $call_length;
|
$array[$x]['call_length'] = $call_length;
|
||||||
|
|
||||||
//send the command
|
//send the command
|
||||||
if ($field['state'] != '') {
|
if ($field['state'] != '') {
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$switch_cmd = 'uuid_dump '.$field['uuid'].' json';
|
$switch_cmd = 'uuid_dump '.$field['uuid'].' json';
|
||||||
$dump_result = event_socket_request($fp, 'api '.$switch_cmd);
|
$dump_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||||
$dump_array = json_decode($dump_result, true);
|
$dump_array = json_decode($dump_result, true);
|
||||||
foreach ($dump_array as $dump_var_name => $dump_var_value) {
|
foreach ($dump_array as $dump_var_name => $dump_var_value) {
|
||||||
$array[$x][$dump_var_name] = trim($dump_var_value);
|
$array[$x][$dump_var_name] = trim($dump_var_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//increment the row
|
//increment the row
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//reindex array using extension instead of auto-incremented value
|
//reindex array using extension instead of auto-incremented value
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach ($array as $index => $subarray) {
|
foreach ($array as $index => $subarray) {
|
||||||
$extension = $subarray['extension'];
|
$extension = $subarray['extension'];
|
||||||
foreach ($subarray as $field => $value) {
|
foreach ($subarray as $field => $value) {
|
||||||
$result[$extension][$field] = $array[$index][$field];
|
$result[$extension][$field] = $array[$index][$field];
|
||||||
unset($array[$index][$field]);
|
unset($array[$index][$field]);
|
||||||
}
|
}
|
||||||
unset($array[$subarray['extension']]['extension']);
|
unset($array[$subarray['extension']]['extension']);
|
||||||
unset($array[$index]);
|
unset($array[$index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//return array
|
//return array
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//$apps[$x]['menu'][0]['title']['en-us'] = "Provision";
|
//$apps[$x]['menu'][0]['title']['en-us'] = "Provision";
|
||||||
//$apps[$x]['menu'][0]['title']['fr-fr'] = "Provision";
|
//$apps[$x]['menu'][0]['title']['fr-fr'] = "Provision";
|
||||||
//$apps[$x]['menu'][0]['uuid'] = "";
|
//$apps[$x]['menu'][0]['uuid'] = "";
|
||||||
//$apps[$x]['menu'][0]['parent_uuid'] = "";
|
//$apps[$x]['menu'][0]['parent_uuid'] = "";
|
||||||
//$apps[$x]['menu'][0]['category'] = "internal";
|
//$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
//$apps[$x]['menu'][0]['path'] = "";
|
//$apps[$x]['menu'][0]['path'] = "";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "admin";
|
//$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||||
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
File diff suppressed because it is too large
Load Diff
+784
-784
File diff suppressed because it is too large
Load Diff
@@ -1,34 +1,34 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//process this only one time
|
//process this only one time
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
$obj = new scripts;
|
$obj = new scripts;
|
||||||
$obj->copy_files();
|
$obj->copy_files();
|
||||||
$obj->write_config();
|
$obj->write_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,286 +1,286 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scripts class provides methods for creating the config.lua and copying switch scripts
|
* scripts class provides methods for creating the config.lua and copying switch scripts
|
||||||
*
|
*
|
||||||
* @method string correct_path
|
* @method string correct_path
|
||||||
* @method string copy_files
|
* @method string copy_files
|
||||||
* @method string write_config
|
* @method string write_config
|
||||||
*/
|
*/
|
||||||
if (!class_exists('scripts')) {
|
if (!class_exists('scripts')) {
|
||||||
class scripts {
|
class scripts {
|
||||||
|
|
||||||
public $db;
|
public $db;
|
||||||
public $db_type;
|
public $db_type;
|
||||||
public $db_name;
|
public $db_name;
|
||||||
public $db_host;
|
public $db_host;
|
||||||
public $db_port;
|
public $db_port;
|
||||||
public $db_path;
|
public $db_path;
|
||||||
public $db_username;
|
public $db_username;
|
||||||
public $db_password;
|
public $db_password;
|
||||||
public $dsn_name;
|
public $dsn_name;
|
||||||
public $dsn_username;
|
public $dsn_username;
|
||||||
public $dsn_password;
|
public $dsn_password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//connect to the database if not connected
|
//connect to the database if not connected
|
||||||
require_once "resources/classes/database.php";
|
require_once "resources/classes/database.php";
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$database->connect();
|
$database->connect();
|
||||||
$this->db = $database->db;
|
$this->db = $database->db;
|
||||||
$this->db_type = $database->type;
|
$this->db_type = $database->type;
|
||||||
$this->db_name = $database->db_name;
|
$this->db_name = $database->db_name;
|
||||||
$this->db_host = $database->host;
|
$this->db_host = $database->host;
|
||||||
$this->db_port = $database->port;
|
$this->db_port = $database->port;
|
||||||
$this->db_path = $database->path;
|
$this->db_path = $database->path;
|
||||||
$this->db_username = $database->username;
|
$this->db_username = $database->username;
|
||||||
$this->db_password = $database->password;
|
$this->db_password = $database->password;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Corrects the path for specifically for windows
|
* Corrects the path for specifically for windows
|
||||||
*/
|
*/
|
||||||
private function correct_path($path) {
|
private function correct_path($path) {
|
||||||
global $IS_WINDOWS;
|
global $IS_WINDOWS;
|
||||||
if ($IS_WINDOWS == null) {
|
if ($IS_WINDOWS == null) {
|
||||||
if (stristr(PHP_OS, 'WIN')) { $IS_WINDOWS = true; } else { $IS_WINDOWS = false; }
|
if (stristr(PHP_OS, 'WIN')) { $IS_WINDOWS = true; } else { $IS_WINDOWS = false; }
|
||||||
}
|
}
|
||||||
if ($IS_WINDOWS) {
|
if ($IS_WINDOWS) {
|
||||||
return str_replace('\\', '/', $path);
|
return str_replace('\\', '/', $path);
|
||||||
}
|
}
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy the switch scripts from the web directory to the switch directory
|
* Copy the switch scripts from the web directory to the switch directory
|
||||||
*/
|
*/
|
||||||
public function copy_files() {
|
public function copy_files() {
|
||||||
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
||||||
$dst_dir = $_SESSION['switch']['scripts']['dir'];
|
$dst_dir = $_SESSION['switch']['scripts']['dir'];
|
||||||
if(strlen($dst_dir) == 0) {
|
if(strlen($dst_dir) == 0) {
|
||||||
throw new Exception("Cannot copy scripts the 'script_dir' is empty");
|
throw new Exception("Cannot copy scripts the 'script_dir' is empty");
|
||||||
}
|
}
|
||||||
if (file_exists($dst_dir)) {
|
if (file_exists($dst_dir)) {
|
||||||
//get the source directory
|
//get the source directory
|
||||||
if (file_exists('/usr/share/examples/fusionpbx/resources/install/scripts')){
|
if (file_exists('/usr/share/examples/fusionpbx/resources/install/scripts')){
|
||||||
$src_dir = '/usr/share/examples/fusionpbx/resources/install/scripts';
|
$src_dir = '/usr/share/examples/fusionpbx/resources/install/scripts';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts';
|
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/scripts';
|
||||||
}
|
}
|
||||||
if (is_readable($dst_dir)) {
|
if (is_readable($dst_dir)) {
|
||||||
recursive_copy($src_dir, $dst_dir);
|
recursive_copy($src_dir, $dst_dir);
|
||||||
unset($src_dir, $dst_dir);
|
unset($src_dir, $dst_dir);
|
||||||
}else{
|
}else{
|
||||||
throw new Exception("Cannot read from '$src_dir' to get the scripts");
|
throw new Exception("Cannot read from '$src_dir' to get the scripts");
|
||||||
}
|
}
|
||||||
chmod($dst_dir, 0774);
|
chmod($dst_dir, 0774);
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Scripts directory doesn't exist");
|
throw new Exception("Scripts directory doesn't exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the config.lua
|
* Writes the config.lua
|
||||||
*/
|
*/
|
||||||
public function write_config() {
|
public function write_config() {
|
||||||
if (is_dir($_SESSION['switch']['scripts']['dir'])) {
|
if (is_dir($_SESSION['switch']['scripts']['dir'])) {
|
||||||
|
|
||||||
//replace the backslash with a forward slash
|
//replace the backslash with a forward slash
|
||||||
$this->db_path = str_replace("\\", "/", $this->db_path);
|
$this->db_path = str_replace("\\", "/", $this->db_path);
|
||||||
|
|
||||||
//get the odbc information
|
//get the odbc information
|
||||||
$sql = "select count(*) as num_rows from v_databases ";
|
$sql = "select count(*) as num_rows from v_databases ";
|
||||||
$sql .= "where database_driver = 'odbc' ";
|
$sql .= "where database_driver = 'odbc' ";
|
||||||
$prep_statement = $this->db->prepare($sql);
|
$prep_statement = $this->db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
if ($row['num_rows'] > 0) {
|
if ($row['num_rows'] > 0) {
|
||||||
$odbc_num_rows = $row['num_rows'];
|
$odbc_num_rows = $row['num_rows'];
|
||||||
|
|
||||||
$sql = "select * from v_databases ";
|
$sql = "select * from v_databases ";
|
||||||
$sql .= "where database_driver = 'odbc' ";
|
$sql .= "where database_driver = 'odbc' ";
|
||||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$this->dsn_name = $row["database_name"];
|
$this->dsn_name = $row["database_name"];
|
||||||
$this->dsn_username = $row["database_username"];
|
$this->dsn_username = $row["database_username"];
|
||||||
$this->dsn_password = $row["database_password"];
|
$this->dsn_password = $row["database_password"];
|
||||||
break; //limit to 1 row
|
break; //limit to 1 row
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$odbc_num_rows = '0';
|
$odbc_num_rows = '0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the recordings directory
|
//get the recordings directory
|
||||||
$recordings_dir = $_SESSION['switch']['recordings']['dir'];
|
$recordings_dir = $_SESSION['switch']['recordings']['dir'];
|
||||||
|
|
||||||
//find the location to write the config.lua
|
//find the location to write the config.lua
|
||||||
if (is_dir("/etc/fusionpbx")){
|
if (is_dir("/etc/fusionpbx")){
|
||||||
$config = "/etc/fusionpbx/config.lua";
|
$config = "/etc/fusionpbx/config.lua";
|
||||||
} elseif (is_dir("/usr/local/etc/fusionpbx")){
|
} elseif (is_dir("/usr/local/etc/fusionpbx")){
|
||||||
$config = "/usr/local/etc/fusionpbx/config.lua";
|
$config = "/usr/local/etc/fusionpbx/config.lua";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
|
$config = $_SESSION['switch']['scripts']['dir']."/resources/config.lua";
|
||||||
}
|
}
|
||||||
$fout = fopen($config,"w");
|
$fout = fopen($config,"w");
|
||||||
if(!$fout){
|
if(!$fout){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//make the config.lua
|
//make the config.lua
|
||||||
$tmp = "\n";
|
$tmp = "\n";
|
||||||
$tmp .= "--set the variables\n";
|
$tmp .= "--set the variables\n";
|
||||||
if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['sounds']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" sounds_dir = [[".$_SESSION['switch']['sounds']['dir']."]];\n");
|
$tmp .= $this->correct_path(" sounds_dir = [[".$_SESSION['switch']['sounds']['dir']."]];\n");
|
||||||
}
|
}
|
||||||
if (strlen($_SESSION['switch']['phrases']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['phrases']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" phrases_dir = [[".$_SESSION['switch']['phrases']['dir']."]];\n");
|
$tmp .= $this->correct_path(" phrases_dir = [[".$_SESSION['switch']['phrases']['dir']."]];\n");
|
||||||
}
|
}
|
||||||
if (strlen($_SESSION['switch']['db']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['db']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" database_dir = [[".$_SESSION['switch']['db']['dir']."]];\n");
|
$tmp .= $this->correct_path(" database_dir = [[".$_SESSION['switch']['db']['dir']."]];\n");
|
||||||
}
|
}
|
||||||
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" recordings_dir = [[".$recordings_dir."]];\n");
|
$tmp .= $this->correct_path(" recordings_dir = [[".$recordings_dir."]];\n");
|
||||||
}
|
}
|
||||||
if (strlen($_SESSION['switch']['storage']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['storage']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" storage_dir = [[".$_SESSION['switch']['storage']['dir']."]];\n");
|
$tmp .= $this->correct_path(" storage_dir = [[".$_SESSION['switch']['storage']['dir']."]];\n");
|
||||||
}
|
}
|
||||||
if (strlen($_SESSION['switch']['voicemail']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['voicemail']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" voicemail_dir = [[".$_SESSION['switch']['voicemail']['dir']."]];\n");
|
$tmp .= $this->correct_path(" voicemail_dir = [[".$_SESSION['switch']['voicemail']['dir']."]];\n");
|
||||||
}
|
}
|
||||||
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
||||||
$tmp .= $this->correct_path(" scripts_dir = [[".$_SESSION['switch']['scripts']['dir']."]];\n");
|
$tmp .= $this->correct_path(" scripts_dir = [[".$_SESSION['switch']['scripts']['dir']."]];\n");
|
||||||
}
|
}
|
||||||
$tmp .= $this->correct_path(" php_dir = [[".PHP_BINDIR."]];\n");
|
$tmp .= $this->correct_path(" php_dir = [[".PHP_BINDIR."]];\n");
|
||||||
if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
|
if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
|
||||||
$tmp .= " php_bin = \"php.exe\";\n";
|
$tmp .= " php_bin = \"php.exe\";\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$tmp .= " php_bin = \"php\";\n";
|
$tmp .= " php_bin = \"php\";\n";
|
||||||
}
|
}
|
||||||
$tmp .= $this->correct_path(" document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n");
|
$tmp .= $this->correct_path(" document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n");
|
||||||
$tmp .= "\n";
|
$tmp .= "\n";
|
||||||
|
|
||||||
if ((strlen($this->db_type) > 0) || (strlen($this->dsn_name) > 0)) {
|
if ((strlen($this->db_type) > 0) || (strlen($this->dsn_name) > 0)) {
|
||||||
$tmp .= "--database information\n";
|
$tmp .= "--database information\n";
|
||||||
$tmp .= " database = {}\n";
|
$tmp .= " database = {}\n";
|
||||||
$tmp .= " database.type = \"".$this->db_type."\";\n";
|
$tmp .= " database.type = \"".$this->db_type."\";\n";
|
||||||
$tmp .= " database.name = \"".$this->db_name."\";\n";
|
$tmp .= " database.name = \"".$this->db_name."\";\n";
|
||||||
$tmp .= $this->correct_path(" database.path = [[".$this->db_path."]];\n");
|
$tmp .= $this->correct_path(" database.path = [[".$this->db_path."]];\n");
|
||||||
|
|
||||||
if (strlen($this->dsn_name) > 0) {
|
if (strlen($this->dsn_name) > 0) {
|
||||||
$tmp .= " database.system = \"odbc://".$this->dsn_name.":".$this->dsn_username.":".$this->dsn_password."\";\n";
|
$tmp .= " database.system = \"odbc://".$this->dsn_name.":".$this->dsn_username.":".$this->dsn_password."\";\n";
|
||||||
$tmp .= " database.switch = \"odbc://freeswitch:".$this->dsn_username.":".$this->dsn_password."\";\n";
|
$tmp .= " database.switch = \"odbc://freeswitch:".$this->dsn_username.":".$this->dsn_password."\";\n";
|
||||||
}
|
}
|
||||||
elseif ($this->db_type == "pgsql") {
|
elseif ($this->db_type == "pgsql") {
|
||||||
if ($this->db_host == "localhost") { $this->db_host = "127.0.0.1"; }
|
if ($this->db_host == "localhost") { $this->db_host = "127.0.0.1"; }
|
||||||
$tmp .= " database.system = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." options='' application_name='".$this->db_name."'\";\n";
|
$tmp .= " database.system = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." options='' application_name='".$this->db_name."'\";\n";
|
||||||
$tmp .= " database.switch = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." options='' application_name='freeswitch'\";\n";
|
$tmp .= " database.switch = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." options='' application_name='freeswitch'\";\n";
|
||||||
}
|
}
|
||||||
elseif ($this->db_type == "sqlite") {
|
elseif ($this->db_type == "sqlite") {
|
||||||
$tmp .= " database.system = \"sqlite://".$this->db_path."/".$this->db_name."\";\n";
|
$tmp .= " database.system = \"sqlite://".$this->db_path."/".$this->db_name."\";\n";
|
||||||
$tmp .= " database.switch = \"sqlite://".$_SESSION['switch']['db']['dir']."\";\n";
|
$tmp .= " database.switch = \"sqlite://".$_SESSION['switch']['db']['dir']."\";\n";
|
||||||
}
|
}
|
||||||
elseif ($this->db_type == "mysql") {
|
elseif ($this->db_type == "mysql") {
|
||||||
$tmp .= " database.system = \"\";\n";
|
$tmp .= " database.system = \"\";\n";
|
||||||
$tmp .= " database.switch = \"\";\n";
|
$tmp .= " database.switch = \"\";\n";
|
||||||
}
|
}
|
||||||
$tmp .= "\n";
|
$tmp .= "\n";
|
||||||
}
|
}
|
||||||
$tmp .= "--set defaults\n";
|
$tmp .= "--set defaults\n";
|
||||||
$tmp .= " expire = {}\n";
|
$tmp .= " expire = {}\n";
|
||||||
$tmp .= " expire.directory = \"3600\";\n";
|
$tmp .= " expire.directory = \"3600\";\n";
|
||||||
$tmp .= " expire.dialplan = \"3600\";\n";
|
$tmp .= " expire.dialplan = \"3600\";\n";
|
||||||
$tmp .= " expire.languages = \"3600\";\n";
|
$tmp .= " expire.languages = \"3600\";\n";
|
||||||
$tmp .= " expire.sofia = \"3600\";\n";
|
$tmp .= " expire.sofia = \"3600\";\n";
|
||||||
$tmp .= " expire.acl = \"3600\";\n";
|
$tmp .= " expire.acl = \"3600\";\n";
|
||||||
$tmp .= "\n";
|
$tmp .= "\n";
|
||||||
$tmp .= "--set xml_handler\n";
|
$tmp .= "--set xml_handler\n";
|
||||||
$tmp .= " xml_handler = {}\n";
|
$tmp .= " xml_handler = {}\n";
|
||||||
$tmp .= " xml_handler.fs_path = false;\n";
|
$tmp .= " xml_handler.fs_path = false;\n";
|
||||||
$tmp .= "\n";
|
$tmp .= "\n";
|
||||||
$tmp .= "--set the debug options\n";
|
$tmp .= "--set the debug options\n";
|
||||||
$tmp .= " debug.params = false;\n";
|
$tmp .= " debug.params = false;\n";
|
||||||
$tmp .= " debug.sql = false;\n";
|
$tmp .= " debug.sql = false;\n";
|
||||||
$tmp .= " debug.xml_request = false;\n";
|
$tmp .= " debug.xml_request = false;\n";
|
||||||
$tmp .= " debug.xml_string = false;\n";
|
$tmp .= " debug.xml_string = false;\n";
|
||||||
$tmp .= " debug.cache = false;\n";
|
$tmp .= " debug.cache = false;\n";
|
||||||
$tmp .= "\n";
|
$tmp .= "\n";
|
||||||
$tmp .= "--additional info\n";
|
$tmp .= "--additional info\n";
|
||||||
$tmp .= " domain_count = ".count($_SESSION["domains"]).";\n";
|
$tmp .= " domain_count = ".count($_SESSION["domains"]).";\n";
|
||||||
$tmp .= $this->correct_path(" temp_dir = [[".$_SESSION['server']['temp']['dir']."]];\n");
|
$tmp .= $this->correct_path(" temp_dir = [[".$_SESSION['server']['temp']['dir']."]];\n");
|
||||||
if (isset($_SESSION['domain']['dial_string']['text'])) {
|
if (isset($_SESSION['domain']['dial_string']['text'])) {
|
||||||
$tmp .= " dial_string = \"".$_SESSION['domain']['dial_string']['text']."\";\n";
|
$tmp .= " dial_string = \"".$_SESSION['domain']['dial_string']['text']."\";\n";
|
||||||
}
|
}
|
||||||
$tmp .= "\n";
|
$tmp .= "\n";
|
||||||
$tmp .= "--include local.lua\n";
|
$tmp .= "--include local.lua\n";
|
||||||
$tmp .= " require(\"resources.functions.file_exists\");\n";
|
$tmp .= " require(\"resources.functions.file_exists\");\n";
|
||||||
$tmp .= " if (file_exists(\"/etc/fusionpbx/local.lua\")) then\n";
|
$tmp .= " if (file_exists(\"/etc/fusionpbx/local.lua\")) then\n";
|
||||||
$tmp .= " dofile(\"/etc/fusionpbx/local.lua\");\n";
|
$tmp .= " dofile(\"/etc/fusionpbx/local.lua\");\n";
|
||||||
$tmp .= " elseif (file_exists(\"/usr/local/etc/fusionpbx/local.lua\")) then\n";
|
$tmp .= " elseif (file_exists(\"/usr/local/etc/fusionpbx/local.lua\")) then\n";
|
||||||
$tmp .= " dofile(\"/usr/local/etc/fusionpbx/local.lua\");\n";
|
$tmp .= " dofile(\"/usr/local/etc/fusionpbx/local.lua\");\n";
|
||||||
$tmp .= " elseif (file_exists(scripts_dir..\"/resources/local.lua\")) then\n";
|
$tmp .= " elseif (file_exists(scripts_dir..\"/resources/local.lua\")) then\n";
|
||||||
$tmp .= " require(\"resources.local\");\n";
|
$tmp .= " require(\"resources.local\");\n";
|
||||||
$tmp .= " end\n";
|
$tmp .= " end\n";
|
||||||
fwrite($fout, $tmp);
|
fwrite($fout, $tmp);
|
||||||
unset($tmp);
|
unset($tmp);
|
||||||
fclose($fout);
|
fclose($fout);
|
||||||
}
|
}
|
||||||
} //end config_lua
|
} //end config_lua
|
||||||
} //end scripts class
|
} //end scripts class
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
//example use
|
//example use
|
||||||
|
|
||||||
//update config.lua
|
//update config.lua
|
||||||
$obj = new scripts;
|
$obj = new scripts;
|
||||||
$obj->write_config();
|
$obj->write_config();
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
@@ -1,227 +1,227 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!defined('WIN32_ERROR_ACCESS_DENIED')) define('WIN32_ERROR_ACCESS_DENIED',0x00000005);
|
if(!defined('WIN32_ERROR_ACCESS_DENIED')) define('WIN32_ERROR_ACCESS_DENIED',0x00000005);
|
||||||
if(!defined('WIN32_ERROR_CIRCULAR_DEPENDENCY')) define('WIN32_ERROR_CIRCULAR_DEPENDENCY',0x00000423);
|
if(!defined('WIN32_ERROR_CIRCULAR_DEPENDENCY')) define('WIN32_ERROR_CIRCULAR_DEPENDENCY',0x00000423);
|
||||||
if(!defined('WIN32_ERROR_DATABASE_DOES_NOT_EXIST')) define('WIN32_ERROR_DATABASE_DOES_NOT_EXIST',0x00000429);
|
if(!defined('WIN32_ERROR_DATABASE_DOES_NOT_EXIST')) define('WIN32_ERROR_DATABASE_DOES_NOT_EXIST',0x00000429);
|
||||||
if(!defined('WIN32_ERROR_DEPENDENT_SERVICES_RUNNING')) define('WIN32_ERROR_DEPENDENT_SERVICES_RUNNING',0x0000041B);
|
if(!defined('WIN32_ERROR_DEPENDENT_SERVICES_RUNNING')) define('WIN32_ERROR_DEPENDENT_SERVICES_RUNNING',0x0000041B);
|
||||||
if(!defined('WIN32_ERROR_DUPLICATE_SERVICE_NAME')) define('WIN32_ERROR_DUPLICATE_SERVICE_NAME',0x00000436);
|
if(!defined('WIN32_ERROR_DUPLICATE_SERVICE_NAME')) define('WIN32_ERROR_DUPLICATE_SERVICE_NAME',0x00000436);
|
||||||
if(!defined('WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT')) define('WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT',0x00000427);
|
if(!defined('WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT')) define('WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT',0x00000427);
|
||||||
if(!defined('WIN32_ERROR_INSUFFICIENT_BUFFER')) define('WIN32_ERROR_INSUFFICIENT_BUFFER',0x0000007A);
|
if(!defined('WIN32_ERROR_INSUFFICIENT_BUFFER')) define('WIN32_ERROR_INSUFFICIENT_BUFFER',0x0000007A);
|
||||||
if(!defined('WIN32_ERROR_INVALID_DATA')) define('WIN32_ERROR_INVALID_DATA',0x0000000D);
|
if(!defined('WIN32_ERROR_INVALID_DATA')) define('WIN32_ERROR_INVALID_DATA',0x0000000D);
|
||||||
if(!defined('WIN32_ERROR_INVALID_HANDLE')) define('WIN32_ERROR_INVALID_HANDLE',0x00000006);
|
if(!defined('WIN32_ERROR_INVALID_HANDLE')) define('WIN32_ERROR_INVALID_HANDLE',0x00000006);
|
||||||
if(!defined('WIN32_ERROR_INVALID_LEVEL')) define('WIN32_ERROR_INVALID_LEVEL',0x0000007C);
|
if(!defined('WIN32_ERROR_INVALID_LEVEL')) define('WIN32_ERROR_INVALID_LEVEL',0x0000007C);
|
||||||
if(!defined('WIN32_ERROR_INVALID_NAME')) define('WIN32_ERROR_INVALID_NAME',0x0000007B);
|
if(!defined('WIN32_ERROR_INVALID_NAME')) define('WIN32_ERROR_INVALID_NAME',0x0000007B);
|
||||||
if(!defined('WIN32_ERROR_INVALID_PARAMETER')) define('WIN32_ERROR_INVALID_PARAMETER',0x00000057);
|
if(!defined('WIN32_ERROR_INVALID_PARAMETER')) define('WIN32_ERROR_INVALID_PARAMETER',0x00000057);
|
||||||
if(!defined('WIN32_ERROR_INVALID_SERVICE_ACCOUNT')) define('WIN32_ERROR_INVALID_SERVICE_ACCOUNT',0x00000421);
|
if(!defined('WIN32_ERROR_INVALID_SERVICE_ACCOUNT')) define('WIN32_ERROR_INVALID_SERVICE_ACCOUNT',0x00000421);
|
||||||
if(!defined('WIN32_ERROR_INVALID_SERVICE_CONTROL')) define('WIN32_ERROR_INVALID_SERVICE_CONTROL',0x0000041C);
|
if(!defined('WIN32_ERROR_INVALID_SERVICE_CONTROL')) define('WIN32_ERROR_INVALID_SERVICE_CONTROL',0x0000041C);
|
||||||
if(!defined('WIN32_ERROR_PATH_NOT_FOUND')) define('WIN32_ERROR_PATH_NOT_FOUND',0x00000003);
|
if(!defined('WIN32_ERROR_PATH_NOT_FOUND')) define('WIN32_ERROR_PATH_NOT_FOUND',0x00000003);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_ALREADY_RUNNING')) define('WIN32_ERROR_SERVICE_ALREADY_RUNNING',0x00000420);
|
if(!defined('WIN32_ERROR_SERVICE_ALREADY_RUNNING')) define('WIN32_ERROR_SERVICE_ALREADY_RUNNING',0x00000420);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL')) define('WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL',0x00000425);
|
if(!defined('WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL')) define('WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL',0x00000425);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_DATABASE_LOCKED')) define('WIN32_ERROR_SERVICE_DATABASE_LOCKED',0x0000041F);
|
if(!defined('WIN32_ERROR_SERVICE_DATABASE_LOCKED')) define('WIN32_ERROR_SERVICE_DATABASE_LOCKED',0x0000041F);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_DEPENDENCY_DELETED')) define('WIN32_ERROR_SERVICE_DEPENDENCY_DELETED',0x00000433);
|
if(!defined('WIN32_ERROR_SERVICE_DEPENDENCY_DELETED')) define('WIN32_ERROR_SERVICE_DEPENDENCY_DELETED',0x00000433);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_DEPENDENCY_FAIL')) define('WIN32_ERROR_SERVICE_DEPENDENCY_FAIL',0x0000042C);
|
if(!defined('WIN32_ERROR_SERVICE_DEPENDENCY_FAIL')) define('WIN32_ERROR_SERVICE_DEPENDENCY_FAIL',0x0000042C);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_DISABLED')) define('WIN32_ERROR_SERVICE_DISABLED',0x00000422);
|
if(!defined('WIN32_ERROR_SERVICE_DISABLED')) define('WIN32_ERROR_SERVICE_DISABLED',0x00000422);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_DOES_NOT_EXIST')) define('WIN32_ERROR_SERVICE_DOES_NOT_EXIST',0x00000424);
|
if(!defined('WIN32_ERROR_SERVICE_DOES_NOT_EXIST')) define('WIN32_ERROR_SERVICE_DOES_NOT_EXIST',0x00000424);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_EXISTS')) define('WIN32_ERROR_SERVICE_EXISTS',0x00000431);
|
if(!defined('WIN32_ERROR_SERVICE_EXISTS')) define('WIN32_ERROR_SERVICE_EXISTS',0x00000431);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_LOGON_FAILED')) define('WIN32_ERROR_SERVICE_LOGON_FAILED',0x0000042D);
|
if(!defined('WIN32_ERROR_SERVICE_LOGON_FAILED')) define('WIN32_ERROR_SERVICE_LOGON_FAILED',0x0000042D);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_MARKED_FOR_DELETE')) define('WIN32_ERROR_SERVICE_MARKED_FOR_DELETE',0x00000430);
|
if(!defined('WIN32_ERROR_SERVICE_MARKED_FOR_DELETE')) define('WIN32_ERROR_SERVICE_MARKED_FOR_DELETE',0x00000430);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_NO_THREAD')) define('WIN32_ERROR_SERVICE_NO_THREAD',0x0000041E);
|
if(!defined('WIN32_ERROR_SERVICE_NO_THREAD')) define('WIN32_ERROR_SERVICE_NO_THREAD',0x0000041E);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_NOT_ACTIVE')) define('WIN32_ERROR_SERVICE_NOT_ACTIVE',0x00000426);
|
if(!defined('WIN32_ERROR_SERVICE_NOT_ACTIVE')) define('WIN32_ERROR_SERVICE_NOT_ACTIVE',0x00000426);
|
||||||
if(!defined('WIN32_ERROR_SERVICE_REQUEST_TIMEOUT')) define('WIN32_ERROR_SERVICE_REQUEST_TIMEOUT',0x0000041D);
|
if(!defined('WIN32_ERROR_SERVICE_REQUEST_TIMEOUT')) define('WIN32_ERROR_SERVICE_REQUEST_TIMEOUT',0x0000041D);
|
||||||
if(!defined('WIN32_ERROR_SHUTDOWN_IN_PROGRESS')) define('WIN32_ERROR_SHUTDOWN_IN_PROGRESS',0x0000045B);
|
if(!defined('WIN32_ERROR_SHUTDOWN_IN_PROGRESS')) define('WIN32_ERROR_SHUTDOWN_IN_PROGRESS',0x0000045B);
|
||||||
if(!defined('WIN32_NO_ERROR')) define('WIN32_NO_ERROR',0x00000000);
|
if(!defined('WIN32_NO_ERROR')) define('WIN32_NO_ERROR',0x00000000);
|
||||||
|
|
||||||
if(function_exists('win32_query_service_status')){
|
if(function_exists('win32_query_service_status')){
|
||||||
|
|
||||||
class win_service{
|
class win_service{
|
||||||
private static $service_state = array(
|
private static $service_state = array(
|
||||||
//Service Status Constants
|
//Service Status Constants
|
||||||
WIN32_SERVICE_CONTINUE_PENDING =>'CONTINUE_PENDING',
|
WIN32_SERVICE_CONTINUE_PENDING =>'CONTINUE_PENDING',
|
||||||
WIN32_SERVICE_PAUSE_PENDING =>'PAUSE_PENDING',
|
WIN32_SERVICE_PAUSE_PENDING =>'PAUSE_PENDING',
|
||||||
WIN32_SERVICE_PAUSED =>'PAUSED',
|
WIN32_SERVICE_PAUSED =>'PAUSED',
|
||||||
WIN32_SERVICE_RUNNING =>'RUNNING',
|
WIN32_SERVICE_RUNNING =>'RUNNING',
|
||||||
WIN32_SERVICE_START_PENDING =>'START_PENDING',
|
WIN32_SERVICE_START_PENDING =>'START_PENDING',
|
||||||
WIN32_SERVICE_STOP_PENDING =>'STOP_PENDING',
|
WIN32_SERVICE_STOP_PENDING =>'STOP_PENDING',
|
||||||
WIN32_SERVICE_STOPPED =>'STOPPED',
|
WIN32_SERVICE_STOPPED =>'STOPPED',
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $win_error = array(
|
private static $win_error = array(
|
||||||
WIN32_NO_ERROR => 'NO_ERROR',
|
WIN32_NO_ERROR => 'NO_ERROR',
|
||||||
WIN32_ERROR_ACCESS_DENIED => 'ACCESS_DENIED',
|
WIN32_ERROR_ACCESS_DENIED => 'ACCESS_DENIED',
|
||||||
WIN32_ERROR_CIRCULAR_DEPENDENCY => 'CIRCULAR_DEPENDENCY',
|
WIN32_ERROR_CIRCULAR_DEPENDENCY => 'CIRCULAR_DEPENDENCY',
|
||||||
WIN32_ERROR_DATABASE_DOES_NOT_EXIST => 'DATABASE_DOES_NOT_EXIST',
|
WIN32_ERROR_DATABASE_DOES_NOT_EXIST => 'DATABASE_DOES_NOT_EXIST',
|
||||||
WIN32_ERROR_DEPENDENT_SERVICES_RUNNING => 'DEPENDENT_SERVICES_RUNNING',
|
WIN32_ERROR_DEPENDENT_SERVICES_RUNNING => 'DEPENDENT_SERVICES_RUNNING',
|
||||||
WIN32_ERROR_DUPLICATE_SERVICE_NAME => 'DUPLICATE_SERVICE_NAME',
|
WIN32_ERROR_DUPLICATE_SERVICE_NAME => 'DUPLICATE_SERVICE_NAME',
|
||||||
WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT => 'FAILED_SERVICE_CONTROLLER_CONNECT',
|
WIN32_ERROR_FAILED_SERVICE_CONTROLLER_CONNECT => 'FAILED_SERVICE_CONTROLLER_CONNECT',
|
||||||
WIN32_ERROR_INSUFFICIENT_BUFFER => 'INSUFFICIENT_BUFFER',
|
WIN32_ERROR_INSUFFICIENT_BUFFER => 'INSUFFICIENT_BUFFER',
|
||||||
WIN32_ERROR_INVALID_DATA => 'INVALID_DATA',
|
WIN32_ERROR_INVALID_DATA => 'INVALID_DATA',
|
||||||
WIN32_ERROR_INVALID_HANDLE => 'INVALID_HANDLE',
|
WIN32_ERROR_INVALID_HANDLE => 'INVALID_HANDLE',
|
||||||
WIN32_ERROR_INVALID_LEVEL => 'INVALID_LEVEL',
|
WIN32_ERROR_INVALID_LEVEL => 'INVALID_LEVEL',
|
||||||
WIN32_ERROR_INVALID_NAME => 'INVALID_NAME',
|
WIN32_ERROR_INVALID_NAME => 'INVALID_NAME',
|
||||||
WIN32_ERROR_INVALID_PARAMETER => 'INVALID_PARAMETER',
|
WIN32_ERROR_INVALID_PARAMETER => 'INVALID_PARAMETER',
|
||||||
WIN32_ERROR_INVALID_SERVICE_ACCOUNT => 'INVALID_SERVICE_ACCOUNT',
|
WIN32_ERROR_INVALID_SERVICE_ACCOUNT => 'INVALID_SERVICE_ACCOUNT',
|
||||||
WIN32_ERROR_INVALID_SERVICE_CONTROL => 'INVALID_SERVICE_CONTROL',
|
WIN32_ERROR_INVALID_SERVICE_CONTROL => 'INVALID_SERVICE_CONTROL',
|
||||||
WIN32_ERROR_PATH_NOT_FOUND => 'PATH_NOT_FOUND',
|
WIN32_ERROR_PATH_NOT_FOUND => 'PATH_NOT_FOUND',
|
||||||
WIN32_ERROR_SERVICE_ALREADY_RUNNING => 'SERVICE_ALREADY_RUNNING',
|
WIN32_ERROR_SERVICE_ALREADY_RUNNING => 'SERVICE_ALREADY_RUNNING',
|
||||||
WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL => 'SERVICE_CANNOT_ACCEPT_CTRL',
|
WIN32_ERROR_SERVICE_CANNOT_ACCEPT_CTRL => 'SERVICE_CANNOT_ACCEPT_CTRL',
|
||||||
WIN32_ERROR_SERVICE_DATABASE_LOCKED => 'SERVICE_DATABASE_LOCKED',
|
WIN32_ERROR_SERVICE_DATABASE_LOCKED => 'SERVICE_DATABASE_LOCKED',
|
||||||
WIN32_ERROR_SERVICE_DEPENDENCY_DELETED => 'SERVICE_DEPENDENCY_DELETED',
|
WIN32_ERROR_SERVICE_DEPENDENCY_DELETED => 'SERVICE_DEPENDENCY_DELETED',
|
||||||
WIN32_ERROR_SERVICE_DEPENDENCY_FAIL => 'SERVICE_DEPENDENCY_FAIL',
|
WIN32_ERROR_SERVICE_DEPENDENCY_FAIL => 'SERVICE_DEPENDENCY_FAIL',
|
||||||
WIN32_ERROR_SERVICE_DISABLED => 'SERVICE_DISABLED',
|
WIN32_ERROR_SERVICE_DISABLED => 'SERVICE_DISABLED',
|
||||||
WIN32_ERROR_SERVICE_DOES_NOT_EXIST => 'SERVICE_DOES_NOT_EXIST',
|
WIN32_ERROR_SERVICE_DOES_NOT_EXIST => 'SERVICE_DOES_NOT_EXIST',
|
||||||
WIN32_ERROR_SERVICE_EXISTS => 'SERVICE_EXISTS',
|
WIN32_ERROR_SERVICE_EXISTS => 'SERVICE_EXISTS',
|
||||||
WIN32_ERROR_SERVICE_LOGON_FAILED => 'SERVICE_LOGON_FAILED',
|
WIN32_ERROR_SERVICE_LOGON_FAILED => 'SERVICE_LOGON_FAILED',
|
||||||
WIN32_ERROR_SERVICE_MARKED_FOR_DELETE => 'SERVICE_MARKED_FOR_DELETE',
|
WIN32_ERROR_SERVICE_MARKED_FOR_DELETE => 'SERVICE_MARKED_FOR_DELETE',
|
||||||
WIN32_ERROR_SERVICE_NO_THREAD => 'SERVICE_NO_THREAD',
|
WIN32_ERROR_SERVICE_NO_THREAD => 'SERVICE_NO_THREAD',
|
||||||
WIN32_ERROR_SERVICE_NOT_ACTIVE => 'SERVICE_NOT_ACTIVE',
|
WIN32_ERROR_SERVICE_NOT_ACTIVE => 'SERVICE_NOT_ACTIVE',
|
||||||
WIN32_ERROR_SERVICE_REQUEST_TIMEOUT => 'SERVICE_REQUEST_TIMEOUT',
|
WIN32_ERROR_SERVICE_REQUEST_TIMEOUT => 'SERVICE_REQUEST_TIMEOUT',
|
||||||
WIN32_ERROR_SHUTDOWN_IN_PROGRESS => 'SHUTDOWN_IN_PROGRESS'
|
WIN32_ERROR_SHUTDOWN_IN_PROGRESS => 'SHUTDOWN_IN_PROGRESS'
|
||||||
);
|
);
|
||||||
|
|
||||||
private static function val2val($val,$map,$default){
|
private static function val2val($val,$map,$default){
|
||||||
if(isset($map[$val])) return $map[$val];
|
if(isset($map[$val])) return $map[$val];
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $status;
|
var $status;
|
||||||
var $last_error;
|
var $last_error;
|
||||||
var $name;
|
var $name;
|
||||||
var $description;
|
var $description;
|
||||||
var $machine;
|
var $machine;
|
||||||
|
|
||||||
function win_service($srvname, $machine=null){
|
function win_service($srvname, $machine=null){
|
||||||
$this->name = $srvname;
|
$this->name = $srvname;
|
||||||
$this->machine = $machine;
|
$this->machine = $machine;
|
||||||
$this->status = null;
|
$this->status = null;
|
||||||
$this->last_error = WIN32_NO_ERROR;
|
$this->last_error = WIN32_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh_status(){
|
function refresh_status(){
|
||||||
$status = win32_query_service_status($this->name,$this->machine);
|
$status = win32_query_service_status($this->name,$this->machine);
|
||||||
if(is_array($status)){
|
if(is_array($status)){
|
||||||
$this->status = (object)$status;
|
$this->status = (object)$status;
|
||||||
$this->last_error = WIN32_NO_ERROR;
|
$this->last_error = WIN32_NO_ERROR;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$this->status = null;
|
$this->status = null;
|
||||||
$last_error = $status;
|
$last_error = $status;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function start(){
|
function start(){
|
||||||
$this->last_error = win32_start_service($this->name, $this->machine);
|
$this->last_error = win32_start_service($this->name, $this->machine);
|
||||||
return ($this->last_error === WIN32_NO_ERROR) or ($this->last_error === WIN32_ERROR_SERVICE_ALREADY_RUNNING);
|
return ($this->last_error === WIN32_NO_ERROR) or ($this->last_error === WIN32_ERROR_SERVICE_ALREADY_RUNNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop(){
|
function stop(){
|
||||||
$this->last_error = win32_stop_service($this->name, $this->machine);
|
$this->last_error = win32_stop_service($this->name, $this->machine);
|
||||||
return $this->last_error === WIN32_NO_ERROR;
|
return $this->last_error === WIN32_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
function last_error($as_string = true){
|
function last_error($as_string = true){
|
||||||
if($as_string){
|
if($as_string){
|
||||||
return self::val2val(
|
return self::val2val(
|
||||||
$this->last_error, self::$win_error, $this->last_error
|
$this->last_error, self::$win_error, $this->last_error
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $this->last_error;
|
return $this->last_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
function state($as_string = true){
|
function state($as_string = true){
|
||||||
if((!$this->status)and(!$this->refresh_status())) return false;
|
if((!$this->status)and(!$this->refresh_status())) return false;
|
||||||
if($as_string){
|
if($as_string){
|
||||||
return self::val2val(
|
return self::val2val(
|
||||||
$this->status->CurrentState, self::$service_state, 'UNKNOWN'
|
$this->status->CurrentState, self::$service_state, 'UNKNOWN'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $this->status->CurrentState;
|
return $this->status->CurrentState;
|
||||||
}
|
}
|
||||||
|
|
||||||
function pid(){
|
function pid(){
|
||||||
if((!$this->status)and(!$this->refresh_status())) return false;
|
if((!$this->status)and(!$this->refresh_status())) return false;
|
||||||
return $this->status->ProcessId;
|
return $this->status->ProcessId;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(function_exists('reg_open_key')){
|
if(function_exists('reg_open_key')){
|
||||||
|
|
||||||
class win_reg_key{
|
class win_reg_key{
|
||||||
|
|
||||||
private static $HK = array(
|
private static $HK = array(
|
||||||
HKEY_CLASSES_ROOT => "HKCR",
|
HKEY_CLASSES_ROOT => "HKCR",
|
||||||
HKEY_CURRENT_USER => "HKCU",
|
HKEY_CURRENT_USER => "HKCU",
|
||||||
HKEY_LOCAL_MACHINE => "HKLM",
|
HKEY_LOCAL_MACHINE => "HKLM",
|
||||||
HKEY_USERS => "HKU",
|
HKEY_USERS => "HKU",
|
||||||
HKEY_CURRENT_CONFIG => "HKCC",
|
HKEY_CURRENT_CONFIG => "HKCC",
|
||||||
);
|
);
|
||||||
|
|
||||||
function __construct($haiv, $key){
|
function __construct($haiv, $key){
|
||||||
$this->h = $haiv;
|
$this->h = $haiv;
|
||||||
$this->k = $key;
|
$this->k = $key;
|
||||||
$this->r = reg_open_key($this->h, $this->k);
|
$this->r = reg_open_key($this->h, $this->k);
|
||||||
$this->shell = new COM('WScript.Shell');
|
$this->shell = new COM('WScript.Shell');
|
||||||
if(!$this->shell){
|
if(!$this->shell){
|
||||||
throw new Exception("Cannot create shell object.");
|
throw new Exception("Cannot create shell object.");
|
||||||
}
|
}
|
||||||
if(!$this->r){
|
if(!$this->r){
|
||||||
throw new Exception("Cannot access registry.");
|
throw new Exception("Cannot access registry.");
|
||||||
}
|
}
|
||||||
$this->path = self::$HK[$this->h] . '\\' . $this->k;
|
$this->path = self::$HK[$this->h] . '\\' . $this->k;
|
||||||
}
|
}
|
||||||
|
|
||||||
function __destruct(){
|
function __destruct(){
|
||||||
if($this->r){
|
if($this->r){
|
||||||
reg_close_key($this->r);
|
reg_close_key($this->r);
|
||||||
$this->r = false;
|
$this->r = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function keys(){
|
function keys(){
|
||||||
return reg_enum_key($this->r);
|
return reg_enum_key($this->r);
|
||||||
}
|
}
|
||||||
|
|
||||||
function values($as_hash = false){
|
function values($as_hash = false){
|
||||||
$values = reg_enum_value($this->r);
|
$values = reg_enum_value($this->r);
|
||||||
if(!$as_hash) return $values;
|
if(!$as_hash) return $values;
|
||||||
$result = Array();
|
$result = Array();
|
||||||
foreach($values as $key){
|
foreach($values as $key){
|
||||||
$result[$key] = reg_get_value($this->r, $key);
|
$result[$key] = reg_get_value($this->r, $key);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function value($key){
|
function value($key){
|
||||||
return reg_get_value($this->r, $key);
|
return reg_get_value($this->r, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
function exists($key){
|
function exists($key){
|
||||||
$v = $this->value($key);
|
$v = $this->value($key);
|
||||||
if($v === NULL) return false;
|
if($v === NULL) return false;
|
||||||
if($v === false) return false;
|
if($v === false) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function write_raw($key, $type, $value){
|
private function write_raw($key, $type, $value){
|
||||||
return reg_set_value($this->r, $key, $type, $value);
|
return reg_set_value($this->r, $key, $type, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function write_dword($key, $value){
|
function write_dword($key, $value){
|
||||||
return $this->write_raw($key, REG_DWORD, $value);
|
return $this->write_raw($key, REG_DWORD, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function write_string($key, $value){
|
function write_string($key, $value){
|
||||||
return $this->write_raw($key, REG_SZ, $value);
|
return $this->write_raw($key, REG_SZ, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_value($key){
|
function remove_value($key){
|
||||||
if(!$this->exists($key)) return;
|
if(!$this->exists($key)) return;
|
||||||
$key = $this->path . '\\' . $key;
|
$key = $this->path . '\\' . $key;
|
||||||
$this->shell->RegDelete($key);
|
$this->shell->RegDelete($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,117 +1,117 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
|
|
||||||
//define holiday presets
|
//define holiday presets
|
||||||
$preset['usa'][] = json_encode(array("new_years_day" => array("mday" => "1", "mon" => "1")));
|
$preset['usa'][] = json_encode(array("new_years_day" => array("mday" => "1", "mon" => "1")));
|
||||||
$preset['usa'][] = json_encode(array("martin_luther_king_jr_day" => array("wday" => "2", "mon" => "1", "mweek" => "3")));
|
$preset['usa'][] = json_encode(array("martin_luther_king_jr_day" => array("wday" => "2", "mon" => "1", "mweek" => "3")));
|
||||||
$preset['usa'][] = json_encode(array("presidents_day" => array("wday" => "2", "mon" => "2", "mweek" => "3")));
|
$preset['usa'][] = json_encode(array("presidents_day" => array("wday" => "2", "mon" => "2", "mweek" => "3")));
|
||||||
$preset['usa'][] = json_encode(array("memorial_day" => array("mday" => "25-31", "wday" => "2", "mon" => "5")));
|
$preset['usa'][] = json_encode(array("memorial_day" => array("mday" => "25-31", "wday" => "2", "mon" => "5")));
|
||||||
$preset['usa'][] = json_encode(array("independence_day" => array("mday" => "4", "mon" => "7")));
|
$preset['usa'][] = json_encode(array("independence_day" => array("mday" => "4", "mon" => "7")));
|
||||||
$preset['usa'][] = json_encode(array("labor_day" => array("wday" => "2", "mon" => "9", "mweek" => "1")));
|
$preset['usa'][] = json_encode(array("labor_day" => array("wday" => "2", "mon" => "9", "mweek" => "1")));
|
||||||
$preset['usa'][] = json_encode(array("columbus_day" => array("wday" => "2", "mon" => "10", "mweek" => "2")));
|
$preset['usa'][] = json_encode(array("columbus_day" => array("wday" => "2", "mon" => "10", "mweek" => "2")));
|
||||||
$preset['usa'][] = json_encode(array("veterans_day" => array("mday" => "11", "mon" => "11")));
|
$preset['usa'][] = json_encode(array("veterans_day" => array("mday" => "11", "mon" => "11")));
|
||||||
$preset['usa'][] = json_encode(array("thanksgiving_day" => array("wday" => "5-6", "mon" => "11", "mweek" => "4")));
|
$preset['usa'][] = json_encode(array("thanksgiving_day" => array("wday" => "5-6", "mon" => "11", "mweek" => "4")));
|
||||||
$preset['usa'][] = json_encode(array("christmas_day" => array("mday" => "25", "mon" => "12")));
|
$preset['usa'][] = json_encode(array("christmas_day" => array("mday" => "25", "mon" => "12")));
|
||||||
|
|
||||||
$preset['england'][] = json_encode(array("new_years_day" => array("mday" => "1", "mon" => "1")));
|
$preset['england'][] = json_encode(array("new_years_day" => array("mday" => "1", "mon" => "1")));
|
||||||
$preset['england'][] = json_encode(array("christmas_day" => array("mday" => "25", "mon" => "12")));
|
$preset['england'][] = json_encode(array("christmas_day" => array("mday" => "25", "mon" => "12")));
|
||||||
$preset['england'][] = json_encode(array("boxing_day" => array("mday" => "26", "mon" => "12")));
|
$preset['england'][] = json_encode(array("boxing_day" => array("mday" => "26", "mon" => "12")));
|
||||||
$preset['england'][] = json_encode(array("may_day" => array("mon" => "5", "mweek" => "1", "wday" => "2")));
|
$preset['england'][] = json_encode(array("may_day" => array("mon" => "5", "mweek" => "1", "wday" => "2")));
|
||||||
$preset['england'][] = json_encode(array("spring_bank_holiday" => array("mon" => "5", "mday" => "25-31", "wday" => "2")));
|
$preset['england'][] = json_encode(array("spring_bank_holiday" => array("mon" => "5", "mday" => "25-31", "wday" => "2")));
|
||||||
$preset['england'][] = json_encode(array("august_bank_holiday" => array("mon" => "8", "mday" => "25-31", "wday" => "2")));
|
$preset['england'][] = json_encode(array("august_bank_holiday" => array("mon" => "8", "mday" => "25-31", "wday" => "2")));
|
||||||
|
|
||||||
//iterate and migrate old presets first
|
//iterate and migrate old presets first
|
||||||
$sql = "update v_default_settings ";
|
$sql = "update v_default_settings ";
|
||||||
$sql .= "set default_setting_subcategory = 'preset_usa' ";
|
$sql .= "set default_setting_subcategory = 'preset_usa' ";
|
||||||
$sql .= ", default_setting_description = 'usa Holiday' ";
|
$sql .= ", default_setting_description = 'usa Holiday' ";
|
||||||
$sql .= "where default_setting_category = 'time_conditions' ";
|
$sql .= "where default_setting_category = 'time_conditions' ";
|
||||||
$sql .= "and default_setting_subcategory = 'preset' ";
|
$sql .= "and default_setting_subcategory = 'preset' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
//iterate and add each, if necessary
|
//iterate and add each, if necessary
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($preset as $region => $data) {
|
foreach ($preset as $region => $data) {
|
||||||
$sql = "select * from v_default_settings ";
|
$sql = "select * from v_default_settings ";
|
||||||
$sql .= "where default_setting_category = 'time_conditions' ";
|
$sql .= "where default_setting_category = 'time_conditions' ";
|
||||||
$sql .= "and default_setting_subcategory = 'preset_$region' ";
|
$sql .= "and default_setting_subcategory = 'preset_$region' ";
|
||||||
$sql .= "and default_setting_name = 'array' ";
|
$sql .= "and default_setting_name = 'array' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
foreach ($data as $json) {
|
foreach ($data as $json) {
|
||||||
$found = false;
|
$found = false;
|
||||||
$missing[$x]['default_setting_category'] = 'time_conditions';
|
$missing[$x]['default_setting_category'] = 'time_conditions';
|
||||||
$missing[$x]['default_setting_subcategory'] = "preset_$region";
|
$missing[$x]['default_setting_subcategory'] = "preset_$region";
|
||||||
$missing[$x]['default_setting_name'] = 'array';
|
$missing[$x]['default_setting_name'] = 'array';
|
||||||
$missing[$x]['default_setting_value'] = $json;
|
$missing[$x]['default_setting_value'] = $json;
|
||||||
$missing[$x]['default_setting_enabled'] = 'true';
|
$missing[$x]['default_setting_enabled'] = 'true';
|
||||||
$missing[$x]['default_setting_description'] = "$region Holiday";
|
$missing[$x]['default_setting_description'] = "$region Holiday";
|
||||||
foreach ($default_settings as $row) {
|
foreach ($default_settings as $row) {
|
||||||
if (trim($row['default_setting_value']) == trim($json)) {
|
if (trim($row['default_setting_value']) == trim($json)) {
|
||||||
$found = true;
|
$found = true;
|
||||||
//remove items from the array that were found
|
//remove items from the array that were found
|
||||||
unset($missing[$x]);
|
unset($missing[$x]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the missing default settings
|
//add the missing default settings
|
||||||
foreach ($missing as $row) {
|
foreach ($missing as $row) {
|
||||||
//add the default settings
|
//add the default settings
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->save($row);
|
$orm->save($row);
|
||||||
$message = $orm->message;
|
$message = $orm->message;
|
||||||
unset($orm);
|
unset($orm);
|
||||||
//print_r($message);
|
//print_r($message);
|
||||||
}
|
}
|
||||||
unset($missing);
|
unset($missing);
|
||||||
|
|
||||||
$array[$x]['default_setting_category'] = 'time_conditions';
|
$array[$x]['default_setting_category'] = 'time_conditions';
|
||||||
$array[$x]['default_setting_subcategory'] = 'region';
|
$array[$x]['default_setting_subcategory'] = 'region';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'usa';
|
$array[$x]['default_setting_value'] = 'usa';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'What region to use by default when choosing Time Conditions';
|
$array[$x]['default_setting_description'] = 'What region to use by default when choosing Time Conditions';
|
||||||
$x++;
|
$x++;
|
||||||
|
|
||||||
//iterate and add each, if necessary
|
//iterate and add each, if necessary
|
||||||
foreach ($array as $index => $default_settings) {
|
foreach ($array as $index => $default_settings) {
|
||||||
|
|
||||||
//add the default setting
|
//add the default setting
|
||||||
$sql = "select count(*) as num_rows from v_default_settings ";
|
$sql = "select count(*) as num_rows from v_default_settings ";
|
||||||
$sql .= "where default_setting_category = '".$default_settings['default_setting_category']."' ";
|
$sql .= "where default_setting_category = '".$default_settings['default_setting_category']."' ";
|
||||||
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
|
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
|
||||||
$sql .= "and default_setting_name = '".$default_settings['default_setting_name']."' ";
|
$sql .= "and default_setting_name = '".$default_settings['default_setting_name']."' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
if ($row['num_rows'] == 0) {
|
if ($row['num_rows'] == 0) {
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->save($array[$index]);
|
$orm->save($array[$index]);
|
||||||
$message = $orm->message;
|
$message = $orm->message;
|
||||||
//print_r($message);
|
//print_r($message);
|
||||||
}
|
}
|
||||||
unset($row);
|
unset($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//unset the array variable
|
//unset the array variable
|
||||||
unset($array);
|
unset($array);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+1114
-1114
File diff suppressed because it is too large
Load Diff
@@ -1,123 +1,123 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
//if greeting filename field empty, copy greeting name field value
|
//if greeting filename field empty, copy greeting name field value
|
||||||
$sql = "update v_voicemail_greetings ";
|
$sql = "update v_voicemail_greetings ";
|
||||||
$sql .= "set greeting_filename = greeting_name ";
|
$sql .= "set greeting_filename = greeting_name ";
|
||||||
$sql .= "where greeting_filename is null ";
|
$sql .= "where greeting_filename is null ";
|
||||||
$sql .= "or greeting_filename = '' ";
|
$sql .= "or greeting_filename = '' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//populate greeting id number if empty
|
//populate greeting id number if empty
|
||||||
$sql = "select voicemail_greeting_uuid, greeting_filename ";
|
$sql = "select voicemail_greeting_uuid, greeting_filename ";
|
||||||
$sql .= "from v_voicemail_greetings ";
|
$sql .= "from v_voicemail_greetings ";
|
||||||
$sql .= "where greeting_id is null ";
|
$sql .= "where greeting_id is null ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
||||||
$greeting_id = preg_replace('{\D}', '', $row['greeting_filename']);
|
$greeting_id = preg_replace('{\D}', '', $row['greeting_filename']);
|
||||||
$sqlu = "update v_voicemail_greetings ";
|
$sqlu = "update v_voicemail_greetings ";
|
||||||
$sqlu .= "set greeting_id = ".$greeting_id." ";
|
$sqlu .= "set greeting_id = ".$greeting_id." ";
|
||||||
$sqlu .= "where voicemail_greeting_uuid = '".$voicemail_greeting_uuid."' ";
|
$sqlu .= "where voicemail_greeting_uuid = '".$voicemail_greeting_uuid."' ";
|
||||||
$db->exec(check_sql($sqlu));
|
$db->exec(check_sql($sqlu));
|
||||||
unset($sqlu, $voicemail_greeting_uuid, $greeting_id);
|
unset($sqlu, $voicemail_greeting_uuid, $greeting_id);
|
||||||
}
|
}
|
||||||
unset ($sql, $prep_statement);
|
unset ($sql, $prep_statement);
|
||||||
|
|
||||||
//if base64, populate from existing greeting files, then remove
|
//if base64, populate from existing greeting files, then remove
|
||||||
if ($_SESSION['voicemail']['storage_type']['text'] == 'base64') {
|
if ($_SESSION['voicemail']['storage_type']['text'] == 'base64') {
|
||||||
//get greetings without base64 in db
|
//get greetings without base64 in db
|
||||||
$sql = "select voicemail_greeting_uuid, domain_uuid, voicemail_id, greeting_filename ";
|
$sql = "select voicemail_greeting_uuid, domain_uuid, voicemail_id, greeting_filename ";
|
||||||
$sql .= "from v_voicemail_greetings where greeting_base64 is null or greeting_base64 = '' ";
|
$sql .= "from v_voicemail_greetings where greeting_base64 is null or greeting_base64 = '' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) > 0) {
|
if (count($result) > 0) {
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
||||||
$greeting_domain_uuid = $row['domain_uuid'];
|
$greeting_domain_uuid = $row['domain_uuid'];
|
||||||
$voicemail_id = $row['voicemail_id'];
|
$voicemail_id = $row['voicemail_id'];
|
||||||
$greeting_filename = $row['greeting_filename'];
|
$greeting_filename = $row['greeting_filename'];
|
||||||
//set greeting directory
|
//set greeting directory
|
||||||
$greeting_directory = $_SESSION['switch']['storage']['dir'].'/voicemail/default/'.$_SESSION['domains'][$greeting_domain_uuid]['domain_name'].'/'.$voicemail_id;
|
$greeting_directory = $_SESSION['switch']['storage']['dir'].'/voicemail/default/'.$_SESSION['domains'][$greeting_domain_uuid]['domain_name'].'/'.$voicemail_id;
|
||||||
//encode greeting file (if exists)
|
//encode greeting file (if exists)
|
||||||
if (file_exists($greeting_directory.'/'.$greeting_filename)) {
|
if (file_exists($greeting_directory.'/'.$greeting_filename)) {
|
||||||
$greeting_base64 = base64_encode(file_get_contents($greeting_directory.'/'.$greeting_filename));
|
$greeting_base64 = base64_encode(file_get_contents($greeting_directory.'/'.$greeting_filename));
|
||||||
//update greeting record with base64
|
//update greeting record with base64
|
||||||
$sql = "update v_voicemail_greetings set ";
|
$sql = "update v_voicemail_greetings set ";
|
||||||
$sql .= "greeting_base64 = '".$greeting_base64."' ";
|
$sql .= "greeting_base64 = '".$greeting_base64."' ";
|
||||||
$sql .= "where domain_uuid = '".$greeting_domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$greeting_domain_uuid."' ";
|
||||||
$sql .= "and voicemail_greeting_uuid = '".$voicemail_greeting_uuid."' ";
|
$sql .= "and voicemail_greeting_uuid = '".$voicemail_greeting_uuid."' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
//remove local greeting file
|
//remove local greeting file
|
||||||
@unlink($greeting_directory.'/'.$greeting_filename);
|
@unlink($greeting_directory.'/'.$greeting_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql, $prep_statement, $result, $row);
|
unset($sql, $prep_statement, $result, $row);
|
||||||
}
|
}
|
||||||
//if not base64, decode to local files, remove base64 data from db
|
//if not base64, decode to local files, remove base64 data from db
|
||||||
else if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
else if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||||
//get greetings with base64 in db
|
//get greetings with base64 in db
|
||||||
$sql = "select voicemail_greeting_uuid, domain_uuid, voicemail_id, greeting_filename, greeting_base64 ";
|
$sql = "select voicemail_greeting_uuid, domain_uuid, voicemail_id, greeting_filename, greeting_base64 ";
|
||||||
$sql .= "from v_voicemail_greetings where greeting_base64 is not null ";
|
$sql .= "from v_voicemail_greetings where greeting_base64 is not null ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) > 0) {
|
if (count($result) > 0) {
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
||||||
$greeting_domain_uuid = $row['domain_uuid'];
|
$greeting_domain_uuid = $row['domain_uuid'];
|
||||||
$voicemail_id = $row['voicemail_id'];
|
$voicemail_id = $row['voicemail_id'];
|
||||||
$greeting_filename = $row['greeting_filename'];
|
$greeting_filename = $row['greeting_filename'];
|
||||||
$greeting_base64 = $row['greeting_base64'];
|
$greeting_base64 = $row['greeting_base64'];
|
||||||
//set greeting directory
|
//set greeting directory
|
||||||
$greeting_directory = $_SESSION['switch']['storage']['dir'].'/voicemail/default/'.$_SESSION['domains'][$greeting_domain_uuid]['domain_name'].'/'.$voicemail_id;
|
$greeting_directory = $_SESSION['switch']['storage']['dir'].'/voicemail/default/'.$_SESSION['domains'][$greeting_domain_uuid]['domain_name'].'/'.$voicemail_id;
|
||||||
//remove local file, if any
|
//remove local file, if any
|
||||||
if (file_exists($greeting_directory.'/'.$greeting_filename)) {
|
if (file_exists($greeting_directory.'/'.$greeting_filename)) {
|
||||||
@unlink($greeting_directory.'/'.$greeting_filename);
|
@unlink($greeting_directory.'/'.$greeting_filename);
|
||||||
}
|
}
|
||||||
//decode base64, save to local file
|
//decode base64, save to local file
|
||||||
$greeting_decoded = base64_decode($greeting_base64);
|
$greeting_decoded = base64_decode($greeting_base64);
|
||||||
file_put_contents($greeting_directory.'/'.$greeting_filename, $greeting_decoded);
|
file_put_contents($greeting_directory.'/'.$greeting_filename, $greeting_decoded);
|
||||||
$sql = "update v_voicemail_greetings ";
|
$sql = "update v_voicemail_greetings ";
|
||||||
$sql .= "set greeting_base64 = null ";
|
$sql .= "set greeting_base64 = null ";
|
||||||
$sql .= "where domain_uuid = '".$greeting_domain_uuid."' ";
|
$sql .= "where domain_uuid = '".$greeting_domain_uuid."' ";
|
||||||
$sql .= "and voicemail_greeting_uuid = '".$voicemail_greeting_uuid."' ";
|
$sql .= "and voicemail_greeting_uuid = '".$voicemail_greeting_uuid."' ";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql, $prep_statement, $result, $row);
|
unset($sql, $prep_statement, $result, $row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,97 +1,97 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//proccess this only one time
|
//proccess this only one time
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
|
|
||||||
//migrate existing attachment preferences to new column, where appropriate
|
//migrate existing attachment preferences to new column, where appropriate
|
||||||
$sql = "update v_voicemails set voicemail_file = 'attach' where voicemail_attach_file = 'true'";
|
$sql = "update v_voicemails set voicemail_file = 'attach' where voicemail_attach_file = 'true'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//define array of settings
|
//define array of settings
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$array[$x]['default_setting_category'] = 'voicemail';
|
$array[$x]['default_setting_category'] = 'voicemail';
|
||||||
$array[$x]['default_setting_subcategory'] = 'voicemail_file';
|
$array[$x]['default_setting_subcategory'] = 'voicemail_file';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'attach';
|
$array[$x]['default_setting_value'] = 'attach';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Define whether to attach voicemail files to email notifications, or only include a link.';
|
$array[$x]['default_setting_description'] = 'Define whether to attach voicemail files to email notifications, or only include a link.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'voicemail';
|
$array[$x]['default_setting_category'] = 'voicemail';
|
||||||
$array[$x]['default_setting_subcategory'] = 'keep_local';
|
$array[$x]['default_setting_subcategory'] = 'keep_local';
|
||||||
$array[$x]['default_setting_name'] = 'boolean';
|
$array[$x]['default_setting_name'] = 'boolean';
|
||||||
$array[$x]['default_setting_value'] = 'true';
|
$array[$x]['default_setting_value'] = 'true';
|
||||||
$array[$x]['default_setting_enabled'] = 'true';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Define whether to keep voicemail files on the local system after sending attached via email.';
|
$array[$x]['default_setting_description'] = 'Define whether to keep voicemail files on the local system after sending attached via email.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'voicemail';
|
$array[$x]['default_setting_category'] = 'voicemail';
|
||||||
$array[$x]['default_setting_subcategory'] = 'storage_type';
|
$array[$x]['default_setting_subcategory'] = 'storage_type';
|
||||||
$array[$x]['default_setting_name'] = 'text';
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
$array[$x]['default_setting_value'] = 'base64';
|
$array[$x]['default_setting_value'] = 'base64';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'false';
|
||||||
$array[$x]['default_setting_description'] = 'Define which storage type (base_64 stores in the database).';
|
$array[$x]['default_setting_description'] = 'Define which storage type (base_64 stores in the database).';
|
||||||
$x++;
|
$x++;
|
||||||
|
|
||||||
//iterate and add each, if necessary
|
//iterate and add each, if necessary
|
||||||
foreach ($array as $index => $default_settings) {
|
foreach ($array as $index => $default_settings) {
|
||||||
//add the default setting
|
//add the default setting
|
||||||
$sql = "select count(*) as num_rows from v_default_settings ";
|
$sql = "select count(*) as num_rows from v_default_settings ";
|
||||||
$sql .= "where default_setting_category = '".$default_settings['default_setting_category']."' ";
|
$sql .= "where default_setting_category = '".$default_settings['default_setting_category']."' ";
|
||||||
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
|
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
|
||||||
$sql .= "and default_setting_name = '".$default_settings['default_setting_name']."' ";
|
$sql .= "and default_setting_name = '".$default_settings['default_setting_name']."' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
unset($prep_statement);
|
unset($prep_statement);
|
||||||
if ($row['num_rows'] == 0) {
|
if ($row['num_rows'] == 0) {
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->save($array[$index]);
|
$orm->save($array[$index]);
|
||||||
$message = $orm->message;
|
$message = $orm->message;
|
||||||
//print_r($message);
|
//print_r($message);
|
||||||
}
|
}
|
||||||
unset($row);
|
unset($row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add that the directory structure for voicemail each domain and voicemail id is
|
//add that the directory structure for voicemail each domain and voicemail id is
|
||||||
$sql = "select d.domain_name, v.voicemail_id ";
|
$sql = "select d.domain_name, v.voicemail_id ";
|
||||||
$sql .= "from v_domains as d, v_voicemails as v ";
|
$sql .= "from v_domains as d, v_voicemails as v ";
|
||||||
$sql .= "where v.domain_uuid = d.domain_uuid ";
|
$sql .= "where v.domain_uuid = d.domain_uuid ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$voicemails = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
$voicemails = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||||
foreach ($voicemails as $row) {
|
foreach ($voicemails as $row) {
|
||||||
$path = $_SESSION['switch']['voicemail']['dir'].'/default/'.$row['domain_name'].'/'.$row['voicemail_id'];
|
$path = $_SESSION['switch']['voicemail']['dir'].'/default/'.$row['domain_name'].'/'.$row['voicemail_id'];
|
||||||
mkdir($path, 0777, true);
|
mkdir($path, 0777, true);
|
||||||
}
|
}
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+714
-714
File diff suppressed because it is too large
Load Diff
@@ -1,78 +1,78 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('voicemail_message_view')) {
|
if (permission_exists('voicemail_message_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get submitted variables
|
//get submitted variables
|
||||||
$voicemail_messages = $_REQUEST["voicemail_messages"];
|
$voicemail_messages = $_REQUEST["voicemail_messages"];
|
||||||
|
|
||||||
//toggle the voicemail message
|
//toggle the voicemail message
|
||||||
$toggled = 0;
|
$toggled = 0;
|
||||||
if (is_array($voicemail_messages) && sizeof($voicemail_messages) > 0) {
|
if (is_array($voicemail_messages) && sizeof($voicemail_messages) > 0) {
|
||||||
require_once "resources/classes/voicemail.php";
|
require_once "resources/classes/voicemail.php";
|
||||||
foreach ($voicemail_messages as $voicemail_uuid => $voicemail_message_uuids) {
|
foreach ($voicemail_messages as $voicemail_uuid => $voicemail_message_uuids) {
|
||||||
foreach ($voicemail_message_uuids as $voicemail_message_uuid) {
|
foreach ($voicemail_message_uuids as $voicemail_message_uuid) {
|
||||||
$voicemail = new voicemail;
|
$voicemail = new voicemail;
|
||||||
$voicemail->db = $db;
|
$voicemail->db = $db;
|
||||||
$voicemail->domain_uuid = $_SESSION['domain_uuid'];
|
$voicemail->domain_uuid = $_SESSION['domain_uuid'];
|
||||||
$voicemail->voicemail_uuid = check_str($voicemail_uuid);
|
$voicemail->voicemail_uuid = check_str($voicemail_uuid);
|
||||||
$voicemail->voicemail_message_uuid = check_str($voicemail_message_uuid);
|
$voicemail->voicemail_message_uuid = check_str($voicemail_message_uuid);
|
||||||
$result = $voicemail->message_toggle();
|
$result = $voicemail->message_toggle();
|
||||||
unset($voicemail);
|
unset($voicemail);
|
||||||
$toggled++;
|
$toggled++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the referrer
|
//set the referrer
|
||||||
$http_referer = parse_url($_SERVER["HTTP_REFERER"]);
|
$http_referer = parse_url($_SERVER["HTTP_REFERER"]);
|
||||||
$referer_path = $http_referer['path'];
|
$referer_path = $http_referer['path'];
|
||||||
$referer_query = $http_referer['query'];
|
$referer_query = $http_referer['query'];
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
if ($toggled > 0) {
|
if ($toggled > 0) {
|
||||||
$_SESSION["message"] = $text['message-toggled'].': '.$toggled;
|
$_SESSION["message"] = $text['message-toggled'].': '.$toggled;
|
||||||
}
|
}
|
||||||
if ($referer_path == PROJECT_PATH."/app/voicemails/voicemail_messages.php") {
|
if ($referer_path == PROJECT_PATH."/app/voicemails/voicemail_messages.php") {
|
||||||
header("Location: voicemail_messages.php?".$referer_query);
|
header("Location: voicemail_messages.php?".$referer_query);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header("Location: voicemails.php");
|
header("Location: voicemails.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+1282
-1282
File diff suppressed because it is too large
Load Diff
+214
-214
@@ -1,214 +1,214 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
require_once "resources/schema.php";
|
require_once "resources/schema.php";
|
||||||
//require_once "xml_cdr_statistics_inc.php";
|
//require_once "xml_cdr_statistics_inc.php";
|
||||||
if (permission_exists('xml_cdr_view')) {
|
if (permission_exists('xml_cdr_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
//require_once "xml_cdr_statistics_inc.php";
|
//require_once "xml_cdr_statistics_inc.php";
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$dom = date('m');
|
$dom = date('m');
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
|
|
||||||
if (strlen($where) == 0) {
|
if (strlen($where) == 0) {
|
||||||
$duuid = "domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
$duuid = "domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($y=0; $y<4; $y++) {
|
for ($y=0; $y<4; $y++) {
|
||||||
$fileheader = array( 'month', 'total calls' , 'total seconds' , 'total minutes' , 'total hours' , 'billing periods', 'rate', 'approx cost');
|
$fileheader = array( 'month', 'total calls' , 'total seconds' , 'total minutes' , 'total hours' , 'billing periods', 'rate', 'approx cost');
|
||||||
|
|
||||||
|
|
||||||
if ( $y == 0) {
|
if ( $y == 0) {
|
||||||
$tablename = "<b>Previous 12 Months Inbound Call Summary</b><br>";
|
$tablename = "<b>Previous 12 Months Inbound Call Summary</b><br>";
|
||||||
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='inbound') ";
|
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='inbound') ";
|
||||||
$sql3 = ";";
|
$sql3 = ";";
|
||||||
//really we should set rate in domain settings or something and pull it from the php session.
|
//really we should set rate in domain settings or something and pull it from the php session.
|
||||||
$rate=0.012;
|
$rate=0.012;
|
||||||
$bill_period=60;
|
$bill_period=60;
|
||||||
}
|
}
|
||||||
elseif ($y == 1) {
|
elseif ($y == 1) {
|
||||||
$tablename = "<b>Previous 12 Months Outbound Metered Call Summary</b><br>";
|
$tablename = "<b>Previous 12 Months Outbound Metered Call Summary</b><br>";
|
||||||
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='outbound') ";
|
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='outbound') ";
|
||||||
$sql3 = "and destination_number not like '%800_______' and destination_number not like '%888_______' and destination_number not like '%877_______' and destination_number not like '%866_______' and destination_number not like '%855_______' ;";
|
$sql3 = "and destination_number not like '%800_______' and destination_number not like '%888_______' and destination_number not like '%877_______' and destination_number not like '%866_______' and destination_number not like '%855_______' ;";
|
||||||
$rate=0.0098;
|
$rate=0.0098;
|
||||||
$rate=$rate/10;
|
$rate=$rate/10;
|
||||||
$bill_period=6;
|
$bill_period=6;
|
||||||
}
|
}
|
||||||
elseif ($y == 2) {
|
elseif ($y == 2) {
|
||||||
$tablename = "<b>Previous 12 Months Toll Free Call Summary</b><br>";
|
$tablename = "<b>Previous 12 Months Toll Free Call Summary</b><br>";
|
||||||
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='outbound') ";
|
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='outbound') ";
|
||||||
$sql3 = "and (destination_number like '%800_______' or destination_number like '%888_______' or destination_number like '%877_______' or destination_number like '%866_______' or destination_number like '%855_______');";
|
$sql3 = "and (destination_number like '%800_______' or destination_number like '%888_______' or destination_number like '%877_______' or destination_number like '%866_______' or destination_number like '%855_______');";
|
||||||
$rate=0;
|
$rate=0;
|
||||||
$bill_period=6;
|
$bill_period=6;
|
||||||
}
|
}
|
||||||
elseif ($y == 3) {
|
elseif ($y == 3) {
|
||||||
$tablename = "<b>Previous 12 Months Local Free Call Summary</b><br>";
|
$tablename = "<b>Previous 12 Months Local Free Call Summary</b><br>";
|
||||||
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='local') ";
|
$sql1 = "select billsec as seconds from v_xml_cdr where (".$duuid."and direction='local') ";
|
||||||
$sql3 = ";";
|
$sql3 = ";";
|
||||||
$rate=0;
|
$rate=0;
|
||||||
$bill_period=6;
|
$bill_period=6;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "whoops<br>";
|
echo "whoops<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//set the style
|
//set the style
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
|
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
|
||||||
|
|
||||||
$dom = date('m');
|
$dom = date('m');
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
$lyear=$year;
|
$lyear=$year;
|
||||||
$lastmonth = $year."-".$dolm."-01";
|
$lastmonth = $year."-".$dolm."-01";
|
||||||
$thismonth = $year."-".$dom."-01";
|
$thismonth = $year."-".$dom."-01";
|
||||||
|
|
||||||
echo $tablename;
|
echo $tablename;
|
||||||
|
|
||||||
foreach ($fileheader as $tr){
|
foreach ($fileheader as $tr){
|
||||||
echo "<th>" . $tr . "</th>";
|
echo "<th>" . $tr . "</th>";
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($x=0; $x < 12; $x++)
|
for ($x=0; $x < 12; $x++)
|
||||||
{
|
{
|
||||||
if ($dom == 1){
|
if ($dom == 1){
|
||||||
$dom=12;
|
$dom=12;
|
||||||
$year=$year-1;
|
$year=$year-1;
|
||||||
}
|
}
|
||||||
elseif ($x == 0){
|
elseif ($x == 0){
|
||||||
$dom=$dom;
|
$dom=$dom;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dom=$dom-1;
|
$dom=$dom-1;
|
||||||
}
|
}
|
||||||
if ($dom == 1) {
|
if ($dom == 1) {
|
||||||
$dolm=12;
|
$dolm=12;
|
||||||
$lyear=$lyear-1;
|
$lyear=$lyear-1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dolm=$dom-1;
|
$dolm=$dom-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//convert to int
|
//convert to int
|
||||||
$dom=$dom*1;
|
$dom=$dom*1;
|
||||||
$dolm=$dolm*1;
|
$dolm=$dolm*1;
|
||||||
|
|
||||||
//back to string, prepend 0)
|
//back to string, prepend 0)
|
||||||
if ( $dolm < 10 ) {
|
if ( $dolm < 10 ) {
|
||||||
$dolm = "0".$dolm;
|
$dolm = "0".$dolm;
|
||||||
}
|
}
|
||||||
if ( $dom < 10 ) {
|
if ( $dom < 10 ) {
|
||||||
$dom = "0".$dom;
|
$dom = "0".$dom;
|
||||||
}
|
}
|
||||||
$lastmonth = $lyear."-".$dolm."-01";
|
$lastmonth = $lyear."-".$dolm."-01";
|
||||||
$thismonth = $year."-".$dom."-01";
|
$thismonth = $year."-".$dom."-01";
|
||||||
|
|
||||||
$sql2 = "and (start_stamp >= '" . $lastmonth . "' AND start_stamp < '" . $thismonth. "') ";
|
$sql2 = "and (start_stamp >= '" . $lastmonth . "' AND start_stamp < '" . $thismonth. "') ";
|
||||||
|
|
||||||
$sql = $sql1;
|
$sql = $sql1;
|
||||||
$sql .= $sql2;
|
$sql .= $sql2;
|
||||||
$sql .= $sql3;
|
$sql .= $sql3;
|
||||||
$sql .= $callsort;
|
$sql .= $callsort;
|
||||||
//echo "<br>" . $sql . "<br>";
|
//echo "<br>" . $sql . "<br>";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||||
unset ($prep_statement, $sql);
|
unset ($prep_statement, $sql);
|
||||||
$max = sizeof($result) -1;
|
$max = sizeof($result) -1;
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
|
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
//echo " <td valign='top' class='".$row_style[$c]."'>".($i+1)."</td>\n";
|
//echo " <td valign='top' class='".$row_style[$c]."'>".($i+1)."</td>\n";
|
||||||
if ( $max > 0 ) {
|
if ( $max > 0 ) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
$result = $row['seconds'];
|
$result = $row['seconds'];
|
||||||
$billtime_1 = intval($result/$bill_period);
|
$billtime_1 = intval($result/$bill_period);
|
||||||
$billtime_2 = $result%$bill_period;
|
$billtime_2 = $result%$bill_period;
|
||||||
|
|
||||||
if (($result%$bill_period) != 0 ) {
|
if (($result%$bill_period) != 0 ) {
|
||||||
//need to round up for billing period
|
//need to round up for billing period
|
||||||
$billtime = $billtime + intval($result/$bill_period) + 1;
|
$billtime = $billtime + intval($result/$bill_period) + 1;
|
||||||
//echo " mod worked ";
|
//echo " mod worked ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//no need to round up for billing period
|
//no need to round up for billing period
|
||||||
$billtime = $billtime + intval($result/$bill_period);
|
$billtime = $billtime + intval($result/$bill_period);
|
||||||
}
|
}
|
||||||
$tottime = $tottime + $result;
|
$tottime = $tottime + $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$dolm."/".$lyear."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$dolm."/".$lyear."</td>";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$max."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$max."</td>";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$tottime."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$tottime."</td>";
|
||||||
$mintime = $tottime/$bill_period;
|
$mintime = $tottime/$bill_period;
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".round($mintime,1)."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".round($mintime,1)."</td>";
|
||||||
$hourtime = $tottime/3600;
|
$hourtime = $tottime/3600;
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".round($hourtime,1)."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".round($hourtime,1)."</td>";
|
||||||
$tot_cost = $rate * $billtime ;
|
$tot_cost = $rate * $billtime ;
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$billtime."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$billtime."</td>";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".$rate."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>".$rate."</td>";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>$".round($tot_cost,2)."</td>";
|
echo "<td valign='top' class='".$row_style[$c]."'>$".round($tot_cost,2)."</td>";
|
||||||
|
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$max=0;
|
$max=0;
|
||||||
$tottime=0;
|
$tottime=0;
|
||||||
$hourtime=0;
|
$hourtime=0;
|
||||||
$billtime=0;
|
$billtime=0;
|
||||||
$tot_cost=0;
|
$tot_cost=0;
|
||||||
$mintime=0;
|
$mintime=0;
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
|
||||||
}
|
}
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|||||||
+288
-288
@@ -1,289 +1,289 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('xml_cdr_view')) {
|
if (permission_exists('xml_cdr_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
require_once "xml_cdr_inc.php";
|
require_once "xml_cdr_inc.php";
|
||||||
|
|
||||||
//get the format
|
//get the format
|
||||||
$export_format = check_str($_REQUEST['export_format']);
|
$export_format = check_str($_REQUEST['export_format']);
|
||||||
|
|
||||||
//get the format
|
//get the format
|
||||||
$showall = check_str($_REQUEST['showall']);
|
$showall = check_str($_REQUEST['showall']);
|
||||||
|
|
||||||
//exprot the csv
|
//exprot the csv
|
||||||
if ($export_format == 'csv') {
|
if ($export_format == 'csv') {
|
||||||
|
|
||||||
//define file name
|
//define file name
|
||||||
if ($_REQUEST['showall'] == 'true') {
|
if ($_REQUEST['showall'] == 'true') {
|
||||||
$csv_filename = "cdr_".date("Ymd_His").".csv";
|
$csv_filename = "cdr_".date("Ymd_His").".csv";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$csv_filename = "cdr_".$_SESSION['domain_name']."_".date("Ymd_His").".csv";
|
$csv_filename = "cdr_".$_SESSION['domain_name']."_".date("Ymd_His").".csv";
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the http headers
|
//set the http headers
|
||||||
header('Content-type: application/octet-binary');
|
header('Content-type: application/octet-binary');
|
||||||
header('Content-Disposition: attachment; filename='.$csv_filename);
|
header('Content-Disposition: attachment; filename='.$csv_filename);
|
||||||
|
|
||||||
//set the csv headers
|
//set the csv headers
|
||||||
$z = 0;
|
$z = 0;
|
||||||
foreach($result[0] as $key => $val) {
|
foreach($result[0] as $key => $val) {
|
||||||
if ($key != "xml" && $key != "json") {
|
if ($key != "xml" && $key != "json") {
|
||||||
if ($z == 0) {
|
if ($z == 0) {
|
||||||
echo '"'.$key.'"';
|
echo '"'.$key.'"';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo ',"'.$key.'"';
|
echo ',"'.$key.'"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$z++;
|
$z++;
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
//show the csv data
|
//show the csv data
|
||||||
$x=0;
|
$x=0;
|
||||||
while(true) {
|
while(true) {
|
||||||
$z = 0;
|
$z = 0;
|
||||||
foreach($result[0] as $key => $val) {
|
foreach($result[0] as $key => $val) {
|
||||||
if ($key != "xml" && $key != "json") {
|
if ($key != "xml" && $key != "json") {
|
||||||
if ($z == 0) {
|
if ($z == 0) {
|
||||||
echo '"'.$result[$x][$key].'"';
|
echo '"'.$result[$x][$key].'"';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo ',"'.$result[$x][$key].'"';
|
echo ',"'.$result[$x][$key].'"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$z++;
|
$z++;
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
++$x;
|
++$x;
|
||||||
if ($x > ($result_count-1)) {
|
if ($x > ($result_count-1)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//export as a PDF
|
//export as a PDF
|
||||||
if ($export_format == 'pdf') {
|
if ($export_format == 'pdf') {
|
||||||
|
|
||||||
//load pdf libraries
|
//load pdf libraries
|
||||||
require_once("resources/tcpdf/tcpdf.php");
|
require_once("resources/tcpdf/tcpdf.php");
|
||||||
require_once("resources/fpdi/fpdi.php");
|
require_once("resources/fpdi/fpdi.php");
|
||||||
|
|
||||||
//determine page size
|
//determine page size
|
||||||
switch ($_SESSION['fax']['page_size']['text']) {
|
switch ($_SESSION['fax']['page_size']['text']) {
|
||||||
case 'a4' :
|
case 'a4' :
|
||||||
$page_width = 11.7; //in
|
$page_width = 11.7; //in
|
||||||
$page_height = 8.3; //in
|
$page_height = 8.3; //in
|
||||||
break;
|
break;
|
||||||
case 'legal' :
|
case 'legal' :
|
||||||
$page_width = 14; //in
|
$page_width = 14; //in
|
||||||
$page_height = 8.5; //in
|
$page_height = 8.5; //in
|
||||||
break;
|
break;
|
||||||
case 'letter' :
|
case 'letter' :
|
||||||
default :
|
default :
|
||||||
$page_width = 11; //in
|
$page_width = 11; //in
|
||||||
$page_height = 8.5; //in
|
$page_height = 8.5; //in
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize pdf
|
// initialize pdf
|
||||||
$pdf = new FPDI('L', 'in');
|
$pdf = new FPDI('L', 'in');
|
||||||
$pdf -> SetAutoPageBreak(false);
|
$pdf -> SetAutoPageBreak(false);
|
||||||
$pdf -> setPrintHeader(false);
|
$pdf -> setPrintHeader(false);
|
||||||
$pdf -> setPrintFooter(false);
|
$pdf -> setPrintFooter(false);
|
||||||
$pdf -> SetMargins(0.5, 0.5, 0.5, true);
|
$pdf -> SetMargins(0.5, 0.5, 0.5, true);
|
||||||
|
|
||||||
//set default font
|
//set default font
|
||||||
$pdf -> SetFont('helvetica', '', 7);
|
$pdf -> SetFont('helvetica', '', 7);
|
||||||
//add new page
|
//add new page
|
||||||
$pdf -> AddPage('L', array($page_width, $page_height));
|
$pdf -> AddPage('L', array($page_width, $page_height));
|
||||||
|
|
||||||
$chunk = 0;
|
$chunk = 0;
|
||||||
|
|
||||||
//write the table column headers
|
//write the table column headers
|
||||||
$data_start = '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
$data_start = '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
||||||
$data_end = '</table>';
|
$data_end = '</table>';
|
||||||
|
|
||||||
$data_head = '<tr>';
|
$data_head = '<tr>';
|
||||||
$data_head .= '<td width="7.5%"><b>'.$text['label-direction'].'</b></td>';
|
$data_head .= '<td width="7.5%"><b>'.$text['label-direction'].'</b></td>';
|
||||||
$data_head .= '<td width="15%"><b>'.$text['label-cid-name'].'</b></td>';
|
$data_head .= '<td width="15%"><b>'.$text['label-cid-name'].'</b></td>';
|
||||||
$data_head .= '<td width="8.5%"><b>'.$text['label-cid-number'].'</b></td>';
|
$data_head .= '<td width="8.5%"><b>'.$text['label-cid-number'].'</b></td>';
|
||||||
$data_head .= '<td width="11%"><b>'.$text['label-destination'].'</b></td>';
|
$data_head .= '<td width="11%"><b>'.$text['label-destination'].'</b></td>';
|
||||||
$data_head .= '<td width="11%"><b>'.$text['label-start'].'</b></td>';
|
$data_head .= '<td width="11%"><b>'.$text['label-start'].'</b></td>';
|
||||||
$data_head .= '<td width="4%" align="right"><b>'.$text['label-tta'].'</b></td>';
|
$data_head .= '<td width="4%" align="right"><b>'.$text['label-tta'].'</b></td>';
|
||||||
$data_head .= '<td width="8.5%" align="right"><b>'.$text['label-duration'].'</b></td>';
|
$data_head .= '<td width="8.5%" align="right"><b>'.$text['label-duration'].'</b></td>';
|
||||||
$data_head .= '<td width="8.5%" align="right"><b>'.$text['label-billsec'].'</b></td>';
|
$data_head .= '<td width="8.5%" align="right"><b>'.$text['label-billsec'].'</b></td>';
|
||||||
$data_head .= '<td width="7%" align="right"><b>'."PDD".'</b></td>';
|
$data_head .= '<td width="7%" align="right"><b>'."PDD".'</b></td>';
|
||||||
$data_head .= '<td width="5%" align="right"><b>'."MOS".'</b></td>';
|
$data_head .= '<td width="5%" align="right"><b>'."MOS".'</b></td>';
|
||||||
$data_head .= '<td width="2%"></td>';
|
$data_head .= '<td width="2%"></td>';
|
||||||
$data_head .= '<td width="15%"><b>'.$text['label-hangup_cause'].'</b></td>';
|
$data_head .= '<td width="15%"><b>'.$text['label-hangup_cause'].'</b></td>';
|
||||||
$data_head .= '</tr>';
|
$data_head .= '</tr>';
|
||||||
$data_head .= '<tr><td colspan="12"><hr></td></tr>';
|
$data_head .= '<tr><td colspan="12"><hr></td></tr>';
|
||||||
|
|
||||||
//initialize total variables
|
//initialize total variables
|
||||||
$total['duration'] = 0;
|
$total['duration'] = 0;
|
||||||
$total['billmsec'] = 0;
|
$total['billmsec'] = 0;
|
||||||
$total['pdd_ms'] = 0;
|
$total['pdd_ms'] = 0;
|
||||||
$total['rtp_audio_in_mos'] = 0;
|
$total['rtp_audio_in_mos'] = 0;
|
||||||
$total['tta'] = 0;
|
$total['tta'] = 0;
|
||||||
|
|
||||||
//write the row cells
|
//write the row cells
|
||||||
$z = 0; // total counter
|
$z = 0; // total counter
|
||||||
$p = 0; // per page counter
|
$p = 0; // per page counter
|
||||||
if (sizeof($result) > 0) {
|
if (sizeof($result) > 0) {
|
||||||
foreach($result as $cdr_num => $fields) {
|
foreach($result as $cdr_num => $fields) {
|
||||||
$data_body[$p] .= '<tr>';
|
$data_body[$p] .= '<tr>';
|
||||||
$data_body[$p] .= '<td width="7.5%">'.$text['label-'.$fields['direction']].'</td>';
|
$data_body[$p] .= '<td width="7.5%">'.$text['label-'.$fields['direction']].'</td>';
|
||||||
$data_body[$p] .= '<td width="15%">'.$fields['caller_id_name'].'</td>';
|
$data_body[$p] .= '<td width="15%">'.$fields['caller_id_name'].'</td>';
|
||||||
$data_body[$p] .= '<td width="8.5%">'.$fields['caller_id_number'].'</td>';
|
$data_body[$p] .= '<td width="8.5%">'.$fields['caller_id_number'].'</td>';
|
||||||
$data_body[$p] .= '<td width="11%">'.format_phone($fields['destination_number']).'</td>';
|
$data_body[$p] .= '<td width="11%">'.format_phone($fields['destination_number']).'</td>';
|
||||||
$data_body[$p] .= '<td width="11%">'.$fields['start_stamp'].'</td>';
|
$data_body[$p] .= '<td width="11%">'.$fields['start_stamp'].'</td>';
|
||||||
$total['tta'] += ($fields['tta'] > 0) ? $fields['tta'] : 0;
|
$total['tta'] += ($fields['tta'] > 0) ? $fields['tta'] : 0;
|
||||||
$data_body[$p] .= '<td width="4%" align="right">'.(($fields['tta'] > 0) ? $fields['tta'].'s' : null).'</td>';
|
$data_body[$p] .= '<td width="4%" align="right">'.(($fields['tta'] > 0) ? $fields['tta'].'s' : null).'</td>';
|
||||||
$seconds = ($fields['hangup_cause'] == "ORIGINATOR_CANCEL") ? $fields['duration'] : round(($fields['billmsec'] / 1000), 0, PHP_ROUND_HALF_UP);
|
$seconds = ($fields['hangup_cause'] == "ORIGINATOR_CANCEL") ? $fields['duration'] : round(($fields['billmsec'] / 1000), 0, PHP_ROUND_HALF_UP);
|
||||||
$total['duration'] += $seconds;
|
$total['duration'] += $seconds;
|
||||||
$data_body[$p] .= '<td width="8.5%" align="right">'.gmdate("G:i:s", $seconds).'</td>';
|
$data_body[$p] .= '<td width="8.5%" align="right">'.gmdate("G:i:s", $seconds).'</td>';
|
||||||
$total['billmsec'] += $fields['billmsec'];
|
$total['billmsec'] += $fields['billmsec'];
|
||||||
$data_body[$p] .= '<td width="8.5%" align="right">'.number_format(round($fields['billmsec'] / 1000, 2), 2).'s</td>';
|
$data_body[$p] .= '<td width="8.5%" align="right">'.number_format(round($fields['billmsec'] / 1000, 2), 2).'s</td>';
|
||||||
$data_body[$p] .= '<td width="7%" align="right">';
|
$data_body[$p] .= '<td width="7%" align="right">';
|
||||||
if (permission_exists("xml_cdr_pdd")) {
|
if (permission_exists("xml_cdr_pdd")) {
|
||||||
$total['pdd_ms'] += $fields['pdd_ms'];
|
$total['pdd_ms'] += $fields['pdd_ms'];
|
||||||
$data_body[$p] .= number_format(round($fields['pdd_ms'] / 1000, 2), 2).'s';
|
$data_body[$p] .= number_format(round($fields['pdd_ms'] / 1000, 2), 2).'s';
|
||||||
}
|
}
|
||||||
$data_body[$p] .= '</td>';
|
$data_body[$p] .= '</td>';
|
||||||
$data_body[$p] .= '<td width="5%" align="right">';
|
$data_body[$p] .= '<td width="5%" align="right">';
|
||||||
if (permission_exists("xml_cdr_mos")) {
|
if (permission_exists("xml_cdr_mos")) {
|
||||||
$total['rtp_audio_in_mos'] += $fields['rtp_audio_in_mos'];
|
$total['rtp_audio_in_mos'] += $fields['rtp_audio_in_mos'];
|
||||||
$data_body[$p] .= (strlen($total['rtp_audio_in_mos']) > 0) ? $fields['rtp_audio_in_mos'] : null;
|
$data_body[$p] .= (strlen($total['rtp_audio_in_mos']) > 0) ? $fields['rtp_audio_in_mos'] : null;
|
||||||
}
|
}
|
||||||
$data_body[$p] .= '</td>';
|
$data_body[$p] .= '</td>';
|
||||||
$data_body[$p] .= '<td width="2%"></td>';
|
$data_body[$p] .= '<td width="2%"></td>';
|
||||||
$data_body[$p] .= '<td width="15%">'.ucwords(strtolower(str_replace("_", " ", $fields['hangup_cause']))).'</td>';
|
$data_body[$p] .= '<td width="15%">'.ucwords(strtolower(str_replace("_", " ", $fields['hangup_cause']))).'</td>';
|
||||||
$data_body[$p] .= '</tr>';
|
$data_body[$p] .= '</tr>';
|
||||||
|
|
||||||
$z++;
|
$z++;
|
||||||
$p++;
|
$p++;
|
||||||
|
|
||||||
if ($p == 60) {
|
if ($p == 60) {
|
||||||
//output data
|
//output data
|
||||||
$data_body_chunk = $data_start.$data_head;
|
$data_body_chunk = $data_start.$data_head;
|
||||||
foreach ($data_body as $data_body_row) {
|
foreach ($data_body as $data_body_row) {
|
||||||
$data_body_chunk .= $data_body_row;
|
$data_body_chunk .= $data_body_row;
|
||||||
}
|
}
|
||||||
$data_body_chunk .= $data_end;
|
$data_body_chunk .= $data_end;
|
||||||
$pdf -> writeHTML($data_body_chunk, true, false, false, false, '');
|
$pdf -> writeHTML($data_body_chunk, true, false, false, false, '');
|
||||||
unset($data_body_chunk);
|
unset($data_body_chunk);
|
||||||
unset($data_body);
|
unset($data_body);
|
||||||
$p = 0;
|
$p = 0;
|
||||||
|
|
||||||
//add new page
|
//add new page
|
||||||
$pdf -> AddPage('L', array($page_width, $page_height));
|
$pdf -> AddPage('L', array($page_width, $page_height));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//write divider
|
//write divider
|
||||||
$data_footer = '<tr><td colspan="12"></td></tr>';
|
$data_footer = '<tr><td colspan="12"></td></tr>';
|
||||||
|
|
||||||
//write totals
|
//write totals
|
||||||
$data_footer .= '<tr>';
|
$data_footer .= '<tr>';
|
||||||
$data_footer .= '<td><b>'.$text['label-total'].'</b></td>';
|
$data_footer .= '<td><b>'.$text['label-total'].'</b></td>';
|
||||||
$data_footer .= '<td>'.$z.'</td>';
|
$data_footer .= '<td>'.$z.'</td>';
|
||||||
$data_footer .= '<td colspan="3"></td>';
|
$data_footer .= '<td colspan="3"></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.number_format(round($total['tta'], 1), 0).'s</b></td>';
|
$data_footer .= '<td align="right"><b>'.number_format(round($total['tta'], 1), 0).'s</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", $total['duration']).'</b></td>';
|
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", $total['duration']).'</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", round($total['billmsec'] / 1000, 0)).'</b></td>';
|
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", round($total['billmsec'] / 1000, 0)).'</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.number_format(round(($total['pdd_ms'] / 1000), 2), 2).'s</b></td>';
|
$data_footer .= '<td align="right"><b>'.number_format(round(($total['pdd_ms'] / 1000), 2), 2).'s</b></td>';
|
||||||
$data_footer .= '<td colspan="2"></td>';
|
$data_footer .= '<td colspan="2"></td>';
|
||||||
$data_footer .= '</tr>';
|
$data_footer .= '</tr>';
|
||||||
|
|
||||||
//write divider
|
//write divider
|
||||||
$data_footer .= '<tr><td colspan="12"><hr></td></tr>';
|
$data_footer .= '<tr><td colspan="12"><hr></td></tr>';
|
||||||
|
|
||||||
//write averages
|
//write averages
|
||||||
$data_footer .= '<tr>';
|
$data_footer .= '<tr>';
|
||||||
$data_footer .= '<td><b>'.$text['label-average'].'</b></td>';
|
$data_footer .= '<td><b>'.$text['label-average'].'</b></td>';
|
||||||
$data_footer .= '<td colspan="4"></td>';
|
$data_footer .= '<td colspan="4"></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.round(($total['tta'] / $z), 1).'</b></td>';
|
$data_footer .= '<td align="right"><b>'.round(($total['tta'] / $z), 1).'</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", ($total['duration'] / $z)).'</b></td>';
|
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", ($total['duration'] / $z)).'</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", round($total['billmsec'] / $z / 1000, 0)).'</b></td>';
|
$data_footer .= '<td align="right"><b>'.gmdate("G:i:s", round($total['billmsec'] / $z / 1000, 0)).'</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.number_format(round(($total['pdd_ms'] / $z / 1000), 2), 2).'s</b></td>';
|
$data_footer .= '<td align="right"><b>'.number_format(round(($total['pdd_ms'] / $z / 1000), 2), 2).'s</b></td>';
|
||||||
$data_footer .= '<td align="right"><b>'.round(($total['rtp_audio_in_mos'] / $z), 2).'</b></td>';
|
$data_footer .= '<td align="right"><b>'.round(($total['rtp_audio_in_mos'] / $z), 2).'</b></td>';
|
||||||
$data_footer .= '<td></td>';
|
$data_footer .= '<td></td>';
|
||||||
$data_footer .= '</tr>';
|
$data_footer .= '</tr>';
|
||||||
|
|
||||||
//write divider
|
//write divider
|
||||||
$data_footer .= '<tr><td colspan="12"><hr></td></tr>';
|
$data_footer .= '<tr><td colspan="12"><hr></td></tr>';
|
||||||
|
|
||||||
//add last page
|
//add last page
|
||||||
if ($p >= 55) {
|
if ($p >= 55) {
|
||||||
$pdf -> AddPage('L', array($page_width, $page_height));
|
$pdf -> AddPage('L', array($page_width, $page_height));
|
||||||
}
|
}
|
||||||
//output remaining data
|
//output remaining data
|
||||||
$data_body_chunk = $data_start.$data_head;
|
$data_body_chunk = $data_start.$data_head;
|
||||||
foreach ($data_body as $data_body_row) {
|
foreach ($data_body as $data_body_row) {
|
||||||
$data_body_chunk .= $data_body_row;
|
$data_body_chunk .= $data_body_row;
|
||||||
}
|
}
|
||||||
$data_body_chunk .= $data_footer.$data_end;
|
$data_body_chunk .= $data_footer.$data_end;
|
||||||
$pdf -> writeHTML($data_body_chunk, true, false, false, false, '');
|
$pdf -> writeHTML($data_body_chunk, true, false, false, false, '');
|
||||||
unset($data_body_chunk);
|
unset($data_body_chunk);
|
||||||
|
|
||||||
//define file name
|
//define file name
|
||||||
$pdf_filename = "cdr_".$_SESSION['domain_name']."_".date("Ymd_His").".pdf";
|
$pdf_filename = "cdr_".$_SESSION['domain_name']."_".date("Ymd_His").".pdf";
|
||||||
|
|
||||||
header("Content-Type: application/force-download");
|
header("Content-Type: application/force-download");
|
||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Type: application/download");
|
header("Content-Type: application/download");
|
||||||
header("Content-Description: File Transfer");
|
header("Content-Description: File Transfer");
|
||||||
header('Content-Disposition: attachment; filename="'.$pdf_filename.'"');
|
header('Content-Disposition: attachment; filename="'.$pdf_filename.'"');
|
||||||
header("Content-Type: application/pdf");
|
header("Content-Type: application/pdf");
|
||||||
header('Accept-Ranges: bytes');
|
header('Accept-Ranges: bytes');
|
||||||
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
|
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
|
||||||
|
|
||||||
// push pdf download
|
// push pdf download
|
||||||
$pdf -> Output($pdf_filename, 'D'); // Display [I]nline, Save to [F]ile, [D]ownload
|
$pdf -> Output($pdf_filename, 'D'); // Display [I]nline, Save to [F]ile, [D]ownload
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,433 +1,433 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$text['title-default_settings']['en-us'] = "Default Settings";
|
$text['title-default_settings']['en-us'] = "Default Settings";
|
||||||
$text['title-default_settings']['es-cl'] = "Condiciones Predeterminadas";
|
$text['title-default_settings']['es-cl'] = "Condiciones Predeterminadas";
|
||||||
$text['title-default_settings']['pt-pt'] = "Predefinições";
|
$text['title-default_settings']['pt-pt'] = "Predefinições";
|
||||||
$text['title-default_settings']['fr-fr'] = "Configurations par Défaut";
|
$text['title-default_settings']['fr-fr'] = "Configurations par Défaut";
|
||||||
$text['title-default_settings']['nl-nl'] = "";
|
$text['title-default_settings']['nl-nl'] = "";
|
||||||
$text['title-default_settings']['pt-br'] = "Configurações";
|
$text['title-default_settings']['pt-br'] = "Configurações";
|
||||||
$text['title-default_settings']['pl'] = "Ustawienia domyślne";
|
$text['title-default_settings']['pl'] = "Ustawienia domyślne";
|
||||||
$text['title-default_settings']['sv-se'] = "Standard Inställningar";
|
$text['title-default_settings']['sv-se'] = "Standard Inställningar";
|
||||||
$text['title-default_settings']['uk'] = "Налаштування за замовчуванням";
|
$text['title-default_settings']['uk'] = "Налаштування за замовчуванням";
|
||||||
$text['title-default_settings']['de-at'] = "Standardeinstellungen";
|
$text['title-default_settings']['de-at'] = "Standardeinstellungen";
|
||||||
|
|
||||||
$text['title-default_setting-edit']['en-us'] = "Default Setting";
|
$text['title-default_setting-edit']['en-us'] = "Default Setting";
|
||||||
$text['title-default_setting-edit']['es-cl'] = "Configuraciones Predeterminadas";
|
$text['title-default_setting-edit']['es-cl'] = "Configuraciones Predeterminadas";
|
||||||
$text['title-default_setting-edit']['pt-pt'] = "Predefinições";
|
$text['title-default_setting-edit']['pt-pt'] = "Predefinições";
|
||||||
$text['title-default_setting-edit']['fr-fr'] = "Configurations par Défaut";
|
$text['title-default_setting-edit']['fr-fr'] = "Configurations par Défaut";
|
||||||
$text['title-default_setting-edit']['nl-nl'] = "";
|
$text['title-default_setting-edit']['nl-nl'] = "";
|
||||||
$text['title-default_setting-edit']['pt-br'] = "Configurações";
|
$text['title-default_setting-edit']['pt-br'] = "Configurações";
|
||||||
$text['title-default_setting-edit']['pl'] = "Ustawienie domyślne";
|
$text['title-default_setting-edit']['pl'] = "Ustawienie domyślne";
|
||||||
$text['title-default_setting-edit']['sv-se'] = "Standard Inställning";
|
$text['title-default_setting-edit']['sv-se'] = "Standard Inställning";
|
||||||
$text['title-default_setting-edit']['uk'] = "Налаштування за замовчуванням";
|
$text['title-default_setting-edit']['uk'] = "Налаштування за замовчуванням";
|
||||||
$text['title-default_setting-edit']['de-at'] = "Standardeinstellungen";
|
$text['title-default_setting-edit']['de-at'] = "Standardeinstellungen";
|
||||||
|
|
||||||
$text['title-default_setting-add']['en-us'] = "Default Setting Add";
|
$text['title-default_setting-add']['en-us'] = "Default Setting Add";
|
||||||
$text['title-default_setting-add']['es-cl'] = "Agregar Configuración Predeterminada";
|
$text['title-default_setting-add']['es-cl'] = "Agregar Configuración Predeterminada";
|
||||||
$text['title-default_setting-add']['pt-pt'] = "Adicionar Predefinição";
|
$text['title-default_setting-add']['pt-pt'] = "Adicionar Predefinição";
|
||||||
$text['title-default_setting-add']['fr-fr'] = "Ajouter une configuration per défaut";
|
$text['title-default_setting-add']['fr-fr'] = "Ajouter une configuration per défaut";
|
||||||
$text['title-default_setting-add']['nl-nl'] = "";
|
$text['title-default_setting-add']['nl-nl'] = "";
|
||||||
$text['title-default_setting-add']['pt-br'] = "Adicionar Configurações";
|
$text['title-default_setting-add']['pt-br'] = "Adicionar Configurações";
|
||||||
$text['title-default_setting-add']['pl'] = "Dodaj ustawienie domyślne";
|
$text['title-default_setting-add']['pl'] = "Dodaj ustawienie domyślne";
|
||||||
$text['title-default_setting-add']['sv-se'] = "Lägg Till Standard Inställning";
|
$text['title-default_setting-add']['sv-se'] = "Lägg Till Standard Inställning";
|
||||||
$text['title-default_setting-add']['uk'] = "";
|
$text['title-default_setting-add']['uk'] = "";
|
||||||
$text['title-default_setting-add']['de-at'] = "Standardeinstellungen";
|
$text['title-default_setting-add']['de-at'] = "Standardeinstellungen";
|
||||||
|
|
||||||
$text['option-voicemail_file_listen']['en-us'] = "Listen Link (Login Required)";
|
$text['option-voicemail_file_listen']['en-us'] = "Listen Link (Login Required)";
|
||||||
$text['option-voicemail_file_listen']['es-cl'] = "Escuchar Link (Se requiere entrar)";
|
$text['option-voicemail_file_listen']['es-cl'] = "Escuchar Link (Se requiere entrar)";
|
||||||
$text['option-voicemail_file_listen']['pt-pt'] = "Ouça Link (login requerido)";
|
$text['option-voicemail_file_listen']['pt-pt'] = "Ouça Link (login requerido)";
|
||||||
$text['option-voicemail_file_listen']['fr-fr'] = "Écouter Link (Connexion requise)";
|
$text['option-voicemail_file_listen']['fr-fr'] = "Écouter Link (Connexion requise)";
|
||||||
$text['option-voicemail_file_listen']['nl-nl'] = "";
|
$text['option-voicemail_file_listen']['nl-nl'] = "";
|
||||||
$text['option-voicemail_file_listen']['pt-br'] = "Arquivo Voicemail";
|
$text['option-voicemail_file_listen']['pt-br'] = "Arquivo Voicemail";
|
||||||
$text['option-voicemail_file_listen']['pl'] = "Link do odsłuchu (po zalogowaniu)";
|
$text['option-voicemail_file_listen']['pl'] = "Link do odsłuchu (po zalogowaniu)";
|
||||||
$text['option-voicemail_file_listen']['sv-se'] = "Lyssna-länk (Måste Logga In)";
|
$text['option-voicemail_file_listen']['sv-se'] = "Lyssna-länk (Måste Logga In)";
|
||||||
$text['option-voicemail_file_listen']['uk'] = "Посилання на прослуховування (Входити обов’язково)";
|
$text['option-voicemail_file_listen']['uk'] = "Посилання на прослуховування (Входити обов’язково)";
|
||||||
$text['option-voicemail_file_listen']['de-at'] = "Link zur Nachricht (Login erforderlich)";
|
$text['option-voicemail_file_listen']['de-at'] = "Link zur Nachricht (Login erforderlich)";
|
||||||
|
|
||||||
$text['option-voicemail_file_link']['en-us'] = "Download Link (No Login Required)";
|
$text['option-voicemail_file_link']['en-us'] = "Download Link (No Login Required)";
|
||||||
$text['option-voicemail_file_link']['es-cl'] = "Enlace de descarga (No se requiere conexión)";
|
$text['option-voicemail_file_link']['es-cl'] = "Enlace de descarga (No se requiere conexión)";
|
||||||
$text['option-voicemail_file_link']['pt-pt'] = "Link para download (Não é necessário login)";
|
$text['option-voicemail_file_link']['pt-pt'] = "Link para download (Não é necessário login)";
|
||||||
$text['option-voicemail_file_link']['fr-fr'] = "Lien de téléchargement (Connexion non requise)";
|
$text['option-voicemail_file_link']['fr-fr'] = "Lien de téléchargement (Connexion non requise)";
|
||||||
$text['option-voicemail_file_link']['nl-nl'] = "";
|
$text['option-voicemail_file_link']['nl-nl'] = "";
|
||||||
$text['option-voicemail_file_link']['pt-br'] = "Link para download (Não é necessário login)";
|
$text['option-voicemail_file_link']['pt-br'] = "Link para download (Não é necessário login)";
|
||||||
$text['option-voicemail_file_link']['pl'] = "Link do pobrania (logowanie nie jest wymagane)";
|
$text['option-voicemail_file_link']['pl'] = "Link do pobrania (logowanie nie jest wymagane)";
|
||||||
$text['option-voicemail_file_link']['sv-se'] = "Nedladdnings-länk (Ingen Inloggning Krävs)";
|
$text['option-voicemail_file_link']['sv-se'] = "Nedladdnings-länk (Ingen Inloggning Krävs)";
|
||||||
$text['option-voicemail_file_link']['uk'] = "Посилання на завантаження (Входити не обов’язково)";
|
$text['option-voicemail_file_link']['uk'] = "Посилання на завантаження (Входити не обов’язково)";
|
||||||
$text['option-voicemail_file_link']['de-at'] = "Link zur Nachricht (kein Login erforderlich)";
|
$text['option-voicemail_file_link']['de-at'] = "Link zur Nachricht (kein Login erforderlich)";
|
||||||
|
|
||||||
$text['option-voicemail_file_attach']['en-us'] = "Audio File Attachment";
|
$text['option-voicemail_file_attach']['en-us'] = "Audio File Attachment";
|
||||||
$text['option-voicemail_file_attach']['es-cl'] = "Archivo Adjunto Audio";
|
$text['option-voicemail_file_attach']['es-cl'] = "Archivo Adjunto Audio";
|
||||||
$text['option-voicemail_file_attach']['pt-pt'] = "Anexo de arquivo de áudio";
|
$text['option-voicemail_file_attach']['pt-pt'] = "Anexo de arquivo de áudio";
|
||||||
$text['option-voicemail_file_attach']['fr-fr'] = "Audio File Attachment";
|
$text['option-voicemail_file_attach']['fr-fr'] = "Audio File Attachment";
|
||||||
$text['option-voicemail_file_attach']['nl-nl'] = "";
|
$text['option-voicemail_file_attach']['nl-nl'] = "";
|
||||||
$text['option-voicemail_file_attach']['pt-br'] = "Anexo de arquivo de áudio";
|
$text['option-voicemail_file_attach']['pt-br'] = "Anexo de arquivo de áudio";
|
||||||
$text['option-voicemail_file_attach']['pl'] = "Załącznik plik audio";
|
$text['option-voicemail_file_attach']['pl'] = "Załącznik plik audio";
|
||||||
$text['option-voicemail_file_attach']['sv-se'] = "Ljudfil Bifogad";
|
$text['option-voicemail_file_attach']['sv-se'] = "Ljudfil Bifogad";
|
||||||
$text['option-voicemail_file_attach']['uk'] = "Приєднати аудіофайл";
|
$text['option-voicemail_file_attach']['uk'] = "Приєднати аудіофайл";
|
||||||
$text['option-voicemail_file_attach']['de-at'] = "Audiodatei als Anhang";
|
$text['option-voicemail_file_attach']['de-at'] = "Audiodatei als Anhang";
|
||||||
|
|
||||||
$text['message-toggled']['en-us'] = "Toggle Completed";
|
$text['message-toggled']['en-us'] = "Toggle Completed";
|
||||||
$text['message-toggled']['es-cl'] = "Alternar Completado";
|
$text['message-toggled']['es-cl'] = "Alternar Completado";
|
||||||
$text['message-toggled']['pt-pt'] = "Alternar Concluído";
|
$text['message-toggled']['pt-pt'] = "Alternar Concluído";
|
||||||
$text['message-toggled']['fr-fr'] = "Basculer Terminé";
|
$text['message-toggled']['fr-fr'] = "Basculer Terminé";
|
||||||
$text['message-toggled']['pt-br'] = "Alternar Concluído";
|
$text['message-toggled']['pt-br'] = "Alternar Concluído";
|
||||||
$text['message-toggled']['pl'] = "Przegubowe Zakończony";
|
$text['message-toggled']['pl'] = "Przegubowe Zakończony";
|
||||||
$text['message-toggled']['he'] = "הושלם Toggle";
|
$text['message-toggled']['he'] = "הושלם Toggle";
|
||||||
$text['message-toggled']['uk'] = "переключити Завершений";
|
$text['message-toggled']['uk'] = "переключити Завершений";
|
||||||
$text['message-toggled']['sv-se'] = "Växla Avslutade";
|
$text['message-toggled']['sv-se'] = "Växla Avslutade";
|
||||||
$text['message-toggled']['de-at'] = "Toggle Completed";
|
$text['message-toggled']['de-at'] = "Toggle Completed";
|
||||||
$text['message-toggled']['ro'] = "Completat toggle";
|
$text['message-toggled']['ro'] = "Completat toggle";
|
||||||
$text['message-toggled']['fa'] = "";
|
$text['message-toggled']['fa'] = "";
|
||||||
$text['message-toggled']['ar-eg'] = "الانتهاء من تبديل";
|
$text['message-toggled']['ar-eg'] = "الانتهاء من تبديل";
|
||||||
|
|
||||||
$text['message-settings_reloaded']['en-us'] = "Settings Reloaded";
|
$text['message-settings_reloaded']['en-us'] = "Settings Reloaded";
|
||||||
$text['message-settings_reloaded']['es-cl'] = "Ajustes Reloaded";
|
$text['message-settings_reloaded']['es-cl'] = "Ajustes Reloaded";
|
||||||
$text['message-settings_reloaded']['pt-pt'] = "Configurações Reloaded";
|
$text['message-settings_reloaded']['pt-pt'] = "Configurações Reloaded";
|
||||||
$text['message-settings_reloaded']['fr-fr'] = "Paramètres Reloaded";
|
$text['message-settings_reloaded']['fr-fr'] = "Paramètres Reloaded";
|
||||||
$text['message-settings_reloaded']['nl-nl'] = "";
|
$text['message-settings_reloaded']['nl-nl'] = "";
|
||||||
$text['message-settings_reloaded']['pt-br'] = "Configurações Reloaded";
|
$text['message-settings_reloaded']['pt-br'] = "Configurações Reloaded";
|
||||||
$text['message-settings_reloaded']['pl'] = "Ustawienia Reloaded";
|
$text['message-settings_reloaded']['pl'] = "Ustawienia Reloaded";
|
||||||
$text['message-settings_reloaded']['sv-se'] = "Inställningar Reloaded";
|
$text['message-settings_reloaded']['sv-se'] = "Inställningar Reloaded";
|
||||||
$text['message-settings_reloaded']['uk'] = "налаштування Reloaded";
|
$text['message-settings_reloaded']['uk'] = "налаштування Reloaded";
|
||||||
$text['message-settings_reloaded']['de-at'] = "Einstellungen neu geladen";
|
$text['message-settings_reloaded']['de-at'] = "Einstellungen neu geladen";
|
||||||
|
|
||||||
$text['message-delete_failed']['en-us'] = "No Settings Checked";
|
$text['message-delete_failed']['en-us'] = "No Settings Checked";
|
||||||
$text['message-delete_failed']['es-cl'] = "No hay ajustes facturado";
|
$text['message-delete_failed']['es-cl'] = "No hay ajustes facturado";
|
||||||
$text['message-delete_failed']['pt-pt'] = "Nenhuma configuração marcada";
|
$text['message-delete_failed']['pt-pt'] = "Nenhuma configuração marcada";
|
||||||
$text['message-delete_failed']['fr-fr'] = "Pas de paramètres enregistrés";
|
$text['message-delete_failed']['fr-fr'] = "Pas de paramètres enregistrés";
|
||||||
$text['message-delete_failed']['nl-nl'] = "";
|
$text['message-delete_failed']['nl-nl'] = "";
|
||||||
$text['message-delete_failed']['pt-br'] = "Falha na exclusão";
|
$text['message-delete_failed']['pt-br'] = "Falha na exclusão";
|
||||||
$text['message-delete_failed']['pl'] = "Próba usunięcia zakończyła się niepowodzeniem";
|
$text['message-delete_failed']['pl'] = "Próba usunięcia zakończyła się niepowodzeniem";
|
||||||
$text['message-delete_failed']['sv-se'] = "Borttagning Misslyckades";
|
$text['message-delete_failed']['sv-se'] = "Borttagning Misslyckades";
|
||||||
$text['message-delete_failed']['uk'] = "Налаштування не вказано";
|
$text['message-delete_failed']['uk'] = "Налаштування не вказано";
|
||||||
$text['message-delete_failed']['de-at'] = "Löschen fehlgeschlagen";
|
$text['message-delete_failed']['de-at'] = "Löschen fehlgeschlagen";
|
||||||
|
|
||||||
$text['message-copy_failed']['en-us'] = "No Settings Checked or Invalid Domain";
|
$text['message-copy_failed']['en-us'] = "No Settings Checked or Invalid Domain";
|
||||||
$text['message-copy_failed']['es-cl'] = "No hay ajustes facturado o de dominio no válido";
|
$text['message-copy_failed']['es-cl'] = "No hay ajustes facturado o de dominio no válido";
|
||||||
$text['message-copy_failed']['pt-pt'] = "Nenhuma configuração marcada ou domínio inválido";
|
$text['message-copy_failed']['pt-pt'] = "Nenhuma configuração marcada ou domínio inválido";
|
||||||
$text['message-copy_failed']['fr-fr'] = "Pas de paramètres enregistrés ou domaine non valide";
|
$text['message-copy_failed']['fr-fr'] = "Pas de paramètres enregistrés ou domaine non valide";
|
||||||
$text['message-copy_failed']['nl-nl'] = "";
|
$text['message-copy_failed']['nl-nl'] = "";
|
||||||
$text['message-copy_failed']['pt-br'] = "Nenhuma configuração selecionada ou dominio inválido";
|
$text['message-copy_failed']['pt-br'] = "Nenhuma configuração selecionada ou dominio inválido";
|
||||||
$text['message-copy_failed']['pl'] = "Nie zaznaczono ustawień lub domena jest niepoprawna";
|
$text['message-copy_failed']['pl'] = "Nie zaznaczono ustawień lub domena jest niepoprawna";
|
||||||
$text['message-copy_failed']['sv-se'] = "Ingen inställning markerad eller ogiltig domän.";
|
$text['message-copy_failed']['sv-se'] = "Ingen inställning markerad eller ogiltig domän.";
|
||||||
$text['message-copy_failed']['uk'] = "";
|
$text['message-copy_failed']['uk'] = "";
|
||||||
$text['message-copy_failed']['de-at'] = "Keine Einstellungen ausgewählt oder ungültige Domain";
|
$text['message-copy_failed']['de-at'] = "Keine Einstellungen ausgewählt oder ungültige Domain";
|
||||||
|
|
||||||
$text['label-top']['en-us'] = "Top";
|
$text['label-top']['en-us'] = "Top";
|
||||||
$text['label-top']['es-cl'] = "encima";
|
$text['label-top']['es-cl'] = "encima";
|
||||||
$text['label-top']['pt-pt'] = "Topo";
|
$text['label-top']['pt-pt'] = "Topo";
|
||||||
$text['label-top']['fr-fr'] = "Meilleur";
|
$text['label-top']['fr-fr'] = "Meilleur";
|
||||||
$text['label-top']['pt-br'] = "Topo";
|
$text['label-top']['pt-br'] = "Topo";
|
||||||
$text['label-top']['pl'] = "Top";
|
$text['label-top']['pl'] = "Top";
|
||||||
$text['label-top']['he'] = "עליון";
|
$text['label-top']['he'] = "עליון";
|
||||||
$text['label-top']['uk'] = "топ";
|
$text['label-top']['uk'] = "топ";
|
||||||
$text['label-top']['sv-se'] = "Topp";
|
$text['label-top']['sv-se'] = "Topp";
|
||||||
$text['label-top']['de-at'] = "Oben";
|
$text['label-top']['de-at'] = "Oben";
|
||||||
$text['label-top']['ro'] = "Top";
|
$text['label-top']['ro'] = "Top";
|
||||||
$text['label-top']['fa'] = "";
|
$text['label-top']['fa'] = "";
|
||||||
$text['label-top']['ar-eg'] = "أعلى";
|
$text['label-top']['ar-eg'] = "أعلى";
|
||||||
|
|
||||||
$text['label-text']['en-us'] = "Text";
|
$text['label-text']['en-us'] = "Text";
|
||||||
$text['label-text']['es-cl'] = "Texto";
|
$text['label-text']['es-cl'] = "Texto";
|
||||||
$text['label-text']['pt-pt'] = "Texto";
|
$text['label-text']['pt-pt'] = "Texto";
|
||||||
$text['label-text']['fr-fr'] = "Texte";
|
$text['label-text']['fr-fr'] = "Texte";
|
||||||
$text['label-text']['pt-br'] = "Texto";
|
$text['label-text']['pt-br'] = "Texto";
|
||||||
$text['label-text']['pl'] = "Tekst";
|
$text['label-text']['pl'] = "Tekst";
|
||||||
$text['label-text']['he'] = "טֶקסט";
|
$text['label-text']['he'] = "טֶקסט";
|
||||||
$text['label-text']['uk'] = "текст";
|
$text['label-text']['uk'] = "текст";
|
||||||
$text['label-text']['sv-se'] = "Text";
|
$text['label-text']['sv-se'] = "Text";
|
||||||
$text['label-text']['de-at'] = "Text";
|
$text['label-text']['de-at'] = "Text";
|
||||||
$text['label-text']['ro'] = "Text";
|
$text['label-text']['ro'] = "Text";
|
||||||
$text['label-text']['fa'] = "";
|
$text['label-text']['fa'] = "";
|
||||||
$text['label-text']['ar-eg'] = "نص";
|
$text['label-text']['ar-eg'] = "نص";
|
||||||
|
|
||||||
$text['label-superfine']['en-us'] = "Superfine";
|
$text['label-superfine']['en-us'] = "Superfine";
|
||||||
$text['label-superfine']['es-cl'] = "Superfino";
|
$text['label-superfine']['es-cl'] = "Superfino";
|
||||||
$text['label-superfine']['pt-pt'] = "Extrafino";
|
$text['label-superfine']['pt-pt'] = "Extrafino";
|
||||||
$text['label-superfine']['fr-fr'] = "Superfin";
|
$text['label-superfine']['fr-fr'] = "Superfin";
|
||||||
$text['label-superfine']['nl-nl'] = "";
|
$text['label-superfine']['nl-nl'] = "";
|
||||||
$text['label-superfine']['pt-br'] = "Resumido";
|
$text['label-superfine']['pt-br'] = "Resumido";
|
||||||
$text['label-superfine']['pl'] = "Najlepsza";
|
$text['label-superfine']['pl'] = "Najlepsza";
|
||||||
$text['label-superfine']['sv-se'] = "Superfin";
|
$text['label-superfine']['sv-se'] = "Superfin";
|
||||||
$text['label-superfine']['uk'] = "";
|
$text['label-superfine']['uk'] = "";
|
||||||
$text['label-superfine']['de-at'] = "Superfein";
|
$text['label-superfine']['de-at'] = "Superfein";
|
||||||
|
|
||||||
$text['label-static']['en-us'] = "Static";
|
$text['label-static']['en-us'] = "Static";
|
||||||
$text['label-static']['es-cl'] = "Estático";
|
$text['label-static']['es-cl'] = "Estático";
|
||||||
$text['label-static']['pt-pt'] = "Estático";
|
$text['label-static']['pt-pt'] = "Estático";
|
||||||
$text['label-static']['fr-fr'] = "Statique";
|
$text['label-static']['fr-fr'] = "Statique";
|
||||||
$text['label-static']['pt-br'] = "Estático";
|
$text['label-static']['pt-br'] = "Estático";
|
||||||
$text['label-static']['pl'] = "Statyczny";
|
$text['label-static']['pl'] = "Statyczny";
|
||||||
$text['label-static']['he'] = "סטָטִי";
|
$text['label-static']['he'] = "סטָטִי";
|
||||||
$text['label-static']['uk'] = "статичний";
|
$text['label-static']['uk'] = "статичний";
|
||||||
$text['label-static']['sv-se'] = "Statisk";
|
$text['label-static']['sv-se'] = "Statisk";
|
||||||
$text['label-static']['de-at'] = "Statisch";
|
$text['label-static']['de-at'] = "Statisch";
|
||||||
$text['label-static']['ro'] = "Static";
|
$text['label-static']['ro'] = "Static";
|
||||||
$text['label-static']['fa'] = "";
|
$text['label-static']['fa'] = "";
|
||||||
$text['label-static']['ar-eg'] = "ساكن";
|
$text['label-static']['ar-eg'] = "ساكن";
|
||||||
|
|
||||||
$text['label-right']['en-us'] = "Right";
|
$text['label-right']['en-us'] = "Right";
|
||||||
$text['label-right']['es-cl'] = "Derecha";
|
$text['label-right']['es-cl'] = "Derecha";
|
||||||
$text['label-right']['pt-pt'] = "Certo";
|
$text['label-right']['pt-pt'] = "Certo";
|
||||||
$text['label-right']['fr-fr'] = "Droite";
|
$text['label-right']['fr-fr'] = "Droite";
|
||||||
$text['label-right']['pt-br'] = "Certo";
|
$text['label-right']['pt-br'] = "Certo";
|
||||||
$text['label-right']['pl'] = "Dobrze";
|
$text['label-right']['pl'] = "Dobrze";
|
||||||
$text['label-right']['he'] = "יָמִינָה";
|
$text['label-right']['he'] = "יָמִינָה";
|
||||||
$text['label-right']['uk'] = "правий";
|
$text['label-right']['uk'] = "правий";
|
||||||
$text['label-right']['sv-se'] = "Höger";
|
$text['label-right']['sv-se'] = "Höger";
|
||||||
$text['label-right']['de-at'] = "Recht";
|
$text['label-right']['de-at'] = "Recht";
|
||||||
$text['label-right']['ro'] = "Dreapta";
|
$text['label-right']['ro'] = "Dreapta";
|
||||||
$text['label-right']['fa'] = "";
|
$text['label-right']['fa'] = "";
|
||||||
$text['label-right']['ar-eg'] = "حق";
|
$text['label-right']['ar-eg'] = "حق";
|
||||||
|
|
||||||
$text['label-normal']['en-us'] = "Normal";
|
$text['label-normal']['en-us'] = "Normal";
|
||||||
$text['label-normal']['es-cl'] = "Normal";
|
$text['label-normal']['es-cl'] = "Normal";
|
||||||
$text['label-normal']['pt-pt'] = "Normal";
|
$text['label-normal']['pt-pt'] = "Normal";
|
||||||
$text['label-normal']['fr-fr'] = "Normal";
|
$text['label-normal']['fr-fr'] = "Normal";
|
||||||
$text['label-normal']['nl-nl'] = "";
|
$text['label-normal']['nl-nl'] = "";
|
||||||
$text['label-normal']['pt-br'] = "Normal";
|
$text['label-normal']['pt-br'] = "Normal";
|
||||||
$text['label-normal']['pl'] = "Normalny";
|
$text['label-normal']['pl'] = "Normalny";
|
||||||
$text['label-normal']['sv-se'] = "normal";
|
$text['label-normal']['sv-se'] = "normal";
|
||||||
$text['label-normal']['uk'] = "звичайно";
|
$text['label-normal']['uk'] = "звичайно";
|
||||||
$text['label-normal']['de-at'] = "normal";
|
$text['label-normal']['de-at'] = "normal";
|
||||||
|
|
||||||
$text['label-none']['en-us'] = "None";
|
$text['label-none']['en-us'] = "None";
|
||||||
$text['label-none']['es-cl'] = "Ninguna";
|
$text['label-none']['es-cl'] = "Ninguna";
|
||||||
$text['label-none']['pt-pt'] = "Nenhum";
|
$text['label-none']['pt-pt'] = "Nenhum";
|
||||||
$text['label-none']['fr-fr'] = "Aucun";
|
$text['label-none']['fr-fr'] = "Aucun";
|
||||||
$text['label-none']['pt-br'] = "Nenhum";
|
$text['label-none']['pt-br'] = "Nenhum";
|
||||||
$text['label-none']['pl'] = "Żaden";
|
$text['label-none']['pl'] = "Żaden";
|
||||||
$text['label-none']['he'] = "אף לא אחד";
|
$text['label-none']['he'] = "אף לא אחד";
|
||||||
$text['label-none']['uk'] = "жоден";
|
$text['label-none']['uk'] = "жоден";
|
||||||
$text['label-none']['sv-se'] = "Ingen";
|
$text['label-none']['sv-se'] = "Ingen";
|
||||||
$text['label-none']['de-at'] = "Keiner";
|
$text['label-none']['de-at'] = "Keiner";
|
||||||
$text['label-none']['ro'] = "Nici unul";
|
$text['label-none']['ro'] = "Nici unul";
|
||||||
$text['label-none']['fa'] = "";
|
$text['label-none']['fa'] = "";
|
||||||
$text['label-none']['ar-eg'] = "لا شيء";
|
$text['label-none']['ar-eg'] = "لا شيء";
|
||||||
|
|
||||||
$text['label-left']['en-us'] = "Left";
|
$text['label-left']['en-us'] = "Left";
|
||||||
$text['label-left']['es-cl'] = "Izquierda";
|
$text['label-left']['es-cl'] = "Izquierda";
|
||||||
$text['label-left']['pt-pt'] = "Esquerda";
|
$text['label-left']['pt-pt'] = "Esquerda";
|
||||||
$text['label-left']['fr-fr'] = "À gauche";
|
$text['label-left']['fr-fr'] = "À gauche";
|
||||||
$text['label-left']['pt-br'] = "Esquerda";
|
$text['label-left']['pt-br'] = "Esquerda";
|
||||||
$text['label-left']['pl'] = "Lewo";
|
$text['label-left']['pl'] = "Lewo";
|
||||||
$text['label-left']['he'] = "שְׁמֹאל";
|
$text['label-left']['he'] = "שְׁמֹאל";
|
||||||
$text['label-left']['uk'] = "лівий";
|
$text['label-left']['uk'] = "лівий";
|
||||||
$text['label-left']['sv-se'] = "Vänster";
|
$text['label-left']['sv-se'] = "Vänster";
|
||||||
$text['label-left']['de-at'] = "Links";
|
$text['label-left']['de-at'] = "Links";
|
||||||
$text['label-left']['ro'] = "Stânga";
|
$text['label-left']['ro'] = "Stânga";
|
||||||
$text['label-left']['fa'] = "";
|
$text['label-left']['fa'] = "";
|
||||||
$text['label-left']['ar-eg'] = "اليسار";
|
$text['label-left']['ar-eg'] = "اليسار";
|
||||||
|
|
||||||
$text['label-inline']['en-us'] = "Inline";
|
$text['label-inline']['en-us'] = "Inline";
|
||||||
$text['label-inline']['es-cl'] = "En línea";
|
$text['label-inline']['es-cl'] = "En línea";
|
||||||
$text['label-inline']['pt-pt'] = "Na linha";
|
$text['label-inline']['pt-pt'] = "Na linha";
|
||||||
$text['label-inline']['fr-fr'] = "En ligne";
|
$text['label-inline']['fr-fr'] = "En ligne";
|
||||||
$text['label-inline']['pt-br'] = "Na linha";
|
$text['label-inline']['pt-br'] = "Na linha";
|
||||||
$text['label-inline']['pl'] = "inline";
|
$text['label-inline']['pl'] = "inline";
|
||||||
$text['label-inline']['he'] = "בשורה";
|
$text['label-inline']['he'] = "בשורה";
|
||||||
$text['label-inline']['uk'] = "В лінію";
|
$text['label-inline']['uk'] = "В лінію";
|
||||||
$text['label-inline']['sv-se'] = "I kö";
|
$text['label-inline']['sv-se'] = "I kö";
|
||||||
$text['label-inline']['de-at'] = "In der Reihe";
|
$text['label-inline']['de-at'] = "In der Reihe";
|
||||||
$text['label-inline']['ro'] = "In linie";
|
$text['label-inline']['ro'] = "In linie";
|
||||||
$text['label-inline']['fa'] = "";
|
$text['label-inline']['fa'] = "";
|
||||||
$text['label-inline']['ar-eg'] = "في النسق";
|
$text['label-inline']['ar-eg'] = "في النسق";
|
||||||
|
|
||||||
$text['label-image']['en-us'] = "Image";
|
$text['label-image']['en-us'] = "Image";
|
||||||
$text['label-image']['es-cl'] = "Imagen";
|
$text['label-image']['es-cl'] = "Imagen";
|
||||||
$text['label-image']['pt-pt'] = "Imagem";
|
$text['label-image']['pt-pt'] = "Imagem";
|
||||||
$text['label-image']['fr-fr'] = "image";
|
$text['label-image']['fr-fr'] = "image";
|
||||||
$text['label-image']['pt-br'] = "Imagem";
|
$text['label-image']['pt-br'] = "Imagem";
|
||||||
$text['label-image']['pl'] = "Obraz";
|
$text['label-image']['pl'] = "Obraz";
|
||||||
$text['label-image']['he'] = "תמונה";
|
$text['label-image']['he'] = "תמונה";
|
||||||
$text['label-image']['uk'] = "зображення";
|
$text['label-image']['uk'] = "зображення";
|
||||||
$text['label-image']['sv-se'] = "Bild";
|
$text['label-image']['sv-se'] = "Bild";
|
||||||
$text['label-image']['de-at'] = "Image";
|
$text['label-image']['de-at'] = "Image";
|
||||||
$text['label-image']['ro'] = "Imagine";
|
$text['label-image']['ro'] = "Imagine";
|
||||||
$text['label-image']['fa'] = "";
|
$text['label-image']['fa'] = "";
|
||||||
$text['label-image']['ar-eg'] = "صورة";
|
$text['label-image']['ar-eg'] = "صورة";
|
||||||
|
|
||||||
$text['label-fixed']['en-us'] = "Fixed";
|
$text['label-fixed']['en-us'] = "Fixed";
|
||||||
$text['label-fixed']['es-cl'] = "Fijo";
|
$text['label-fixed']['es-cl'] = "Fijo";
|
||||||
$text['label-fixed']['pt-pt'] = "Fixo";
|
$text['label-fixed']['pt-pt'] = "Fixo";
|
||||||
$text['label-fixed']['fr-fr'] = "Fixé";
|
$text['label-fixed']['fr-fr'] = "Fixé";
|
||||||
$text['label-fixed']['pt-br'] = "Fixo";
|
$text['label-fixed']['pt-br'] = "Fixo";
|
||||||
$text['label-fixed']['pl'] = "Naprawiony";
|
$text['label-fixed']['pl'] = "Naprawiony";
|
||||||
$text['label-fixed']['he'] = "קָבוּעַ";
|
$text['label-fixed']['he'] = "קָבוּעַ";
|
||||||
$text['label-fixed']['uk'] = "фіксований";
|
$text['label-fixed']['uk'] = "фіксований";
|
||||||
$text['label-fixed']['sv-se'] = "Fast";
|
$text['label-fixed']['sv-se'] = "Fast";
|
||||||
$text['label-fixed']['de-at'] = "fest";
|
$text['label-fixed']['de-at'] = "fest";
|
||||||
$text['label-fixed']['ro'] = "Fix";
|
$text['label-fixed']['ro'] = "Fix";
|
||||||
$text['label-fixed']['fa'] = "";
|
$text['label-fixed']['fa'] = "";
|
||||||
$text['label-fixed']['ar-eg'] = "ثابت";
|
$text['label-fixed']['ar-eg'] = "ثابت";
|
||||||
|
|
||||||
$text['label-fine']['en-us'] = "Fine";
|
$text['label-fine']['en-us'] = "Fine";
|
||||||
$text['label-fine']['es-cl'] = "Fine";
|
$text['label-fine']['es-cl'] = "Fine";
|
||||||
$text['label-fine']['pt-pt'] = "Belas";
|
$text['label-fine']['pt-pt'] = "Belas";
|
||||||
$text['label-fine']['fr-fr'] = "Fin";
|
$text['label-fine']['fr-fr'] = "Fin";
|
||||||
$text['label-fine']['nl-nl'] = "";
|
$text['label-fine']['nl-nl'] = "";
|
||||||
$text['label-fine']['pt-br'] = "Agradável ";
|
$text['label-fine']['pt-br'] = "Agradável ";
|
||||||
$text['label-fine']['pl'] = "Dobry";
|
$text['label-fine']['pl'] = "Dobry";
|
||||||
$text['label-fine']['sv-se'] = "Fin";
|
$text['label-fine']['sv-se'] = "Fin";
|
||||||
$text['label-fine']['uk'] = "";
|
$text['label-fine']['uk'] = "";
|
||||||
$text['label-fine']['de-at'] = "Fein";
|
$text['label-fine']['de-at'] = "Fein";
|
||||||
|
|
||||||
$text['label-center']['en-us'] = "Center";
|
$text['label-center']['en-us'] = "Center";
|
||||||
$text['label-center']['es-cl'] = "Centrar";
|
$text['label-center']['es-cl'] = "Centrar";
|
||||||
$text['label-center']['pt-pt'] = "Centro";
|
$text['label-center']['pt-pt'] = "Centro";
|
||||||
$text['label-center']['fr-fr'] = "centre";
|
$text['label-center']['fr-fr'] = "centre";
|
||||||
$text['label-center']['pt-br'] = "Centro";
|
$text['label-center']['pt-br'] = "Centro";
|
||||||
$text['label-center']['pl'] = "Centrum";
|
$text['label-center']['pl'] = "Centrum";
|
||||||
$text['label-center']['he'] = "מֶרְכָּז";
|
$text['label-center']['he'] = "מֶרְכָּז";
|
||||||
$text['label-center']['uk'] = "центр";
|
$text['label-center']['uk'] = "центр";
|
||||||
$text['label-center']['sv-se'] = "Centrum";
|
$text['label-center']['sv-se'] = "Centrum";
|
||||||
$text['label-center']['de-at'] = "Center";
|
$text['label-center']['de-at'] = "Center";
|
||||||
$text['label-center']['ro'] = "Centru";
|
$text['label-center']['ro'] = "Centru";
|
||||||
$text['label-center']['fa'] = "";
|
$text['label-center']['fa'] = "";
|
||||||
$text['label-center']['ar-eg'] = "مركز";
|
$text['label-center']['ar-eg'] = "مركز";
|
||||||
|
|
||||||
$text['label-bottom']['en-us'] = "Bottom";
|
$text['label-bottom']['en-us'] = "Bottom";
|
||||||
$text['label-bottom']['es-cl'] = "Fondo";
|
$text['label-bottom']['es-cl'] = "Fondo";
|
||||||
$text['label-bottom']['pt-pt'] = "Inferior";
|
$text['label-bottom']['pt-pt'] = "Inferior";
|
||||||
$text['label-bottom']['fr-fr'] = "Bas";
|
$text['label-bottom']['fr-fr'] = "Bas";
|
||||||
$text['label-bottom']['pt-br'] = "Inferior";
|
$text['label-bottom']['pt-br'] = "Inferior";
|
||||||
$text['label-bottom']['pl'] = "Dolny";
|
$text['label-bottom']['pl'] = "Dolny";
|
||||||
$text['label-bottom']['he'] = "תַחתִית";
|
$text['label-bottom']['he'] = "תַחתִית";
|
||||||
$text['label-bottom']['uk'] = "дно";
|
$text['label-bottom']['uk'] = "дно";
|
||||||
$text['label-bottom']['sv-se'] = "Botten";
|
$text['label-bottom']['sv-se'] = "Botten";
|
||||||
$text['label-bottom']['de-at'] = "Boden";
|
$text['label-bottom']['de-at'] = "Boden";
|
||||||
$text['label-bottom']['ro'] = "Fund";
|
$text['label-bottom']['ro'] = "Fund";
|
||||||
$text['label-bottom']['fa'] = "";
|
$text['label-bottom']['fa'] = "";
|
||||||
$text['label-bottom']['ar-eg'] = "أسفل";
|
$text['label-bottom']['ar-eg'] = "أسفل";
|
||||||
|
|
||||||
$text['label-24-hour']['en-us'] = "24-Hour";
|
$text['label-24-hour']['en-us'] = "24-Hour";
|
||||||
$text['label-24-hour']['es-cl'] = "24 horas";
|
$text['label-24-hour']['es-cl'] = "24 horas";
|
||||||
$text['label-24-hour']['pt-pt'] = "24 horas";
|
$text['label-24-hour']['pt-pt'] = "24 horas";
|
||||||
$text['label-24-hour']['fr-fr'] = "24 heures";
|
$text['label-24-hour']['fr-fr'] = "24 heures";
|
||||||
$text['label-24-hour']['pt-br'] = "24 horas";
|
$text['label-24-hour']['pt-br'] = "24 horas";
|
||||||
$text['label-24-hour']['pl'] = "24-godzinny";
|
$text['label-24-hour']['pl'] = "24-godzinny";
|
||||||
$text['label-24-hour']['he'] = "24 שעות";
|
$text['label-24-hour']['he'] = "24 שעות";
|
||||||
$text['label-24-hour']['uk'] = "24-годинний";
|
$text['label-24-hour']['uk'] = "24-годинний";
|
||||||
$text['label-24-hour']['sv-se'] = "24-timmars";
|
$text['label-24-hour']['sv-se'] = "24-timmars";
|
||||||
$text['label-24-hour']['de-at'] = "24 Stunden";
|
$text['label-24-hour']['de-at'] = "24 Stunden";
|
||||||
$text['label-24-hour']['ro'] = "24 de ore";
|
$text['label-24-hour']['ro'] = "24 de ore";
|
||||||
$text['label-24-hour']['fa'] = "";
|
$text['label-24-hour']['fa'] = "";
|
||||||
$text['label-24-hour']['ar-eg'] = "24 ساعة";
|
$text['label-24-hour']['ar-eg'] = "24 ساعة";
|
||||||
|
|
||||||
$text['label-12-hour']['en-us'] = "12-Hour";
|
$text['label-12-hour']['en-us'] = "12-Hour";
|
||||||
$text['label-12-hour']['es-cl'] = "12 horas";
|
$text['label-12-hour']['es-cl'] = "12 horas";
|
||||||
$text['label-12-hour']['pt-pt'] = "12 horas";
|
$text['label-12-hour']['pt-pt'] = "12 horas";
|
||||||
$text['label-12-hour']['fr-fr'] = "12 heures";
|
$text['label-12-hour']['fr-fr'] = "12 heures";
|
||||||
$text['label-12-hour']['pt-br'] = "12 horas";
|
$text['label-12-hour']['pt-br'] = "12 horas";
|
||||||
$text['label-12-hour']['pl'] = "12-godzinny";
|
$text['label-12-hour']['pl'] = "12-godzinny";
|
||||||
$text['label-12-hour']['he'] = "12 שעות";
|
$text['label-12-hour']['he'] = "12 שעות";
|
||||||
$text['label-12-hour']['uk'] = "12-годинний";
|
$text['label-12-hour']['uk'] = "12-годинний";
|
||||||
$text['label-12-hour']['sv-se'] = "12-timmars";
|
$text['label-12-hour']['sv-se'] = "12-timmars";
|
||||||
$text['label-12-hour']['de-at'] = "12 Stunden";
|
$text['label-12-hour']['de-at'] = "12 Stunden";
|
||||||
$text['label-12-hour']['ro'] = "12 de ore";
|
$text['label-12-hour']['ro'] = "12 de ore";
|
||||||
$text['label-12-hour']['fa'] = "";
|
$text['label-12-hour']['fa'] = "";
|
||||||
$text['label-12-hour']['ar-eg'] = "12 ساعة";
|
$text['label-12-hour']['ar-eg'] = "12 ساعة";
|
||||||
|
|
||||||
$text['header-default_settings']['en-us'] = "Default Settings";
|
$text['header-default_settings']['en-us'] = "Default Settings";
|
||||||
$text['header-default_settings']['es-cl'] = "Condiciones Predeterminadas";
|
$text['header-default_settings']['es-cl'] = "Condiciones Predeterminadas";
|
||||||
$text['header-default_settings']['pt-pt'] = "Predefinições";
|
$text['header-default_settings']['pt-pt'] = "Predefinições";
|
||||||
$text['header-default_settings']['fr-fr'] = "Configurations par Défaut";
|
$text['header-default_settings']['fr-fr'] = "Configurations par Défaut";
|
||||||
$text['header-default_settings']['nl-nl'] = "";
|
$text['header-default_settings']['nl-nl'] = "";
|
||||||
$text['header-default_settings']['pt-br'] = "Configurações";
|
$text['header-default_settings']['pt-br'] = "Configurações";
|
||||||
$text['header-default_settings']['pl'] = "Ustawienia domyślne";
|
$text['header-default_settings']['pl'] = "Ustawienia domyślne";
|
||||||
$text['header-default_settings']['sv-se'] = "Standard Inställningar";
|
$text['header-default_settings']['sv-se'] = "Standard Inställningar";
|
||||||
$text['header-default_settings']['uk'] = "";
|
$text['header-default_settings']['uk'] = "";
|
||||||
$text['header-default_settings']['de-at'] = "Standard Einstellungen";
|
$text['header-default_settings']['de-at'] = "Standard Einstellungen";
|
||||||
|
|
||||||
$text['header-default_setting-edit']['en-us'] = "Default Setting";
|
$text['header-default_setting-edit']['en-us'] = "Default Setting";
|
||||||
$text['header-default_setting-edit']['es-cl'] = "Configuraciones Predeterminadas";
|
$text['header-default_setting-edit']['es-cl'] = "Configuraciones Predeterminadas";
|
||||||
$text['header-default_setting-edit']['pt-pt'] = "Predefinições";
|
$text['header-default_setting-edit']['pt-pt'] = "Predefinições";
|
||||||
$text['header-default_setting-edit']['fr-fr'] = "Configurations par Défaut";
|
$text['header-default_setting-edit']['fr-fr'] = "Configurations par Défaut";
|
||||||
$text['header-default_setting-edit']['nl-nl'] = "";
|
$text['header-default_setting-edit']['nl-nl'] = "";
|
||||||
$text['header-default_setting-edit']['pt-br'] = "Configurações";
|
$text['header-default_setting-edit']['pt-br'] = "Configurações";
|
||||||
$text['header-default_setting-edit']['pl'] = "Ustawienie domyślne";
|
$text['header-default_setting-edit']['pl'] = "Ustawienie domyślne";
|
||||||
$text['header-default_setting-edit']['sv-se'] = "Standard Inställning";
|
$text['header-default_setting-edit']['sv-se'] = "Standard Inställning";
|
||||||
$text['header-default_setting-edit']['uk'] = "";
|
$text['header-default_setting-edit']['uk'] = "";
|
||||||
$text['header-default_setting-edit']['de-at'] = "Standard Einstellungen";
|
$text['header-default_setting-edit']['de-at'] = "Standard Einstellungen";
|
||||||
|
|
||||||
$text['header-default_setting-add']['en-us'] = "Default Setting Add";
|
$text['header-default_setting-add']['en-us'] = "Default Setting Add";
|
||||||
$text['header-default_setting-add']['es-cl'] = "Agregar Configuración Predeterminada";
|
$text['header-default_setting-add']['es-cl'] = "Agregar Configuración Predeterminada";
|
||||||
$text['header-default_setting-add']['pt-pt'] = "Adicionar Predefinição ";
|
$text['header-default_setting-add']['pt-pt'] = "Adicionar Predefinição ";
|
||||||
$text['header-default_setting-add']['fr-fr'] = "Ajouter une configuration per défaut";
|
$text['header-default_setting-add']['fr-fr'] = "Ajouter une configuration per défaut";
|
||||||
$text['header-default_setting-add']['nl-nl'] = "";
|
$text['header-default_setting-add']['nl-nl'] = "";
|
||||||
$text['header-default_setting-add']['pt-br'] = "Adicionar configurações";
|
$text['header-default_setting-add']['pt-br'] = "Adicionar configurações";
|
||||||
$text['header-default_setting-add']['pl'] = "Dodaj ustawienie domyślne";
|
$text['header-default_setting-add']['pl'] = "Dodaj ustawienie domyślne";
|
||||||
$text['header-default_setting-add']['sv-se'] = "Lägg Till Standard Inställning";
|
$text['header-default_setting-add']['sv-se'] = "Lägg Till Standard Inställning";
|
||||||
$text['header-default_setting-add']['uk'] = "";
|
$text['header-default_setting-add']['uk'] = "";
|
||||||
$text['header-default_setting-add']['de-at'] = "Standard Einstellungen hinzufügen";
|
$text['header-default_setting-add']['de-at'] = "Standard Einstellungen hinzufügen";
|
||||||
|
|
||||||
$text['description-order']['en-us'] = "Set the order (index) for this array element.";
|
$text['description-order']['en-us'] = "Set the order (index) for this array element.";
|
||||||
$text['description-order']['es-cl'] = "Establecer el orden (índice) para este elemento de la matriz.";
|
$text['description-order']['es-cl'] = "Establecer el orden (índice) para este elemento de la matriz.";
|
||||||
$text['description-order']['pt-pt'] = "Defina a ordem (índice) para este elemento da matriz.";
|
$text['description-order']['pt-pt'] = "Defina a ordem (índice) para este elemento da matriz.";
|
||||||
$text['description-order']['fr-fr'] = "Définir l'ordre (index) pour cet élément de tableau.";
|
$text['description-order']['fr-fr'] = "Définir l'ordre (index) pour cet élément de tableau.";
|
||||||
$text['description-order']['nl-nl'] = "";
|
$text['description-order']['nl-nl'] = "";
|
||||||
$text['description-order']['pt-br'] = "Defina a ordem (indice) para este elemento da matriz";
|
$text['description-order']['pt-br'] = "Defina a ordem (indice) para este elemento da matriz";
|
||||||
$text['description-order']['pl'] = "Wybierz kolejność.";
|
$text['description-order']['pl'] = "Wybierz kolejność.";
|
||||||
$text['description-order']['sv-se'] = "Ställ in ordningen (index) för detta element.";
|
$text['description-order']['sv-se'] = "Ställ in ordningen (index) för detta element.";
|
||||||
$text['description-order']['uk'] = "";
|
$text['description-order']['uk'] = "";
|
||||||
$text['description-order']['de-at'] = "Wählen Sie die Reihenfolge (Index) für das Array Element.";
|
$text['description-order']['de-at'] = "Wählen Sie die Reihenfolge (Index) für das Array Element.";
|
||||||
|
|
||||||
$text['description-enabled']['en-us'] = "Set the status of this default setting.";
|
$text['description-enabled']['en-us'] = "Set the status of this default setting.";
|
||||||
$text['description-enabled']['es-cl'] = "Ingrese el estado de esta configuración.";
|
$text['description-enabled']['es-cl'] = "Ingrese el estado de esta configuración.";
|
||||||
$text['description-enabled']['pt-pt'] = "Escolha o estado desta predefinição.";
|
$text['description-enabled']['pt-pt'] = "Escolha o estado desta predefinição.";
|
||||||
$text['description-enabled']['fr-fr'] = "Choisir l'état de ce paraètre";
|
$text['description-enabled']['fr-fr'] = "Choisir l'état de ce paraètre";
|
||||||
$text['description-enabled']['nl-nl'] = "";
|
$text['description-enabled']['nl-nl'] = "";
|
||||||
$text['description-enabled']['pt-br'] = "Escolha o estado desta definição";
|
$text['description-enabled']['pt-br'] = "Escolha o estado desta definição";
|
||||||
$text['description-enabled']['pl'] = "Ustaw status ustawienia domyślnego.";
|
$text['description-enabled']['pl'] = "Ustaw status ustawienia domyślnego.";
|
||||||
$text['description-enabled']['sv-se'] = "Välj status på denna standardinställning.";
|
$text['description-enabled']['sv-se'] = "Välj status på denna standardinställning.";
|
||||||
$text['description-enabled']['uk'] = "";
|
$text['description-enabled']['uk'] = "";
|
||||||
$text['description-enabled']['de-at'] = "Setzen Sie den Status dieser Standardeinstellung.";
|
$text['description-enabled']['de-at'] = "Setzen Sie den Status dieser Standardeinstellung.";
|
||||||
|
|
||||||
$text['description-default_settings']['en-us'] = "Settings used for all domains.";
|
$text['description-default_settings']['en-us'] = "Settings used for all domains.";
|
||||||
$text['description-default_settings']['es-cl'] = "Configuraciones usadas por todos los dominios";
|
$text['description-default_settings']['es-cl'] = "Configuraciones usadas por todos los dominios";
|
||||||
$text['description-default_settings']['pt-pt'] = "Definições comuns a todos os domínios.";
|
$text['description-default_settings']['pt-pt'] = "Definições comuns a todos os domínios.";
|
||||||
$text['description-default_settings']['fr-fr'] = "Configurations communes à tous les domaines.";
|
$text['description-default_settings']['fr-fr'] = "Configurations communes à tous les domaines.";
|
||||||
$text['description-default_settings']['nl-nl'] = "";
|
$text['description-default_settings']['nl-nl'] = "";
|
||||||
$text['description-default_settings']['pt-br'] = "Configurações comuns a todos os dominios";
|
$text['description-default_settings']['pt-br'] = "Configurações comuns a todos os dominios";
|
||||||
$text['description-default_settings']['pl'] = "Ustawienia stosowane dla wszystkich domen.";
|
$text['description-default_settings']['pl'] = "Ustawienia stosowane dla wszystkich domen.";
|
||||||
$text['description-default_settings']['sv-se'] = "Inställning används för alla domäner.";
|
$text['description-default_settings']['sv-se'] = "Inställning används för alla domäner.";
|
||||||
$text['description-default_settings']['uk'] = "Налаштування використовується для всіх доменів";
|
$text['description-default_settings']['uk'] = "Налаштування використовується для всіх доменів";
|
||||||
$text['description-default_settings']['de-at'] = "Einstellungen für alle Domains.";
|
$text['description-default_settings']['de-at'] = "Einstellungen für alle Domains.";
|
||||||
|
|
||||||
$text['description-default_setting-edit']['en-us'] = "Settings used for all domains.";
|
$text['description-default_setting-edit']['en-us'] = "Settings used for all domains.";
|
||||||
$text['description-default_setting-edit']['es-cl'] = "Configuraciones usadas para todos los dominios.";
|
$text['description-default_setting-edit']['es-cl'] = "Configuraciones usadas para todos los dominios.";
|
||||||
$text['description-default_setting-edit']['pt-pt'] = "Definições comuns a todos os domínios.";
|
$text['description-default_setting-edit']['pt-pt'] = "Definições comuns a todos os domínios.";
|
||||||
$text['description-default_setting-edit']['fr-fr'] = "Configurations communes à tous les domaines";
|
$text['description-default_setting-edit']['fr-fr'] = "Configurations communes à tous les domaines";
|
||||||
$text['description-default_setting-edit']['nl-nl'] = "";
|
$text['description-default_setting-edit']['nl-nl'] = "";
|
||||||
$text['description-default_setting-edit']['pt-br'] = "Configurações comuns a todos os dominios";
|
$text['description-default_setting-edit']['pt-br'] = "Configurações comuns a todos os dominios";
|
||||||
$text['description-default_setting-edit']['pl'] = "Ustawienia stosowane dla wszystkich domen.";
|
$text['description-default_setting-edit']['pl'] = "Ustawienia stosowane dla wszystkich domen.";
|
||||||
$text['description-default_setting-edit']['sv-se'] = "Inställning används för alla domäner.";
|
$text['description-default_setting-edit']['sv-se'] = "Inställning används för alla domäner.";
|
||||||
$text['description-default_setting-edit']['uk'] = "Налаштування використовується для всіх доменів";
|
$text['description-default_setting-edit']['uk'] = "Налаштування використовується для всіх доменів";
|
||||||
$text['description-default_setting-edit']['de-at'] = "Einstellungen für alle Domains.";
|
$text['description-default_setting-edit']['de-at'] = "Einstellungen für alle Domains.";
|
||||||
|
|
||||||
$text['description-default_setting-add']['en-us'] = "Settings used for all domains.";
|
$text['description-default_setting-add']['en-us'] = "Settings used for all domains.";
|
||||||
$text['description-default_setting-add']['es-cl'] = "Configuraciones usadas para todos los dominios.";
|
$text['description-default_setting-add']['es-cl'] = "Configuraciones usadas para todos los dominios.";
|
||||||
$text['description-default_setting-add']['pt-pt'] = "Definições comuns a todos os domínios.";
|
$text['description-default_setting-add']['pt-pt'] = "Definições comuns a todos os domínios.";
|
||||||
$text['description-default_setting-add']['fr-fr'] = "Configurations communes à tous les domaines";
|
$text['description-default_setting-add']['fr-fr'] = "Configurations communes à tous les domaines";
|
||||||
$text['description-default_setting-add']['nl-nl'] = "";
|
$text['description-default_setting-add']['nl-nl'] = "";
|
||||||
$text['description-default_setting-add']['pt-br'] = "Configurações comuns a todos os dominio";
|
$text['description-default_setting-add']['pt-br'] = "Configurações comuns a todos os dominio";
|
||||||
$text['description-default_setting-add']['pl'] = "Ustawienia stosowane dla wszystkich domen.";
|
$text['description-default_setting-add']['pl'] = "Ustawienia stosowane dla wszystkich domen.";
|
||||||
$text['description-default_setting-add']['sv-se'] = "Inställning används för alla domäner.";
|
$text['description-default_setting-add']['sv-se'] = "Inställning används för alla domäner.";
|
||||||
$text['description-default_setting-add']['uk'] = "Налаштування використовується для всіх доменів";
|
$text['description-default_setting-add']['uk'] = "Налаштування використовується для всіх доменів";
|
||||||
$text['description-default_setting-add']['de-at'] = "Einstellungen für alle Domains.";
|
$text['description-default_setting-add']['de-at'] = "Einstellungen für alle Domains.";
|
||||||
|
|
||||||
$text['button-toggle']['en-us'] = "Toggle";
|
$text['button-toggle']['en-us'] = "Toggle";
|
||||||
$text['button-toggle']['es-cl'] = "Palanca";
|
$text['button-toggle']['es-cl'] = "Palanca";
|
||||||
$text['button-toggle']['pt-pt'] = "Alternar";
|
$text['button-toggle']['pt-pt'] = "Alternar";
|
||||||
$text['button-toggle']['fr-fr'] = "Basculer";
|
$text['button-toggle']['fr-fr'] = "Basculer";
|
||||||
$text['button-toggle']['pt-br'] = "Alternar";
|
$text['button-toggle']['pt-br'] = "Alternar";
|
||||||
$text['button-toggle']['pl'] = "Przełącznik";
|
$text['button-toggle']['pl'] = "Przełącznik";
|
||||||
$text['button-toggle']['he'] = "לְמַתֵג";
|
$text['button-toggle']['he'] = "לְמַתֵג";
|
||||||
$text['button-toggle']['uk'] = "тумблер";
|
$text['button-toggle']['uk'] = "тумблер";
|
||||||
$text['button-toggle']['sv-se'] = "toggle";
|
$text['button-toggle']['sv-se'] = "toggle";
|
||||||
$text['button-toggle']['de-at'] = "Umschalten";
|
$text['button-toggle']['de-at'] = "Umschalten";
|
||||||
$text['button-toggle']['ro'] = "Comutare";
|
$text['button-toggle']['ro'] = "Comutare";
|
||||||
$text['button-toggle']['fa'] = "";
|
$text['button-toggle']['fa'] = "";
|
||||||
$text['button-toggle']['ar-eg'] = "تبديل";
|
$text['button-toggle']['ar-eg'] = "تبديل";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,72 +1,72 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('voicemail_message_view')) {
|
if (permission_exists('voicemail_message_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//get submitted variables
|
//get submitted variables
|
||||||
$search = $_REQUEST['search'];
|
$search = $_REQUEST['search'];
|
||||||
$default_setting_uuids = $_REQUEST["id"];
|
$default_setting_uuids = $_REQUEST["id"];
|
||||||
|
|
||||||
//toggle the setting
|
//toggle the setting
|
||||||
$toggled = 0;
|
$toggled = 0;
|
||||||
if (is_array($default_setting_uuids) && sizeof($default_setting_uuids) > 0) {
|
if (is_array($default_setting_uuids) && sizeof($default_setting_uuids) > 0) {
|
||||||
foreach ($default_setting_uuids as $default_setting_uuid) {
|
foreach ($default_setting_uuids as $default_setting_uuid) {
|
||||||
//get current status
|
//get current status
|
||||||
$sql = "select default_setting_enabled from v_default_settings where default_setting_uuid = '".check_str($default_setting_uuid)."'";
|
$sql = "select default_setting_enabled from v_default_settings where default_setting_uuid = '".check_str($default_setting_uuid)."'";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_NAMED);
|
$row = $prep_statement->fetch(PDO::FETCH_NAMED);
|
||||||
$new_status = ($row['default_setting_enabled'] == 'true') ? 'false' : "true";
|
$new_status = ($row['default_setting_enabled'] == 'true') ? 'false' : "true";
|
||||||
unset ($sql, $prep_statement, $row);
|
unset ($sql, $prep_statement, $row);
|
||||||
//set new status
|
//set new status
|
||||||
$sql = "update v_default_settings set default_setting_enabled = '".$new_status."' where default_setting_uuid = '".check_str($default_setting_uuid)."'";
|
$sql = "update v_default_settings set default_setting_enabled = '".$new_status."' where default_setting_uuid = '".check_str($default_setting_uuid)."'";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset ($sql, $prep_statement);
|
unset ($sql, $prep_statement);
|
||||||
|
|
||||||
$toggled++;
|
$toggled++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
if ($toggled > 0) {
|
if ($toggled > 0) {
|
||||||
$_SESSION["message"] = $text['message-toggled'].': '.$toggled;
|
$_SESSION["message"] = $text['message-toggled'].': '.$toggled;
|
||||||
}
|
}
|
||||||
header("Location: default_settings.php".(($search != '') ? '?search='.$search : null));
|
header("Location: default_settings.php".(($search != '') ? '?search='.$search : null));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,51 +1,51 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('default_setting_view')) {
|
if (permission_exists('default_setting_view')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
$search = check_str($_REQUEST['search']);
|
$search = check_str($_REQUEST['search']);
|
||||||
|
|
||||||
require "resources/classes/domains.php";
|
require "resources/classes/domains.php";
|
||||||
$domain = new domains();
|
$domain = new domains();
|
||||||
$domain->db = $db;
|
$domain->db = $db;
|
||||||
$domain->set();
|
$domain->set();
|
||||||
|
|
||||||
$_SESSION["message"] = $text['message-settings_reloaded'];
|
$_SESSION["message"] = $text['message-settings_reloaded'];
|
||||||
header("Location: default_settings.php".(($search != '') ? "?search=".$search : null));
|
header("Location: default_settings.php".(($search != '') ? "?search=".$search : null));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,35 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2010
|
Portions created by the Initial Developer are Copyright (C) 2008-2010
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//proccess this only one time
|
//proccess this only one time
|
||||||
if ($domains_processed == 1) {
|
if ($domains_processed == 1) {
|
||||||
//set domains with enabled status of empty or null to true
|
//set domains with enabled status of empty or null to true
|
||||||
$sql = "update v_domains set domain_enabled = 'true' where domain_enabled = '' or domain_enabled is null";
|
$sql = "update v_domains set domain_enabled = 'true' where domain_enabled = '' or domain_enabled is null";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,445 +1,445 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$text['title-domains']['en-us'] = "Domains";
|
$text['title-domains']['en-us'] = "Domains";
|
||||||
$text['title-domains']['es-cl'] = "Dominios";
|
$text['title-domains']['es-cl'] = "Dominios";
|
||||||
$text['title-domains']['pt-pt'] = "Domínios";
|
$text['title-domains']['pt-pt'] = "Domínios";
|
||||||
$text['title-domains']['fr-fr'] = "Domaines";
|
$text['title-domains']['fr-fr'] = "Domaines";
|
||||||
$text['title-domains']['pt-br'] = "Dominios";
|
$text['title-domains']['pt-br'] = "Dominios";
|
||||||
$text['title-domains']['pl'] = "Domeny";
|
$text['title-domains']['pl'] = "Domeny";
|
||||||
$text['title-domains']['sv-se'] = "Domäner";
|
$text['title-domains']['sv-se'] = "Domäner";
|
||||||
$text['title-domains']['uk'] = "Домени";
|
$text['title-domains']['uk'] = "Домени";
|
||||||
$text['title-domains']['de-at'] = "Domains";
|
$text['title-domains']['de-at'] = "Domains";
|
||||||
|
|
||||||
$text['title-domain_setting-edit']['en-us'] = "Domain Setting";
|
$text['title-domain_setting-edit']['en-us'] = "Domain Setting";
|
||||||
$text['title-domain_setting-edit']['es-cl'] = "Configuraciones de dominio.";
|
$text['title-domain_setting-edit']['es-cl'] = "Configuraciones de dominio.";
|
||||||
$text['title-domain_setting-edit']['pt-pt'] = "Definições do Domínio";
|
$text['title-domain_setting-edit']['pt-pt'] = "Definições do Domínio";
|
||||||
$text['title-domain_setting-edit']['fr-fr'] = "Paramètres du domaine";
|
$text['title-domain_setting-edit']['fr-fr'] = "Paramètres du domaine";
|
||||||
$text['title-domain_setting-edit']['pt-br'] = "Configurações do dominio";
|
$text['title-domain_setting-edit']['pt-br'] = "Configurações do dominio";
|
||||||
$text['title-domain_setting-edit']['pl'] = "Ustawienia domen";
|
$text['title-domain_setting-edit']['pl'] = "Ustawienia domen";
|
||||||
$text['title-domain_setting-edit']['sv-se'] = "Domän Inställning";
|
$text['title-domain_setting-edit']['sv-se'] = "Domän Inställning";
|
||||||
$text['title-domain_setting-edit']['uk'] = "Налаштування доменів";
|
$text['title-domain_setting-edit']['uk'] = "Налаштування доменів";
|
||||||
$text['title-domain_setting-edit']['de-at'] = "Domain Einstellungen";
|
$text['title-domain_setting-edit']['de-at'] = "Domain Einstellungen";
|
||||||
|
|
||||||
$text['title-domain_setting-add']['en-us'] = "Domain Setting Add";
|
$text['title-domain_setting-add']['en-us'] = "Domain Setting Add";
|
||||||
$text['title-domain_setting-add']['es-cl'] = "Agregar Configuración de Dominio";
|
$text['title-domain_setting-add']['es-cl'] = "Agregar Configuración de Dominio";
|
||||||
$text['title-domain_setting-add']['pt-pt'] = "Adicionar Definição ao Domínio";
|
$text['title-domain_setting-add']['pt-pt'] = "Adicionar Definição ao Domínio";
|
||||||
$text['title-domain_setting-add']['fr-fr'] = "Ajouter un paramètre au domaine";
|
$text['title-domain_setting-add']['fr-fr'] = "Ajouter un paramètre au domaine";
|
||||||
$text['title-domain_setting-add']['pt-br'] = "Adicionar configurações do dominio";
|
$text['title-domain_setting-add']['pt-br'] = "Adicionar configurações do dominio";
|
||||||
$text['title-domain_setting-add']['pl'] = "Dodaj ustawienie domeny";
|
$text['title-domain_setting-add']['pl'] = "Dodaj ustawienie domeny";
|
||||||
$text['title-domain_setting-add']['sv-se'] = "Lägg Till Domän Inställning";
|
$text['title-domain_setting-add']['sv-se'] = "Lägg Till Domän Inställning";
|
||||||
$text['title-domain_setting-add']['uk'] = "Додавання домену";
|
$text['title-domain_setting-add']['uk'] = "Додавання домену";
|
||||||
$text['title-domain_setting-add']['de-at'] = "Domain Einstellungen hinzufügen";
|
$text['title-domain_setting-add']['de-at'] = "Domain Einstellungen hinzufügen";
|
||||||
|
|
||||||
$text['title-domain-edit']['en-us'] = "Domain";
|
$text['title-domain-edit']['en-us'] = "Domain";
|
||||||
$text['title-domain-edit']['es-cl'] = "Dominio";
|
$text['title-domain-edit']['es-cl'] = "Dominio";
|
||||||
$text['title-domain-edit']['pt-pt'] = "Domínio";
|
$text['title-domain-edit']['pt-pt'] = "Domínio";
|
||||||
$text['title-domain-edit']['fr-fr'] = "Domaines";
|
$text['title-domain-edit']['fr-fr'] = "Domaines";
|
||||||
$text['title-domain-edit']['pt-br'] = "Dominio";
|
$text['title-domain-edit']['pt-br'] = "Dominio";
|
||||||
$text['title-domain-edit']['pl'] = "Domena";
|
$text['title-domain-edit']['pl'] = "Domena";
|
||||||
$text['title-domain-edit']['sv-se'] = "Domän";
|
$text['title-domain-edit']['sv-se'] = "Domän";
|
||||||
$text['title-domain-edit']['uk'] = "Домен";
|
$text['title-domain-edit']['uk'] = "Домен";
|
||||||
$text['title-domain-edit']['de-at'] = "Domain";
|
$text['title-domain-edit']['de-at'] = "Domain";
|
||||||
|
|
||||||
$text['title-domain-add']['en-us'] = "Domain Add";
|
$text['title-domain-add']['en-us'] = "Domain Add";
|
||||||
$text['title-domain-add']['es-cl'] = "Agregar Dominio";
|
$text['title-domain-add']['es-cl'] = "Agregar Dominio";
|
||||||
$text['title-domain-add']['pt-pt'] = "Adicionar Domínio";
|
$text['title-domain-add']['pt-pt'] = "Adicionar Domínio";
|
||||||
$text['title-domain-add']['fr-fr'] = "Ajouter un Domaine";
|
$text['title-domain-add']['fr-fr'] = "Ajouter un Domaine";
|
||||||
$text['title-domain-add']['pt-br'] = "Adicionar dominio";
|
$text['title-domain-add']['pt-br'] = "Adicionar dominio";
|
||||||
$text['title-domain-add']['pl'] = "Dodaj domenę";
|
$text['title-domain-add']['pl'] = "Dodaj domenę";
|
||||||
$text['title-domain-add']['sv-se'] = "Lägg Till Domän";
|
$text['title-domain-add']['sv-se'] = "Lägg Till Domän";
|
||||||
$text['title-domain-add']['uk'] = "Новий домен";
|
$text['title-domain-add']['uk'] = "Новий домен";
|
||||||
$text['title-domain-add']['de-at'] = "Domain hinzufügen";
|
$text['title-domain-add']['de-at'] = "Domain hinzufügen";
|
||||||
|
|
||||||
$text['message-delete_failed']['en-us'] = "No Settings Checked";
|
$text['message-delete_failed']['en-us'] = "No Settings Checked";
|
||||||
$text['message-delete_failed']['es-cl'] = "No hay ajustes facturado";
|
$text['message-delete_failed']['es-cl'] = "No hay ajustes facturado";
|
||||||
$text['message-delete_failed']['pt-pt'] = "Nenhuma configuração marcada";
|
$text['message-delete_failed']['pt-pt'] = "Nenhuma configuração marcada";
|
||||||
$text['message-delete_failed']['fr-fr'] = "Pas de paramètres enregistrés";
|
$text['message-delete_failed']['fr-fr'] = "Pas de paramètres enregistrés";
|
||||||
$text['message-delete_failed']['pt-br'] = "Falha na exclusão";
|
$text['message-delete_failed']['pt-br'] = "Falha na exclusão";
|
||||||
$text['message-delete_failed']['pl'] = "Próba usunięcia zakończyła się niepowodzeniem";
|
$text['message-delete_failed']['pl'] = "Próba usunięcia zakończyła się niepowodzeniem";
|
||||||
$text['message-delete_failed']['sv-se'] = "Ingen Inställning Markerad";
|
$text['message-delete_failed']['sv-se'] = "Ingen Inställning Markerad";
|
||||||
$text['message-delete_failed']['uk'] = "Налаштування не вказано";
|
$text['message-delete_failed']['uk'] = "Налаштування не вказано";
|
||||||
$text['message-delete_failed']['de-at'] = "Keine Einstellungen ausgewählt";
|
$text['message-delete_failed']['de-at'] = "Keine Einstellungen ausgewählt";
|
||||||
|
|
||||||
$text['label-top']['en-us'] = "Top";
|
$text['label-top']['en-us'] = "Top";
|
||||||
$text['label-top']['es-cl'] = "encima";
|
$text['label-top']['es-cl'] = "encima";
|
||||||
$text['label-top']['pt-pt'] = "Topo";
|
$text['label-top']['pt-pt'] = "Topo";
|
||||||
$text['label-top']['fr-fr'] = "Meilleur";
|
$text['label-top']['fr-fr'] = "Meilleur";
|
||||||
$text['label-top']['pt-br'] = "Topo";
|
$text['label-top']['pt-br'] = "Topo";
|
||||||
$text['label-top']['pl'] = "Top";
|
$text['label-top']['pl'] = "Top";
|
||||||
$text['label-top']['he'] = "עליון";
|
$text['label-top']['he'] = "עליון";
|
||||||
$text['label-top']['uk'] = "топ";
|
$text['label-top']['uk'] = "топ";
|
||||||
$text['label-top']['sv-se'] = "Topp";
|
$text['label-top']['sv-se'] = "Topp";
|
||||||
$text['label-top']['de-at'] = "Oben";
|
$text['label-top']['de-at'] = "Oben";
|
||||||
$text['label-top']['ro'] = "Top";
|
$text['label-top']['ro'] = "Top";
|
||||||
$text['label-top']['fa'] = "";
|
$text['label-top']['fa'] = "";
|
||||||
$text['label-top']['ar-eg'] = "أعلى";
|
$text['label-top']['ar-eg'] = "أعلى";
|
||||||
|
|
||||||
$text['label-tools']['en-us'] = "Tools";
|
$text['label-tools']['en-us'] = "Tools";
|
||||||
$text['label-tools']['es-cl'] = "Herramientas";
|
$text['label-tools']['es-cl'] = "Herramientas";
|
||||||
$text['label-tools']['pt-pt'] = "Ferramentas";
|
$text['label-tools']['pt-pt'] = "Ferramentas";
|
||||||
$text['label-tools']['fr-fr'] = "Outils";
|
$text['label-tools']['fr-fr'] = "Outils";
|
||||||
$text['label-tools']['pt-br'] = "Ferramentas";
|
$text['label-tools']['pt-br'] = "Ferramentas";
|
||||||
$text['label-tools']['pl'] = "Narzędzia";
|
$text['label-tools']['pl'] = "Narzędzia";
|
||||||
$text['label-tools']['sv-se'] = "Verktyg";
|
$text['label-tools']['sv-se'] = "Verktyg";
|
||||||
$text['label-tools']['uk'] = "Параметри";
|
$text['label-tools']['uk'] = "Параметри";
|
||||||
$text['label-tools']['de-at'] = "Werkzeug";
|
$text['label-tools']['de-at'] = "Werkzeug";
|
||||||
|
|
||||||
$text['label-text']['en-us'] = "Text";
|
$text['label-text']['en-us'] = "Text";
|
||||||
$text['label-text']['es-cl'] = "Texto";
|
$text['label-text']['es-cl'] = "Texto";
|
||||||
$text['label-text']['pt-pt'] = "Texto";
|
$text['label-text']['pt-pt'] = "Texto";
|
||||||
$text['label-text']['fr-fr'] = "Texte";
|
$text['label-text']['fr-fr'] = "Texte";
|
||||||
$text['label-text']['pt-br'] = "Texto";
|
$text['label-text']['pt-br'] = "Texto";
|
||||||
$text['label-text']['pl'] = "Tekst";
|
$text['label-text']['pl'] = "Tekst";
|
||||||
$text['label-text']['he'] = "טֶקסט";
|
$text['label-text']['he'] = "טֶקסט";
|
||||||
$text['label-text']['uk'] = "текст";
|
$text['label-text']['uk'] = "текст";
|
||||||
$text['label-text']['sv-se'] = "Text";
|
$text['label-text']['sv-se'] = "Text";
|
||||||
$text['label-text']['de-at'] = "Text";
|
$text['label-text']['de-at'] = "Text";
|
||||||
$text['label-text']['ro'] = "Text";
|
$text['label-text']['ro'] = "Text";
|
||||||
$text['label-text']['fa'] = "";
|
$text['label-text']['fa'] = "";
|
||||||
$text['label-text']['ar-eg'] = "نص";
|
$text['label-text']['ar-eg'] = "نص";
|
||||||
|
|
||||||
$text['label-static']['en-us'] = "Static";
|
$text['label-static']['en-us'] = "Static";
|
||||||
$text['label-static']['es-cl'] = "Estático";
|
$text['label-static']['es-cl'] = "Estático";
|
||||||
$text['label-static']['pt-pt'] = "Estático";
|
$text['label-static']['pt-pt'] = "Estático";
|
||||||
$text['label-static']['fr-fr'] = "Statique";
|
$text['label-static']['fr-fr'] = "Statique";
|
||||||
$text['label-static']['pt-br'] = "Estático";
|
$text['label-static']['pt-br'] = "Estático";
|
||||||
$text['label-static']['pl'] = "Statyczny";
|
$text['label-static']['pl'] = "Statyczny";
|
||||||
$text['label-static']['he'] = "סטָטִי";
|
$text['label-static']['he'] = "סטָטִי";
|
||||||
$text['label-static']['uk'] = "статичний";
|
$text['label-static']['uk'] = "статичний";
|
||||||
$text['label-static']['sv-se'] = "Statisk";
|
$text['label-static']['sv-se'] = "Statisk";
|
||||||
$text['label-static']['de-at'] = "Statisch";
|
$text['label-static']['de-at'] = "Statisch";
|
||||||
$text['label-static']['ro'] = "Static";
|
$text['label-static']['ro'] = "Static";
|
||||||
$text['label-static']['fa'] = "";
|
$text['label-static']['fa'] = "";
|
||||||
$text['label-static']['ar-eg'] = "ساكن";
|
$text['label-static']['ar-eg'] = "ساكن";
|
||||||
|
|
||||||
$text['label-right']['en-us'] = "Right";
|
$text['label-right']['en-us'] = "Right";
|
||||||
$text['label-right']['es-cl'] = "Derecha";
|
$text['label-right']['es-cl'] = "Derecha";
|
||||||
$text['label-right']['pt-pt'] = "Certo";
|
$text['label-right']['pt-pt'] = "Certo";
|
||||||
$text['label-right']['fr-fr'] = "Droite";
|
$text['label-right']['fr-fr'] = "Droite";
|
||||||
$text['label-right']['pt-br'] = "Certo";
|
$text['label-right']['pt-br'] = "Certo";
|
||||||
$text['label-right']['pl'] = "Dobrze";
|
$text['label-right']['pl'] = "Dobrze";
|
||||||
$text['label-right']['he'] = "יָמִינָה";
|
$text['label-right']['he'] = "יָמִינָה";
|
||||||
$text['label-right']['uk'] = "правий";
|
$text['label-right']['uk'] = "правий";
|
||||||
$text['label-right']['sv-se'] = "Höger";
|
$text['label-right']['sv-se'] = "Höger";
|
||||||
$text['label-right']['de-at'] = "Recht";
|
$text['label-right']['de-at'] = "Recht";
|
||||||
$text['label-right']['ro'] = "Dreapta";
|
$text['label-right']['ro'] = "Dreapta";
|
||||||
$text['label-right']['fa'] = "";
|
$text['label-right']['fa'] = "";
|
||||||
$text['label-right']['ar-eg'] = "حق";
|
$text['label-right']['ar-eg'] = "حق";
|
||||||
|
|
||||||
$text['label-parent_domain']['en-us'] = "Parent Domain";
|
$text['label-parent_domain']['en-us'] = "Parent Domain";
|
||||||
$text['label-parent_domain']['es-cl'] = "Dominio de los Padres";
|
$text['label-parent_domain']['es-cl'] = "Dominio de los Padres";
|
||||||
$text['label-parent_domain']['pt-pt'] = "Domínio Parent";
|
$text['label-parent_domain']['pt-pt'] = "Domínio Parent";
|
||||||
$text['label-parent_domain']['fr-fr'] = "Domaine Parent";
|
$text['label-parent_domain']['fr-fr'] = "Domaine Parent";
|
||||||
$text['label-parent_domain']['pt-br'] = "Dominio principal";
|
$text['label-parent_domain']['pt-br'] = "Dominio principal";
|
||||||
$text['label-parent_domain']['pl'] = "Domena nadrzędna";
|
$text['label-parent_domain']['pl'] = "Domena nadrzędna";
|
||||||
$text['label-parent_domain']['sv-se'] = "Överordnad Domän";
|
$text['label-parent_domain']['sv-se'] = "Överordnad Domän";
|
||||||
$text['label-parent_domain']['uk'] = "Батьківський домен";
|
$text['label-parent_domain']['uk'] = "Батьківський домен";
|
||||||
$text['label-parent_domain']['de-at'] = "Übergeordnete Domain";
|
$text['label-parent_domain']['de-at'] = "Übergeordnete Domain";
|
||||||
|
|
||||||
$text['label-none']['en-us'] = "None";
|
$text['label-none']['en-us'] = "None";
|
||||||
$text['label-none']['es-cl'] = "Ninguna";
|
$text['label-none']['es-cl'] = "Ninguna";
|
||||||
$text['label-none']['pt-pt'] = "Nenhum";
|
$text['label-none']['pt-pt'] = "Nenhum";
|
||||||
$text['label-none']['fr-fr'] = "Aucun";
|
$text['label-none']['fr-fr'] = "Aucun";
|
||||||
$text['label-none']['pt-br'] = "Nenhum";
|
$text['label-none']['pt-br'] = "Nenhum";
|
||||||
$text['label-none']['pl'] = "Żaden";
|
$text['label-none']['pl'] = "Żaden";
|
||||||
$text['label-none']['he'] = "אף לא אחד";
|
$text['label-none']['he'] = "אף לא אחד";
|
||||||
$text['label-none']['uk'] = "жоден";
|
$text['label-none']['uk'] = "жоден";
|
||||||
$text['label-none']['sv-se'] = "Ingen";
|
$text['label-none']['sv-se'] = "Ingen";
|
||||||
$text['label-none']['de-at'] = "Keiner";
|
$text['label-none']['de-at'] = "Keiner";
|
||||||
$text['label-none']['ro'] = "Nici unul";
|
$text['label-none']['ro'] = "Nici unul";
|
||||||
$text['label-none']['fa'] = "";
|
$text['label-none']['fa'] = "";
|
||||||
$text['label-none']['ar-eg'] = "لا شيء";
|
$text['label-none']['ar-eg'] = "لا شيء";
|
||||||
|
|
||||||
$text['label-manage']['en-us'] = "Manage";
|
$text['label-manage']['en-us'] = "Manage";
|
||||||
$text['label-manage']['es-cl'] = "Gestionar";
|
$text['label-manage']['es-cl'] = "Gestionar";
|
||||||
$text['label-manage']['pt-pt'] = "Gerir";
|
$text['label-manage']['pt-pt'] = "Gerir";
|
||||||
$text['label-manage']['fr-fr'] = "Gérer";
|
$text['label-manage']['fr-fr'] = "Gérer";
|
||||||
$text['label-manage']['pt-br'] = "Gerenciar";
|
$text['label-manage']['pt-br'] = "Gerenciar";
|
||||||
$text['label-manage']['pl'] = "Zarządzaj";
|
$text['label-manage']['pl'] = "Zarządzaj";
|
||||||
$text['label-manage']['sv-se'] = "Hantera";
|
$text['label-manage']['sv-se'] = "Hantera";
|
||||||
$text['label-manage']['uk'] = "Керувати";
|
$text['label-manage']['uk'] = "Керувати";
|
||||||
$text['label-manage']['de-at'] = "Verwalten";
|
$text['label-manage']['de-at'] = "Verwalten";
|
||||||
|
|
||||||
$text['label-left']['en-us'] = "Left";
|
$text['label-left']['en-us'] = "Left";
|
||||||
$text['label-left']['es-cl'] = "Izquierda";
|
$text['label-left']['es-cl'] = "Izquierda";
|
||||||
$text['label-left']['pt-pt'] = "Esquerda";
|
$text['label-left']['pt-pt'] = "Esquerda";
|
||||||
$text['label-left']['fr-fr'] = "À gauche";
|
$text['label-left']['fr-fr'] = "À gauche";
|
||||||
$text['label-left']['pt-br'] = "Esquerda";
|
$text['label-left']['pt-br'] = "Esquerda";
|
||||||
$text['label-left']['pl'] = "Lewo";
|
$text['label-left']['pl'] = "Lewo";
|
||||||
$text['label-left']['he'] = "שְׁמֹאל";
|
$text['label-left']['he'] = "שְׁמֹאל";
|
||||||
$text['label-left']['uk'] = "лівий";
|
$text['label-left']['uk'] = "лівий";
|
||||||
$text['label-left']['sv-se'] = "Vänster";
|
$text['label-left']['sv-se'] = "Vänster";
|
||||||
$text['label-left']['de-at'] = "Links";
|
$text['label-left']['de-at'] = "Links";
|
||||||
$text['label-left']['ro'] = "Stânga";
|
$text['label-left']['ro'] = "Stânga";
|
||||||
$text['label-left']['fa'] = "";
|
$text['label-left']['fa'] = "";
|
||||||
$text['label-left']['ar-eg'] = "اليسار";
|
$text['label-left']['ar-eg'] = "اليسار";
|
||||||
|
|
||||||
$text['label-inline']['en-us'] = "Inline";
|
$text['label-inline']['en-us'] = "Inline";
|
||||||
$text['label-inline']['es-cl'] = "En línea";
|
$text['label-inline']['es-cl'] = "En línea";
|
||||||
$text['label-inline']['pt-pt'] = "Na linha";
|
$text['label-inline']['pt-pt'] = "Na linha";
|
||||||
$text['label-inline']['fr-fr'] = "En ligne";
|
$text['label-inline']['fr-fr'] = "En ligne";
|
||||||
$text['label-inline']['pt-br'] = "Na linha";
|
$text['label-inline']['pt-br'] = "Na linha";
|
||||||
$text['label-inline']['pl'] = "inline";
|
$text['label-inline']['pl'] = "inline";
|
||||||
$text['label-inline']['he'] = "בשורה";
|
$text['label-inline']['he'] = "בשורה";
|
||||||
$text['label-inline']['uk'] = "В лінію";
|
$text['label-inline']['uk'] = "В лінію";
|
||||||
$text['label-inline']['sv-se'] = "I kö";
|
$text['label-inline']['sv-se'] = "I kö";
|
||||||
$text['label-inline']['de-at'] = "In der Reihe";
|
$text['label-inline']['de-at'] = "In der Reihe";
|
||||||
$text['label-inline']['ro'] = "In linie";
|
$text['label-inline']['ro'] = "In linie";
|
||||||
$text['label-inline']['fa'] = "";
|
$text['label-inline']['fa'] = "";
|
||||||
$text['label-inline']['ar-eg'] = "في النسق";
|
$text['label-inline']['ar-eg'] = "في النسق";
|
||||||
|
|
||||||
$text['label-image']['en-us'] = "Image";
|
$text['label-image']['en-us'] = "Image";
|
||||||
$text['label-image']['es-cl'] = "Imagen";
|
$text['label-image']['es-cl'] = "Imagen";
|
||||||
$text['label-image']['pt-pt'] = "Imagem";
|
$text['label-image']['pt-pt'] = "Imagem";
|
||||||
$text['label-image']['fr-fr'] = "image";
|
$text['label-image']['fr-fr'] = "image";
|
||||||
$text['label-image']['pt-br'] = "Imagem";
|
$text['label-image']['pt-br'] = "Imagem";
|
||||||
$text['label-image']['pl'] = "Obraz";
|
$text['label-image']['pl'] = "Obraz";
|
||||||
$text['label-image']['he'] = "תמונה";
|
$text['label-image']['he'] = "תמונה";
|
||||||
$text['label-image']['uk'] = "зображення";
|
$text['label-image']['uk'] = "зображення";
|
||||||
$text['label-image']['sv-se'] = "Bild";
|
$text['label-image']['sv-se'] = "Bild";
|
||||||
$text['label-image']['de-at'] = "Image";
|
$text['label-image']['de-at'] = "Image";
|
||||||
$text['label-image']['ro'] = "Imagine";
|
$text['label-image']['ro'] = "Imagine";
|
||||||
$text['label-image']['fa'] = "";
|
$text['label-image']['fa'] = "";
|
||||||
$text['label-image']['ar-eg'] = "صورة";
|
$text['label-image']['ar-eg'] = "صورة";
|
||||||
|
|
||||||
$text['label-fixed']['en-us'] = "Fixed";
|
$text['label-fixed']['en-us'] = "Fixed";
|
||||||
$text['label-fixed']['es-cl'] = "Fijo";
|
$text['label-fixed']['es-cl'] = "Fijo";
|
||||||
$text['label-fixed']['pt-pt'] = "Fixo";
|
$text['label-fixed']['pt-pt'] = "Fixo";
|
||||||
$text['label-fixed']['fr-fr'] = "Fixé";
|
$text['label-fixed']['fr-fr'] = "Fixé";
|
||||||
$text['label-fixed']['pt-br'] = "Fixo";
|
$text['label-fixed']['pt-br'] = "Fixo";
|
||||||
$text['label-fixed']['pl'] = "Naprawiony";
|
$text['label-fixed']['pl'] = "Naprawiony";
|
||||||
$text['label-fixed']['he'] = "קָבוּעַ";
|
$text['label-fixed']['he'] = "קָבוּעַ";
|
||||||
$text['label-fixed']['uk'] = "фіксований";
|
$text['label-fixed']['uk'] = "фіксований";
|
||||||
$text['label-fixed']['sv-se'] = "Fast";
|
$text['label-fixed']['sv-se'] = "Fast";
|
||||||
$text['label-fixed']['de-at'] = "fest";
|
$text['label-fixed']['de-at'] = "fest";
|
||||||
$text['label-fixed']['ro'] = "Fix";
|
$text['label-fixed']['ro'] = "Fix";
|
||||||
$text['label-fixed']['fa'] = "";
|
$text['label-fixed']['fa'] = "";
|
||||||
$text['label-fixed']['ar-eg'] = "ثابت";
|
$text['label-fixed']['ar-eg'] = "ثابت";
|
||||||
|
|
||||||
$text['label-domain']['en-us'] = "Domain";
|
$text['label-domain']['en-us'] = "Domain";
|
||||||
$text['label-domain']['es-cl'] = "Dominio";
|
$text['label-domain']['es-cl'] = "Dominio";
|
||||||
$text['label-domain']['pt-pt'] = "Domínio";
|
$text['label-domain']['pt-pt'] = "Domínio";
|
||||||
$text['label-domain']['fr-fr'] = "Domaine";
|
$text['label-domain']['fr-fr'] = "Domaine";
|
||||||
$text['label-domain']['pt-br'] = "Dominio";
|
$text['label-domain']['pt-br'] = "Dominio";
|
||||||
$text['label-domain']['pl'] = "Domena";
|
$text['label-domain']['pl'] = "Domena";
|
||||||
$text['label-domain']['sv-se'] = "Domän";
|
$text['label-domain']['sv-se'] = "Domän";
|
||||||
$text['label-domain']['uk'] = "Домен";
|
$text['label-domain']['uk'] = "Домен";
|
||||||
$text['label-domain']['de-at'] = "Domain";
|
$text['label-domain']['de-at'] = "Domain";
|
||||||
|
|
||||||
$text['label-center']['en-us'] = "Center";
|
$text['label-center']['en-us'] = "Center";
|
||||||
$text['label-center']['es-cl'] = "Centrar";
|
$text['label-center']['es-cl'] = "Centrar";
|
||||||
$text['label-center']['pt-pt'] = "Centro";
|
$text['label-center']['pt-pt'] = "Centro";
|
||||||
$text['label-center']['fr-fr'] = "centre";
|
$text['label-center']['fr-fr'] = "centre";
|
||||||
$text['label-center']['pt-br'] = "Centro";
|
$text['label-center']['pt-br'] = "Centro";
|
||||||
$text['label-center']['pl'] = "Centrum";
|
$text['label-center']['pl'] = "Centrum";
|
||||||
$text['label-center']['he'] = "מֶרְכָּז";
|
$text['label-center']['he'] = "מֶרְכָּז";
|
||||||
$text['label-center']['uk'] = "центр";
|
$text['label-center']['uk'] = "центр";
|
||||||
$text['label-center']['sv-se'] = "Centrum";
|
$text['label-center']['sv-se'] = "Centrum";
|
||||||
$text['label-center']['de-at'] = "Center";
|
$text['label-center']['de-at'] = "Center";
|
||||||
$text['label-center']['ro'] = "Centru";
|
$text['label-center']['ro'] = "Centru";
|
||||||
$text['label-center']['fa'] = "";
|
$text['label-center']['fa'] = "";
|
||||||
$text['label-center']['ar-eg'] = "مركز";
|
$text['label-center']['ar-eg'] = "مركز";
|
||||||
|
|
||||||
$text['label-bottom']['en-us'] = "Bottom";
|
$text['label-bottom']['en-us'] = "Bottom";
|
||||||
$text['label-bottom']['es-cl'] = "Fondo";
|
$text['label-bottom']['es-cl'] = "Fondo";
|
||||||
$text['label-bottom']['pt-pt'] = "Inferior";
|
$text['label-bottom']['pt-pt'] = "Inferior";
|
||||||
$text['label-bottom']['fr-fr'] = "Bas";
|
$text['label-bottom']['fr-fr'] = "Bas";
|
||||||
$text['label-bottom']['pt-br'] = "Inferior";
|
$text['label-bottom']['pt-br'] = "Inferior";
|
||||||
$text['label-bottom']['pl'] = "Dolny";
|
$text['label-bottom']['pl'] = "Dolny";
|
||||||
$text['label-bottom']['he'] = "תַחתִית";
|
$text['label-bottom']['he'] = "תַחתִית";
|
||||||
$text['label-bottom']['uk'] = "дно";
|
$text['label-bottom']['uk'] = "дно";
|
||||||
$text['label-bottom']['sv-se'] = "Botten";
|
$text['label-bottom']['sv-se'] = "Botten";
|
||||||
$text['label-bottom']['de-at'] = "Boden";
|
$text['label-bottom']['de-at'] = "Boden";
|
||||||
$text['label-bottom']['ro'] = "Fund";
|
$text['label-bottom']['ro'] = "Fund";
|
||||||
$text['label-bottom']['fa'] = "";
|
$text['label-bottom']['fa'] = "";
|
||||||
$text['label-bottom']['ar-eg'] = "أسفل";
|
$text['label-bottom']['ar-eg'] = "أسفل";
|
||||||
|
|
||||||
$text['label-24-hour']['en-us'] = "24-Hour";
|
$text['label-24-hour']['en-us'] = "24-Hour";
|
||||||
$text['label-24-hour']['es-cl'] = "24 horas";
|
$text['label-24-hour']['es-cl'] = "24 horas";
|
||||||
$text['label-24-hour']['pt-pt'] = "24 horas";
|
$text['label-24-hour']['pt-pt'] = "24 horas";
|
||||||
$text['label-24-hour']['fr-fr'] = "24 heures";
|
$text['label-24-hour']['fr-fr'] = "24 heures";
|
||||||
$text['label-24-hour']['pt-br'] = "24 horas";
|
$text['label-24-hour']['pt-br'] = "24 horas";
|
||||||
$text['label-24-hour']['pl'] = "24-godzinny";
|
$text['label-24-hour']['pl'] = "24-godzinny";
|
||||||
$text['label-24-hour']['he'] = "24 שעות";
|
$text['label-24-hour']['he'] = "24 שעות";
|
||||||
$text['label-24-hour']['uk'] = "24-годинний";
|
$text['label-24-hour']['uk'] = "24-годинний";
|
||||||
$text['label-24-hour']['sv-se'] = "24-timmars";
|
$text['label-24-hour']['sv-se'] = "24-timmars";
|
||||||
$text['label-24-hour']['de-at'] = "24 Stunden";
|
$text['label-24-hour']['de-at'] = "24 Stunden";
|
||||||
$text['label-24-hour']['ro'] = "24 de ore";
|
$text['label-24-hour']['ro'] = "24 de ore";
|
||||||
$text['label-24-hour']['fa'] = "";
|
$text['label-24-hour']['fa'] = "";
|
||||||
$text['label-24-hour']['ar-eg'] = "24 ساعة";
|
$text['label-24-hour']['ar-eg'] = "24 ساعة";
|
||||||
|
|
||||||
$text['label-12-hour']['en-us'] = "12-Hour";
|
$text['label-12-hour']['en-us'] = "12-Hour";
|
||||||
$text['label-12-hour']['es-cl'] = "12 horas";
|
$text['label-12-hour']['es-cl'] = "12 horas";
|
||||||
$text['label-12-hour']['pt-pt'] = "12 horas";
|
$text['label-12-hour']['pt-pt'] = "12 horas";
|
||||||
$text['label-12-hour']['fr-fr'] = "12 heures";
|
$text['label-12-hour']['fr-fr'] = "12 heures";
|
||||||
$text['label-12-hour']['pt-br'] = "12 horas";
|
$text['label-12-hour']['pt-br'] = "12 horas";
|
||||||
$text['label-12-hour']['pl'] = "12-godzinny";
|
$text['label-12-hour']['pl'] = "12-godzinny";
|
||||||
$text['label-12-hour']['he'] = "12 שעות";
|
$text['label-12-hour']['he'] = "12 שעות";
|
||||||
$text['label-12-hour']['uk'] = "12-годинний";
|
$text['label-12-hour']['uk'] = "12-годинний";
|
||||||
$text['label-12-hour']['sv-se'] = "12-timmars";
|
$text['label-12-hour']['sv-se'] = "12-timmars";
|
||||||
$text['label-12-hour']['de-at'] = "12 Stunden";
|
$text['label-12-hour']['de-at'] = "12 Stunden";
|
||||||
$text['label-12-hour']['ro'] = "12 de ore";
|
$text['label-12-hour']['ro'] = "12 de ore";
|
||||||
$text['label-12-hour']['fa'] = "";
|
$text['label-12-hour']['fa'] = "";
|
||||||
$text['label-12-hour']['ar-eg'] = "12 ساعة";
|
$text['label-12-hour']['ar-eg'] = "12 ساعة";
|
||||||
|
|
||||||
$text['header-settings']['en-us'] = "Settings";
|
$text['header-settings']['en-us'] = "Settings";
|
||||||
$text['header-settings']['es-cl'] = "Configuraciones";
|
$text['header-settings']['es-cl'] = "Configuraciones";
|
||||||
$text['header-settings']['pt-pt'] = "Definições";
|
$text['header-settings']['pt-pt'] = "Definições";
|
||||||
$text['header-settings']['fr-fr'] = "Paramètres";
|
$text['header-settings']['fr-fr'] = "Paramètres";
|
||||||
$text['header-settings']['pt-br'] = "Configurações";
|
$text['header-settings']['pt-br'] = "Configurações";
|
||||||
$text['header-settings']['pl'] = "Ustawienia";
|
$text['header-settings']['pl'] = "Ustawienia";
|
||||||
$text['header-settings']['sv-se'] = "Inställning";
|
$text['header-settings']['sv-se'] = "Inställning";
|
||||||
$text['header-settings']['uk'] = "Налаштування";
|
$text['header-settings']['uk'] = "Налаштування";
|
||||||
$text['header-settings']['de-at'] = "Einstellungen";
|
$text['header-settings']['de-at'] = "Einstellungen";
|
||||||
|
|
||||||
$text['header-domains']['en-us'] = "Domains";
|
$text['header-domains']['en-us'] = "Domains";
|
||||||
$text['header-domains']['es-cl'] = "Dominios";
|
$text['header-domains']['es-cl'] = "Dominios";
|
||||||
$text['header-domains']['pt-pt'] = "Domínios";
|
$text['header-domains']['pt-pt'] = "Domínios";
|
||||||
$text['header-domains']['fr-fr'] = "Domaines";
|
$text['header-domains']['fr-fr'] = "Domaines";
|
||||||
$text['header-domains']['pt-br'] = "Dominios";
|
$text['header-domains']['pt-br'] = "Dominios";
|
||||||
$text['header-domains']['pl'] = "Domeny";
|
$text['header-domains']['pl'] = "Domeny";
|
||||||
$text['header-domains']['sv-se'] = "Domäner";
|
$text['header-domains']['sv-se'] = "Domäner";
|
||||||
$text['header-domains']['uk'] = "Домени";
|
$text['header-domains']['uk'] = "Домени";
|
||||||
$text['header-domains']['de-at'] = "Domains";
|
$text['header-domains']['de-at'] = "Domains";
|
||||||
|
|
||||||
$text['header-domain_setting-edit']['en-us'] = "Domain Setting";
|
$text['header-domain_setting-edit']['en-us'] = "Domain Setting";
|
||||||
$text['header-domain_setting-edit']['es-cl'] = "Configuraciones de dominio";
|
$text['header-domain_setting-edit']['es-cl'] = "Configuraciones de dominio";
|
||||||
$text['header-domain_setting-edit']['pt-pt'] = "Definições do Domínio";
|
$text['header-domain_setting-edit']['pt-pt'] = "Definições do Domínio";
|
||||||
$text['header-domain_setting-edit']['fr-fr'] = "Paramètres du domaine";
|
$text['header-domain_setting-edit']['fr-fr'] = "Paramètres du domaine";
|
||||||
$text['header-domain_setting-edit']['pt-br'] = "Configurações do dominio";
|
$text['header-domain_setting-edit']['pt-br'] = "Configurações do dominio";
|
||||||
$text['header-domain_setting-edit']['pl'] = "Ustawienia domeny";
|
$text['header-domain_setting-edit']['pl'] = "Ustawienia domeny";
|
||||||
$text['header-domain_setting-edit']['sv-se'] = "Domän Inställning";
|
$text['header-domain_setting-edit']['sv-se'] = "Domän Inställning";
|
||||||
$text['header-domain_setting-edit']['uk'] = "Налаштування домену";
|
$text['header-domain_setting-edit']['uk'] = "Налаштування домену";
|
||||||
$text['header-domain_setting-edit']['de-at'] = "Domain Einstellungen";
|
$text['header-domain_setting-edit']['de-at'] = "Domain Einstellungen";
|
||||||
|
|
||||||
$text['header-domain_setting-add']['en-us'] = "Domain Setting Add";
|
$text['header-domain_setting-add']['en-us'] = "Domain Setting Add";
|
||||||
$text['header-domain_setting-add']['es-cl'] = "Agregar Configuración de Dominio";
|
$text['header-domain_setting-add']['es-cl'] = "Agregar Configuración de Dominio";
|
||||||
$text['header-domain_setting-add']['pt-pt'] = "Adicionar Definição ao Domínio";
|
$text['header-domain_setting-add']['pt-pt'] = "Adicionar Definição ao Domínio";
|
||||||
$text['header-domain_setting-add']['fr-fr'] = "Ajouter un paramètre au domaine";
|
$text['header-domain_setting-add']['fr-fr'] = "Ajouter un paramètre au domaine";
|
||||||
$text['header-domain_setting-add']['pt-br'] = "Adicionar configuração ao dominio";
|
$text['header-domain_setting-add']['pt-br'] = "Adicionar configuração ao dominio";
|
||||||
$text['header-domain_setting-add']['pl'] = "Dodaj ustawienie domeny";
|
$text['header-domain_setting-add']['pl'] = "Dodaj ustawienie domeny";
|
||||||
$text['header-domain_setting-add']['sv-se'] = "Lägg Till Domän Inställning";
|
$text['header-domain_setting-add']['sv-se'] = "Lägg Till Domän Inställning";
|
||||||
$text['header-domain_setting-add']['uk'] = "Параметри домену";
|
$text['header-domain_setting-add']['uk'] = "Параметри домену";
|
||||||
$text['header-domain_setting-add']['de-at'] = "Domain Einstellungen hinzufügen";
|
$text['header-domain_setting-add']['de-at'] = "Domain Einstellungen hinzufügen";
|
||||||
|
|
||||||
$text['header-domain-edit']['en-us'] = "Domain";
|
$text['header-domain-edit']['en-us'] = "Domain";
|
||||||
$text['header-domain-edit']['es-cl'] = "Dominio";
|
$text['header-domain-edit']['es-cl'] = "Dominio";
|
||||||
$text['header-domain-edit']['pt-pt'] = "Domínio";
|
$text['header-domain-edit']['pt-pt'] = "Domínio";
|
||||||
$text['header-domain-edit']['fr-fr'] = "Domaine";
|
$text['header-domain-edit']['fr-fr'] = "Domaine";
|
||||||
$text['header-domain-edit']['pt-br'] = "Dominio";
|
$text['header-domain-edit']['pt-br'] = "Dominio";
|
||||||
$text['header-domain-edit']['pl'] = "Domena";
|
$text['header-domain-edit']['pl'] = "Domena";
|
||||||
$text['header-domain-edit']['sv-se'] = "Domän";
|
$text['header-domain-edit']['sv-se'] = "Domän";
|
||||||
$text['header-domain-edit']['uk'] = "Домен";
|
$text['header-domain-edit']['uk'] = "Домен";
|
||||||
$text['header-domain-edit']['de-at'] = "Domain";
|
$text['header-domain-edit']['de-at'] = "Domain";
|
||||||
|
|
||||||
$text['header-domain-add']['en-us'] = "Domain Add";
|
$text['header-domain-add']['en-us'] = "Domain Add";
|
||||||
$text['header-domain-add']['es-cl'] = "Agregar Dominio";
|
$text['header-domain-add']['es-cl'] = "Agregar Dominio";
|
||||||
$text['header-domain-add']['pt-pt'] = "Adicionar Domínio";
|
$text['header-domain-add']['pt-pt'] = "Adicionar Domínio";
|
||||||
$text['header-domain-add']['fr-fr'] = "Ajouter un Domaine";
|
$text['header-domain-add']['fr-fr'] = "Ajouter un Domaine";
|
||||||
$text['header-domain-add']['pt-br'] = "Adicionar dominio";
|
$text['header-domain-add']['pt-br'] = "Adicionar dominio";
|
||||||
$text['header-domain-add']['pl'] = "Dodaj domenę";
|
$text['header-domain-add']['pl'] = "Dodaj domenę";
|
||||||
$text['header-domain-add']['sv-se'] = "Lägg Till Domän";
|
$text['header-domain-add']['sv-se'] = "Lägg Till Domän";
|
||||||
$text['header-domain-add']['uk'] = "Новий домен";
|
$text['header-domain-add']['uk'] = "Новий домен";
|
||||||
$text['header-domain-add']['de-at'] = "Domain hinzufügen";
|
$text['header-domain-add']['de-at'] = "Domain hinzufügen";
|
||||||
|
|
||||||
$text['description-setting_enabled']['en-us'] = "Set the status of this default setting.";
|
$text['description-setting_enabled']['en-us'] = "Set the status of this default setting.";
|
||||||
$text['description-setting_enabled']['es-cl'] = "Configure el estado de esta configuración predeterminada.";
|
$text['description-setting_enabled']['es-cl'] = "Configure el estado de esta configuración predeterminada.";
|
||||||
$text['description-setting_enabled']['pt-pt'] = "Escolha o estado desta definição por omissão.";
|
$text['description-setting_enabled']['pt-pt'] = "Escolha o estado desta definição por omissão.";
|
||||||
$text['description-setting_enabled']['fr-fr'] = "Choisir l'état de ce paramètre";
|
$text['description-setting_enabled']['fr-fr'] = "Choisir l'état de ce paramètre";
|
||||||
$text['description-setting_enabled']['pt-br'] = "Escolha o estado desta configuração";
|
$text['description-setting_enabled']['pt-br'] = "Escolha o estado desta configuração";
|
||||||
$text['description-setting_enabled']['pl'] = "Wybierz, aby włączyć lub wyłączyć tę funkcję.";
|
$text['description-setting_enabled']['pl'] = "Wybierz, aby włączyć lub wyłączyć tę funkcję.";
|
||||||
$text['description-setting_enabled']['sv-se'] = "Ange status på denna standard inställning.";
|
$text['description-setting_enabled']['sv-se'] = "Ange status på denna standard inställning.";
|
||||||
$text['description-setting_enabled']['uk'] = "Встановіть стан цього параметра за замовчуванням.";
|
$text['description-setting_enabled']['uk'] = "Встановіть стан цього параметра за замовчуванням.";
|
||||||
$text['description-setting_enabled']['de-at'] = "Setzen Sie den Status dieser Standardeinstellung.";
|
$text['description-setting_enabled']['de-at'] = "Setzen Sie den Status dieser Standardeinstellung.";
|
||||||
|
|
||||||
$text['description-parent_domain']['en-us'] = "Set the parent domain.";
|
$text['description-parent_domain']['en-us'] = "Set the parent domain.";
|
||||||
$text['description-parent_domain']['es-cl'] = "Establecer el dominio principal.";
|
$text['description-parent_domain']['es-cl'] = "Establecer el dominio principal.";
|
||||||
$text['description-parent_domain']['pt-pt'] = "Defina o domínio pai.";
|
$text['description-parent_domain']['pt-pt'] = "Defina o domínio pai.";
|
||||||
$text['description-parent_domain']['fr-fr'] = "Réglez le domaine parent.";
|
$text['description-parent_domain']['fr-fr'] = "Réglez le domaine parent.";
|
||||||
$text['description-parent_domain']['pt-br'] = "Defina o dominio pai";
|
$text['description-parent_domain']['pt-br'] = "Defina o dominio pai";
|
||||||
$text['description-parent_domain']['pl'] = "Ustaw domenę nadrzędną";
|
$text['description-parent_domain']['pl'] = "Ustaw domenę nadrzędną";
|
||||||
$text['description-parent_domain']['sv-se'] = "Ange Överordan Domän.";
|
$text['description-parent_domain']['sv-se'] = "Ange Överordan Domän.";
|
||||||
$text['description-parent_domain']['uk'] = "Вкажіть батьківський домен";
|
$text['description-parent_domain']['uk'] = "Вкажіть батьківський домен";
|
||||||
$text['description-parent_domain']['de-at'] = "Setzen Sie die übergeordnete Domain.";
|
$text['description-parent_domain']['de-at'] = "Setzen Sie die übergeordnete Domain.";
|
||||||
|
|
||||||
$text['description-order']['en-us'] = "Set the order for this array element.";
|
$text['description-order']['en-us'] = "Set the order for this array element.";
|
||||||
$text['description-order']['es-cl'] = "Establecer el orden para este elemento de la matriz.";
|
$text['description-order']['es-cl'] = "Establecer el orden para este elemento de la matriz.";
|
||||||
$text['description-order']['pt-pt'] = "Definir a ordem para este elemento do array.";
|
$text['description-order']['pt-pt'] = "Definir a ordem para este elemento do array.";
|
||||||
$text['description-order']['fr-fr'] = "Définissez l'ordre de cet élément de tableau.";
|
$text['description-order']['fr-fr'] = "Définissez l'ordre de cet élément de tableau.";
|
||||||
$text['description-order']['pt-br'] = "Defina a ordem (indice) para este elemento da matriz";
|
$text['description-order']['pt-br'] = "Defina a ordem (indice) para este elemento da matriz";
|
||||||
$text['description-order']['pl'] = "Wybierz kolejność.";
|
$text['description-order']['pl'] = "Wybierz kolejność.";
|
||||||
$text['description-order']['sv-se'] = "Ställ in ordningen för detta element.";
|
$text['description-order']['sv-se'] = "Ställ in ordningen för detta element.";
|
||||||
$text['description-order']['uk'] = "Вкажіть порядок для масиву елементів";
|
$text['description-order']['uk'] = "Вкажіть порядок для масиву елементів";
|
||||||
$text['description-order']['de-at'] = "Wählen Sie die Reihenfolge des Array Elements.";
|
$text['description-order']['de-at'] = "Wählen Sie die Reihenfolge des Array Elements.";
|
||||||
|
|
||||||
$text['description-name']['en-us'] = "Enter the name of the domain.";
|
$text['description-name']['en-us'] = "Enter the name of the domain.";
|
||||||
$text['description-name']['es-cl'] = "Ingrese el nombre del dominio";
|
$text['description-name']['es-cl'] = "Ingrese el nombre del dominio";
|
||||||
$text['description-name']['pt-pt'] = "Introduza o nome do domínio.";
|
$text['description-name']['pt-pt'] = "Introduza o nome do domínio.";
|
||||||
$text['description-name']['fr-fr'] = "Entrer le nom du domaine.";
|
$text['description-name']['fr-fr'] = "Entrer le nom du domaine.";
|
||||||
$text['description-name']['pt-br'] = "Insira o nome do menu";
|
$text['description-name']['pt-br'] = "Insira o nome do menu";
|
||||||
$text['description-name']['pl'] = "Wprowadź nazwę";
|
$text['description-name']['pl'] = "Wprowadź nazwę";
|
||||||
$text['description-name']['sv-se'] = "Ange namn på Domänen.";
|
$text['description-name']['sv-se'] = "Ange namn på Domänen.";
|
||||||
$text['description-name']['uk'] = "Вкажіть назву домену";
|
$text['description-name']['uk'] = "Вкажіть назву домену";
|
||||||
$text['description-name']['de-at'] = "Geben Sie den Namen dieser Domain an";
|
$text['description-name']['de-at'] = "Geben Sie den Namen dieser Domain an";
|
||||||
|
|
||||||
$text['description-domains']['en-us'] = "Control the list of domains to manage.";
|
$text['description-domains']['en-us'] = "Control the list of domains to manage.";
|
||||||
$text['description-domains']['es-cl'] = "Controlar la lista de dominios a gestionar.";
|
$text['description-domains']['es-cl'] = "Controlar la lista de dominios a gestionar.";
|
||||||
$text['description-domains']['pt-pt'] = "Controlar a lista dos domínios a gerir";
|
$text['description-domains']['pt-pt'] = "Controlar a lista dos domínios a gerir";
|
||||||
$text['description-domains']['fr-fr'] = "Contrôler la liste des domaines à gérer";
|
$text['description-domains']['fr-fr'] = "Contrôler la liste des domaines à gérer";
|
||||||
$text['description-domains']['pt-br'] = "Gerencie a lista dos dominios";
|
$text['description-domains']['pt-br'] = "Gerencie a lista dos dominios";
|
||||||
$text['description-domains']['pl'] = "Zarządzanie listą domen.";
|
$text['description-domains']['pl'] = "Zarządzanie listą domen.";
|
||||||
$text['description-domains']['sv-se'] = "Kontrollera lista med Domäner att hantera.";
|
$text['description-domains']['sv-se'] = "Kontrollera lista med Domäner att hantera.";
|
||||||
$text['description-domains']['uk'] = "Список доменів для керування";
|
$text['description-domains']['uk'] = "Список доменів для керування";
|
||||||
$text['description-domains']['de-at'] = "Eine Liste aller Domains.";
|
$text['description-domains']['de-at'] = "Eine Liste aller Domains.";
|
||||||
|
|
||||||
$text['description-domain_setting-edit']['en-us'] = "Edit a setting for this domain.";
|
$text['description-domain_setting-edit']['en-us'] = "Edit a setting for this domain.";
|
||||||
$text['description-domain_setting-edit']['es-cl'] = "Edita una configuración para este dominio.";
|
$text['description-domain_setting-edit']['es-cl'] = "Edita una configuración para este dominio.";
|
||||||
$text['description-domain_setting-edit']['pt-pt'] = "Editar uma definição deste domínio.";
|
$text['description-domain_setting-edit']['pt-pt'] = "Editar uma definição deste domínio.";
|
||||||
$text['description-domain_setting-edit']['fr-fr'] = "Editer un paramètre du domaine.";
|
$text['description-domain_setting-edit']['fr-fr'] = "Editer un paramètre du domaine.";
|
||||||
$text['description-domain_setting-edit']['pt-br'] = "Editar uma configuração deste dominio";
|
$text['description-domain_setting-edit']['pt-br'] = "Editar uma configuração deste dominio";
|
||||||
$text['description-domain_setting-edit']['pl'] = "Edytuj ustawienia w tej domenie";
|
$text['description-domain_setting-edit']['pl'] = "Edytuj ustawienia w tej domenie";
|
||||||
$text['description-domain_setting-edit']['sv-se'] = "Ändra en inställning för denna Domän.";
|
$text['description-domain_setting-edit']['sv-se'] = "Ändra en inställning för denna Domän.";
|
||||||
$text['description-domain_setting-edit']['uk'] = "Редагування параметрів для домену";
|
$text['description-domain_setting-edit']['uk'] = "Редагування параметрів для домену";
|
||||||
$text['description-domain_setting-edit']['de-at'] = "Eine Einstellung für diese Domain ändern.";
|
$text['description-domain_setting-edit']['de-at'] = "Eine Einstellung für diese Domain ändern.";
|
||||||
|
|
||||||
$text['description-domain_setting-add']['en-us'] = "Add a setting for this domain.";
|
$text['description-domain_setting-add']['en-us'] = "Add a setting for this domain.";
|
||||||
$text['description-domain_setting-add']['es-cl'] = "Agregar una configuración para este dominio.";
|
$text['description-domain_setting-add']['es-cl'] = "Agregar una configuración para este dominio.";
|
||||||
$text['description-domain_setting-add']['pt-pt'] = "Adicionar uma definição a este domínio.";
|
$text['description-domain_setting-add']['pt-pt'] = "Adicionar uma definição a este domínio.";
|
||||||
$text['description-domain_setting-add']['fr-fr'] = "";
|
$text['description-domain_setting-add']['fr-fr'] = "";
|
||||||
$text['description-domain_setting-add']['pt-br'] = "Adicionar uma configuração a este dominio";
|
$text['description-domain_setting-add']['pt-br'] = "Adicionar uma configuração a este dominio";
|
||||||
$text['description-domain_setting-add']['pl'] = "Dodaj ustawienie w tej domenie";
|
$text['description-domain_setting-add']['pl'] = "Dodaj ustawienie w tej domenie";
|
||||||
$text['description-domain_setting-add']['sv-se'] = "Lägg Till en inställning för denna Domän.";
|
$text['description-domain_setting-add']['sv-se'] = "Lägg Till en inställning för denna Domän.";
|
||||||
$text['description-domain_setting-add']['uk'] = "Додавання параметра для домену";
|
$text['description-domain_setting-add']['uk'] = "Додавання параметра для домену";
|
||||||
$text['description-domain_setting-add']['de-at'] = "Eine Einstellung für diese Domain hinzufügen.";
|
$text['description-domain_setting-add']['de-at'] = "Eine Einstellung für diese Domain hinzufügen.";
|
||||||
|
|
||||||
$text['description-domain_enabled']['en-us'] = "Set the status of the domain.";
|
$text['description-domain_enabled']['en-us'] = "Set the status of the domain.";
|
||||||
$text['description-domain_enabled']['es-cl'] = "Ajuste el estado del dominio.";
|
$text['description-domain_enabled']['es-cl'] = "Ajuste el estado del dominio.";
|
||||||
$text['description-domain_enabled']['pt-pt'] = "Definir o estado do domínio.";
|
$text['description-domain_enabled']['pt-pt'] = "Definir o estado do domínio.";
|
||||||
$text['description-domain_enabled']['fr-fr'] = "Régler le statut du domaine.";
|
$text['description-domain_enabled']['fr-fr'] = "Régler le statut du domaine.";
|
||||||
$text['description-domain_enabled']['pt-br'] = "Definir o estado do dominio";
|
$text['description-domain_enabled']['pt-br'] = "Definir o estado do dominio";
|
||||||
$text['description-domain_enabled']['pl'] = "Ustaw status tej domeny.";
|
$text['description-domain_enabled']['pl'] = "Ustaw status tej domeny.";
|
||||||
$text['description-domain_enabled']['sv-se'] = "Ange status för Domänen.";
|
$text['description-domain_enabled']['sv-se'] = "Ange status för Domänen.";
|
||||||
$text['description-domain_enabled']['uk'] = "Вкажіть стан домену";
|
$text['description-domain_enabled']['uk'] = "Вкажіть стан домену";
|
||||||
$text['description-domain_enabled']['de-at'] = "Den Status der Domain setzen.";
|
$text['description-domain_enabled']['de-at'] = "Den Status der Domain setzen.";
|
||||||
|
|
||||||
$text['description-domain-edit']['en-us'] = "Edit the details of this domain.";
|
$text['description-domain-edit']['en-us'] = "Edit the details of this domain.";
|
||||||
$text['description-domain-edit']['es-cl'] = "Editar detalles de este dominio.";
|
$text['description-domain-edit']['es-cl'] = "Editar detalles de este dominio.";
|
||||||
$text['description-domain-edit']['pt-pt'] = "Editar detalhes deste domínio.";
|
$text['description-domain-edit']['pt-pt'] = "Editar detalhes deste domínio.";
|
||||||
$text['description-domain-edit']['fr-fr'] = "Editer les détaisl de ce domaine. ";
|
$text['description-domain-edit']['fr-fr'] = "Editer les détaisl de ce domaine. ";
|
||||||
$text['description-domain-edit']['pt-br'] = "Editar detalhes deste dominio";
|
$text['description-domain-edit']['pt-br'] = "Editar detalhes deste dominio";
|
||||||
$text['description-domain-edit']['pl'] = "Edytuj szczegóły tej domeny.";
|
$text['description-domain-edit']['pl'] = "Edytuj szczegóły tej domeny.";
|
||||||
$text['description-domain-edit']['sv-se'] = "Ändra detaljer för denna Domän.";
|
$text['description-domain-edit']['sv-se'] = "Ändra detaljer för denna Domän.";
|
||||||
$text['description-domain-edit']['uk'] = "Редагування деталей домену";
|
$text['description-domain-edit']['uk'] = "Редагування деталей домену";
|
||||||
$text['description-domain-edit']['de-at'] = "Die Details dieser Domain ändern.";
|
$text['description-domain-edit']['de-at'] = "Die Details dieser Domain ändern.";
|
||||||
|
|
||||||
$text['description-domain-add']['en-us'] = "Enter the domain details below.";
|
$text['description-domain-add']['en-us'] = "Enter the domain details below.";
|
||||||
$text['description-domain-add']['es-cl'] = "Ingrese los detalles del dominio a continuación.";
|
$text['description-domain-add']['es-cl'] = "Ingrese los detalles del dominio a continuación.";
|
||||||
$text['description-domain-add']['pt-pt'] = "Introduza os detalhes do domínio abaixo.";
|
$text['description-domain-add']['pt-pt'] = "Introduza os detalhes do domínio abaixo.";
|
||||||
$text['description-domain-add']['fr-fr'] = "Entrer les détails du domaine ci-dessous.";
|
$text['description-domain-add']['fr-fr'] = "Entrer les détails du domaine ci-dessous.";
|
||||||
$text['description-domain-add']['pt-br'] = "Insira os detalhes do dominio abaixo";
|
$text['description-domain-add']['pt-br'] = "Insira os detalhes do dominio abaixo";
|
||||||
$text['description-domain-add']['pl'] = "Poniżej wprowadź szczegóły domeny";
|
$text['description-domain-add']['pl'] = "Poniżej wprowadź szczegóły domeny";
|
||||||
$text['description-domain-add']['sv-se'] = "Ange domändetaljer nedan.";
|
$text['description-domain-add']['sv-se'] = "Ange domändetaljer nedan.";
|
||||||
$text['description-domain-add']['uk'] = "Введіть дані домену нижче.";
|
$text['description-domain-add']['uk'] = "Введіть дані домену нижче.";
|
||||||
$text['description-domain-add']['de-at'] = "Geben Sie die Domain Details unten an.";
|
$text['description-domain-add']['de-at'] = "Geben Sie die Domain Details unten an.";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,164 +1,164 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* events class provides an event system
|
* events class provides an event system
|
||||||
*
|
*
|
||||||
* @method void load_plugins
|
* @method void load_plugins
|
||||||
* @method dynamic __call
|
* @method dynamic __call
|
||||||
*/
|
*/
|
||||||
class events {
|
class events {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var obj $db Database connnection object
|
* @var obj $db Database connnection object
|
||||||
* @var array $plugins Store available plugin classes
|
* @var array $plugins Store available plugin classes
|
||||||
* @var array $methods store methods found on each plugin
|
* @var array $methods store methods found on each plugin
|
||||||
* @var array $headers headers provide information about the events
|
* @var array $headers headers provide information about the events
|
||||||
* @var array $required array of items that are required
|
* @var array $required array of items that are required
|
||||||
* @var string $content optional additional data about the event
|
* @var string $content optional additional data about the event
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
private $plugins = array();
|
private $plugins = array();
|
||||||
private $methods = array();
|
private $methods = array();
|
||||||
public $headers = array();
|
public $headers = array();
|
||||||
public $required = array();
|
public $required = array();
|
||||||
private $content;
|
private $content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
* Creates the database connection object
|
* Creates the database connection object
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//create the database connection
|
//create the database connection
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/classes/database.php";
|
require_once "resources/classes/database.php";
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$database->connect();
|
$database->connect();
|
||||||
$this->db = $database->db;
|
$this->db = $database->db;
|
||||||
return $this->db = $database->db;
|
return $this->db = $database->db;
|
||||||
|
|
||||||
//load the plugins
|
//load the plugins
|
||||||
$this->load_plugins();
|
$this->load_plugins();
|
||||||
|
|
||||||
//add values to the required array
|
//add values to the required array
|
||||||
$this->required['headers'][] = "content-type";
|
$this->required['headers'][] = "content-type";
|
||||||
$this->required['headers'][] = "date";
|
$this->required['headers'][] = "date";
|
||||||
$this->required['headers'][] = "host";
|
$this->required['headers'][] = "host";
|
||||||
$this->required['headers'][] = "status";
|
$this->required['headers'][] = "status";
|
||||||
$this->required['headers'][] = "app_name";
|
$this->required['headers'][] = "app_name";
|
||||||
$this->required['headers'][] = "app_uuid";
|
$this->required['headers'][] = "app_uuid";
|
||||||
$this->required['headers'][] = "domain_uuid";
|
$this->required['headers'][] = "domain_uuid";
|
||||||
$this->required['headers'][] = "user_uuid";
|
$this->required['headers'][] = "user_uuid";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function will load all available plugins into the memory
|
* This function will load all available plugins into the memory
|
||||||
* Rules:
|
* Rules:
|
||||||
* plugins are stored in ./plugins
|
* plugins are stored in ./plugins
|
||||||
* plugin class is named plugin_<name>
|
* plugin class is named plugin_<name>
|
||||||
* php file is named <name>.php
|
* php file is named <name>.php
|
||||||
*/
|
*/
|
||||||
private function load_plugins() {
|
private function load_plugins() {
|
||||||
$base = realpath(dirname(__FILE__)) . "/plugins";
|
$base = realpath(dirname(__FILE__)) . "/plugins";
|
||||||
$this->plugins = glob($base . "/*.php");
|
$this->plugins = glob($base . "/*.php");
|
||||||
foreach($this->plugins as $plugin) {
|
foreach($this->plugins as $plugin) {
|
||||||
//include the plugin php file and define the class name
|
//include the plugin php file and define the class name
|
||||||
include_once $plugin;
|
include_once $plugin;
|
||||||
$plugin_name = basename($plugin, ".php");
|
$plugin_name = basename($plugin, ".php");
|
||||||
$class_name = "plugin_".$plugin_name;
|
$class_name = "plugin_".$plugin_name;
|
||||||
|
|
||||||
//create the plugin object so that it can be stored and called later
|
//create the plugin object so that it can be stored and called later
|
||||||
$obj = new $class_name();
|
$obj = new $class_name();
|
||||||
$this->plugins[$plugin_name] = $obj;
|
$this->plugins[$plugin_name] = $obj;
|
||||||
|
|
||||||
//store all methods found in the plugin
|
//store all methods found in the plugin
|
||||||
foreach (get_class_methods($obj) as $method ) {
|
foreach (get_class_methods($obj) as $method ) {
|
||||||
$this->methods[$method] = $plugin_name;
|
$this->methods[$method] = $plugin_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the plugin method
|
* Run the plugin method
|
||||||
* @param strint $method
|
* @param strint $method
|
||||||
* @param string $args
|
* @param string $args
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __call($method, $args) {
|
public function __call($method, $args) {
|
||||||
if (! key_exists($method, $this->methods)) {
|
if (! key_exists($method, $this->methods)) {
|
||||||
throw new Exception ("Call to undefined method: " . $method);
|
throw new Exception ("Call to undefined method: " . $method);
|
||||||
}
|
}
|
||||||
array_unshift($args, $this);
|
array_unshift($args, $this);
|
||||||
try {
|
try {
|
||||||
$obj = call_user_func_array(array($this->plugins[$this->methods[$method]], $method), $args);
|
$obj = call_user_func_array(array($this->plugins[$this->methods[$method]], $method), $args);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
echo 'Exception: ', $e->getMessage(), "\n";
|
echo 'Exception: ', $e->getMessage(), "\n";
|
||||||
}
|
}
|
||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new event header
|
* Set a new event header
|
||||||
* @param string $category
|
* @param string $category
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $value
|
* @param string $value
|
||||||
*/
|
*/
|
||||||
public function set_header($category, $name, $value) {
|
public function set_header($category, $name, $value) {
|
||||||
$this->headers[$category][$name] = $value;
|
$this->headers[$category][$name] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check for required headers
|
* check for required headers
|
||||||
* @param string $category
|
* @param string $category
|
||||||
* @return bolean $value
|
* @return bolean $value
|
||||||
*/
|
*/
|
||||||
public function check_required($category) {
|
public function check_required($category) {
|
||||||
foreach ($this->required['headers'] as &$header) {
|
foreach ($this->required['headers'] as &$header) {
|
||||||
if ($category == $header) {
|
if ($category == $header) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send the event
|
* Send the event
|
||||||
*/
|
*/
|
||||||
public function send() {
|
public function send() {
|
||||||
//check for required headers are present return false if any are missing
|
//check for required headers are present return false if any are missing
|
||||||
foreach ($this->headers as &$header) {
|
foreach ($this->headers as &$header) {
|
||||||
if (!$this->check_required($header)) {
|
if (!$this->check_required($header)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//$this->content;
|
//$this->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serialize the event headers
|
* Serialize the event headers
|
||||||
* @param string $type values: array, json
|
* @param string $type values: array, json
|
||||||
*/
|
*/
|
||||||
public function serialize($type) {
|
public function serialize($type) {
|
||||||
$array = $this->headers;
|
$array = $this->headers;
|
||||||
if ($type == "array") {
|
if ($type == "array") {
|
||||||
return $array;
|
return $array;
|
||||||
} elseif ($type == "json") {
|
} elseif ($type == "json") {
|
||||||
return json_encode($array);
|
return json_encode($array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+420
-420
@@ -1,421 +1,421 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$text['title-install']['en-us'] = "Install";
|
$text['title-install']['en-us'] = "Install";
|
||||||
$text['title-install']['es-cl'] = "Instale";
|
$text['title-install']['es-cl'] = "Instale";
|
||||||
$text['title-install']['pt-pt'] = "Installation";
|
$text['title-install']['pt-pt'] = "Installation";
|
||||||
$text['title-install']['fr-fr'] = "Installation";
|
$text['title-install']['fr-fr'] = "Installation";
|
||||||
$text['title-install']['pt-br'] = "Installation";
|
$text['title-install']['pt-br'] = "Installation";
|
||||||
$text['title-install']['pl'] = "Zainstalować";
|
$text['title-install']['pl'] = "Zainstalować";
|
||||||
$text['title-install']['sv-se'] = "Installera";
|
$text['title-install']['sv-se'] = "Installera";
|
||||||
$text['title-install']['uk'] = "Перший раз Встановіть";
|
$text['title-install']['uk'] = "Перший раз Встановіть";
|
||||||
$text['title-install']['de-at'] = "Erstinstallation";
|
$text['title-install']['de-at'] = "Erstinstallation";
|
||||||
$text['title-install']['ar-eg'] = "للمرة الأولى قم بتثبيت";
|
$text['title-install']['ar-eg'] = "للمرة الأولى قم بتثبيت";
|
||||||
|
|
||||||
$text['title-detected_configuration']['en-us'] = "Detected Configuration";
|
$text['title-detected_configuration']['en-us'] = "Detected Configuration";
|
||||||
$text['title-detected_configuration']['es-cl'] = "Configuración detectado";
|
$text['title-detected_configuration']['es-cl'] = "Configuración detectado";
|
||||||
$text['title-detected_configuration']['pt-pt'] = "Configuração detectado";
|
$text['title-detected_configuration']['pt-pt'] = "Configuração detectado";
|
||||||
$text['title-detected_configuration']['fr-fr'] = "Detected Configuration";
|
$text['title-detected_configuration']['fr-fr'] = "Detected Configuration";
|
||||||
$text['title-detected_configuration']['pt-br'] = "Configuração detectado";
|
$text['title-detected_configuration']['pt-br'] = "Configuração detectado";
|
||||||
$text['title-detected_configuration']['pl'] = "Wykryto Konfiguracja";
|
$text['title-detected_configuration']['pl'] = "Wykryto Konfiguracja";
|
||||||
$text['title-detected_configuration']['sv-se'] = "Detekterad Konfiguration";
|
$text['title-detected_configuration']['sv-se'] = "Detekterad Konfiguration";
|
||||||
$text['title-detected_configuration']['uk'] = "виявлено Конфігурація";
|
$text['title-detected_configuration']['uk'] = "виявлено Конфігурація";
|
||||||
$text['title-detected_configuration']['de-at'] = "Erkannt Configuration";
|
$text['title-detected_configuration']['de-at'] = "Erkannt Configuration";
|
||||||
$text['title-detected_configuration']['ar-eg'] = "تكوين الكشف عن";
|
$text['title-detected_configuration']['ar-eg'] = "تكوين الكشف عن";
|
||||||
|
|
||||||
$text['title-assumed_configuration']['en-us'] = "Assumed Configuration";
|
$text['title-assumed_configuration']['en-us'] = "Assumed Configuration";
|
||||||
$text['title-assumed_configuration']['es-cl'] = "Configuración adoptada";
|
$text['title-assumed_configuration']['es-cl'] = "Configuración adoptada";
|
||||||
$text['title-assumed_configuration']['pt-pt'] = "Assumed Configuration";
|
$text['title-assumed_configuration']['pt-pt'] = "Assumed Configuration";
|
||||||
$text['title-assumed_configuration']['fr-fr'] = "Configuration supposée";
|
$text['title-assumed_configuration']['fr-fr'] = "Configuration supposée";
|
||||||
$text['title-assumed_configuration']['pt-br'] = "Assumed Configuration";
|
$text['title-assumed_configuration']['pt-br'] = "Assumed Configuration";
|
||||||
$text['title-assumed_configuration']['pl'] = "Zakładana Konfiguracja";
|
$text['title-assumed_configuration']['pl'] = "Zakładana Konfiguracja";
|
||||||
$text['title-assumed_configuration']['sv-se'] = "Antagen Konfiguration";
|
$text['title-assumed_configuration']['sv-se'] = "Antagen Konfiguration";
|
||||||
$text['title-assumed_configuration']['uk'] = "передбачуваний Конфігурація";
|
$text['title-assumed_configuration']['uk'] = "передбачуваний Конфігурація";
|
||||||
$text['title-assumed_configuration']['de-at'] = "Angenommene Configuration";
|
$text['title-assumed_configuration']['de-at'] = "Angenommene Configuration";
|
||||||
$text['title-assumed_configuration']['ar-eg'] = "تكوين المفترضة";
|
$text['title-assumed_configuration']['ar-eg'] = "تكوين المفترضة";
|
||||||
|
|
||||||
$text['label-ft-install']['en-us'] = "First Time Install";
|
$text['label-ft-install']['en-us'] = "First Time Install";
|
||||||
$text['label-ft-install']['es-cl'] = "La primera instalación";
|
$text['label-ft-install']['es-cl'] = "La primera instalación";
|
||||||
$text['label-ft-install']['pt-pt'] = "First Time Install";
|
$text['label-ft-install']['pt-pt'] = "First Time Install";
|
||||||
$text['label-ft-install']['fr-fr'] = "Première installation";
|
$text['label-ft-install']['fr-fr'] = "Première installation";
|
||||||
$text['label-ft-install']['pt-br'] = "First Time Install";
|
$text['label-ft-install']['pt-br'] = "First Time Install";
|
||||||
$text['label-ft-install']['pl'] = "Zainstalować";
|
$text['label-ft-install']['pl'] = "Zainstalować";
|
||||||
$text['label-ft-install']['sv-se'] = "Första gången Installera";
|
$text['label-ft-install']['sv-se'] = "Första gången Installera";
|
||||||
$text['label-ft-install']['uk'] = "Перший раз Встановіть";
|
$text['label-ft-install']['uk'] = "Перший раз Встановіть";
|
||||||
$text['label-ft-install']['de-at'] = "Erstinstallation";
|
$text['label-ft-install']['de-at'] = "Erstinstallation";
|
||||||
$text['label-ft-install']['ar-eg'] = "للمرة الأولى قم بتثبيت";
|
$text['label-ft-install']['ar-eg'] = "للمرة الأولى قم بتثبيت";
|
||||||
|
|
||||||
$text['description-ft-install']['en-us'] = "Perform all actions for a First Time Install";
|
$text['description-ft-install']['en-us'] = "Perform all actions for a First Time Install";
|
||||||
$text['description-ft-install']['es-cl'] = "Realizar todas las acciones para una primera instalación";
|
$text['description-ft-install']['es-cl'] = "Realizar todas las acciones para una primera instalación";
|
||||||
$text['description-ft-install']['pt-pt'] = "Executar todas as ações para uma primeira vez Instalar";
|
$text['description-ft-install']['pt-pt'] = "Executar todas as ações para uma primeira vez Instalar";
|
||||||
$text['description-ft-install']['fr-fr'] = "Effectuer toutes les actions pour une première installation";
|
$text['description-ft-install']['fr-fr'] = "Effectuer toutes les actions pour une première installation";
|
||||||
$text['description-ft-install']['pt-br'] = "Executar todas as ações para uma primeira vez Instalar";
|
$text['description-ft-install']['pt-br'] = "Executar todas as ações para uma primeira vez Instalar";
|
||||||
$text['description-ft-install']['pl'] = "Wykonać wszystkie czynności dla pierwszy raz zainstalować";
|
$text['description-ft-install']['pl'] = "Wykonać wszystkie czynności dla pierwszy raz zainstalować";
|
||||||
$text['description-ft-install']['sv-se'] = "Utföra alla åtgärder för första gången Installera";
|
$text['description-ft-install']['sv-se'] = "Utföra alla åtgärder för första gången Installera";
|
||||||
$text['description-ft-install']['uk'] = "Виконайте всі дії для першого разу Встановіть";
|
$text['description-ft-install']['uk'] = "Виконайте всі дії для першого разу Встановіть";
|
||||||
$text['description-ft-install']['de-at'] = "Führen Sie alle Aktionen für einen ersten Mal installieren";
|
$text['description-ft-install']['de-at'] = "Führen Sie alle Aktionen für einen ersten Mal installieren";
|
||||||
$text['description-ft-install']['ar-eg'] = "تنفيذ كافة الإجراءات لأول مرة التثبيت";
|
$text['description-ft-install']['ar-eg'] = "تنفيذ كافة الإجراءات لأول مرة التثبيت";
|
||||||
|
|
||||||
$text['label-add-switch']['en-us'] = "Add a new switch";
|
$text['label-add-switch']['en-us'] = "Add a new switch";
|
||||||
$text['label-add-switch']['es-cl'] = "Añadir un nuevo conmutador";
|
$text['label-add-switch']['es-cl'] = "Añadir un nuevo conmutador";
|
||||||
$text['label-add-switch']['pt-pt'] = "Adicionar um novo switch";
|
$text['label-add-switch']['pt-pt'] = "Adicionar um novo switch";
|
||||||
$text['label-add-switch']['fr-fr'] = "Ajouter un nouveau commutateur";
|
$text['label-add-switch']['fr-fr'] = "Ajouter un nouveau commutateur";
|
||||||
$text['label-add-switch']['pt-br'] = "Adicionar um novo switch";
|
$text['label-add-switch']['pt-br'] = "Adicionar um novo switch";
|
||||||
$text['label-add-switch']['pl'] = "Dodaj nowy przełącznik";
|
$text['label-add-switch']['pl'] = "Dodaj nowy przełącznik";
|
||||||
$text['label-add-switch']['sv-se'] = "Lägg till en ny switch";
|
$text['label-add-switch']['sv-se'] = "Lägg till en ny switch";
|
||||||
$text['label-add-switch']['uk'] = "Додати новий перемикач";
|
$text['label-add-switch']['uk'] = "Додати новий перемикач";
|
||||||
$text['label-add-switch']['de-at'] = "Fügen Sie einen neuen Schalter";
|
$text['label-add-switch']['de-at'] = "Fügen Sie einen neuen Schalter";
|
||||||
$text['label-add-switch']['ar-eg'] = "إضافة مفتاح جديد";
|
$text['label-add-switch']['ar-eg'] = "إضافة مفتاح جديد";
|
||||||
|
|
||||||
$text['label-select_language']['en-us'] = "Language";
|
$text['label-select_language']['en-us'] = "Language";
|
||||||
$text['label-select_language']['es-cl'] = "Idioma";
|
$text['label-select_language']['es-cl'] = "Idioma";
|
||||||
$text['label-select_language']['pt-pt'] = "Idioma";
|
$text['label-select_language']['pt-pt'] = "Idioma";
|
||||||
$text['label-select_language']['fr-fr'] = "Langue";
|
$text['label-select_language']['fr-fr'] = "Langue";
|
||||||
$text['label-select_language']['pt-br'] = "Idioma";
|
$text['label-select_language']['pt-br'] = "Idioma";
|
||||||
$text['label-select_language']['pl'] = "Język";
|
$text['label-select_language']['pl'] = "Język";
|
||||||
$text['label-select_language']['sv-se'] = "Språk";
|
$text['label-select_language']['sv-se'] = "Språk";
|
||||||
$text['label-select_language']['uk'] = "Мова";
|
$text['label-select_language']['uk'] = "Мова";
|
||||||
$text['label-select_language']['de-at'] = "Sprache";
|
$text['label-select_language']['de-at'] = "Sprache";
|
||||||
$text['label-select_language']['ar-eg'] = "لغة";
|
$text['label-select_language']['ar-eg'] = "لغة";
|
||||||
|
|
||||||
$text['label-event_host']['en-us'] = "Host address";
|
$text['label-event_host']['en-us'] = "Host address";
|
||||||
$text['label-event_host']['es-cl'] = "Dirección de host";
|
$text['label-event_host']['es-cl'] = "Dirección de host";
|
||||||
$text['label-event_host']['pt-pt'] = "Endereço do host";
|
$text['label-event_host']['pt-pt'] = "Endereço do host";
|
||||||
$text['label-event_host']['fr-fr'] = "Adresse de l'hôte";
|
$text['label-event_host']['fr-fr'] = "Adresse de l'hôte";
|
||||||
$text['label-event_host']['pt-br'] = "Endereço do host";
|
$text['label-event_host']['pt-br'] = "Endereço do host";
|
||||||
$text['label-event_host']['pl'] = "Adres hosta";
|
$text['label-event_host']['pl'] = "Adres hosta";
|
||||||
$text['label-event_host']['sv-se'] = "Host adress";
|
$text['label-event_host']['sv-se'] = "Host adress";
|
||||||
$text['label-event_host']['uk'] = "адреса хоста";
|
$text['label-event_host']['uk'] = "адреса хоста";
|
||||||
$text['label-event_host']['de-at'] = "Host-Adresse";
|
$text['label-event_host']['de-at'] = "Host-Adresse";
|
||||||
$text['label-event_host']['ar-eg'] = "عنوان المضيف";
|
$text['label-event_host']['ar-eg'] = "عنوان المضيف";
|
||||||
|
|
||||||
$text['label-event_port']['en-us'] = "Port";
|
$text['label-event_port']['en-us'] = "Port";
|
||||||
$text['label-event_port']['es-cl'] = "Puerto";
|
$text['label-event_port']['es-cl'] = "Puerto";
|
||||||
$text['label-event_port']['pt-pt'] = "Porto";
|
$text['label-event_port']['pt-pt'] = "Porto";
|
||||||
$text['label-event_port']['fr-fr'] = "Port";
|
$text['label-event_port']['fr-fr'] = "Port";
|
||||||
$text['label-event_port']['pt-br'] = "Porta";
|
$text['label-event_port']['pt-br'] = "Porta";
|
||||||
$text['label-event_port']['pl'] = "Port";
|
$text['label-event_port']['pl'] = "Port";
|
||||||
$text['label-event_port']['sv-se'] = "Port";
|
$text['label-event_port']['sv-se'] = "Port";
|
||||||
$text['label-event_port']['uk'] = "Порт";
|
$text['label-event_port']['uk'] = "Порт";
|
||||||
$text['label-event_port']['de-at'] = "Port";
|
$text['label-event_port']['de-at'] = "Port";
|
||||||
$text['label-event_port']['ar-eg'] = "منفذ";
|
$text['label-event_port']['ar-eg'] = "منفذ";
|
||||||
|
|
||||||
$text['label-event_password']['en-us'] = "Password";
|
$text['label-event_password']['en-us'] = "Password";
|
||||||
$text['label-event_password']['es-cl'] = "Contreseña";
|
$text['label-event_password']['es-cl'] = "Contreseña";
|
||||||
$text['label-event_password']['pt-pt'] = "Palavra-Chave";
|
$text['label-event_password']['pt-pt'] = "Palavra-Chave";
|
||||||
$text['label-event_password']['fr-fr'] = "Mot de Passe";
|
$text['label-event_password']['fr-fr'] = "Mot de Passe";
|
||||||
$text['label-event_password']['pt-br'] = "Senha";
|
$text['label-event_password']['pt-br'] = "Senha";
|
||||||
$text['label-event_password']['pl'] = "Hasło";
|
$text['label-event_password']['pl'] = "Hasło";
|
||||||
$text['label-event_password']['sv-se'] = "Lösenord";
|
$text['label-event_password']['sv-se'] = "Lösenord";
|
||||||
$text['label-event_password']['uk'] = "Пароль";
|
$text['label-event_password']['uk'] = "Пароль";
|
||||||
$text['label-event_password']['de-at'] = "Passwort";
|
$text['label-event_password']['de-at'] = "Passwort";
|
||||||
$text['label-event_password']['ar-eg'] = "كلمة السر";
|
$text['label-event_password']['ar-eg'] = "كلمة السر";
|
||||||
|
|
||||||
$text['label-username']['en-us'] = "Username";
|
$text['label-username']['en-us'] = "Username";
|
||||||
$text['label-username']['es-cl'] = "Nombre de usuario";
|
$text['label-username']['es-cl'] = "Nombre de usuario";
|
||||||
$text['label-username']['pt-pt'] = "Utilizador";
|
$text['label-username']['pt-pt'] = "Utilizador";
|
||||||
$text['label-username']['fr-fr'] = "Utilisateur";
|
$text['label-username']['fr-fr'] = "Utilisateur";
|
||||||
$text['label-username']['pt-br'] = "Nome do Usuário";
|
$text['label-username']['pt-br'] = "Nome do Usuário";
|
||||||
$text['label-username']['pl'] = "Użytkownik";
|
$text['label-username']['pl'] = "Użytkownik";
|
||||||
$text['label-username']['sv-se'] = "Användarnamn";
|
$text['label-username']['sv-se'] = "Användarnamn";
|
||||||
$text['label-username']['uk'] = "Ім’я користувача";
|
$text['label-username']['uk'] = "Ім’я користувача";
|
||||||
$text['label-username']['de-at'] = "Benutzername";
|
$text['label-username']['de-at'] = "Benutzername";
|
||||||
$text['label-username']['ar-eg'] = "اسم المستخدم";
|
$text['label-username']['ar-eg'] = "اسم المستخدم";
|
||||||
|
|
||||||
$text['label-port']['en-us'] = "Port";
|
$text['label-port']['en-us'] = "Port";
|
||||||
$text['label-port']['es-cl'] = "Puerto";
|
$text['label-port']['es-cl'] = "Puerto";
|
||||||
$text['label-port']['pt-pt'] = "Porto";
|
$text['label-port']['pt-pt'] = "Porto";
|
||||||
$text['label-port']['fr-fr'] = "Port";
|
$text['label-port']['fr-fr'] = "Port";
|
||||||
$text['label-port']['pt-br'] = "Porta";
|
$text['label-port']['pt-br'] = "Porta";
|
||||||
$text['label-port']['pl'] = "Port";
|
$text['label-port']['pl'] = "Port";
|
||||||
$text['label-port']['sv-se'] = "Port";
|
$text['label-port']['sv-se'] = "Port";
|
||||||
$text['label-port']['uk'] = "Порт";
|
$text['label-port']['uk'] = "Порт";
|
||||||
$text['label-port']['de-at'] = "Port";
|
$text['label-port']['de-at'] = "Port";
|
||||||
$text['label-port']['ar-eg'] = "منفذ";
|
$text['label-port']['ar-eg'] = "منفذ";
|
||||||
|
|
||||||
$text['label-path']['en-us'] = "Path";
|
$text['label-path']['en-us'] = "Path";
|
||||||
$text['label-path']['es-cl'] = "Ruta";
|
$text['label-path']['es-cl'] = "Ruta";
|
||||||
$text['label-path']['pt-pt'] = "Caminho";
|
$text['label-path']['pt-pt'] = "Caminho";
|
||||||
$text['label-path']['fr-fr'] = "Chemin";
|
$text['label-path']['fr-fr'] = "Chemin";
|
||||||
$text['label-path']['pt-br'] = "Caminho";
|
$text['label-path']['pt-br'] = "Caminho";
|
||||||
$text['label-path']['pl'] = "Ścieżka";
|
$text['label-path']['pl'] = "Ścieżka";
|
||||||
$text['label-path']['sv-se'] = "Sökväg";
|
$text['label-path']['sv-se'] = "Sökväg";
|
||||||
$text['label-path']['uk'] = "Шлях";
|
$text['label-path']['uk'] = "Шлях";
|
||||||
$text['label-path']['de-at'] = "Pfad";
|
$text['label-path']['de-at'] = "Pfad";
|
||||||
$text['label-path']['ar-eg'] = "مسار";
|
$text['label-path']['ar-eg'] = "مسار";
|
||||||
|
|
||||||
$text['label-host']['en-us'] = "Host";
|
$text['label-host']['en-us'] = "Host";
|
||||||
$text['label-host']['es-cl'] = "Host";
|
$text['label-host']['es-cl'] = "Host";
|
||||||
$text['label-host']['pt-pt'] = "Máquina";
|
$text['label-host']['pt-pt'] = "Máquina";
|
||||||
$text['label-host']['fr-fr'] = "Hôte";
|
$text['label-host']['fr-fr'] = "Hôte";
|
||||||
$text['label-host']['pt-br'] = "Máquina";
|
$text['label-host']['pt-br'] = "Máquina";
|
||||||
$text['label-host']['pl'] = "Host";
|
$text['label-host']['pl'] = "Host";
|
||||||
$text['label-host']['sv-se'] = "Värd";
|
$text['label-host']['sv-se'] = "Värd";
|
||||||
$text['label-host']['uk'] = "Хост";
|
$text['label-host']['uk'] = "Хост";
|
||||||
$text['label-host']['de-at'] = "Host";
|
$text['label-host']['de-at'] = "Host";
|
||||||
$text['label-host']['ar-eg'] = "مضيف";
|
$text['label-host']['ar-eg'] = "مضيف";
|
||||||
|
|
||||||
$text['label-driver']['en-us'] = "Driver";
|
$text['label-driver']['en-us'] = "Driver";
|
||||||
$text['label-driver']['es-cl'] = "Controlador";
|
$text['label-driver']['es-cl'] = "Controlador";
|
||||||
$text['label-driver']['pt-pt'] = "Driver";
|
$text['label-driver']['pt-pt'] = "Driver";
|
||||||
$text['label-driver']['fr-fr'] = "Driver";
|
$text['label-driver']['fr-fr'] = "Driver";
|
||||||
$text['label-driver']['pt-br'] = "Driver";
|
$text['label-driver']['pt-br'] = "Driver";
|
||||||
$text['label-driver']['pl'] = "Sterownik";
|
$text['label-driver']['pl'] = "Sterownik";
|
||||||
$text['label-driver']['sv-se'] = "Drivrutin";
|
$text['label-driver']['sv-se'] = "Drivrutin";
|
||||||
$text['label-driver']['uk'] = "Драйвер";
|
$text['label-driver']['uk'] = "Драйвер";
|
||||||
$text['label-driver']['de-at'] = "Treiber";
|
$text['label-driver']['de-at'] = "Treiber";
|
||||||
$text['label-driver']['ar-eg'] = "سائق";
|
$text['label-driver']['ar-eg'] = "سائق";
|
||||||
|
|
||||||
$text['header-install']['en-us'] = "Install";
|
$text['header-install']['en-us'] = "Install";
|
||||||
$text['header-install']['es-cl'] = "Instalar";
|
$text['header-install']['es-cl'] = "Instalar";
|
||||||
$text['header-install']['pt-pt'] = "Instalar";
|
$text['header-install']['pt-pt'] = "Instalar";
|
||||||
$text['header-install']['fr-fr'] = "Installer";
|
$text['header-install']['fr-fr'] = "Installer";
|
||||||
$text['header-install']['pt-br'] = "Instalar";
|
$text['header-install']['pt-br'] = "Instalar";
|
||||||
$text['header-install']['pl'] = "Zainstalować";
|
$text['header-install']['pl'] = "Zainstalować";
|
||||||
$text['header-install']['sv-se'] = "Installera";
|
$text['header-install']['sv-se'] = "Installera";
|
||||||
$text['header-install']['uk'] = "встановлювати";
|
$text['header-install']['uk'] = "встановлювати";
|
||||||
$text['header-install']['de-at'] = "Installieren";
|
$text['header-install']['de-at'] = "Installieren";
|
||||||
$text['header-install']['ar-eg'] = "تثبيت";
|
$text['header-install']['ar-eg'] = "تثبيت";
|
||||||
|
|
||||||
$text['header-select_language']['en-us'] = "Select Language";
|
$text['header-select_language']['en-us'] = "Select Language";
|
||||||
$text['header-select_language']['es-cl'] = "Selecciona idioma";
|
$text['header-select_language']['es-cl'] = "Selecciona idioma";
|
||||||
$text['header-select_language']['pt-pt'] = "Selecione o idioma";
|
$text['header-select_language']['pt-pt'] = "Selecione o idioma";
|
||||||
$text['header-select_language']['fr-fr'] = "Sélectionnez la langue";
|
$text['header-select_language']['fr-fr'] = "Sélectionnez la langue";
|
||||||
$text['header-select_language']['pt-br'] = "Selecione o idioma";
|
$text['header-select_language']['pt-br'] = "Selecione o idioma";
|
||||||
$text['header-select_language']['pl'] = "Wybierz język";
|
$text['header-select_language']['pl'] = "Wybierz język";
|
||||||
$text['header-select_language']['sv-se'] = "Välj språk";
|
$text['header-select_language']['sv-se'] = "Välj språk";
|
||||||
$text['header-select_language']['uk'] = "вибір мови";
|
$text['header-select_language']['uk'] = "вибір мови";
|
||||||
$text['header-select_language']['de-at'] = "Sprache wählen";
|
$text['header-select_language']['de-at'] = "Sprache wählen";
|
||||||
$text['header-select_language']['ar-eg'] = "اختار اللغة";
|
$text['header-select_language']['ar-eg'] = "اختار اللغة";
|
||||||
|
|
||||||
$text['header-event_socket']['en-us'] = "Event Socket Configuration";
|
$text['header-event_socket']['en-us'] = "Event Socket Configuration";
|
||||||
$text['header-event_socket']['es-cl'] = "Configuración del zócalo evento";
|
$text['header-event_socket']['es-cl'] = "Configuración del zócalo evento";
|
||||||
$text['header-event_socket']['pt-pt'] = "Configuração soquete evento";
|
$text['header-event_socket']['pt-pt'] = "Configuração soquete evento";
|
||||||
$text['header-event_socket']['fr-fr'] = "Event Configuration Socket";
|
$text['header-event_socket']['fr-fr'] = "Event Configuration Socket";
|
||||||
$text['header-event_socket']['pt-br'] = "Configuração soquete evento";
|
$text['header-event_socket']['pt-br'] = "Configuração soquete evento";
|
||||||
$text['header-event_socket']['pl'] = "Zdarzenie Gniazdo Konfiguracja";
|
$text['header-event_socket']['pl'] = "Zdarzenie Gniazdo Konfiguracja";
|
||||||
$text['header-event_socket']['sv-se'] = "Händelse Socket Konfiguration";
|
$text['header-event_socket']['sv-se'] = "Händelse Socket Konfiguration";
|
||||||
$text['header-event_socket']['uk'] = "Конфігурація гніздо Подія";
|
$text['header-event_socket']['uk'] = "Конфігурація гніздо Подія";
|
||||||
$text['header-event_socket']['de-at'] = "Veranstaltungssockelkonfiguration";
|
$text['header-event_socket']['de-at'] = "Veranstaltungssockelkonfiguration";
|
||||||
$text['header-event_socket']['ar-eg'] = "تكوين المقبس الحدث";
|
$text['header-event_socket']['ar-eg'] = "تكوين المقبس الحدث";
|
||||||
|
|
||||||
$text['header-config_detail']['en-us'] = "Admin Configuration";
|
$text['header-config_detail']['en-us'] = "Admin Configuration";
|
||||||
$text['header-config_detail']['es-cl'] = "Configuración de administración";
|
$text['header-config_detail']['es-cl'] = "Configuración de administración";
|
||||||
$text['header-config_detail']['pt-pt'] = "Configuração de administrador";
|
$text['header-config_detail']['pt-pt'] = "Configuração de administrador";
|
||||||
$text['header-config_detail']['fr-fr'] = "Configuration Admin";
|
$text['header-config_detail']['fr-fr'] = "Configuration Admin";
|
||||||
$text['header-config_detail']['pt-br'] = "Configuração de administrador";
|
$text['header-config_detail']['pt-br'] = "Configuração de administrador";
|
||||||
$text['header-config_detail']['pl'] = "Konfiguracja Admin";
|
$text['header-config_detail']['pl'] = "Konfiguracja Admin";
|
||||||
$text['header-config_detail']['sv-se'] = "Admin Konfiguration";
|
$text['header-config_detail']['sv-se'] = "Admin Konfiguration";
|
||||||
$text['header-config_detail']['uk'] = "конфігурація Адмін";
|
$text['header-config_detail']['uk'] = "конфігурація Адмін";
|
||||||
$text['header-config_detail']['de-at'] = "Admin-Konfiguration";
|
$text['header-config_detail']['de-at'] = "Admin-Konfiguration";
|
||||||
$text['header-config_detail']['ar-eg'] = "تكوين المشرف";
|
$text['header-config_detail']['ar-eg'] = "تكوين المشرف";
|
||||||
|
|
||||||
$text['header-config_database']['en-us'] = "Database Configuration";
|
$text['header-config_database']['en-us'] = "Database Configuration";
|
||||||
$text['header-config_database']['es-cl'] = "Configuración de la base de datos";
|
$text['header-config_database']['es-cl'] = "Configuración de la base de datos";
|
||||||
$text['header-config_database']['pt-pt'] = "Configuration Database";
|
$text['header-config_database']['pt-pt'] = "Configuration Database";
|
||||||
$text['header-config_database']['fr-fr'] = "Configuration de base de données";
|
$text['header-config_database']['fr-fr'] = "Configuration de base de données";
|
||||||
$text['header-config_database']['pt-br'] = "Configuration Database";
|
$text['header-config_database']['pt-br'] = "Configuration Database";
|
||||||
$text['header-config_database']['pl'] = "Konfiguracja bazy danych";
|
$text['header-config_database']['pl'] = "Konfiguracja bazy danych";
|
||||||
$text['header-config_database']['sv-se'] = "Databaskonfiguration ";
|
$text['header-config_database']['sv-se'] = "Databaskonfiguration ";
|
||||||
$text['header-config_database']['uk'] = "конфігурація бази даних";
|
$text['header-config_database']['uk'] = "конфігурація бази даних";
|
||||||
$text['header-config_database']['de-at'] = "Datenbankkonfiguration ";
|
$text['header-config_database']['de-at'] = "Datenbankkonfiguration ";
|
||||||
$text['header-config_database']['ar-eg'] = "تكوين قاعدة بيانات";
|
$text['header-config_database']['ar-eg'] = "تكوين قاعدة بيانات";
|
||||||
|
|
||||||
$text['header-installing']['en-us'] = "Executing Install";
|
$text['header-installing']['en-us'] = "Executing Install";
|
||||||
$text['header-installing']['es-cl'] = "Instalar la ejecución";
|
$text['header-installing']['es-cl'] = "Instalar la ejecución";
|
||||||
$text['header-installing']['pt-pt'] = "Execução Instalar";
|
$text['header-installing']['pt-pt'] = "Execução Instalar";
|
||||||
$text['header-installing']['fr-fr'] = "Installez exécution";
|
$text['header-installing']['fr-fr'] = "Installez exécution";
|
||||||
$text['header-installing']['pt-br'] = "Execução Instalar";
|
$text['header-installing']['pt-br'] = "Execução Instalar";
|
||||||
$text['header-installing']['pl'] = "Wykonywanie Install";
|
$text['header-installing']['pl'] = "Wykonywanie Install";
|
||||||
$text['header-installing']['sv-se'] = "Exekvera Installera";
|
$text['header-installing']['sv-se'] = "Exekvera Installera";
|
||||||
$text['header-installing']['uk'] = "виконання Встановіть";
|
$text['header-installing']['uk'] = "виконання Встановіть";
|
||||||
$text['header-installing']['de-at'] = "Ausführen Installieren";
|
$text['header-installing']['de-at'] = "Ausführen Installieren";
|
||||||
$text['header-installing']['ar-eg'] = "تنفيذ التثبيت";
|
$text['header-installing']['ar-eg'] = "تنفيذ التثبيت";
|
||||||
|
|
||||||
$text['description-event_host']['en-us'] = "Enter the event socket host name or IP address.";
|
$text['description-event_host']['en-us'] = "Enter the event socket host name or IP address.";
|
||||||
$text['description-event_host']['es-cl'] = "Introduzca el nombre de host toma evento o dirección IP.";
|
$text['description-event_host']['es-cl'] = "Introduzca el nombre de host toma evento o dirección IP.";
|
||||||
$text['description-event_host']['pt-pt'] = "Digite o nome do host tomada evento ou endereço IP.";
|
$text['description-event_host']['pt-pt'] = "Digite o nome do host tomada evento ou endereço IP.";
|
||||||
$text['description-event_host']['fr-fr'] = "Entrez le socket nom d'hôte de l'événement ou de l'adresse IP.";
|
$text['description-event_host']['fr-fr'] = "Entrez le socket nom d'hôte de l'événement ou de l'adresse IP.";
|
||||||
$text['description-event_host']['pt-br'] = "Digite o nome do host tomada evento ou endereço IP.";
|
$text['description-event_host']['pt-br'] = "Digite o nome do host tomada evento ou endereço IP.";
|
||||||
$text['description-event_host']['pl'] = "Wprowadź nazwę hosta gniazda wydarzenie lub adres IP.";
|
$text['description-event_host']['pl'] = "Wprowadź nazwę hosta gniazda wydarzenie lub adres IP.";
|
||||||
$text['description-event_host']['sv-se'] = "Ange händelsen uttag värdnamn eller IP-adress.";
|
$text['description-event_host']['sv-se'] = "Ange händelsen uttag värdnamn eller IP-adress.";
|
||||||
$text['description-event_host']['uk'] = "Введіть проведення сокета ім'я хоста або IP-адресу.";
|
$text['description-event_host']['uk'] = "Введіть проведення сокета ім'я хоста або IP-адресу.";
|
||||||
$text['description-event_host']['de-at'] = "Geben Sie das Ereignis Buchse Hostnamen oder die IP-Adresse .";
|
$text['description-event_host']['de-at'] = "Geben Sie das Ereignis Buchse Hostnamen oder die IP-Adresse .";
|
||||||
$text['description-event_host']['ar-eg'] = "أدخل اسم المضيف مأخذ الحدث.";
|
$text['description-event_host']['ar-eg'] = "أدخل اسم المضيف مأخذ الحدث.";
|
||||||
|
|
||||||
$text['description-event_port']['en-us'] = "Enter the event socket port number.";
|
$text['description-event_port']['en-us'] = "Enter the event socket port number.";
|
||||||
$text['description-event_port']['es-cl'] = "Introduzca el número de puerto de socket evento.";
|
$text['description-event_port']['es-cl'] = "Introduzca el número de puerto de socket evento.";
|
||||||
$text['description-event_port']['pt-pt'] = "Digite o número do evento porta de soquete.";
|
$text['description-event_port']['pt-pt'] = "Digite o número do evento porta de soquete.";
|
||||||
$text['description-event_port']['fr-fr'] = "Entrez le numéro cas de port du socket.";
|
$text['description-event_port']['fr-fr'] = "Entrez le numéro cas de port du socket.";
|
||||||
$text['description-event_port']['pt-br'] = "Digite o número do evento porta de soquete.";
|
$text['description-event_port']['pt-br'] = "Digite o número do evento porta de soquete.";
|
||||||
$text['description-event_port']['pl'] = "Wprowadź numer portu gniazda zdarzenia.";
|
$text['description-event_port']['pl'] = "Wprowadź numer portu gniazda zdarzenia.";
|
||||||
$text['description-event_port']['sv-se'] = "Ange händelsen socket portnummer.";
|
$text['description-event_port']['sv-se'] = "Ange händelsen socket portnummer.";
|
||||||
$text['description-event_port']['uk'] = "Введіть номер подія гніздо порту.";
|
$text['description-event_port']['uk'] = "Введіть номер подія гніздо порту.";
|
||||||
$text['description-event_port']['de-at'] = "Geben Sie das Ereignis Socket-Portnummer.";
|
$text['description-event_port']['de-at'] = "Geben Sie das Ereignis Socket-Portnummer.";
|
||||||
$text['description-event_port']['ar-eg'] = "أدخل رقم الحدث ميناء المقبس.";
|
$text['description-event_port']['ar-eg'] = "أدخل رقم الحدث ميناء المقبس.";
|
||||||
|
|
||||||
$text['description-event_password']['en-us'] = "Enter the event socket password.";
|
$text['description-event_password']['en-us'] = "Enter the event socket password.";
|
||||||
$text['description-event_password']['es-cl'] = "Introduzca la toma evento contraseña.";
|
$text['description-event_password']['es-cl'] = "Introduzca la toma evento contraseña.";
|
||||||
$text['description-event_password']['pt-pt'] = "Digite tomada a senha evento.";
|
$text['description-event_password']['pt-pt'] = "Digite tomada a senha evento.";
|
||||||
$text['description-event_password']['fr-fr'] = "Saisissez la prise de mot de passe de l'événement.";
|
$text['description-event_password']['fr-fr'] = "Saisissez la prise de mot de passe de l'événement.";
|
||||||
$text['description-event_password']['pt-br'] = "Digite tomada a senha evento.";
|
$text['description-event_password']['pt-br'] = "Digite tomada a senha evento.";
|
||||||
$text['description-event_password']['pl'] = "Wprowadź hasło gniazda zdarzenia.";
|
$text['description-event_password']['pl'] = "Wprowadź hasło gniazda zdarzenia.";
|
||||||
$text['description-event_password']['sv-se'] = "Ange händelsen uttag lösenord.";
|
$text['description-event_password']['sv-se'] = "Ange händelsen uttag lösenord.";
|
||||||
$text['description-event_password']['uk'] = "Введіть гніздо пароль подією.";
|
$text['description-event_password']['uk'] = "Введіть гніздо пароль подією.";
|
||||||
$text['description-event_password']['de-at'] = "Geben Sie das Ereignis Passwort Steckdose.";
|
$text['description-event_password']['de-at'] = "Geben Sie das Ereignis Passwort Steckdose.";
|
||||||
$text['description-event_password']['ar-eg'] = "أدخل كلمة المرور مأخذ الحدث.";
|
$text['description-event_password']['ar-eg'] = "أدخل كلمة المرور مأخذ الحدث.";
|
||||||
|
|
||||||
$text['description-username']['en-us'] = "Enter the database username.";
|
$text['description-username']['en-us'] = "Enter the database username.";
|
||||||
$text['description-username']['es-cl'] = "Ingrese el nombre de usuario de la base de datos.";
|
$text['description-username']['es-cl'] = "Ingrese el nombre de usuario de la base de datos.";
|
||||||
$text['description-username']['pt-pt'] = "Introduza o utilizador da base de dados.";
|
$text['description-username']['pt-pt'] = "Introduza o utilizador da base de dados.";
|
||||||
$text['description-username']['fr-fr'] = "Entrer le nom d'utilisateur de la Base de données.";
|
$text['description-username']['fr-fr'] = "Entrer le nom d'utilisateur de la Base de données.";
|
||||||
$text['description-username']['pt-br'] = "Insira o nome do usuário";
|
$text['description-username']['pt-br'] = "Insira o nome do usuário";
|
||||||
$text['description-username']['pl'] = "Wprowadź nazwę użytkownika";
|
$text['description-username']['pl'] = "Wprowadź nazwę użytkownika";
|
||||||
$text['description-username']['sv-se'] = "Ange databasen användarnamn här.";
|
$text['description-username']['sv-se'] = "Ange databasen användarnamn här.";
|
||||||
$text['description-username']['uk'] = "Введіть ім’я користувача бази даних";
|
$text['description-username']['uk'] = "Введіть ім’я користувача бази даних";
|
||||||
$text['description-username']['de-at'] = "Geben Sie den Datenbank Benutzernamen an.";
|
$text['description-username']['de-at'] = "Geben Sie den Datenbank Benutzernamen an.";
|
||||||
$text['description-username']['ar-eg'] = "أدخل اسم المستخدم هنا";
|
$text['description-username']['ar-eg'] = "أدخل اسم المستخدم هنا";
|
||||||
|
|
||||||
$text['description-type']['en-us'] = "Select the database type.";
|
$text['description-type']['en-us'] = "Select the database type.";
|
||||||
$text['description-type']['es-cl'] = "Seleccione el tipo de base de datos";
|
$text['description-type']['es-cl'] = "Seleccione el tipo de base de datos";
|
||||||
$text['description-type']['pt-pt'] = "Escolha o tipo de base de dados.";
|
$text['description-type']['pt-pt'] = "Escolha o tipo de base de dados.";
|
||||||
$text['description-type']['fr-fr'] = "Choisir le type de Base de données.";
|
$text['description-type']['fr-fr'] = "Choisir le type de Base de données.";
|
||||||
$text['description-type']['pt-br'] = "Introduza o tipo de definição.";
|
$text['description-type']['pt-br'] = "Introduza o tipo de definição.";
|
||||||
$text['description-type']['pl'] = "Wprowadź rodzaj bazy danych";
|
$text['description-type']['pl'] = "Wprowadź rodzaj bazy danych";
|
||||||
$text['description-type']['sv-se'] = "Välj databastyp";
|
$text['description-type']['sv-se'] = "Välj databastyp";
|
||||||
$text['description-type']['uk'] = "Виберіть тип бази даних";
|
$text['description-type']['uk'] = "Виберіть тип бази даних";
|
||||||
$text['description-type']['de-at'] = "Wählen Sie den Datenbank Typ.";
|
$text['description-type']['de-at'] = "Wählen Sie den Datenbank Typ.";
|
||||||
$text['description-type']['ar-eg'] = "إختر نوع قاعدة البيانات";
|
$text['description-type']['ar-eg'] = "إختر نوع قاعدة البيانات";
|
||||||
|
|
||||||
$text['description-port']['en-us'] = "Enter the port number.";
|
$text['description-port']['en-us'] = "Enter the port number.";
|
||||||
$text['description-port']['es-cl'] = "Ingrese el número del puerto.";
|
$text['description-port']['es-cl'] = "Ingrese el número del puerto.";
|
||||||
$text['description-port']['pt-pt'] = "Introduza o número do porto.";
|
$text['description-port']['pt-pt'] = "Introduza o número do porto.";
|
||||||
$text['description-port']['fr-fr'] = "Entrer le numéro de port.";
|
$text['description-port']['fr-fr'] = "Entrer le numéro de port.";
|
||||||
$text['description-port']['pt-br'] = "Insira o número da porta";
|
$text['description-port']['pt-br'] = "Insira o número da porta";
|
||||||
$text['description-port']['pl'] = "Wprowadź numer portu";
|
$text['description-port']['pl'] = "Wprowadź numer portu";
|
||||||
$text['description-port']['sv-se'] = "Ange portnummer";
|
$text['description-port']['sv-se'] = "Ange portnummer";
|
||||||
$text['description-port']['uk'] = "Введіть номер порта";
|
$text['description-port']['uk'] = "Введіть номер порта";
|
||||||
$text['description-port']['de-at'] = "Geben Sie die Port Nummer an.";
|
$text['description-port']['de-at'] = "Geben Sie die Port Nummer an.";
|
||||||
$text['description-port']['ar-eg'] = "أدخل رقم المنفذ";
|
$text['description-port']['ar-eg'] = "أدخل رقم المنفذ";
|
||||||
|
|
||||||
$text['description-path']['en-us'] = "Enter the database file path (SQLite only).";
|
$text['description-path']['en-us'] = "Enter the database file path (SQLite only).";
|
||||||
$text['description-path']['es-cl'] = "Ingrese la ruta al archivo de datos (solo SQLite).";
|
$text['description-path']['es-cl'] = "Ingrese la ruta al archivo de datos (solo SQLite).";
|
||||||
$text['description-path']['pt-pt'] = "Introduza o caminho da base de dados (apenas SQLite)";
|
$text['description-path']['pt-pt'] = "Introduza o caminho da base de dados (apenas SQLite)";
|
||||||
$text['description-path']['fr-fr'] = "Entrer le chemin du fichier Base de données (Spécifique SQLite).";
|
$text['description-path']['fr-fr'] = "Entrer le chemin du fichier Base de données (Spécifique SQLite).";
|
||||||
$text['description-path']['pt-br'] = "Insira o caminho da base de dados (SQLite)";
|
$text['description-path']['pt-br'] = "Insira o caminho da base de dados (SQLite)";
|
||||||
$text['description-path']['pl'] = "Wprowadź ścieżkę do pliku bazy danych (tylko SQLite)";
|
$text['description-path']['pl'] = "Wprowadź ścieżkę do pliku bazy danych (tylko SQLite)";
|
||||||
$text['description-path']['sv-se'] = "Ange databasens sökväg (gäller endast SQLite).";
|
$text['description-path']['sv-se'] = "Ange databasens sökväg (gäller endast SQLite).";
|
||||||
$text['description-path']['uk'] = "Вкажіть шлях до файлу бази даних (тільки SQLite).";
|
$text['description-path']['uk'] = "Вкажіть шлях до файлу бази даних (тільки SQLite).";
|
||||||
$text['description-path']['de-at'] = "Geben Sie den Datenbank Pfad an (nur für SQLite).";
|
$text['description-path']['de-at'] = "Geben Sie den Datenbank Pfad an (nur für SQLite).";
|
||||||
$text['description-path']['ar-eg'] = "أدخل مسار ملف قاعدة البيانات (سكليتي فقط).";
|
$text['description-path']['ar-eg'] = "أدخل مسار ملف قاعدة البيانات (سكليتي فقط).";
|
||||||
|
|
||||||
$text['description-password']['en-us'] = "Enter the database password.";
|
$text['description-password']['en-us'] = "Enter the database password.";
|
||||||
$text['description-password']['es-cl'] = "Ingrese la contraseña de la base de datos.";
|
$text['description-password']['es-cl'] = "Ingrese la contraseña de la base de datos.";
|
||||||
$text['description-password']['pt-pt'] = "Introduza a palavra-chave da base de dados.";
|
$text['description-password']['pt-pt'] = "Introduza a palavra-chave da base de dados.";
|
||||||
$text['description-password']['fr-fr'] = "Entrer le mot de passe pour la Base de données.";
|
$text['description-password']['fr-fr'] = "Entrer le mot de passe pour la Base de données.";
|
||||||
$text['description-password']['pt-br'] = "Introduza a senha";
|
$text['description-password']['pt-br'] = "Introduza a senha";
|
||||||
$text['description-password']['pl'] = "Wpisz hasło";
|
$text['description-password']['pl'] = "Wpisz hasło";
|
||||||
$text['description-password']['sv-se'] = "Ange databasens lösenord.";
|
$text['description-password']['sv-se'] = "Ange databasens lösenord.";
|
||||||
$text['description-password']['uk'] = "Введіть пароль бази даних.";
|
$text['description-password']['uk'] = "Введіть пароль бази даних.";
|
||||||
$text['description-password']['de-at'] = "Geben Sie das Datenbank Passwort ein.";
|
$text['description-password']['de-at'] = "Geben Sie das Datenbank Passwort ein.";
|
||||||
$text['description-password']['ar-eg'] = "أدخل الرقم السري الخاص بقاعدة البيانات";
|
$text['description-password']['ar-eg'] = "أدخل الرقم السري الخاص بقاعدة البيانات";
|
||||||
|
|
||||||
$text['description-name']['en-us'] = "Enter the database name.";
|
$text['description-name']['en-us'] = "Enter the database name.";
|
||||||
$text['description-name']['es-cl'] = "Ingrese el nombre de la base de datos.";
|
$text['description-name']['es-cl'] = "Ingrese el nombre de la base de datos.";
|
||||||
$text['description-name']['pt-pt'] = "Introduza o nome da base de dados.";
|
$text['description-name']['pt-pt'] = "Introduza o nome da base de dados.";
|
||||||
$text['description-name']['fr-fr'] = "Entrer le nom de la Base de données.";
|
$text['description-name']['fr-fr'] = "Entrer le nom de la Base de données.";
|
||||||
$text['description-name']['pt-br'] = "Insira o nome do menu";
|
$text['description-name']['pt-br'] = "Insira o nome do menu";
|
||||||
$text['description-name']['pl'] = "Wprowadź nazwę bazy danych.";
|
$text['description-name']['pl'] = "Wprowadź nazwę bazy danych.";
|
||||||
$text['description-name']['sv-se'] = "Ange databasens namn.";
|
$text['description-name']['sv-se'] = "Ange databasens namn.";
|
||||||
$text['description-name']['uk'] = "Введіть ім'я бази даних.";
|
$text['description-name']['uk'] = "Введіть ім'я бази даних.";
|
||||||
$text['description-name']['de-at'] = "Geben Sie den Namen der Datenbank an";
|
$text['description-name']['de-at'] = "Geben Sie den Namen der Datenbank an";
|
||||||
$text['description-name']['ar-eg'] = "أدخل إسم قاعدة البيانات";
|
$text['description-name']['ar-eg'] = "أدخل إسم قاعدة البيانات";
|
||||||
|
|
||||||
$text['description-host']['en-us'] = "Enter the host name.";
|
$text['description-host']['en-us'] = "Enter the host name.";
|
||||||
$text['description-host']['es-cl'] = "Ingrese el nombre de host";
|
$text['description-host']['es-cl'] = "Ingrese el nombre de host";
|
||||||
$text['description-host']['pt-pt'] = "Introduza o nome da máquina.";
|
$text['description-host']['pt-pt'] = "Introduza o nome da máquina.";
|
||||||
$text['description-host']['fr-fr'] = "Entrer le nom de l'hôte.";
|
$text['description-host']['fr-fr'] = "Entrer le nom de l'hôte.";
|
||||||
$text['description-host']['pt-br'] = "Insira o nome da máquina ";
|
$text['description-host']['pt-br'] = "Insira o nome da máquina ";
|
||||||
$text['description-host']['pl'] = "Wprowadź nazwę hosta.";
|
$text['description-host']['pl'] = "Wprowadź nazwę hosta.";
|
||||||
$text['description-host']['sv-se'] = "Ange värdnamnet";
|
$text['description-host']['sv-se'] = "Ange värdnamnet";
|
||||||
$text['description-host']['uk'] = "Введіть ім'я хоста.";
|
$text['description-host']['uk'] = "Введіть ім'я хоста.";
|
||||||
$text['description-host']['de-at'] = "Geben Sie den Host Namen ein.";
|
$text['description-host']['de-at'] = "Geben Sie den Host Namen ein.";
|
||||||
$text['description-host']['ar-eg'] = "أدخل إسم المضيف";
|
$text['description-host']['ar-eg'] = "أدخل إسم المضيف";
|
||||||
|
|
||||||
$text['description-driver']['en-us'] = "Select the database driver.";
|
$text['description-driver']['en-us'] = "Select the database driver.";
|
||||||
$text['description-driver']['es-cl'] = "Seleccione un controlador de base de datos.";
|
$text['description-driver']['es-cl'] = "Seleccione un controlador de base de datos.";
|
||||||
$text['description-driver']['pt-pt'] = "Escolha o driver da base de dados";
|
$text['description-driver']['pt-pt'] = "Escolha o driver da base de dados";
|
||||||
$text['description-driver']['fr-fr'] = "Choisir le driver de la Base de données.";
|
$text['description-driver']['fr-fr'] = "Choisir le driver de la Base de données.";
|
||||||
$text['description-driver']['pt-br'] = "Escolha o driver da base de dados";
|
$text['description-driver']['pt-br'] = "Escolha o driver da base de dados";
|
||||||
$text['description-driver']['pl'] = "Wybierz sterownik bazy danych.";
|
$text['description-driver']['pl'] = "Wybierz sterownik bazy danych.";
|
||||||
$text['description-driver']['sv-se'] = "Välj databas drivrutin.";
|
$text['description-driver']['sv-se'] = "Välj databas drivrutin.";
|
||||||
$text['description-driver']['uk'] = "Виберіть драйвер бази даних.";
|
$text['description-driver']['uk'] = "Виберіть драйвер бази даних.";
|
||||||
$text['description-driver']['de-at'] = "Wählen Sie den Datenbank Treiber.";
|
$text['description-driver']['de-at'] = "Wählen Sie den Datenbank Treiber.";
|
||||||
$text['description-driver']['ar-eg'] = "حدد برنامج تشغيل قاعدة البيانات.";
|
$text['description-driver']['ar-eg'] = "حدد برنامج تشغيل قاعدة البيانات.";
|
||||||
|
|
||||||
$text['description-install']['en-us'] = "Select the action below you wish to perform.";
|
$text['description-install']['en-us'] = "Select the action below you wish to perform.";
|
||||||
$text['description-install']['es-cl'] = "Seleccione las accion a continuación que desea realizar.";
|
$text['description-install']['es-cl'] = "Seleccione las accion a continuación que desea realizar.";
|
||||||
$text['description-install']['pt-pt'] = "Selecione as ações abaixo você deseja executar."; //action signular needed
|
$text['description-install']['pt-pt'] = "Selecione as ações abaixo você deseja executar."; //action signular needed
|
||||||
$text['description-install']['fr-fr'] = "Sélectionnez les action ci-dessous que vous souhaitez effectuer.";
|
$text['description-install']['fr-fr'] = "Sélectionnez les action ci-dessous que vous souhaitez effectuer.";
|
||||||
$text['description-install']['pt-br'] = "Seleciona as ações abaixo que deseja executar "; //action signular needed
|
$text['description-install']['pt-br'] = "Seleciona as ações abaixo que deseja executar "; //action signular needed
|
||||||
$text['description-install']['pl'] = "Wybierz opcje, które chcesz wykonać."; //action signular needed
|
$text['description-install']['pl'] = "Wybierz opcje, które chcesz wykonać."; //action signular needed
|
||||||
$text['description-install']['sv-se'] = "Välj de åtgärder nedan som du vill utföra."; //action signular needed
|
$text['description-install']['sv-se'] = "Välj de åtgärder nedan som du vill utföra."; //action signular needed
|
||||||
$text['description-install']['uk'] = "Виберіть об’єкти для оновлення"; //action signular needed
|
$text['description-install']['uk'] = "Виберіть об’єкти для оновлення"; //action signular needed
|
||||||
$text['description-install']['de-at'] = "Wählen Sie eine Aktion."; //action signular needed
|
$text['description-install']['de-at'] = "Wählen Sie eine Aktion."; //action signular needed
|
||||||
$text['description-install']['ar-eg'] = "حدد الإجراء أدناه كنت ترغب في القيام بها.";
|
$text['description-install']['ar-eg'] = "حدد الإجراء أدناه كنت ترغب في القيام بها.";
|
||||||
|
|
||||||
$text['description-database-edit']['en-us'] = "Database connection information.";
|
$text['description-database-edit']['en-us'] = "Database connection information.";
|
||||||
$text['description-database-edit']['es-cl'] = "Información de conexión a base de datos.";
|
$text['description-database-edit']['es-cl'] = "Información de conexión a base de datos.";
|
||||||
$text['description-database-edit']['pt-pt'] = "Informação da ligação à base de dados.";
|
$text['description-database-edit']['pt-pt'] = "Informação da ligação à base de dados.";
|
||||||
$text['description-database-edit']['fr-fr'] = "Informations de connexion à la Base";
|
$text['description-database-edit']['fr-fr'] = "Informations de connexion à la Base";
|
||||||
$text['description-database-edit']['pt-br'] = "Informações da ligação na base de dados";
|
$text['description-database-edit']['pt-br'] = "Informações da ligação na base de dados";
|
||||||
$text['description-database-edit']['pl'] = "Informacje o połączeniach z bazą danych.";
|
$text['description-database-edit']['pl'] = "Informacje o połączeniach z bazą danych.";
|
||||||
$text['description-database-edit']['sv-se'] = "Information om Databasanslutning";
|
$text['description-database-edit']['sv-se'] = "Information om Databasanslutning";
|
||||||
$text['description-database-edit']['uk'] = "інформація про підключення до бази даних.";
|
$text['description-database-edit']['uk'] = "інформація про підключення до бази даних.";
|
||||||
$text['description-database-edit']['de-at'] = "Datenbank Verbindungs Information.";
|
$text['description-database-edit']['de-at'] = "Datenbank Verbindungs Information.";
|
||||||
$text['description-database-edit']['ar-eg'] = "بيانات الإتصال الخاص بقاعدة البيانات";
|
$text['description-database-edit']['ar-eg'] = "بيانات الإتصال الخاص بقاعدة البيانات";
|
||||||
|
|
||||||
$text['description-database-add']['en-us'] = "Database connection information.";
|
$text['description-database-add']['en-us'] = "Database connection information.";
|
||||||
$text['description-database-add']['es-cl'] = "Información de conexión a base de datos.";
|
$text['description-database-add']['es-cl'] = "Información de conexión a base de datos.";
|
||||||
$text['description-database-add']['pt-pt'] = "Informação da ligação à base de dados.";
|
$text['description-database-add']['pt-pt'] = "Informação da ligação à base de dados.";
|
||||||
$text['description-database-add']['fr-fr'] = "Informations de connexion à la Base.";
|
$text['description-database-add']['fr-fr'] = "Informations de connexion à la Base.";
|
||||||
$text['description-database-add']['pt-br'] = "Informações da ligação na base de dados";
|
$text['description-database-add']['pt-br'] = "Informações da ligação na base de dados";
|
||||||
$text['description-database-add']['pl'] = "Informacje o połączeniach z bazą danych.";
|
$text['description-database-add']['pl'] = "Informacje o połączeniach z bazą danych.";
|
||||||
$text['description-database-add']['sv-se'] = "Information om Databasanslutning";
|
$text['description-database-add']['sv-se'] = "Information om Databasanslutning";
|
||||||
$text['description-database-add']['uk'] = "інформація про підключення до бази даних.";
|
$text['description-database-add']['uk'] = "інформація про підключення до бази даних.";
|
||||||
$text['description-database-add']['de-at'] = "Datenbank Verbindungs Information.";
|
$text['description-database-add']['de-at'] = "Datenbank Verbindungs Information.";
|
||||||
$text['description-database-add']['ar-eg'] = "بيانات الإتصال الخاص بقاعدة البيانات";
|
$text['description-database-add']['ar-eg'] = "بيانات الإتصال الخاص بقاعدة البيانات";
|
||||||
|
|
||||||
$text['description-select_language']['en-us'] = "Please select the language you want to use";
|
$text['description-select_language']['en-us'] = "Please select the language you want to use";
|
||||||
$text['description-select_language']['es-cl'] = "Por favor, seleccione el idioma que desea utilizar";
|
$text['description-select_language']['es-cl'] = "Por favor, seleccione el idioma que desea utilizar";
|
||||||
$text['description-select_language']['pt-pt'] = "Por favor, selecione o idioma que deseja usar";
|
$text['description-select_language']['pt-pt'] = "Por favor, selecione o idioma que deseja usar";
|
||||||
$text['description-select_language']['fr-fr'] = "S'il vous plaît choisir la langue que vous souhaitez utiliser";
|
$text['description-select_language']['fr-fr'] = "S'il vous plaît choisir la langue que vous souhaitez utiliser";
|
||||||
$text['description-select_language']['pt-br'] = "Por favor, selecione o idioma que deseja usar";
|
$text['description-select_language']['pt-br'] = "Por favor, selecione o idioma que deseja usar";
|
||||||
$text['description-select_language']['pl'] = "Wybierz język, którego chcesz używać";
|
$text['description-select_language']['pl'] = "Wybierz język, którego chcesz używać";
|
||||||
$text['description-select_language']['sv-se'] = "Välj det språk du vill använda";
|
$text['description-select_language']['sv-se'] = "Välj det språk du vill använda";
|
||||||
$text['description-select_language']['uk'] = "Виберіть мову, який ви хочете використовувати";
|
$text['description-select_language']['uk'] = "Виберіть мову, який ви хочете використовувати";
|
||||||
$text['description-select_language']['de-at'] = "Bitte wählen Sie die gewünschte Sprache zu verwenden";
|
$text['description-select_language']['de-at'] = "Bitte wählen Sie die gewünschte Sprache zu verwenden";
|
||||||
$text['description-select_language']['ar-eg'] = "يرجى اختيار اللغة التي تريد استخدامها";
|
$text['description-select_language']['ar-eg'] = "يرجى اختيار اللغة التي تريد استخدامها";
|
||||||
|
|
||||||
$text['button-detect']['en-us'] = "Detect Configuration";
|
$text['button-detect']['en-us'] = "Detect Configuration";
|
||||||
$text['button-detect']['es-cl'] = "Detectar Configuración";
|
$text['button-detect']['es-cl'] = "Detectar Configuración";
|
||||||
$text['button-detect']['pt-pt'] = "Detectar Configuração";
|
$text['button-detect']['pt-pt'] = "Detectar Configuração";
|
||||||
$text['button-detect']['fr-fr'] = "Détecter Configuration";
|
$text['button-detect']['fr-fr'] = "Détecter Configuration";
|
||||||
$text['button-detect']['pt-br'] = "Detectar Configuração";
|
$text['button-detect']['pt-br'] = "Detectar Configuração";
|
||||||
$text['button-detect']['pl'] = "Wykrywanie Konfiguracja";
|
$text['button-detect']['pl'] = "Wykrywanie Konfiguracja";
|
||||||
$text['button-detect']['sv-se'] = "Detektera Konfiguration";
|
$text['button-detect']['sv-se'] = "Detektera Konfiguration";
|
||||||
$text['button-detect']['uk'] = "виявлення Конфігурація";
|
$text['button-detect']['uk'] = "виявлення Конфігурація";
|
||||||
$text['button-detect']['de-at'] = "Detect-Konfiguration";
|
$text['button-detect']['de-at'] = "Detect-Konfiguration";
|
||||||
$text['button-detect']['ar-eg'] = "كشف تكوين";
|
$text['button-detect']['ar-eg'] = "كشف تكوين";
|
||||||
|
|
||||||
$text['button-select']['en-us'] = "Select";
|
$text['button-select']['en-us'] = "Select";
|
||||||
$text['button-select']['es-cl'] = "Seleccionar";
|
$text['button-select']['es-cl'] = "Seleccionar";
|
||||||
$text['button-select']['pt-pt'] = "Selecionar";
|
$text['button-select']['pt-pt'] = "Selecionar";
|
||||||
$text['button-select']['fr-fr'] = "Sélectionner";
|
$text['button-select']['fr-fr'] = "Sélectionner";
|
||||||
$text['button-select']['pt-br'] = "Selecionar";
|
$text['button-select']['pt-br'] = "Selecionar";
|
||||||
$text['button-select']['pl'] = "Wybierz";
|
$text['button-select']['pl'] = "Wybierz";
|
||||||
$text['button-select']['sv-se'] = "Välj";
|
$text['button-select']['sv-se'] = "Välj";
|
||||||
$text['button-select']['uk'] = "вибрати";
|
$text['button-select']['uk'] = "вибрати";
|
||||||
$text['button-select']['de-at'] = "Wählen";
|
$text['button-select']['de-at'] = "Wählen";
|
||||||
$text['button-select']['ar-eg'] = "اختار";
|
$text['button-select']['ar-eg'] = "اختار";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+82
-82
@@ -1,83 +1,83 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
|
|
||||||
//detect install state
|
//detect install state
|
||||||
$install_enabled = true;
|
$install_enabled = true;
|
||||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
||||||
$install_enabled = false;
|
$install_enabled = false;
|
||||||
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
||||||
//linux
|
//linux
|
||||||
$install_enabled = false;
|
$install_enabled = false;
|
||||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
||||||
$install_enabled = false;
|
$install_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($install_enabled) {
|
if($install_enabled) {
|
||||||
header("Location: ".PROJECT_PATH."/core/install/install.php");
|
header("Location: ".PROJECT_PATH."/core/install/install.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (!if_group("superadmin")) {
|
if (!if_group("superadmin")) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//includes and title
|
//includes and title
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
$document['title'] = $text['title-install'];
|
$document['title'] = $text['title-install'];
|
||||||
|
|
||||||
echo "<b>".$text['header-install']."</b>";
|
echo "<b>".$text['header-install']."</b>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo $text['description-install'];
|
echo $text['description-install'];
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
echo "<form name='frm' method='post' action='/core/install/install.php'>\n";
|
echo "<form name='frm' method='post' action='/core/install/install.php'>\n";
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " <input id='do_ft-install' type='submit' class='btn' value='".$text['label-ft-install']."'/>";
|
echo " <input id='do_ft-install' type='submit' class='btn' value='".$text['label-ft-install']."'/>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_ft-install'>";
|
echo " <label for='do_ft-install'>";
|
||||||
echo " ".$text['description-ft-install'];
|
echo " ".$text['description-ft-install'];
|
||||||
echo " </label>\n";
|
echo " </label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+366
-366
@@ -1,367 +1,367 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
//add the required includes
|
//add the required includes
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/functions.php";
|
require_once "resources/functions.php";
|
||||||
require_once "resources/classes/text.php";
|
require_once "resources/classes/text.php";
|
||||||
|
|
||||||
//initialize variables we are going to use
|
//initialize variables we are going to use
|
||||||
$event_host = '';
|
$event_host = '';
|
||||||
$event_port = '';
|
$event_port = '';
|
||||||
$event_password = '';
|
$event_password = '';
|
||||||
$install_language = 'en-us';
|
$install_language = 'en-us';
|
||||||
$admin_username = '';
|
$admin_username = '';
|
||||||
$admin_password = '';
|
$admin_password = '';
|
||||||
$install_default_country = 'US';
|
$install_default_country = 'US';
|
||||||
$install_template_name = '';
|
$install_template_name = '';
|
||||||
$domain_name = '';
|
$domain_name = '';
|
||||||
$db_type = '';
|
$db_type = '';
|
||||||
$db_path = '';
|
$db_path = '';
|
||||||
$db_host = '';
|
$db_host = '';
|
||||||
$db_port = '';
|
$db_port = '';
|
||||||
$db_name = '';
|
$db_name = '';
|
||||||
$db_username = '';
|
$db_username = '';
|
||||||
$db_password = '';
|
$db_password = '';
|
||||||
$db_create = '';
|
$db_create = '';
|
||||||
$db_create_username = '';
|
$db_create_username = '';
|
||||||
$db_create_password = '';
|
$db_create_password = '';
|
||||||
|
|
||||||
//detect the iso country code from the locale
|
//detect the iso country code from the locale
|
||||||
//$locale = Locale::getDefault();
|
//$locale = Locale::getDefault();
|
||||||
$timezone = 'UTC';
|
$timezone = 'UTC';
|
||||||
if (is_link('/etc/localtime')) {
|
if (is_link('/etc/localtime')) {
|
||||||
// Mac OS X (and older Linuxes)
|
// Mac OS X (and older Linuxes)
|
||||||
// /etc/localtime is a symlink to the
|
// /etc/localtime is a symlink to the
|
||||||
// timezone in /usr/share/zoneinfo.
|
// timezone in /usr/share/zoneinfo.
|
||||||
$filename = readlink('/etc/localtime');
|
$filename = readlink('/etc/localtime');
|
||||||
if (strpos($filename, '/usr/share/zoneinfo/') === 0) {
|
if (strpos($filename, '/usr/share/zoneinfo/') === 0) {
|
||||||
$timezone = substr($filename, 20);
|
$timezone = substr($filename, 20);
|
||||||
}
|
}
|
||||||
} elseif (file_exists('/etc/timezone')) {
|
} elseif (file_exists('/etc/timezone')) {
|
||||||
// Ubuntu / Debian.
|
// Ubuntu / Debian.
|
||||||
$data = file_get_contents('/etc/timezone');
|
$data = file_get_contents('/etc/timezone');
|
||||||
if ($data) {
|
if ($data) {
|
||||||
$timezone = rtrim($data);
|
$timezone = rtrim($data);
|
||||||
}
|
}
|
||||||
} elseif (file_exists('/etc/sysconfig/clock')) {
|
} elseif (file_exists('/etc/sysconfig/clock')) {
|
||||||
// RHEL / CentOS
|
// RHEL / CentOS
|
||||||
$data = parse_ini_file('/etc/sysconfig/clock');
|
$data = parse_ini_file('/etc/sysconfig/clock');
|
||||||
if (!empty($data['ZONE'])) {
|
if (!empty($data['ZONE'])) {
|
||||||
$timezone = $data['ZONE'];
|
$timezone = $data['ZONE'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the time zone
|
//set the time zone
|
||||||
date_default_timezone_set($timezone);
|
date_default_timezone_set($timezone);
|
||||||
|
|
||||||
//if the config.php exists deny access to install.php
|
//if the config.php exists deny access to install.php
|
||||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//intialize variables
|
//intialize variables
|
||||||
$install_step = '';
|
$install_step = '';
|
||||||
$return_install_step = '';
|
$return_install_step = '';
|
||||||
|
|
||||||
//process the the HTTP POST
|
//process the the HTTP POST
|
||||||
if (count($_POST) > 0) {
|
if (count($_POST) > 0) {
|
||||||
$install_language = check_str($_POST["install_language"]);
|
$install_language = check_str($_POST["install_language"]);
|
||||||
$install_step = check_str($_POST["install_step"]);
|
$install_step = check_str($_POST["install_step"]);
|
||||||
$return_install_step = check_str($_POST["return_install_step"]);
|
$return_install_step = check_str($_POST["return_install_step"]);
|
||||||
if(isset($_POST["event_host"])){
|
if(isset($_POST["event_host"])){
|
||||||
$event_host = check_str($_POST["event_host"]);
|
$event_host = check_str($_POST["event_host"]);
|
||||||
$event_port = check_str($_POST["event_port"]);
|
$event_port = check_str($_POST["event_port"]);
|
||||||
$event_password = check_str($_POST["event_password"]);
|
$event_password = check_str($_POST["event_password"]);
|
||||||
}
|
}
|
||||||
if(isset($_POST["db_type"])){
|
if(isset($_POST["db_type"])){
|
||||||
$db_type = $_POST["db_type"];
|
$db_type = $_POST["db_type"];
|
||||||
$admin_username = $_POST["admin_username"];
|
$admin_username = $_POST["admin_username"];
|
||||||
$admin_password = $_POST["admin_password"];
|
$admin_password = $_POST["admin_password"];
|
||||||
$install_default_country = $_POST["install_default_country"];
|
$install_default_country = $_POST["install_default_country"];
|
||||||
$install_template_name = $_POST["install_template_name"];
|
$install_template_name = $_POST["install_template_name"];
|
||||||
$domain_name = $_POST["domain_name"];
|
$domain_name = $_POST["domain_name"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the install step if it is not set
|
//set the install step if it is not set
|
||||||
if(!$install_step) { $install_step = 'select_language'; }
|
if(!$install_step) { $install_step = 'select_language'; }
|
||||||
|
|
||||||
//set the language for the install
|
//set the language for the install
|
||||||
$_SESSION['domain']['language']['code'] = $install_language;
|
$_SESSION['domain']['language']['code'] = $install_language;
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//set a default enviroment if first_time
|
//set a default enviroment if first_time
|
||||||
//initialize some varibles to cut down on warnings
|
//initialize some varibles to cut down on warnings
|
||||||
$_SESSION['message'] = '';
|
$_SESSION['message'] = '';
|
||||||
$v_link_label_play = '';
|
$v_link_label_play = '';
|
||||||
$v_link_label_pause = '';
|
$v_link_label_pause = '';
|
||||||
$default_login = 0;
|
$default_login = 0;
|
||||||
$onload = '';
|
$onload = '';
|
||||||
|
|
||||||
//buffer the content
|
//buffer the content
|
||||||
ob_end_clean(); //clean the buffer
|
ob_end_clean(); //clean the buffer
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
if (!extension_loaded('PDO')) {
|
if (!extension_loaded('PDO')) {
|
||||||
$messages[] = "<b>PHP PDO was not detected</b>. Please install it before proceeding";
|
$messages[] = "<b>PHP PDO was not detected</b>. Please install it before proceeding";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
$msg = '';
|
$msg = '';
|
||||||
//make sure the includes directory is writable so the config.php file can be written.
|
//make sure the includes directory is writable so the config.php file can be written.
|
||||||
if (!is_writable($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/pdo.php")) {
|
if (!is_writable($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/pdo.php")) {
|
||||||
$messages[] = "<b>Write access to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."</b> and its sub-directories are required during the install.";
|
$messages[] = "<b>Write access to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."</b> and its sub-directories are required during the install.";
|
||||||
}
|
}
|
||||||
//test for selinux
|
//test for selinux
|
||||||
if (file_exists('/usr/sbin/getenforce')) {
|
if (file_exists('/usr/sbin/getenforce')) {
|
||||||
$enforcing;
|
$enforcing;
|
||||||
exec('getenforce', $enforcing);
|
exec('getenforce', $enforcing);
|
||||||
if($enforcing[0] == 'Enforcing'){
|
if($enforcing[0] == 'Enforcing'){
|
||||||
$messages[] = "<b>SELinux is enabled and enforcing</b> you must have a policy installed to let the webserver connect to the switch event socket<br/>".
|
$messages[] = "<b>SELinux is enabled and enforcing</b> you must have a policy installed to let the webserver connect to the switch event socket<br/>".
|
||||||
"<sm>You can use the following to find what ports are allowed<pre>semanage port -l | grep '^http_port_t'</pre></sm>";
|
"<sm>You can use the following to find what ports are allowed<pre>semanage port -l | grep '^http_port_t'</pre></sm>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//test for windows and non sqlite
|
//test for windows and non sqlite
|
||||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' and strlen($db_type) > 0 and $db_type !='sqlite') {
|
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' and strlen($db_type) > 0 and $db_type !='sqlite') {
|
||||||
$messages[] = "<b>Windows requires a system DSN ODBC connection</b> this must be configured.";
|
$messages[] = "<b>Windows requires a system DSN ODBC connection</b> this must be configured.";
|
||||||
}
|
}
|
||||||
|
|
||||||
//action code
|
//action code
|
||||||
if($return_install_step == 'config_detail'){
|
if($return_install_step == 'config_detail'){
|
||||||
//check for all required data
|
//check for all required data
|
||||||
$existing_errors = count($messages);
|
$existing_errors = count($messages);
|
||||||
if (strlen($admin_username) == 0) { $messages[] = "Please provide the Admin Username"; }
|
if (strlen($admin_username) == 0) { $messages[] = "Please provide the Admin Username"; }
|
||||||
if (strlen($admin_password) == 0) { $messages[] = "Please provide the Admin Password"; }
|
if (strlen($admin_password) == 0) { $messages[] = "Please provide the Admin Password"; }
|
||||||
elseif (strlen($admin_password) < 5) { $messages[] = "Please provide an Admin Password that is 5 or more characters.<br>\n"; }
|
elseif (strlen($admin_password) < 5) { $messages[] = "Please provide an Admin Password that is 5 or more characters.<br>\n"; }
|
||||||
if ( count($messages) > $existing_errors) { $install_step = 'config_detail'; }
|
if ( count($messages) > $existing_errors) { $install_step = 'config_detail'; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if($install_step =='execute') {
|
if($install_step =='execute') {
|
||||||
//set the max execution time to 1 hour
|
//set the max execution time to 1 hour
|
||||||
ini_set('max_execution_time',3600);
|
ini_set('max_execution_time',3600);
|
||||||
}
|
}
|
||||||
|
|
||||||
//display messages
|
//display messages
|
||||||
if (count($messages)>0) {
|
if (count($messages)>0) {
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "<div align='center'>\n";
|
echo "<div align='center'>\n";
|
||||||
echo "<table width='75%'>\n";
|
echo "<table width='75%'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<th align='left'>Messages</th>\n";
|
echo "<th align='left'>Messages</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='row_style1'><strong><ul>\n";
|
echo "<td class='row_style1'><strong><ul>\n";
|
||||||
foreach ($messages as $message){
|
foreach ($messages as $message){
|
||||||
echo "<li>$message</li>\n";
|
echo "<li>$message</li>\n";
|
||||||
}
|
}
|
||||||
echo "</ul></strong></td>\n";
|
echo "</ul></strong></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//includes and title
|
//includes and title
|
||||||
$document['title'] = $text['title-install'];
|
$document['title'] = $text['title-install'];
|
||||||
|
|
||||||
//view code
|
//view code
|
||||||
if($install_step == 'select_language'){
|
if($install_step == 'select_language'){
|
||||||
echo " <form method='post' name='frm' action=''>\n";
|
echo " <form method='post' name='frm' action=''>\n";
|
||||||
include "resources/page_parts/install_select_language.php";
|
include "resources/page_parts/install_select_language.php";
|
||||||
echo " <input type='hidden' name='return_install_step' value='select_language'/>\n";
|
echo " <input type='hidden' name='return_install_step' value='select_language'/>\n";
|
||||||
echo " <input type='hidden' name='install_step' value='detect_config'/>\n";
|
echo " <input type='hidden' name='install_step' value='detect_config'/>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
} elseif($install_step == 'detect_config'){
|
} elseif($install_step == 'detect_config'){
|
||||||
if(!($event_host == '' || $event_host == 'localhost' || $event_host == '::1' || $event_host == '127.0.0.1' )){
|
if(!($event_host == '' || $event_host == 'localhost' || $event_host == '::1' || $event_host == '127.0.0.1' )){
|
||||||
echo "<p><b>Warning</b> you have choosen a value other than localhost for event_host, this is unsoported at present</p>\n";
|
echo "<p><b>Warning</b> you have choosen a value other than localhost for event_host, this is unsoported at present</p>\n";
|
||||||
}
|
}
|
||||||
//if($detect_ok){
|
//if($detect_ok){
|
||||||
echo "<form method='post' name='frm' action=''>\n";
|
echo "<form method='post' name='frm' action=''>\n";
|
||||||
include "resources/page_parts/install_event_socket.php";
|
include "resources/page_parts/install_event_socket.php";
|
||||||
echo " <input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
echo " <input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
||||||
echo " <input type='hidden' name='return_install_step' value='detect_config'/>\n";
|
echo " <input type='hidden' name='return_install_step' value='detect_config'/>\n";
|
||||||
echo " <input type='hidden' name='install_step' value='config_detail'/>\n";
|
echo " <input type='hidden' name='install_step' value='config_detail'/>\n";
|
||||||
echo " <input type='hidden' name='event_host' value='$event_host'/>\n";
|
echo " <input type='hidden' name='event_host' value='$event_host'/>\n";
|
||||||
echo " <input type='hidden' name='event_port' value='$event_port'/>\n";
|
echo " <input type='hidden' name='event_port' value='$event_port'/>\n";
|
||||||
echo " <input type='hidden' name='event_password' value='$event_password'/>\n";
|
echo " <input type='hidden' name='event_password' value='$event_password'/>\n";
|
||||||
//echo " <div style='text-align:right'>\n";
|
//echo " <div style='text-align:right'>\n";
|
||||||
//echo " <button type='button' class='btn' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
|
//echo " <button type='button' class='btn' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
|
||||||
//echo " <button type='submit' class='btn' id='next'>".$text['button-next']."</button>\n";
|
//echo " <button type='submit' class='btn' id='next'>".$text['button-next']."</button>\n";
|
||||||
//echo " </div>\n";
|
//echo " </div>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
//} else {
|
//} else {
|
||||||
// echo "<form method='post' name='frm' action=''>\n";
|
// echo "<form method='post' name='frm' action=''>\n";
|
||||||
// echo " <div style='text-align:right'>\n";
|
// echo " <div style='text-align:right'>\n";
|
||||||
// echo " <button type='button' class='btn' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
|
// echo " <button type='button' class='btn' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
|
||||||
// echo " </div>\n";
|
// echo " </div>\n";
|
||||||
// echo "</form>\n";
|
// echo "</form>\n";
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
elseif($install_step == 'config_detail'){
|
elseif($install_step == 'config_detail'){
|
||||||
//get the domain
|
//get the domain
|
||||||
if(!$domain_name){
|
if(!$domain_name){
|
||||||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||||
$domain_name = $domain_array[0];
|
$domain_name = $domain_array[0];
|
||||||
}
|
}
|
||||||
include "resources/page_parts/install_config_detail.php";
|
include "resources/page_parts/install_config_detail.php";
|
||||||
}
|
}
|
||||||
elseif($install_step == 'config_database'){
|
elseif($install_step == 'config_database'){
|
||||||
include "resources/page_parts/install_config_database.php";
|
include "resources/page_parts/install_config_database.php";
|
||||||
}
|
}
|
||||||
elseif($install_step == 'execute'){
|
elseif($install_step == 'execute'){
|
||||||
echo "<p><b>".$text['header-installing']."</b></p>\n";
|
echo "<p><b>".$text['header-installing']."</b></p>\n";
|
||||||
//$protocol = 'http';
|
//$protocol = 'http';
|
||||||
//if($_SERVER['HTTPS']) { $protocol = 'https'; }
|
//if($_SERVER['HTTPS']) { $protocol = 'https'; }
|
||||||
//echo "<iframe src='$protocol://$domain_name/core/install/install_first_time.php' style='border:solid 1px #000;width:100%;height:auto'></iframe>";
|
//echo "<iframe src='$protocol://$domain_name/core/install/install_first_time.php' style='border:solid 1px #000;width:100%;height:auto'></iframe>";
|
||||||
require_once "core/install/resources/classes/detect_switch.php";
|
require_once "core/install/resources/classes/detect_switch.php";
|
||||||
$detect_switch = new detect_switch($event_host, $event_port, $event_password);
|
$detect_switch = new detect_switch($event_host, $event_port, $event_password);
|
||||||
$detect_ok = true;
|
$detect_ok = true;
|
||||||
try {
|
try {
|
||||||
$detect_switch->detect();
|
$detect_switch->detect();
|
||||||
} catch(Exception $e){
|
} catch(Exception $e){
|
||||||
//echo "<p>Failed to detect configuration detect_switch reported: " . $e->getMessage() . "</p>\n";
|
//echo "<p>Failed to detect configuration detect_switch reported: " . $e->getMessage() . "</p>\n";
|
||||||
//$detect_ok = false;
|
//$detect_ok = false;
|
||||||
}
|
}
|
||||||
if($detect_ok){
|
if($detect_ok){
|
||||||
$install_ok = true;
|
$install_ok = true;
|
||||||
echo "<pre style='text-align:left;'>\n";
|
echo "<pre style='text-align:left;'>\n";
|
||||||
function error_handler($err_severity, $errstr, $errfile, $errline ) {
|
function error_handler($err_severity, $errstr, $errfile, $errline ) {
|
||||||
if (0 === error_reporting()) { return false;}
|
if (0 === error_reporting()) { return false;}
|
||||||
switch($err_severity)
|
switch($err_severity)
|
||||||
{
|
{
|
||||||
case E_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
case E_PARSE: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_PARSE: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
case E_CORE_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_CORE_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
case E_COMPILE_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_COMPILE_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
case E_USER_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_USER_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
case E_STRICT: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_STRICT: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
case E_RECOVERABLE_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
case E_RECOVERABLE_ERROR: throw new Exception ($errstr . " in $errfile line: $errline");
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#set_error_handler("error_handler");
|
#set_error_handler("error_handler");
|
||||||
try {
|
try {
|
||||||
require_once "resources/classes/global_settings.php";
|
require_once "resources/classes/global_settings.php";
|
||||||
$global_settings = new global_settings($detect_switch, $domain_name);
|
$global_settings = new global_settings($detect_switch, $domain_name);
|
||||||
if(is_null($global_settings)){ throw new Exception("Error global_settings came back with null"); }
|
if(is_null($global_settings)){ throw new Exception("Error global_settings came back with null"); }
|
||||||
require_once "resources/classes/install_fusionpbx.php";
|
require_once "resources/classes/install_fusionpbx.php";
|
||||||
$system = new install_fusionpbx($global_settings);
|
$system = new install_fusionpbx($global_settings);
|
||||||
$system->admin_username = $admin_username;
|
$system->admin_username = $admin_username;
|
||||||
$system->admin_password = $admin_password;
|
$system->admin_password = $admin_password;
|
||||||
$system->default_country = $install_default_country;
|
$system->default_country = $install_default_country;
|
||||||
$system->install_language = $install_language;
|
$system->install_language = $install_language;
|
||||||
$system->template_name = $install_template_name;
|
$system->template_name = $install_template_name;
|
||||||
|
|
||||||
require_once "resources/classes/install_switch.php";
|
require_once "resources/classes/install_switch.php";
|
||||||
$switch = new install_switch($global_settings);
|
$switch = new install_switch($global_settings);
|
||||||
//$switch->debug = true;
|
//$switch->debug = true;
|
||||||
//$system->debug = true;
|
//$system->debug = true;
|
||||||
$switch->echo_progress = true;
|
$switch->echo_progress = true;
|
||||||
$system->echo_progress = true;
|
$system->echo_progress = true;
|
||||||
$system->install_phase_1();
|
$system->install_phase_1();
|
||||||
$switch->install_phase_1();
|
$switch->install_phase_1();
|
||||||
$system->install_phase_2();
|
$system->install_phase_2();
|
||||||
$switch->install_phase_2();
|
$switch->install_phase_2();
|
||||||
} catch(Exception $e){
|
} catch(Exception $e){
|
||||||
echo "</pre>\n";
|
echo "</pre>\n";
|
||||||
echo "<p><b>Failed to install</b><br/>" . $e->getMessage() . "</p>\n";
|
echo "<p><b>Failed to install</b><br/>" . $e->getMessage() . "</p>\n";
|
||||||
try {
|
try {
|
||||||
require_once "resources/classes/install_fusionpbx.php";
|
require_once "resources/classes/install_fusionpbx.php";
|
||||||
$system = new install_fusionpbx($global_settings);
|
$system = new install_fusionpbx($global_settings);
|
||||||
$system->remove_config();
|
$system->remove_config();
|
||||||
} catch(Exception $e){
|
} catch(Exception $e){
|
||||||
echo "<p><b>Failed to remove config:</b> " . $e->getMessage() . "</p>\n";
|
echo "<p><b>Failed to remove config:</b> " . $e->getMessage() . "</p>\n";
|
||||||
}
|
}
|
||||||
$install_ok = false;
|
$install_ok = false;
|
||||||
}
|
}
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
if($install_ok){
|
if($install_ok){
|
||||||
echo "</pre>\n";
|
echo "</pre>\n";
|
||||||
header("Location: ".PROJECT_PATH."/logout.php");
|
header("Location: ".PROJECT_PATH."/logout.php");
|
||||||
$_SESSION['message'] = 'Install complete';
|
$_SESSION['message'] = 'Install complete';
|
||||||
} else {
|
} else {
|
||||||
echo "<form method='post' name='frm' action=''>\n";
|
echo "<form method='post' name='frm' action=''>\n";
|
||||||
echo " <div style='text-align:right'>\n";
|
echo " <div style='text-align:right'>\n";
|
||||||
echo " <button type='button' class='btn' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
|
echo " <button type='button' class='btn' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
|
||||||
echo " <button type='button' class='btn' onclick=\"location.reload(true);\">".$text['button-execute']."</button>\n";
|
echo " <button type='button' class='btn' onclick=\"location.reload(true);\">".$text['button-execute']."</button>\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<p>Unkown install_step '$install_step'</p>\n";
|
echo "<p>Unkown install_step '$install_step'</p>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//initialize some defaults so we can be 'logged in'
|
//initialize some defaults so we can be 'logged in'
|
||||||
$_SESSION['username'] = 'install_enabled';
|
$_SESSION['username'] = 'install_enabled';
|
||||||
$_SESSION['permissions'][]['permission_name'] = 'superadmin';
|
$_SESSION['permissions'][]['permission_name'] = 'superadmin';
|
||||||
$_SESSION['menu'] = '';
|
$_SESSION['menu'] = '';
|
||||||
|
|
||||||
//add the content to the template and then send output
|
//add the content to the template and then send output
|
||||||
$body = ob_get_contents(); //get the output from the buffer
|
$body = ob_get_contents(); //get the output from the buffer
|
||||||
ob_end_clean(); //clean the buffer
|
ob_end_clean(); //clean the buffer
|
||||||
|
|
||||||
//set a default template
|
//set a default template
|
||||||
$default_template = 'default';
|
$default_template = 'default';
|
||||||
$_SESSION['domain']['template']['name'] = $default_template;
|
$_SESSION['domain']['template']['name'] = $default_template;
|
||||||
$_SESSION['theme']['menu_brand_type']['text'] = "text";
|
$_SESSION['theme']['menu_brand_type']['text'] = "text";
|
||||||
|
|
||||||
//set the default template path
|
//set the default template path
|
||||||
$template_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes/'.$default_template.'/template.php';
|
$template_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes/'.$default_template.'/template.php';
|
||||||
|
|
||||||
//get the content of the template
|
//get the content of the template
|
||||||
$template_content = file_get_contents($template_path);
|
$template_content = file_get_contents($template_path);
|
||||||
|
|
||||||
//replace the variables in the template
|
//replace the variables in the template
|
||||||
$template_content = str_replace ("<!--{title}-->", $document['title'], $template_content); //<!--{title}--> defined in each individual page
|
$template_content = str_replace ("<!--{title}-->", $document['title'], $template_content); //<!--{title}--> defined in each individual page
|
||||||
$template_content = str_replace ("<!--{head}-->", '', $template_content); //<!--{head}--> defined in each individual page
|
$template_content = str_replace ("<!--{head}-->", '', $template_content); //<!--{head}--> defined in each individual page
|
||||||
//$template_content = str_replace ("<!--{menu}-->", $_SESSION["menu"], $template_content); //included in the theme
|
//$template_content = str_replace ("<!--{menu}-->", $_SESSION["menu"], $template_content); //included in the theme
|
||||||
$template_content = str_replace ("<!--{body}-->", $body, $template_content); //defined in /themes/default/template.php
|
$template_content = str_replace ("<!--{body}-->", $body, $template_content); //defined in /themes/default/template.php
|
||||||
$template_content = str_replace ("<!--{project_path}-->", PROJECT_PATH, $template_content); //defined in /themes/default/template.php
|
$template_content = str_replace ("<!--{project_path}-->", PROJECT_PATH, $template_content); //defined in /themes/default/template.php
|
||||||
|
|
||||||
//get the contents of the template and save it to the template variable
|
//get the contents of the template and save it to the template variable
|
||||||
ob_start();
|
ob_start();
|
||||||
require_once "resources/classes/menu.php";
|
require_once "resources/classes/menu.php";
|
||||||
eval('?>' . $template_content . '<?php ');
|
eval('?>' . $template_content . '<?php ');
|
||||||
$content = ob_get_contents(); //get the output from the buffer
|
$content = ob_get_contents(); //get the output from the buffer
|
||||||
ob_end_clean(); //clean the buffer
|
ob_end_clean(); //clean the buffer
|
||||||
|
|
||||||
//send the content to the browser and then clear the variable
|
//send the content to the browser and then clear the variable
|
||||||
echo $content;
|
echo $content;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,170 +1,170 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2010-2015
|
Copyright (C) 2010-2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/classes/event_socket.php";
|
require_once "resources/classes/event_socket.php";
|
||||||
|
|
||||||
//define the install class
|
//define the install class
|
||||||
class detect_switch {
|
class detect_switch {
|
||||||
|
|
||||||
// cached data
|
// cached data
|
||||||
protected $_dirs;
|
protected $_dirs;
|
||||||
protected $_vdirs;
|
protected $_vdirs;
|
||||||
public function get_dirs() { return $this->_dirs; }
|
public function get_dirs() { return $this->_dirs; }
|
||||||
public function get_vdirs() { return $this->_vdirs; }
|
public function get_vdirs() { return $this->_vdirs; }
|
||||||
|
|
||||||
// version information
|
// version information
|
||||||
protected $_major;
|
protected $_major;
|
||||||
protected $_minor;
|
protected $_minor;
|
||||||
protected $_build;
|
protected $_build;
|
||||||
protected $_bits;
|
protected $_bits;
|
||||||
public function major() { return $this->_major; }
|
public function major() { return $this->_major; }
|
||||||
public function minor() { return $this->_minor; }
|
public function minor() { return $this->_minor; }
|
||||||
public function build() { return $this->_build; }
|
public function build() { return $this->_build; }
|
||||||
public function bits() { return $this->_bits; }
|
public function bits() { return $this->_bits; }
|
||||||
public function version() { return $this->_major.".".$this->_minor.".".$this->_build." (".$this->_bits.")"; }
|
public function version() { return $this->_major.".".$this->_minor.".".$this->_build." (".$this->_bits.")"; }
|
||||||
|
|
||||||
// dirs - detected by from the switch
|
// dirs - detected by from the switch
|
||||||
protected $_base_dir = '';
|
protected $_base_dir = '';
|
||||||
protected $_cache_dir = '';
|
protected $_cache_dir = '';
|
||||||
protected $_conf_dir = '';
|
protected $_conf_dir = '';
|
||||||
protected $_db_dir = '';
|
protected $_db_dir = '';
|
||||||
protected $_grammar_dir = '';
|
protected $_grammar_dir = '';
|
||||||
protected $_htdocs_dir = '';
|
protected $_htdocs_dir = '';
|
||||||
protected $_log_dir = '';
|
protected $_log_dir = '';
|
||||||
protected $_mod_dir = '';
|
protected $_mod_dir = '';
|
||||||
protected $_recordings_dir = '';
|
protected $_recordings_dir = '';
|
||||||
protected $_run_dir = '';
|
protected $_run_dir = '';
|
||||||
protected $_script_dir = '';
|
protected $_script_dir = '';
|
||||||
protected $_sounds_dir = '';
|
protected $_sounds_dir = '';
|
||||||
protected $_storage_dir = '';
|
protected $_storage_dir = '';
|
||||||
protected $_temp_dir = '';
|
protected $_temp_dir = '';
|
||||||
public function base_dir() { return $this->_base_dir; }
|
public function base_dir() { return $this->_base_dir; }
|
||||||
public function cache_dir() { return $this->_cache_dir; }
|
public function cache_dir() { return $this->_cache_dir; }
|
||||||
public function conf_dir() { return $this->_conf_dir; }
|
public function conf_dir() { return $this->_conf_dir; }
|
||||||
public function db_dir() { return $this->_db_dir; }
|
public function db_dir() { return $this->_db_dir; }
|
||||||
public function grammar_dir() { return $this->_grammar_dir; }
|
public function grammar_dir() { return $this->_grammar_dir; }
|
||||||
public function htdocs_dir() { return $this->_htdocs_dir; }
|
public function htdocs_dir() { return $this->_htdocs_dir; }
|
||||||
public function log_dir() { return $this->_log_dir; }
|
public function log_dir() { return $this->_log_dir; }
|
||||||
public function mod_dir() { return $this->_mod_dir; }
|
public function mod_dir() { return $this->_mod_dir; }
|
||||||
public function recordings_dir() { return $this->_recordings_dir; }
|
public function recordings_dir() { return $this->_recordings_dir; }
|
||||||
public function run_dir() { return $this->_run_dir; }
|
public function run_dir() { return $this->_run_dir; }
|
||||||
public function script_dir() { return $this->_script_dir; }
|
public function script_dir() { return $this->_script_dir; }
|
||||||
public function sounds_dir() { return $this->_sounds_dir; }
|
public function sounds_dir() { return $this->_sounds_dir; }
|
||||||
public function storage_dir() { return $this->_storage_dir; }
|
public function storage_dir() { return $this->_storage_dir; }
|
||||||
public function temp_dir() { return $this->_temp_dir; }
|
public function temp_dir() { return $this->_temp_dir; }
|
||||||
|
|
||||||
// virtual dirs - assumed based on the detected dirs
|
// virtual dirs - assumed based on the detected dirs
|
||||||
protected $_voicemail_vdir = '';
|
protected $_voicemail_vdir = '';
|
||||||
protected $_phrases_vdir = '';
|
protected $_phrases_vdir = '';
|
||||||
protected $_extensions_vdir = '';
|
protected $_extensions_vdir = '';
|
||||||
protected $_sip_profiles_vdir = '';
|
protected $_sip_profiles_vdir = '';
|
||||||
protected $_dialplan_vdir = '';
|
protected $_dialplan_vdir = '';
|
||||||
protected $_backup_vdir = '';
|
protected $_backup_vdir = '';
|
||||||
public function voicemail_vdir() { return $this->_voicemail_vdir; }
|
public function voicemail_vdir() { return $this->_voicemail_vdir; }
|
||||||
public function phrases_vdir() { return $this->_phrases_vdir; }
|
public function phrases_vdir() { return $this->_phrases_vdir; }
|
||||||
public function extensions_vdir() { return $this->_extensions_vdir; }
|
public function extensions_vdir() { return $this->_extensions_vdir; }
|
||||||
public function sip_profiles_vdir() { return $this->_sip_profiles_vdir; }
|
public function sip_profiles_vdir() { return $this->_sip_profiles_vdir; }
|
||||||
public function dialplan_vdir() { return $this->_dialplan_vdir; }
|
public function dialplan_vdir() { return $this->_dialplan_vdir; }
|
||||||
public function backup_vdir() { return $this->_backup_vdir; }
|
public function backup_vdir() { return $this->_backup_vdir; }
|
||||||
|
|
||||||
// event socket
|
// event socket
|
||||||
public $event_host = 'localhost';
|
public $event_host = 'localhost';
|
||||||
public $event_port = '8021';
|
public $event_port = '8021';
|
||||||
public $event_password = 'ClueCon';
|
public $event_password = 'ClueCon';
|
||||||
protected $event_socket;
|
protected $event_socket;
|
||||||
|
|
||||||
public function __construct($event_host, $event_port, $event_password) {
|
public function __construct($event_host, $event_port, $event_password) {
|
||||||
//do not take these settings from session as they be detecting a new switch
|
//do not take these settings from session as they be detecting a new switch
|
||||||
if($event_host){ $this->event_host = $event_host; }
|
if($event_host){ $this->event_host = $event_host; }
|
||||||
if($event_port){ $this->event_port = $event_port; }
|
if($event_port){ $this->event_port = $event_port; }
|
||||||
if($event_password){ $this->event_password = $event_password; }
|
if($event_password){ $this->event_password = $event_password; }
|
||||||
$this->connect_event_socket();
|
$this->connect_event_socket();
|
||||||
if(!$this->event_socket){
|
if(!$this->event_socket){
|
||||||
$this->detect_event_socket();
|
$this->detect_event_socket();
|
||||||
}
|
}
|
||||||
$this->_dirs = preg_grep ('/.*_dir$/', get_class_methods('detect_switch') );
|
$this->_dirs = preg_grep ('/.*_dir$/', get_class_methods('detect_switch') );
|
||||||
sort( $this->_dirs );
|
sort( $this->_dirs );
|
||||||
$this->_vdirs = preg_grep ('/.*_vdir$/', get_class_methods('detect_switch') );
|
$this->_vdirs = preg_grep ('/.*_vdir$/', get_class_methods('detect_switch') );
|
||||||
sort( $this->_vdirs );
|
sort( $this->_vdirs );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function detect_event_socket() {
|
protected function detect_event_socket() {
|
||||||
//perform searches for user's config here
|
//perform searches for user's config here
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detect() {
|
public function detect() {
|
||||||
$this->connect_event_socket();
|
$this->connect_event_socket();
|
||||||
if(!$this->event_socket){
|
if(!$this->event_socket){
|
||||||
throw new Exception('Failed to use event socket');
|
throw new Exception('Failed to use event socket');
|
||||||
}
|
}
|
||||||
$FS_Version = $this->event_socket_request('api version');
|
$FS_Version = $this->event_socket_request('api version');
|
||||||
preg_match("/FreeSWITCH Version (\d+)\.(\d+)\.(\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $FS_Version, $matches);
|
preg_match("/FreeSWITCH Version (\d+)\.(\d+)\.(\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $FS_Version, $matches);
|
||||||
$this->_major = $matches[1];
|
$this->_major = $matches[1];
|
||||||
$this->_minor = $matches[2];
|
$this->_minor = $matches[2];
|
||||||
$this->_build = $matches[3];
|
$this->_build = $matches[3];
|
||||||
$this->_bits = $matches[4];
|
$this->_bits = $matches[4];
|
||||||
$FS_Vars = $this->event_socket_request('api global_getvar');
|
$FS_Vars = $this->event_socket_request('api global_getvar');
|
||||||
foreach (explode("\n",$FS_Vars) as $FS_Var){
|
foreach (explode("\n",$FS_Vars) as $FS_Var){
|
||||||
preg_match("/(\w+_dir)=(.*)/", $FS_Var, $matches);
|
preg_match("/(\w+_dir)=(.*)/", $FS_Var, $matches);
|
||||||
if(count($matches) > 0 and property_exists($this, "_" . $matches[1])){
|
if(count($matches) > 0 and property_exists($this, "_" . $matches[1])){
|
||||||
$field = "_" . $matches[1];
|
$field = "_" . $matches[1];
|
||||||
$this->$field = normalize_path($matches[2]);
|
$this->$field = normalize_path($matches[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->_voicemail_vdir = normalize_path($this->_storage_dir . DIRECTORY_SEPARATOR . "voicemail");
|
$this->_voicemail_vdir = normalize_path($this->_storage_dir . DIRECTORY_SEPARATOR . "voicemail");
|
||||||
$this->_phrases_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "lang");
|
$this->_phrases_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "lang");
|
||||||
$this->_extensions_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "directory");
|
$this->_extensions_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "directory");
|
||||||
$this->_sip_profiles_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "sip_profiles");
|
$this->_sip_profiles_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "sip_profiles");
|
||||||
$this->_dialplan_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "dialplan");
|
$this->_dialplan_vdir = normalize_path($this->_conf_dir . DIRECTORY_SEPARATOR . "dialplan");
|
||||||
$this->_backup_vdir = normalize_path(sys_get_temp_dir());
|
$this->_backup_vdir = normalize_path(sys_get_temp_dir());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function connect_event_socket(){
|
protected function connect_event_socket(){
|
||||||
$esl = new event_socket;
|
$esl = new event_socket;
|
||||||
if ($esl->connect($this->event_host, $this->event_port, $this->event_password)) {
|
if ($esl->connect($this->event_host, $this->event_port, $this->event_password)) {
|
||||||
$this->event_socket = $esl->reset_fp();
|
$this->event_socket = $esl->reset_fp();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function event_socket_request($cmd) {
|
protected function event_socket_request($cmd) {
|
||||||
$esl = new event_socket($this->event_socket);
|
$esl = new event_socket($this->event_socket);
|
||||||
$result = $esl->request($cmd);
|
$result = $esl->request($cmd);
|
||||||
$esl->reset_fp();
|
$esl->reset_fp();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function restart_switch() {
|
public function restart_switch() {
|
||||||
$this->connect_event_socket();
|
$this->connect_event_socket();
|
||||||
if(!$this->event_socket){
|
if(!$this->event_socket){
|
||||||
throw new Exception('Failed to use event socket');
|
throw new Exception('Failed to use event socket');
|
||||||
}
|
}
|
||||||
$this->event_socket_request('api fsctl shutdown restart elegant');
|
$this->event_socket_request('api fsctl shutdown restart elegant');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,214 +1,214 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2010-2015
|
Copyright (C) 2010-2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
|
|
||||||
//define the install class
|
//define the install class
|
||||||
class global_settings {
|
class global_settings {
|
||||||
|
|
||||||
// cached data
|
// cached data
|
||||||
protected $_switch_dirs;
|
protected $_switch_dirs;
|
||||||
protected $_switch_vdirs;
|
protected $_switch_vdirs;
|
||||||
public function get_switch_dirs() { return $this->_switch_dirs; }
|
public function get_switch_dirs() { return $this->_switch_dirs; }
|
||||||
public function get_switch_vdirs() { return $this->_switch_vdirs; }
|
public function get_switch_vdirs() { return $this->_switch_vdirs; }
|
||||||
|
|
||||||
// dirs - detected from the switch
|
// dirs - detected from the switch
|
||||||
protected $_switch_base_dir = '';
|
protected $_switch_base_dir = '';
|
||||||
protected $_switch_cache_dir = '';
|
protected $_switch_cache_dir = '';
|
||||||
protected $_switch_conf_dir = '';
|
protected $_switch_conf_dir = '';
|
||||||
protected $_switch_db_dir = '';
|
protected $_switch_db_dir = '';
|
||||||
protected $_switch_grammar_dir = '';
|
protected $_switch_grammar_dir = '';
|
||||||
protected $_switch_htdocs_dir = '';
|
protected $_switch_htdocs_dir = '';
|
||||||
protected $_switch_log_dir = '';
|
protected $_switch_log_dir = '';
|
||||||
protected $_switch_mod_dir = '';
|
protected $_switch_mod_dir = '';
|
||||||
protected $_switch_recordings_dir = '';
|
protected $_switch_recordings_dir = '';
|
||||||
protected $_switch_run_dir = '';
|
protected $_switch_run_dir = '';
|
||||||
protected $_switch_script_dir = '';
|
protected $_switch_script_dir = '';
|
||||||
protected $_switch_sounds_dir = '';
|
protected $_switch_sounds_dir = '';
|
||||||
protected $_switch_storage_dir = '';
|
protected $_switch_storage_dir = '';
|
||||||
protected $_switch_temp_dir = '';
|
protected $_switch_temp_dir = '';
|
||||||
public function switch_base_dir() { return $this->_switch_base_dir; }
|
public function switch_base_dir() { return $this->_switch_base_dir; }
|
||||||
public function switch_cache_dir() { return $this->_switch_cache_dir; }
|
public function switch_cache_dir() { return $this->_switch_cache_dir; }
|
||||||
public function switch_conf_dir() { return $this->_switch_conf_dir; }
|
public function switch_conf_dir() { return $this->_switch_conf_dir; }
|
||||||
public function switch_db_dir() { return $this->_switch_db_dir; }
|
public function switch_db_dir() { return $this->_switch_db_dir; }
|
||||||
public function switch_grammar_dir() { return $this->_switch_grammar_dir; }
|
public function switch_grammar_dir() { return $this->_switch_grammar_dir; }
|
||||||
public function switch_htdocs_dir() { return $this->_switch_htdocs_dir; }
|
public function switch_htdocs_dir() { return $this->_switch_htdocs_dir; }
|
||||||
public function switch_log_dir() { return $this->_switch_log_dir; }
|
public function switch_log_dir() { return $this->_switch_log_dir; }
|
||||||
public function switch_mod_dir() { return $this->_switch_mod_dir; }
|
public function switch_mod_dir() { return $this->_switch_mod_dir; }
|
||||||
public function switch_recordings_dir() { return $this->_switch_recordings_dir; }
|
public function switch_recordings_dir() { return $this->_switch_recordings_dir; }
|
||||||
public function switch_run_dir() { return $this->_switch_run_dir; }
|
public function switch_run_dir() { return $this->_switch_run_dir; }
|
||||||
public function switch_script_dir() { return $this->_switch_script_dir; }
|
public function switch_script_dir() { return $this->_switch_script_dir; }
|
||||||
public function switch_sounds_dir() { return $this->_switch_sounds_dir; }
|
public function switch_sounds_dir() { return $this->_switch_sounds_dir; }
|
||||||
public function switch_storage_dir() { return $this->_switch_storage_dir; }
|
public function switch_storage_dir() { return $this->_switch_storage_dir; }
|
||||||
public function switch_temp_dir() { return $this->_switch_temp_dir; }
|
public function switch_temp_dir() { return $this->_switch_temp_dir; }
|
||||||
|
|
||||||
// virtual dirs - assumed based on the detected dirs
|
// virtual dirs - assumed based on the detected dirs
|
||||||
protected $_switch_voicemail_vdir = '';
|
protected $_switch_voicemail_vdir = '';
|
||||||
protected $_switch_phrases_vdir = '';
|
protected $_switch_phrases_vdir = '';
|
||||||
protected $_switch_extensions_vdir = '';
|
protected $_switch_extensions_vdir = '';
|
||||||
protected $_switch_sip_profiles_vdir = '';
|
protected $_switch_sip_profiles_vdir = '';
|
||||||
protected $_switch_dialplan_vdir = '';
|
protected $_switch_dialplan_vdir = '';
|
||||||
protected $_switch_backup_vdir = '';
|
protected $_switch_backup_vdir = '';
|
||||||
public function switch_voicemail_vdir() { return $this->_switch_voicemail_vdir; }
|
public function switch_voicemail_vdir() { return $this->_switch_voicemail_vdir; }
|
||||||
public function switch_phrases_vdir() { return $this->_switch_phrases_vdir; }
|
public function switch_phrases_vdir() { return $this->_switch_phrases_vdir; }
|
||||||
public function switch_extensions_vdir() { return $this->_switch_extensions_vdir; }
|
public function switch_extensions_vdir() { return $this->_switch_extensions_vdir; }
|
||||||
public function switch_sip_profiles_vdir() { return $this->_switch_sip_profiles_vdir; }
|
public function switch_sip_profiles_vdir() { return $this->_switch_sip_profiles_vdir; }
|
||||||
public function switch_dialplan_vdir() { return $this->_switch_dialplan_vdir; }
|
public function switch_dialplan_vdir() { return $this->_switch_dialplan_vdir; }
|
||||||
public function switch_backup_vdir() { return $this->_switch_backup_vdir; }
|
public function switch_backup_vdir() { return $this->_switch_backup_vdir; }
|
||||||
|
|
||||||
// event socket
|
// event socket
|
||||||
protected $_switch_event_host;
|
protected $_switch_event_host;
|
||||||
protected $_switch_event_port;
|
protected $_switch_event_port;
|
||||||
protected $_switch_event_password;
|
protected $_switch_event_password;
|
||||||
public function switch_event_host() { return $this->_switch_event_host; }
|
public function switch_event_host() { return $this->_switch_event_host; }
|
||||||
public function switch_event_port() { return $this->_switch_event_port; }
|
public function switch_event_port() { return $this->_switch_event_port; }
|
||||||
public function switch_event_password() { return $this->_switch_event_password; }
|
public function switch_event_password() { return $this->_switch_event_password; }
|
||||||
|
|
||||||
// database information
|
// database information
|
||||||
protected $_db_type;
|
protected $_db_type;
|
||||||
protected $_db_path;
|
protected $_db_path;
|
||||||
protected $_db_host;
|
protected $_db_host;
|
||||||
protected $_db_port;
|
protected $_db_port;
|
||||||
protected $_db_name;
|
protected $_db_name;
|
||||||
protected $_db_username;
|
protected $_db_username;
|
||||||
protected $_db_password;
|
protected $_db_password;
|
||||||
protected $_db_create;
|
protected $_db_create;
|
||||||
protected $_db_create_username;
|
protected $_db_create_username;
|
||||||
protected $_db_create_password;
|
protected $_db_create_password;
|
||||||
public function db_type() { return $this->_db_type; }
|
public function db_type() { return $this->_db_type; }
|
||||||
public function db_path() { return $this->_db_path; }
|
public function db_path() { return $this->_db_path; }
|
||||||
public function db_host() { return $this->_db_host; }
|
public function db_host() { return $this->_db_host; }
|
||||||
public function db_port() { return $this->_db_port; }
|
public function db_port() { return $this->_db_port; }
|
||||||
public function db_name() { return $this->_db_name; }
|
public function db_name() { return $this->_db_name; }
|
||||||
public function db_username() { return $this->_db_username; }
|
public function db_username() { return $this->_db_username; }
|
||||||
public function db_password() { return $this->_db_password; }
|
public function db_password() { return $this->_db_password; }
|
||||||
public function db_create() { return $this->_db_create; }
|
public function db_create() { return $this->_db_create; }
|
||||||
public function db_create_username() { return $this->_db_create_username; }
|
public function db_create_username() { return $this->_db_create_username; }
|
||||||
public function db_create_password() { return $this->_db_create_password; }
|
public function db_create_password() { return $this->_db_create_password; }
|
||||||
|
|
||||||
//misc information
|
//misc information
|
||||||
protected $_domain_uuid;
|
protected $_domain_uuid;
|
||||||
protected $_domain_name;
|
protected $_domain_name;
|
||||||
protected $_domain_count;
|
protected $_domain_count;
|
||||||
public function domain_uuid() { return $this->_domain_uuid; }
|
public function domain_uuid() { return $this->_domain_uuid; }
|
||||||
public function domain_name() { return $this->_domain_name; }
|
public function domain_name() { return $this->_domain_name; }
|
||||||
public function domain_count() { return $this->_domain_count; }
|
public function domain_count() { return $this->_domain_count; }
|
||||||
public function set_domain_uuid($domain_uuid) {
|
public function set_domain_uuid($domain_uuid) {
|
||||||
$e = new Exception();
|
$e = new Exception();
|
||||||
$trace = $e->getTrace();
|
$trace = $e->getTrace();
|
||||||
if($trace[1]['function'] != 'create_domain'){
|
if($trace[1]['function'] != 'create_domain'){
|
||||||
throw new Exception('Only create_domain is allowed to update the domain_uuid');
|
throw new Exception('Only create_domain is allowed to update the domain_uuid');
|
||||||
}
|
}
|
||||||
$this->_domain_uuid = $domain_uuid;
|
$this->_domain_uuid = $domain_uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct($detect_switch = null, $domain_name = null, $domain_uuid = null) {
|
public function __construct($detect_switch = null, $domain_name = null, $domain_uuid = null) {
|
||||||
$this->_switch_dirs = preg_grep ('/^switch_.*_dir$/', get_class_methods('global_settings') );
|
$this->_switch_dirs = preg_grep ('/^switch_.*_dir$/', get_class_methods('global_settings') );
|
||||||
sort( $this->_switch_dirs );
|
sort( $this->_switch_dirs );
|
||||||
$this->_switch_vdirs = preg_grep ('/^switch_.*_vdir$/', get_class_methods('global_settings') );
|
$this->_switch_vdirs = preg_grep ('/^switch_.*_vdir$/', get_class_methods('global_settings') );
|
||||||
sort( $this->_switch_vdirs );
|
sort( $this->_switch_vdirs );
|
||||||
if(is_null($detect_switch)){
|
if(is_null($detect_switch)){
|
||||||
//take settings from session
|
//take settings from session
|
||||||
foreach ($this->_switch_dirs as $dir){
|
foreach ($this->_switch_dirs as $dir){
|
||||||
$category = 'switch';
|
$category = 'switch';
|
||||||
$session_var;
|
$session_var;
|
||||||
preg_match( '/^switch_(.*)_dir$/', $dir, $session_var);
|
preg_match( '/^switch_(.*)_dir$/', $dir, $session_var);
|
||||||
$dir = "_$dir";
|
$dir = "_$dir";
|
||||||
if($session_var[1] == 'script'){ $session_var[1] = 'scripts'; }
|
if($session_var[1] == 'script'){ $session_var[1] = 'scripts'; }
|
||||||
if($session_var[1] == 'temp'){ $category = 'server'; }
|
if($session_var[1] == 'temp'){ $category = 'server'; }
|
||||||
$this->$dir = $_SESSION[$category][$session_var[1]]['dir'];
|
$this->$dir = $_SESSION[$category][$session_var[1]]['dir'];
|
||||||
}
|
}
|
||||||
foreach ($this->_switch_vdirs as $vdir){
|
foreach ($this->_switch_vdirs as $vdir){
|
||||||
$category = 'switch';
|
$category = 'switch';
|
||||||
$session_var;
|
$session_var;
|
||||||
preg_match( '/^switch_(.*)_vdir$/', $vdir, $session_var);
|
preg_match( '/^switch_(.*)_vdir$/', $vdir, $session_var);
|
||||||
$vdir = "_$vdir";
|
$vdir = "_$vdir";
|
||||||
if($session_var[1] == 'backup'){ $category = 'server'; }
|
if($session_var[1] == 'backup'){ $category = 'server'; }
|
||||||
$this->$vdir = $_SESSION[$category][$session_var[1]]['dir'];
|
$this->$vdir = $_SESSION[$category][$session_var[1]]['dir'];
|
||||||
}
|
}
|
||||||
$this->_switch_event_host = $_SESSION['event_socket_ip_address'];
|
$this->_switch_event_host = $_SESSION['event_socket_ip_address'];
|
||||||
$this->_switch_event_port = $_SESSION['event_socket_port'];
|
$this->_switch_event_port = $_SESSION['event_socket_port'];
|
||||||
$this->_switch_event_password = $_SESSION['event_socket_password'];
|
$this->_switch_event_password = $_SESSION['event_socket_password'];
|
||||||
|
|
||||||
// domain info
|
// domain info
|
||||||
$this->_domain_name = $_SESSION['domain_name'];
|
$this->_domain_name = $_SESSION['domain_name'];
|
||||||
$this->_domain_uuid = $_SESSION['domain_uuid'];
|
$this->_domain_uuid = $_SESSION['domain_uuid'];
|
||||||
|
|
||||||
// collect misc info
|
// collect misc info
|
||||||
$this->_domain_count = count($_SESSION["domains"]);
|
$this->_domain_count = count($_SESSION["domains"]);
|
||||||
|
|
||||||
// collect db_info
|
// collect db_info
|
||||||
global $db_type, $db_path, $db_host, $db_port, $db_name, $db_username, $db_password;
|
global $db_type, $db_path, $db_host, $db_port, $db_name, $db_username, $db_password;
|
||||||
$this->_db_type = $db_type;
|
$this->_db_type = $db_type;
|
||||||
$this->_db_path = $db_path;
|
$this->_db_path = $db_path;
|
||||||
$this->_db_host = $db_host;
|
$this->_db_host = $db_host;
|
||||||
$this->_db_port = $db_port;
|
$this->_db_port = $db_port;
|
||||||
$this->_db_name = $db_name;
|
$this->_db_name = $db_name;
|
||||||
$this->_db_username = $db_username;
|
$this->_db_username = $db_username;
|
||||||
$this->_db_password = $db_password;
|
$this->_db_password = $db_password;
|
||||||
|
|
||||||
}elseif(!is_a($detect_switch, 'detect_switch')){
|
}elseif(!is_a($detect_switch, 'detect_switch')){
|
||||||
throw new Exception('The parameter $detect_switch must be a detect_switch object (or a subclass of)');
|
throw new Exception('The parameter $detect_switch must be a detect_switch object (or a subclass of)');
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//copy from detect_switch
|
//copy from detect_switch
|
||||||
foreach($detect_switch->get_dirs() as $dir){
|
foreach($detect_switch->get_dirs() as $dir){
|
||||||
$t_dir = "_switch_$dir";
|
$t_dir = "_switch_$dir";
|
||||||
$this->$t_dir = $detect_switch->$dir();
|
$this->$t_dir = $detect_switch->$dir();
|
||||||
}
|
}
|
||||||
foreach($detect_switch->get_vdirs() as $vdir){
|
foreach($detect_switch->get_vdirs() as $vdir){
|
||||||
$t_vdir = "_switch_$vdir";
|
$t_vdir = "_switch_$vdir";
|
||||||
$this->$t_vdir = $detect_switch->$vdir();
|
$this->$t_vdir = $detect_switch->$vdir();
|
||||||
}
|
}
|
||||||
$this->_switch_event_host = $detect_switch->event_host;
|
$this->_switch_event_host = $detect_switch->event_host;
|
||||||
$this->_switch_event_port = $detect_switch->event_port;
|
$this->_switch_event_port = $detect_switch->event_port;
|
||||||
$this->_switch_event_password = $detect_switch->event_password;
|
$this->_switch_event_password = $detect_switch->event_password;
|
||||||
|
|
||||||
//copy from _POST
|
//copy from _POST
|
||||||
foreach($_POST as $key=>$value){
|
foreach($_POST as $key=>$value){
|
||||||
if(substr($key,0,3) == "db_"){
|
if(substr($key,0,3) == "db_"){
|
||||||
$o_key = "_$key";
|
$o_key = "_$key";
|
||||||
$this->$o_key = $value;
|
$this->$o_key = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($this->_db_create and strlen($this->_db_create_username) == 0)
|
if($this->_db_create and strlen($this->_db_create_username) == 0)
|
||||||
{
|
{
|
||||||
$this->_db_create_username = $this->_db_username;
|
$this->_db_create_username = $this->_db_username;
|
||||||
$this->_db_create_password = $this->_db_password;
|
$this->_db_create_password = $this->_db_password;
|
||||||
}
|
}
|
||||||
if (strlen($this->_db_port) == 0) { $this->_db_port = "5432"; }
|
if (strlen($this->_db_port) == 0) { $this->_db_port = "5432"; }
|
||||||
|
|
||||||
// domain info
|
// domain info
|
||||||
if(strlen($domain_uuid) == 0){ $domain_uuid = uuid(); }
|
if(strlen($domain_uuid) == 0){ $domain_uuid = uuid(); }
|
||||||
$this->_domain_name = $domain_name;
|
$this->_domain_name = $domain_name;
|
||||||
$this->_domain_uuid = $domain_uuid;
|
$this->_domain_uuid = $domain_uuid;
|
||||||
|
|
||||||
//collect misc info
|
//collect misc info
|
||||||
$this->_domain_count = 1; //assumed to be one
|
$this->_domain_count = 1; //assumed to be one
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,146 +1,146 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Copyright (C) 2010-2015
|
Copyright (C) 2010-2015
|
||||||
All Rights Reserved.
|
All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
|
|
||||||
//define the install class
|
//define the install class
|
||||||
class install_switch {
|
class install_switch {
|
||||||
|
|
||||||
protected $global_settings;
|
protected $global_settings;
|
||||||
protected $dbh;
|
protected $dbh;
|
||||||
|
|
||||||
public $debug = false;
|
public $debug = false;
|
||||||
public $echo_progress = false;
|
public $echo_progress = false;
|
||||||
|
|
||||||
function __construct($global_settings) {
|
function __construct($global_settings) {
|
||||||
if(is_null($global_settings)){
|
if(is_null($global_settings)){
|
||||||
require_once "core/install/resources/classes/global_settings.php";
|
require_once "core/install/resources/classes/global_settings.php";
|
||||||
$global_settings = new global_settings();
|
$global_settings = new global_settings();
|
||||||
}elseif(!is_a($global_settings, 'global_settings')){
|
}elseif(!is_a($global_settings, 'global_settings')){
|
||||||
throw new Exception('The parameter $global_settings must be a global_settings object (or a subclass of)');
|
throw new Exception('The parameter $global_settings must be a global_settings object (or a subclass of)');
|
||||||
}
|
}
|
||||||
$this->global_settings = $global_settings;
|
$this->global_settings = $global_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
//utility Functions
|
//utility Functions
|
||||||
function write_debug($message) {
|
function write_debug($message) {
|
||||||
if($this->debug){
|
if($this->debug){
|
||||||
echo "$message\n";
|
echo "$message\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function write_progress($message) {
|
function write_progress($message) {
|
||||||
if($this->echo_progress){
|
if($this->echo_progress){
|
||||||
echo "$message\n";
|
echo "$message\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function backup_dir($dir, $backup_name){
|
protected function backup_dir($dir, $backup_name){
|
||||||
if (!is_readable($dir)) {
|
if (!is_readable($dir)) {
|
||||||
throw new Exception("backup_dir() source directory '".$dir."' does not exist.");
|
throw new Exception("backup_dir() source directory '".$dir."' does not exist.");
|
||||||
}
|
}
|
||||||
$dst_tar = join( DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), "$backup_name.tar"));
|
$dst_tar = join( DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), "$backup_name.tar"));
|
||||||
//pharData is the correct way to do it, but it keeps creating incomplete archives
|
//pharData is the correct way to do it, but it keeps creating incomplete archives
|
||||||
//$tar = new PharData($dst_tar);
|
//$tar = new PharData($dst_tar);
|
||||||
//$tar->buildFromDirectory($dir);
|
//$tar->buildFromDirectory($dir);
|
||||||
$this->write_debug("backing up to $dst_tar");
|
$this->write_debug("backing up to $dst_tar");
|
||||||
if (file_exists('/bin/tar')) {
|
if (file_exists('/bin/tar')) {
|
||||||
exec('tar -cvf ' .$dst_tar. ' -C '.$dir .' .');
|
exec('tar -cvf ' .$dst_tar. ' -C '.$dir .' .');
|
||||||
}else{
|
}else{
|
||||||
$this->write_debug('WARN: old config could not be compressed');
|
$this->write_debug('WARN: old config could not be compressed');
|
||||||
$dst_dir = join( DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), "$backup_name"));
|
$dst_dir = join( DIRECTORY_SEPARATOR, array(sys_get_temp_dir(), "$backup_name"));
|
||||||
recursive_copy($dir, $dst_dir);
|
recursive_copy($dir, $dst_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_phase_1() {
|
function install_phase_1() {
|
||||||
$this->write_progress("Install phase 1 started for switch");
|
$this->write_progress("Install phase 1 started for switch");
|
||||||
$this->copy_conf();
|
$this->copy_conf();
|
||||||
$this->write_progress("Install phase 1 completed for switch");
|
$this->write_progress("Install phase 1 completed for switch");
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_phase_2() {
|
function install_phase_2() {
|
||||||
$this->write_progress("Install phase 2 started for switch");
|
$this->write_progress("Install phase 2 started for switch");
|
||||||
$this->restart_switch();
|
$this->restart_switch();
|
||||||
$this->write_progress("Install phase 2 completed for switch");
|
$this->write_progress("Install phase 2 completed for switch");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function copy_conf() {
|
protected function copy_conf() {
|
||||||
//send a message
|
//send a message
|
||||||
$this->write_progress("\tCopying Config");
|
$this->write_progress("\tCopying Config");
|
||||||
|
|
||||||
//make a backup of the config
|
//make a backup of the config
|
||||||
if (file_exists($this->global_settings->switch_conf_dir())) {
|
if (file_exists($this->global_settings->switch_conf_dir())) {
|
||||||
$this->backup_dir($this->global_settings->switch_conf_dir(), 'fusionpbx_switch_config');
|
$this->backup_dir($this->global_settings->switch_conf_dir(), 'fusionpbx_switch_config');
|
||||||
recursive_delete($this->global_settings->switch_conf_dir());
|
recursive_delete($this->global_settings->switch_conf_dir());
|
||||||
}
|
}
|
||||||
|
|
||||||
//make sure the conf directory exists
|
//make sure the conf directory exists
|
||||||
if (!is_dir($this->global_settings->switch_conf_dir())) {
|
if (!is_dir($this->global_settings->switch_conf_dir())) {
|
||||||
if (!mkdir($this->global_settings->switch_conf_dir(), 0774, true)) {
|
if (!mkdir($this->global_settings->switch_conf_dir(), 0774, true)) {
|
||||||
throw new Exception("Failed to create the switch conf directory '".$this->global_settings->switch_conf_dir()."'. ");
|
throw new Exception("Failed to create the switch conf directory '".$this->global_settings->switch_conf_dir()."'. ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy resources/templates/conf to the freeswitch conf dir
|
//copy resources/templates/conf to the freeswitch conf dir
|
||||||
if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf')){
|
if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf')){
|
||||||
$src_dir = "/usr/share/examples/fusionpbx/resources/templates/conf";
|
$src_dir = "/usr/share/examples/fusionpbx/resources/templates/conf";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/conf";
|
$src_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/conf";
|
||||||
}
|
}
|
||||||
$dst_dir = $this->global_settings->switch_conf_dir();
|
$dst_dir = $this->global_settings->switch_conf_dir();
|
||||||
if (is_readable($dst_dir)) {
|
if (is_readable($dst_dir)) {
|
||||||
recursive_copy($src_dir, $dst_dir);
|
recursive_copy($src_dir, $dst_dir);
|
||||||
unset($src_dir, $dst_dir);
|
unset($src_dir, $dst_dir);
|
||||||
}
|
}
|
||||||
$fax_dir = join( DIRECTORY_SEPARATOR, array($this->global_settings->switch_storage_dir(), 'fax'));
|
$fax_dir = join( DIRECTORY_SEPARATOR, array($this->global_settings->switch_storage_dir(), 'fax'));
|
||||||
if (!is_readable($fax_dir)) { mkdir($fax_dir,0777,true); }
|
if (!is_readable($fax_dir)) { mkdir($fax_dir,0777,true); }
|
||||||
$voicemail_dir = join( DIRECTORY_SEPARATOR, array($this->global_settings->switch_storage_dir(), 'voicemail'));
|
$voicemail_dir = join( DIRECTORY_SEPARATOR, array($this->global_settings->switch_storage_dir(), 'voicemail'));
|
||||||
if (!is_readable($voicemail_dir)) { mkdir($voicemail_dir,0777,true); }
|
if (!is_readable($voicemail_dir)) { mkdir($voicemail_dir,0777,true); }
|
||||||
|
|
||||||
//write the xml_cdr.conf.xml file
|
//write the xml_cdr.conf.xml file
|
||||||
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/xml_cdr")) {
|
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/xml_cdr")) {
|
||||||
xml_cdr_conf_xml();
|
xml_cdr_conf_xml();
|
||||||
}
|
}
|
||||||
|
|
||||||
//write the switch.conf.xml file
|
//write the switch.conf.xml file
|
||||||
if (file_exists($this->global_settings->switch_conf_dir())) {
|
if (file_exists($this->global_settings->switch_conf_dir())) {
|
||||||
switch_conf_xml();
|
switch_conf_xml();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function restart_switch() {
|
protected function restart_switch() {
|
||||||
$esl = new event_socket;
|
$esl = new event_socket;
|
||||||
if(!$esl->connect($this->global_settings->switch_event_host(), $this->global_settings->switch_event_port(), $this->global_settings->switch_event_password())) {
|
if(!$esl->connect($this->global_settings->switch_event_host(), $this->global_settings->switch_event_port(), $this->global_settings->switch_event_password())) {
|
||||||
throw new Exception("Failed to connect to switch");
|
throw new Exception("Failed to connect to switch");
|
||||||
}
|
}
|
||||||
if (!$esl->request('api fsctl shutdown restart elegant')){
|
if (!$esl->request('api fsctl shutdown restart elegant')){
|
||||||
throw new Exception("Failed to send switch restart");
|
throw new Exception("Failed to send switch restart");
|
||||||
}
|
}
|
||||||
$esl->reset_fp();
|
$esl->reset_fp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,252 +1,252 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$iso_countries = array
|
$iso_countries = array
|
||||||
(
|
(
|
||||||
'AF' => 'Afghanistan',
|
'AF' => 'Afghanistan',
|
||||||
'AX' => 'Aland Islands',
|
'AX' => 'Aland Islands',
|
||||||
'AL' => 'Albania',
|
'AL' => 'Albania',
|
||||||
'DZ' => 'Algeria',
|
'DZ' => 'Algeria',
|
||||||
'AS' => 'American Samoa',
|
'AS' => 'American Samoa',
|
||||||
'AD' => 'Andorra',
|
'AD' => 'Andorra',
|
||||||
'AO' => 'Angola',
|
'AO' => 'Angola',
|
||||||
'AI' => 'Anguilla',
|
'AI' => 'Anguilla',
|
||||||
'AQ' => 'Antarctica',
|
'AQ' => 'Antarctica',
|
||||||
'AG' => 'Antigua And Barbuda',
|
'AG' => 'Antigua And Barbuda',
|
||||||
'AR' => 'Argentina',
|
'AR' => 'Argentina',
|
||||||
'AM' => 'Armenia',
|
'AM' => 'Armenia',
|
||||||
'AW' => 'Aruba',
|
'AW' => 'Aruba',
|
||||||
'AU' => 'Australia',
|
'AU' => 'Australia',
|
||||||
'AT' => 'Austria',
|
'AT' => 'Austria',
|
||||||
'AZ' => 'Azerbaijan',
|
'AZ' => 'Azerbaijan',
|
||||||
'BS' => 'Bahamas',
|
'BS' => 'Bahamas',
|
||||||
'BH' => 'Bahrain',
|
'BH' => 'Bahrain',
|
||||||
'BD' => 'Bangladesh',
|
'BD' => 'Bangladesh',
|
||||||
'BB' => 'Barbados',
|
'BB' => 'Barbados',
|
||||||
'BY' => 'Belarus',
|
'BY' => 'Belarus',
|
||||||
'BE' => 'Belgium',
|
'BE' => 'Belgium',
|
||||||
'BZ' => 'Belize',
|
'BZ' => 'Belize',
|
||||||
'BJ' => 'Benin',
|
'BJ' => 'Benin',
|
||||||
'BM' => 'Bermuda',
|
'BM' => 'Bermuda',
|
||||||
'BT' => 'Bhutan',
|
'BT' => 'Bhutan',
|
||||||
'BO' => 'Bolivia',
|
'BO' => 'Bolivia',
|
||||||
'BA' => 'Bosnia And Herzegovina',
|
'BA' => 'Bosnia And Herzegovina',
|
||||||
'BW' => 'Botswana',
|
'BW' => 'Botswana',
|
||||||
'BV' => 'Bouvet Island',
|
'BV' => 'Bouvet Island',
|
||||||
'BR' => 'Brazil',
|
'BR' => 'Brazil',
|
||||||
'IO' => 'British Indian Ocean Territory',
|
'IO' => 'British Indian Ocean Territory',
|
||||||
'BN' => 'Brunei Darussalam',
|
'BN' => 'Brunei Darussalam',
|
||||||
'BG' => 'Bulgaria',
|
'BG' => 'Bulgaria',
|
||||||
'BF' => 'Burkina Faso',
|
'BF' => 'Burkina Faso',
|
||||||
'BI' => 'Burundi',
|
'BI' => 'Burundi',
|
||||||
'KH' => 'Cambodia',
|
'KH' => 'Cambodia',
|
||||||
'CM' => 'Cameroon',
|
'CM' => 'Cameroon',
|
||||||
'CA' => 'Canada',
|
'CA' => 'Canada',
|
||||||
'CV' => 'Cape Verde',
|
'CV' => 'Cape Verde',
|
||||||
'KY' => 'Cayman Islands',
|
'KY' => 'Cayman Islands',
|
||||||
'CF' => 'Central African Republic',
|
'CF' => 'Central African Republic',
|
||||||
'TD' => 'Chad',
|
'TD' => 'Chad',
|
||||||
'CL' => 'Chile',
|
'CL' => 'Chile',
|
||||||
'CN' => 'China',
|
'CN' => 'China',
|
||||||
'CX' => 'Christmas Island',
|
'CX' => 'Christmas Island',
|
||||||
'CC' => 'Cocos (Keeling) Islands',
|
'CC' => 'Cocos (Keeling) Islands',
|
||||||
'CO' => 'Colombia',
|
'CO' => 'Colombia',
|
||||||
'KM' => 'Comoros',
|
'KM' => 'Comoros',
|
||||||
'CG' => 'Congo',
|
'CG' => 'Congo',
|
||||||
'CD' => 'Congo, Democratic Republic',
|
'CD' => 'Congo, Democratic Republic',
|
||||||
'CK' => 'Cook Islands',
|
'CK' => 'Cook Islands',
|
||||||
'CR' => 'Costa Rica',
|
'CR' => 'Costa Rica',
|
||||||
'CI' => 'Cote D\'Ivoire',
|
'CI' => 'Cote D\'Ivoire',
|
||||||
'HR' => 'Croatia',
|
'HR' => 'Croatia',
|
||||||
'CU' => 'Cuba',
|
'CU' => 'Cuba',
|
||||||
'CY' => 'Cyprus',
|
'CY' => 'Cyprus',
|
||||||
'CZ' => 'Czech Republic',
|
'CZ' => 'Czech Republic',
|
||||||
'DK' => 'Denmark',
|
'DK' => 'Denmark',
|
||||||
'DJ' => 'Djibouti',
|
'DJ' => 'Djibouti',
|
||||||
'DM' => 'Dominica',
|
'DM' => 'Dominica',
|
||||||
'DO' => 'Dominican Republic',
|
'DO' => 'Dominican Republic',
|
||||||
'EC' => 'Ecuador',
|
'EC' => 'Ecuador',
|
||||||
'EG' => 'Egypt',
|
'EG' => 'Egypt',
|
||||||
'SV' => 'El Salvador',
|
'SV' => 'El Salvador',
|
||||||
'GQ' => 'Equatorial Guinea',
|
'GQ' => 'Equatorial Guinea',
|
||||||
'ER' => 'Eritrea',
|
'ER' => 'Eritrea',
|
||||||
'EE' => 'Estonia',
|
'EE' => 'Estonia',
|
||||||
'ET' => 'Ethiopia',
|
'ET' => 'Ethiopia',
|
||||||
'FK' => 'Falkland Islands (Malvinas)',
|
'FK' => 'Falkland Islands (Malvinas)',
|
||||||
'FO' => 'Faroe Islands',
|
'FO' => 'Faroe Islands',
|
||||||
'FJ' => 'Fiji',
|
'FJ' => 'Fiji',
|
||||||
'FI' => 'Finland',
|
'FI' => 'Finland',
|
||||||
'FR' => 'France',
|
'FR' => 'France',
|
||||||
'GF' => 'French Guiana',
|
'GF' => 'French Guiana',
|
||||||
'PF' => 'French Polynesia',
|
'PF' => 'French Polynesia',
|
||||||
'TF' => 'French Southern Territories',
|
'TF' => 'French Southern Territories',
|
||||||
'GA' => 'Gabon',
|
'GA' => 'Gabon',
|
||||||
'GM' => 'Gambia',
|
'GM' => 'Gambia',
|
||||||
'GE' => 'Georgia',
|
'GE' => 'Georgia',
|
||||||
'DE' => 'Germany',
|
'DE' => 'Germany',
|
||||||
'GH' => 'Ghana',
|
'GH' => 'Ghana',
|
||||||
'GI' => 'Gibraltar',
|
'GI' => 'Gibraltar',
|
||||||
'GR' => 'Greece',
|
'GR' => 'Greece',
|
||||||
'GL' => 'Greenland',
|
'GL' => 'Greenland',
|
||||||
'GD' => 'Grenada',
|
'GD' => 'Grenada',
|
||||||
'GP' => 'Guadeloupe',
|
'GP' => 'Guadeloupe',
|
||||||
'GU' => 'Guam',
|
'GU' => 'Guam',
|
||||||
'GT' => 'Guatemala',
|
'GT' => 'Guatemala',
|
||||||
'GG' => 'Guernsey',
|
'GG' => 'Guernsey',
|
||||||
'GN' => 'Guinea',
|
'GN' => 'Guinea',
|
||||||
'GW' => 'Guinea-Bissau',
|
'GW' => 'Guinea-Bissau',
|
||||||
'GY' => 'Guyana',
|
'GY' => 'Guyana',
|
||||||
'HT' => 'Haiti',
|
'HT' => 'Haiti',
|
||||||
'HM' => 'Heard Island & Mcdonald Islands',
|
'HM' => 'Heard Island & Mcdonald Islands',
|
||||||
'VA' => 'Holy See (Vatican City State)',
|
'VA' => 'Holy See (Vatican City State)',
|
||||||
'HN' => 'Honduras',
|
'HN' => 'Honduras',
|
||||||
'HK' => 'Hong Kong',
|
'HK' => 'Hong Kong',
|
||||||
'HU' => 'Hungary',
|
'HU' => 'Hungary',
|
||||||
'IS' => 'Iceland',
|
'IS' => 'Iceland',
|
||||||
'IN' => 'India',
|
'IN' => 'India',
|
||||||
'ID' => 'Indonesia',
|
'ID' => 'Indonesia',
|
||||||
'IR' => 'Iran, Islamic Republic Of',
|
'IR' => 'Iran, Islamic Republic Of',
|
||||||
'IQ' => 'Iraq',
|
'IQ' => 'Iraq',
|
||||||
'IE' => 'Ireland',
|
'IE' => 'Ireland',
|
||||||
'IM' => 'Isle Of Man',
|
'IM' => 'Isle Of Man',
|
||||||
'IL' => 'Israel',
|
'IL' => 'Israel',
|
||||||
'IT' => 'Italy',
|
'IT' => 'Italy',
|
||||||
'JM' => 'Jamaica',
|
'JM' => 'Jamaica',
|
||||||
'JP' => 'Japan',
|
'JP' => 'Japan',
|
||||||
'JE' => 'Jersey',
|
'JE' => 'Jersey',
|
||||||
'JO' => 'Jordan',
|
'JO' => 'Jordan',
|
||||||
'KZ' => 'Kazakhstan',
|
'KZ' => 'Kazakhstan',
|
||||||
'KE' => 'Kenya',
|
'KE' => 'Kenya',
|
||||||
'KI' => 'Kiribati',
|
'KI' => 'Kiribati',
|
||||||
'KR' => 'Korea',
|
'KR' => 'Korea',
|
||||||
'KW' => 'Kuwait',
|
'KW' => 'Kuwait',
|
||||||
'KG' => 'Kyrgyzstan',
|
'KG' => 'Kyrgyzstan',
|
||||||
'LA' => 'Lao People\'s Democratic Republic',
|
'LA' => 'Lao People\'s Democratic Republic',
|
||||||
'LV' => 'Latvia',
|
'LV' => 'Latvia',
|
||||||
'LB' => 'Lebanon',
|
'LB' => 'Lebanon',
|
||||||
'LS' => 'Lesotho',
|
'LS' => 'Lesotho',
|
||||||
'LR' => 'Liberia',
|
'LR' => 'Liberia',
|
||||||
'LY' => 'Libyan Arab Jamahiriya',
|
'LY' => 'Libyan Arab Jamahiriya',
|
||||||
'LI' => 'Liechtenstein',
|
'LI' => 'Liechtenstein',
|
||||||
'LT' => 'Lithuania',
|
'LT' => 'Lithuania',
|
||||||
'LU' => 'Luxembourg',
|
'LU' => 'Luxembourg',
|
||||||
'MO' => 'Macao',
|
'MO' => 'Macao',
|
||||||
'MK' => 'Macedonia',
|
'MK' => 'Macedonia',
|
||||||
'MG' => 'Madagascar',
|
'MG' => 'Madagascar',
|
||||||
'MW' => 'Malawi',
|
'MW' => 'Malawi',
|
||||||
'MY' => 'Malaysia',
|
'MY' => 'Malaysia',
|
||||||
'MV' => 'Maldives',
|
'MV' => 'Maldives',
|
||||||
'ML' => 'Mali',
|
'ML' => 'Mali',
|
||||||
'MT' => 'Malta',
|
'MT' => 'Malta',
|
||||||
'MH' => 'Marshall Islands',
|
'MH' => 'Marshall Islands',
|
||||||
'MQ' => 'Martinique',
|
'MQ' => 'Martinique',
|
||||||
'MR' => 'Mauritania',
|
'MR' => 'Mauritania',
|
||||||
'MU' => 'Mauritius',
|
'MU' => 'Mauritius',
|
||||||
'YT' => 'Mayotte',
|
'YT' => 'Mayotte',
|
||||||
'MX' => 'Mexico',
|
'MX' => 'Mexico',
|
||||||
'FM' => 'Micronesia, Federated States Of',
|
'FM' => 'Micronesia, Federated States Of',
|
||||||
'MD' => 'Moldova',
|
'MD' => 'Moldova',
|
||||||
'MC' => 'Monaco',
|
'MC' => 'Monaco',
|
||||||
'MN' => 'Mongolia',
|
'MN' => 'Mongolia',
|
||||||
'ME' => 'Montenegro',
|
'ME' => 'Montenegro',
|
||||||
'MS' => 'Montserrat',
|
'MS' => 'Montserrat',
|
||||||
'MA' => 'Morocco',
|
'MA' => 'Morocco',
|
||||||
'MZ' => 'Mozambique',
|
'MZ' => 'Mozambique',
|
||||||
'MM' => 'Myanmar',
|
'MM' => 'Myanmar',
|
||||||
'NA' => 'Namibia',
|
'NA' => 'Namibia',
|
||||||
'NR' => 'Nauru',
|
'NR' => 'Nauru',
|
||||||
'NP' => 'Nepal',
|
'NP' => 'Nepal',
|
||||||
'NL' => 'Netherlands',
|
'NL' => 'Netherlands',
|
||||||
'AN' => 'Netherlands Antilles',
|
'AN' => 'Netherlands Antilles',
|
||||||
'NC' => 'New Caledonia',
|
'NC' => 'New Caledonia',
|
||||||
'NZ' => 'New Zealand',
|
'NZ' => 'New Zealand',
|
||||||
'NI' => 'Nicaragua',
|
'NI' => 'Nicaragua',
|
||||||
'NE' => 'Niger',
|
'NE' => 'Niger',
|
||||||
'NG' => 'Nigeria',
|
'NG' => 'Nigeria',
|
||||||
'NU' => 'Niue',
|
'NU' => 'Niue',
|
||||||
'NF' => 'Norfolk Island',
|
'NF' => 'Norfolk Island',
|
||||||
'MP' => 'Northern Mariana Islands',
|
'MP' => 'Northern Mariana Islands',
|
||||||
'NO' => 'Norway',
|
'NO' => 'Norway',
|
||||||
'OM' => 'Oman',
|
'OM' => 'Oman',
|
||||||
'PK' => 'Pakistan',
|
'PK' => 'Pakistan',
|
||||||
'PW' => 'Palau',
|
'PW' => 'Palau',
|
||||||
'PS' => 'Palestinian Territory, Occupied',
|
'PS' => 'Palestinian Territory, Occupied',
|
||||||
'PA' => 'Panama',
|
'PA' => 'Panama',
|
||||||
'PG' => 'Papua New Guinea',
|
'PG' => 'Papua New Guinea',
|
||||||
'PY' => 'Paraguay',
|
'PY' => 'Paraguay',
|
||||||
'PE' => 'Peru',
|
'PE' => 'Peru',
|
||||||
'PH' => 'Philippines',
|
'PH' => 'Philippines',
|
||||||
'PN' => 'Pitcairn',
|
'PN' => 'Pitcairn',
|
||||||
'PL' => 'Poland',
|
'PL' => 'Poland',
|
||||||
'PT' => 'Portugal',
|
'PT' => 'Portugal',
|
||||||
'PR' => 'Puerto Rico',
|
'PR' => 'Puerto Rico',
|
||||||
'QA' => 'Qatar',
|
'QA' => 'Qatar',
|
||||||
'RE' => 'Reunion',
|
'RE' => 'Reunion',
|
||||||
'RO' => 'Romania',
|
'RO' => 'Romania',
|
||||||
'RU' => 'Russian Federation',
|
'RU' => 'Russian Federation',
|
||||||
'RW' => 'Rwanda',
|
'RW' => 'Rwanda',
|
||||||
'BL' => 'Saint Barthelemy',
|
'BL' => 'Saint Barthelemy',
|
||||||
'SH' => 'Saint Helena',
|
'SH' => 'Saint Helena',
|
||||||
'KN' => 'Saint Kitts And Nevis',
|
'KN' => 'Saint Kitts And Nevis',
|
||||||
'LC' => 'Saint Lucia',
|
'LC' => 'Saint Lucia',
|
||||||
'MF' => 'Saint Martin',
|
'MF' => 'Saint Martin',
|
||||||
'PM' => 'Saint Pierre And Miquelon',
|
'PM' => 'Saint Pierre And Miquelon',
|
||||||
'VC' => 'Saint Vincent And Grenadines',
|
'VC' => 'Saint Vincent And Grenadines',
|
||||||
'WS' => 'Samoa',
|
'WS' => 'Samoa',
|
||||||
'SM' => 'San Marino',
|
'SM' => 'San Marino',
|
||||||
'ST' => 'Sao Tome And Principe',
|
'ST' => 'Sao Tome And Principe',
|
||||||
'SA' => 'Saudi Arabia',
|
'SA' => 'Saudi Arabia',
|
||||||
'SN' => 'Senegal',
|
'SN' => 'Senegal',
|
||||||
'RS' => 'Serbia',
|
'RS' => 'Serbia',
|
||||||
'SC' => 'Seychelles',
|
'SC' => 'Seychelles',
|
||||||
'SL' => 'Sierra Leone',
|
'SL' => 'Sierra Leone',
|
||||||
'SG' => 'Singapore',
|
'SG' => 'Singapore',
|
||||||
'SK' => 'Slovakia',
|
'SK' => 'Slovakia',
|
||||||
'SI' => 'Slovenia',
|
'SI' => 'Slovenia',
|
||||||
'SB' => 'Solomon Islands',
|
'SB' => 'Solomon Islands',
|
||||||
'SO' => 'Somalia',
|
'SO' => 'Somalia',
|
||||||
'ZA' => 'South Africa',
|
'ZA' => 'South Africa',
|
||||||
'GS' => 'South Georgia And Sandwich Isl.',
|
'GS' => 'South Georgia And Sandwich Isl.',
|
||||||
'ES' => 'Spain',
|
'ES' => 'Spain',
|
||||||
'LK' => 'Sri Lanka',
|
'LK' => 'Sri Lanka',
|
||||||
'SD' => 'Sudan',
|
'SD' => 'Sudan',
|
||||||
'SR' => 'Suriname',
|
'SR' => 'Suriname',
|
||||||
'SJ' => 'Svalbard And Jan Mayen',
|
'SJ' => 'Svalbard And Jan Mayen',
|
||||||
'SZ' => 'Swaziland',
|
'SZ' => 'Swaziland',
|
||||||
'SE' => 'Sweden',
|
'SE' => 'Sweden',
|
||||||
'CH' => 'Switzerland',
|
'CH' => 'Switzerland',
|
||||||
'SY' => 'Syrian Arab Republic',
|
'SY' => 'Syrian Arab Republic',
|
||||||
'TW' => 'Taiwan',
|
'TW' => 'Taiwan',
|
||||||
'TJ' => 'Tajikistan',
|
'TJ' => 'Tajikistan',
|
||||||
'TZ' => 'Tanzania',
|
'TZ' => 'Tanzania',
|
||||||
'TH' => 'Thailand',
|
'TH' => 'Thailand',
|
||||||
'TL' => 'Timor-Leste',
|
'TL' => 'Timor-Leste',
|
||||||
'TG' => 'Togo',
|
'TG' => 'Togo',
|
||||||
'TK' => 'Tokelau',
|
'TK' => 'Tokelau',
|
||||||
'TO' => 'Tonga',
|
'TO' => 'Tonga',
|
||||||
'TT' => 'Trinidad And Tobago',
|
'TT' => 'Trinidad And Tobago',
|
||||||
'TN' => 'Tunisia',
|
'TN' => 'Tunisia',
|
||||||
'TR' => 'Turkey',
|
'TR' => 'Turkey',
|
||||||
'TM' => 'Turkmenistan',
|
'TM' => 'Turkmenistan',
|
||||||
'TC' => 'Turks And Caicos Islands',
|
'TC' => 'Turks And Caicos Islands',
|
||||||
'TV' => 'Tuvalu',
|
'TV' => 'Tuvalu',
|
||||||
'UG' => 'Uganda',
|
'UG' => 'Uganda',
|
||||||
'UA' => 'Ukraine',
|
'UA' => 'Ukraine',
|
||||||
'AE' => 'United Arab Emirates',
|
'AE' => 'United Arab Emirates',
|
||||||
'GB' => 'United Kingdom',
|
'GB' => 'United Kingdom',
|
||||||
'US' => 'United States',
|
'US' => 'United States',
|
||||||
'UM' => 'United States Outlying Islands',
|
'UM' => 'United States Outlying Islands',
|
||||||
'UY' => 'Uruguay',
|
'UY' => 'Uruguay',
|
||||||
'UZ' => 'Uzbekistan',
|
'UZ' => 'Uzbekistan',
|
||||||
'VU' => 'Vanuatu',
|
'VU' => 'Vanuatu',
|
||||||
'VE' => 'Venezuela',
|
'VE' => 'Venezuela',
|
||||||
'VN' => 'Viet Nam',
|
'VN' => 'Viet Nam',
|
||||||
'VG' => 'Virgin Islands, British',
|
'VG' => 'Virgin Islands, British',
|
||||||
'VI' => 'Virgin Islands, U.S.',
|
'VI' => 'Virgin Islands, U.S.',
|
||||||
'WF' => 'Wallis And Futuna',
|
'WF' => 'Wallis And Futuna',
|
||||||
'EH' => 'Western Sahara',
|
'EH' => 'Western Sahara',
|
||||||
'YE' => 'Yemen',
|
'YE' => 'Yemen',
|
||||||
'ZM' => 'Zambia',
|
'ZM' => 'Zambia',
|
||||||
'ZW' => 'Zimbabwe',
|
'ZW' => 'Zimbabwe',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,276 +1,276 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo "<form method='post' name='frm' action=''>\n";
|
echo "<form method='post' name='frm' action=''>\n";
|
||||||
echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
||||||
echo "<input type='hidden' name='return_install_step' value='config_database'/>\n";
|
echo "<input type='hidden' name='return_install_step' value='config_database'/>\n";
|
||||||
echo "<input type='hidden' name='install_step' value='execute'/>\n";
|
echo "<input type='hidden' name='install_step' value='execute'/>\n";
|
||||||
|
|
||||||
echo "<input type='hidden' name='event_host' value='$event_host'/>\n";
|
echo "<input type='hidden' name='event_host' value='$event_host'/>\n";
|
||||||
echo "<input type='hidden' name='event_port' value='$event_port'/>\n";
|
echo "<input type='hidden' name='event_port' value='$event_port'/>\n";
|
||||||
echo "<input type='hidden' name='event_password' value='$event_password'/>\n";
|
echo "<input type='hidden' name='event_password' value='$event_password'/>\n";
|
||||||
echo "<input type='hidden' name='db_type' value='$db_type'/>\n";
|
echo "<input type='hidden' name='db_type' value='$db_type'/>\n";
|
||||||
echo "<input type='hidden' name='admin_username' value='$admin_username'/>\n";
|
echo "<input type='hidden' name='admin_username' value='$admin_username'/>\n";
|
||||||
echo "<input type='hidden' name='admin_password' value='$admin_password'/>\n";
|
echo "<input type='hidden' name='admin_password' value='$admin_password'/>\n";
|
||||||
echo "<input type='hidden' name='install_default_country' value='$install_default_country'/>\n";
|
echo "<input type='hidden' name='install_default_country' value='$install_default_country'/>\n";
|
||||||
echo "<input type='hidden' name='install_template_name' value='$install_template_name'/>\n";
|
echo "<input type='hidden' name='install_template_name' value='$install_template_name'/>\n";
|
||||||
echo "<input type='hidden' name='domain_name' value='$domain_name'/>\n";
|
echo "<input type='hidden' name='domain_name' value='$domain_name'/>\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td align='left' width='30%' nowrap><b>".$text['header-config_database']."</b></td>\n";
|
echo "<td align='left' width='30%' nowrap><b>".$text['header-config_database']."</b></td>\n";
|
||||||
echo "<td width='70%' align='right'>\n";
|
echo "<td width='70%' align='right'>\n";
|
||||||
echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
||||||
echo " <input type='submit' name='next' class='btn' value='".$text['button-next']."'/>\n";
|
echo " <input type='submit' name='next' class='btn' value='".$text['button-next']."'/>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($db_type == "sqlite") {
|
if ($db_type == "sqlite") {
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' 'valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' 'valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Filename\n";
|
echo " Database Filename\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_name' maxlength='255' value=\"$db_name\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_name' maxlength='255' value=\"$db_name\"><br />\n";
|
||||||
echo " Set the database filename. The file extension should be '.db'.\n";
|
echo " Set the database filename. The file extension should be '.db'.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' 'valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' 'valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Directory\n";
|
echo " Database Directory\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_path' maxlength='255' value=\"$db_path\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_path' maxlength='255' value=\"$db_path\"><br />\n";
|
||||||
echo " Set the path to the database directory.\n";
|
echo " Set the path to the database directory.\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($db_type == "mysql") {
|
if ($db_type == "mysql") {
|
||||||
|
|
||||||
//set defaults
|
//set defaults
|
||||||
if (strlen($db_host) == 0) { $db_host = 'localhost'; }
|
if (strlen($db_host) == 0) { $db_host = 'localhost'; }
|
||||||
if (strlen($db_port) == 0) { $db_port = '3306'; }
|
if (strlen($db_port) == 0) { $db_port = '3306'; }
|
||||||
//if (strlen($db_name) == 0) { $db_name = 'fusionpbx'; }
|
//if (strlen($db_name) == 0) { $db_name = 'fusionpbx'; }
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Host\n";
|
echo " Database Host\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_host' maxlength='255' value=\"$db_host\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_host' maxlength='255' value=\"$db_host\"><br />\n";
|
||||||
echo " Enter the host address for the database server.\n";
|
echo " Enter the host address for the database server.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Port\n";
|
echo " Database Port\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_port' maxlength='255' value=\"$db_port\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_port' maxlength='255' value=\"$db_port\"><br />\n";
|
||||||
echo " Enter the port number. It is optional if the database is using the default port.\n";
|
echo " Enter the port number. It is optional if the database is using the default port.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Name\n";
|
echo " Database Name\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_name' maxlength='255' value=\"$db_name\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_name' maxlength='255' value=\"$db_name\"><br />\n";
|
||||||
echo " Enter the name of the database.\n";
|
echo " Enter the name of the database.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Username\n";
|
echo " Database Username\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_username' maxlength='255' value=\"$db_username\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_username' maxlength='255' value=\"$db_username\"><br />\n";
|
||||||
echo " Enter the database username. \n";
|
echo " Enter the database username. \n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Password\n";
|
echo " Database Password\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_password' maxlength='255' value=\"$db_password\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_password' maxlength='255' value=\"$db_password\"><br />\n";
|
||||||
echo " Enter the database password.\n";
|
echo " Enter the database password.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Create Database Options\n";
|
echo " Create Database Options\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
if($db_create=='1') { $checked = "checked='checked'"; } else { $checked = ''; }
|
if($db_create=='1') { $checked = "checked='checked'"; } else { $checked = ''; }
|
||||||
echo " <label><input type='checkbox' name='db_create' value='1' $checked /> Create the database</label>\n";
|
echo " <label><input type='checkbox' name='db_create' value='1' $checked /> Create the database</label>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo "Choose whether to create the database\n";
|
echo "Choose whether to create the database\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Create Database Username\n";
|
echo " Create Database Username\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_create_username' maxlength='255' value=\"$db_create_username\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_create_username' maxlength='255' value=\"$db_create_username\"><br />\n";
|
||||||
echo " Optional, this username is used to create the database, a database user and set the permissions. \n";
|
echo " Optional, this username is used to create the database, a database user and set the permissions. \n";
|
||||||
echo " By default this username is 'root' however it can be any account with permission to add a database, user, and grant permissions. \n";
|
echo " By default this username is 'root' however it can be any account with permission to add a database, user, and grant permissions. \n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Create Database Password\n";
|
echo " Create Database Password\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_create_password' maxlength='255' value=\"$db_create_password\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_create_password' maxlength='255' value=\"$db_create_password\"><br />\n";
|
||||||
echo " Enter the create database password.\n";
|
echo " Enter the create database password.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($db_type == "pgsql") {
|
if ($db_type == "pgsql") {
|
||||||
if (strlen($db_host) == 0) { $db_host = 'localhost'; }
|
if (strlen($db_host) == 0) { $db_host = 'localhost'; }
|
||||||
if (strlen($db_port) == 0) { $db_port = '5432'; }
|
if (strlen($db_port) == 0) { $db_port = '5432'; }
|
||||||
if (strlen($db_name) == 0) { $db_name = 'fusionpbx'; }
|
if (strlen($db_name) == 0) { $db_name = 'fusionpbx'; }
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Host\n";
|
echo " Database Host\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_host' maxlength='255' value=\"$db_host\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_host' maxlength='255' value=\"$db_host\"><br />\n";
|
||||||
echo " Enter the host address for the database server.\n";
|
echo " Enter the host address for the database server.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Port\n";
|
echo " Database Port\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_port' maxlength='255' value=\"$db_port\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_port' maxlength='255' value=\"$db_port\"><br />\n";
|
||||||
echo " Enter the port number. It is optional if the database is using the default port.\n";
|
echo " Enter the port number. It is optional if the database is using the default port.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Name\n";
|
echo " Database Name\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_name' maxlength='255' value=\"$db_name\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_name' maxlength='255' value=\"$db_name\"><br />\n";
|
||||||
echo " Enter the name of the database.\n";
|
echo " Enter the name of the database.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Username\n";
|
echo " Database Username\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_username' maxlength='255' value=\"$db_username\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_username' maxlength='255' value=\"$db_username\"><br />\n";
|
||||||
echo " Enter the database username.\n";
|
echo " Enter the database username.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Password\n";
|
echo " Database Password\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_password' maxlength='255' value=\"$db_password\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_password' maxlength='255' value=\"$db_password\"><br />\n";
|
||||||
echo " Enter the database password.\n";
|
echo " Enter the database password.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Create Database Options\n";
|
echo " Create Database Options\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
if($db_create=='1') { $checked = "checked='checked'"; } else { $checked = ''; }
|
if($db_create=='1') { $checked = "checked='checked'"; } else { $checked = ''; }
|
||||||
echo " <label><input type='checkbox' name='db_create' value='1' $checked /> Create the database</label>\n";
|
echo " <label><input type='checkbox' name='db_create' value='1' $checked /> Create the database</label>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Create Database Username\n";
|
echo " Create Database Username\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_create_username' maxlength='255' value=\"$db_create_username\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_create_username' maxlength='255' value=\"$db_create_username\"><br />\n";
|
||||||
echo " Optional, this username is used to create the database, a database user and set the permissions. \n";
|
echo " Optional, this username is used to create the database, a database user and set the permissions. \n";
|
||||||
echo " By default this username is 'pgsql' however it can be any account with permission to add a database, user, and grant permissions. \n";
|
echo " By default this username is 'pgsql' however it can be any account with permission to add a database, user, and grant permissions. \n";
|
||||||
echo " Leave blank to use the details above. \n";
|
echo " Leave blank to use the details above. \n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " Create Database Password\n";
|
echo " Create Database Password\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='db_create_password' maxlength='255' value=\"$db_create_password\"><br />\n";
|
echo " <input class='formfld' type='text' name='db_create_password' maxlength='255' value=\"$db_create_password\"><br />\n";
|
||||||
echo " Enter the create database password.\n";
|
echo " Enter the create database password.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
//echo " <div style='text-align:right'>\n";
|
//echo " <div style='text-align:right'>\n";
|
||||||
//echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
//echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
||||||
//echo " <input type='submit' name='execute' class='btn' name='".$text['button-execute']."'>\n";
|
//echo " <input type='submit' name='execute' class='btn' name='".$text['button-execute']."'>\n";
|
||||||
//echo " </div>\n";
|
//echo " </div>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
?>
|
?>
|
||||||
@@ -1,150 +1,150 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo "<form method='post' name='frm' action=''>\n";
|
echo "<form method='post' name='frm' action=''>\n";
|
||||||
echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
||||||
echo "<input type='hidden' name='return_install_step' value='config_detail'/>\n";
|
echo "<input type='hidden' name='return_install_step' value='config_detail'/>\n";
|
||||||
echo "<input type='hidden' name='install_step' value='config_database'/>\n";
|
echo "<input type='hidden' name='install_step' value='config_database'/>\n";
|
||||||
|
|
||||||
echo "<input type='hidden' name='event_host' value='$event_host'/>\n";
|
echo "<input type='hidden' name='event_host' value='$event_host'/>\n";
|
||||||
echo "<input type='hidden' name='event_port' value='$event_port'/>\n";
|
echo "<input type='hidden' name='event_port' value='$event_port'/>\n";
|
||||||
echo "<input type='hidden' name='event_password' value='$event_password'/>\n";
|
echo "<input type='hidden' name='event_password' value='$event_password'/>\n";
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td align='left' width='30%' nowrap><b>".$text['header-config_detail']."</b></td>\n";
|
echo "<td align='left' width='30%' nowrap><b>".$text['header-config_detail']."</b></td>\n";
|
||||||
echo "<td width='70%' align='right'>\n";
|
echo "<td width='70%' align='right'>\n";
|
||||||
echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
||||||
echo " <input type='submit' name='next' class='btn' value='".$text['button-next']."'/>\n";
|
echo " <input type='submit' name='next' class='btn' value='".$text['button-next']."'/>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " Username\n";
|
echo " Username\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='admin_username' maxlength='255' value=\"$admin_username\"><br />\n";
|
echo " <input class='formfld' type='text' name='admin_username' maxlength='255' value=\"$admin_username\"><br />\n";
|
||||||
echo " Enter the username to use when logging in with the browser.<br />\n";
|
echo " Enter the username to use when logging in with the browser.<br />\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " Password\n";
|
echo " Password\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='admin_password' maxlength='255' value=\"$admin_password\"><br />\n";
|
echo " <input class='formfld' type='text' name='admin_password' maxlength='255' value=\"$admin_password\"><br />\n";
|
||||||
echo " Enter the password to use when logging in with the browser.<br />\n";
|
echo " Enter the password to use when logging in with the browser.<br />\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " Country\n";
|
echo " Country\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select id='install_default_country' name='install_default_country' class='formfld' style=''>\n";
|
echo " <select id='install_default_country' name='install_default_country' class='formfld' style=''>\n";
|
||||||
require "resources/countries.php";
|
require "resources/countries.php";
|
||||||
|
|
||||||
foreach ($countries as $iso_code => $country ){
|
foreach ($countries as $iso_code => $country ){
|
||||||
if($iso_code == $install_default_country){
|
if($iso_code == $install_default_country){
|
||||||
echo " <option value='$iso_code' selected='selected'>".$country['country']."</option>\n";
|
echo " <option value='$iso_code' selected='selected'>".$country['country']."</option>\n";
|
||||||
}else{
|
}else{
|
||||||
echo " <option value='$iso_code'>".$country['country']."</option>\n";
|
echo " <option value='$iso_code'>".$country['country']."</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " Select ISO country code used to initialize calling contry code variables.<br />\n";
|
echo " Select ISO country code used to initialize calling contry code variables.<br />\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='20%' class=\"vncellreq\" align='left' nowrap='nowrap'>\n";
|
echo " <td width='20%' class=\"vncellreq\" align='left' nowrap='nowrap'>\n";
|
||||||
echo " Theme: \n";
|
echo " Theme: \n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class=\"vtable\" align='left'>\n";
|
echo " <td class=\"vtable\" align='left'>\n";
|
||||||
echo " <select id='install_template_name' name='install_template_name' class='formfld' style=''>\n";
|
echo " <select id='install_template_name' name='install_template_name' class='formfld' style=''>\n";
|
||||||
echo " <option value=''></option>\n";
|
echo " <option value=''></option>\n";
|
||||||
//add all the themes to the list
|
//add all the themes to the list
|
||||||
$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
||||||
if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
|
if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
|
||||||
while (false !== ($dir_name = readdir($handle))) {
|
while (false !== ($dir_name = readdir($handle))) {
|
||||||
if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && $dir_name != ".git" && $dir_name != "flags" && is_readable($theme_dir.'/'.$dir_name)) {
|
if ($dir_name != "." && $dir_name != ".." && $dir_name != ".svn" && $dir_name != ".git" && $dir_name != "flags" && is_readable($theme_dir.'/'.$dir_name)) {
|
||||||
$dir_label = str_replace('_', ' ', $dir_name);
|
$dir_label = str_replace('_', ' ', $dir_name);
|
||||||
$dir_label = str_replace('-', ' ', $dir_label);
|
$dir_label = str_replace('-', ' ', $dir_label);
|
||||||
if ($dir_name == 'enhanced') {
|
if ($dir_name == 'enhanced') {
|
||||||
echo " <option value='$dir_name' selected='selected'>$dir_label</option>\n";
|
echo " <option value='$dir_name' selected='selected'>$dir_label</option>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " <option value='$dir_name'>$dir_label</option>\n";
|
echo " <option value='$dir_name'>$dir_label</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " Select a theme to set as the default.<br />\n";
|
echo " Select a theme to set as the default.<br />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Domain name\n";
|
echo " Domain name\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='domain_name' maxlength='255' value=\"$domain_name\"><br />\n";
|
echo " <input class='formfld' type='text' name='domain_name' maxlength='255' value=\"$domain_name\"><br />\n";
|
||||||
echo " Enter the default domain name. \n";
|
echo " Enter the default domain name. \n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " Database Type\n";
|
echo " Database Type\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select name='db_type' id='db_type' class='formfld' id='form_tag' onchange='db_type_onchange();'>\n";
|
echo " <select name='db_type' id='db_type' class='formfld' id='form_tag' onchange='db_type_onchange();'>\n";
|
||||||
if (extension_loaded('pdo_pgsql')) { echo " <option value='pgsql'>postgresql</option>\n"; }
|
if (extension_loaded('pdo_pgsql')) { echo " <option value='pgsql'>postgresql</option>\n"; }
|
||||||
if (extension_loaded('pdo_mysql')) { echo " <option value='mysql'>mysql</option>\n"; }
|
if (extension_loaded('pdo_mysql')) { echo " <option value='mysql'>mysql</option>\n"; }
|
||||||
if (extension_loaded('pdo_sqlite')) { echo " <option value='sqlite' selected='selected'>sqlite</option>\n"; } //set sqlite as the default
|
if (extension_loaded('pdo_sqlite')) { echo " <option value='sqlite' selected='selected'>sqlite</option>\n"; } //set sqlite as the default
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo " Select the database type.\n";
|
echo " Select the database type.\n";
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
//echo " <div style='text-align:right'>\n";
|
//echo " <div style='text-align:right'>\n";
|
||||||
//echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
//echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
||||||
//echo " <input type='submit' class='btn' name='execute' name='".$text['button-next']."'>\n";
|
//echo " <input type='submit' class='btn' name='execute' name='".$text['button-next']."'>\n";
|
||||||
//echo " </div>\n";
|
//echo " </div>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
?>
|
?>
|
||||||
@@ -1,137 +1,137 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
//fetch the values
|
//fetch the values
|
||||||
require_once "core/install/resources/classes/detect_switch.php";
|
require_once "core/install/resources/classes/detect_switch.php";
|
||||||
$switch_detect = new detect_switch($event_host, $event_port, $event_password);
|
$switch_detect = new detect_switch($event_host, $event_port, $event_password);
|
||||||
//$switch_detect->event_port = 2021;
|
//$switch_detect->event_port = 2021;
|
||||||
$detect_ok = true;
|
$detect_ok = true;
|
||||||
try {
|
try {
|
||||||
$switch_detect->detect();
|
$switch_detect->detect();
|
||||||
} catch(Exception $e){
|
} catch(Exception $e){
|
||||||
//echo "<p><b>Failed to detect configuration</b> detect_switch reported: " . $e->getMessage() ."</p>\n";
|
//echo "<p><b>Failed to detect configuration</b> detect_switch reported: " . $e->getMessage() ."</p>\n";
|
||||||
//$detect_ok = false;
|
//$detect_ok = false;
|
||||||
}
|
}
|
||||||
echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
|
||||||
echo "<input type='hidden' name='install_step' value='detect_config'/>\n";
|
echo "<input type='hidden' name='install_step' value='detect_config'/>\n";
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' align='left' nowrap><b>".$text['header-event_socket']."</b><br><br></td>\n";
|
echo "<td width='30%' align='left' nowrap><b>".$text['header-event_socket']."</b><br><br></td>\n";
|
||||||
echo "<td width='70%' align='right'>";
|
echo "<td width='70%' align='right'>";
|
||||||
//echo " <input type='button' name='detect' class='btn' onclick=\"location.reload();\" value='".$text['button-detect']."'/>\n";
|
//echo " <input type='button' name='detect' class='btn' onclick=\"location.reload();\" value='".$text['button-detect']."'/>\n";
|
||||||
echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
echo " <input type='button' name='back' class='btn' onclick=\"history.go(-1);\" value='".$text['button-back']."'/>\n";
|
||||||
echo " <input type='submit' name='next' class='btn' value='".$text['button-next']."'/>\n";
|
echo " <input type='submit' name='next' class='btn' value='".$text['button-next']."'/>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-event_host']."\n";
|
echo " ".$text['label-event_host']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='event_host' maxlength='255' value=\"".$switch_detect->event_host."\" />\n";
|
echo " <input class='formfld' type='text' name='event_host' maxlength='255' value=\"".$switch_detect->event_host."\" />\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-event_host']."\n";
|
echo $text['description-event_host']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-event_port']."\n";
|
echo " ".$text['label-event_port']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='event_port' maxlength='255' value=\"".$switch_detect->event_port."\"/>\n";
|
echo " <input class='formfld' type='text' name='event_port' maxlength='255' value=\"".$switch_detect->event_port."\"/>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-event_port']."\n";
|
echo $text['description-event_port']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-event_password']."\n";
|
echo " ".$text['label-event_password']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='password' name='event_password' maxlength='255' value=\"".$switch_detect->event_password."\"/>\n";
|
echo " <input class='formfld' type='password' name='event_password' maxlength='255' value=\"".$switch_detect->event_password."\"/>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-event_password']."\n";
|
echo $text['description-event_password']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td colspan='2' align='right'>\n";
|
echo " <td colspan='2' align='right'>\n";
|
||||||
echo " <br>";
|
echo " <br>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
if($detect_ok){
|
if($detect_ok){
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td colspan='4' align='left' nowrap><b>".$text['title-detected_configuration']."</b></td>\n";
|
echo "<td colspan='4' align='left' nowrap><b>".$text['title-detected_configuration']."</b></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
$id = 1;
|
$id = 1;
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='15%'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='15%'>\n";
|
||||||
echo "Switch version\n";
|
echo "Switch version\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' width='35%' align='left'>\n";
|
echo "<td class='vtable' width='35%' align='left'>\n";
|
||||||
echo " ".$switch_detect->version()."\n";
|
echo " ".$switch_detect->version()."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
|
|
||||||
foreach ($switch_detect->get_dirs() as $folder)
|
foreach ($switch_detect->get_dirs() as $folder)
|
||||||
{
|
{
|
||||||
if($id % 2 == 0){ echo "<tr>\n"; }
|
if($id % 2 == 0){ echo "<tr>\n"; }
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='15%'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='15%'>\n";
|
||||||
echo $folder."\n";
|
echo $folder."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' width='35%' align='left'>\n";
|
echo "<td class='vtable' width='35%' align='left'>\n";
|
||||||
echo " ".$switch_detect->$folder()."\n";
|
echo " ".$switch_detect->$folder()."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
if($id % 2 == 1){ echo "</tr>\n"; }
|
if($id % 2 == 1){ echo "</tr>\n"; }
|
||||||
$id++;
|
$id++;
|
||||||
}
|
}
|
||||||
if($id % 2 == 1){ echo "</tr>\n"; }
|
if($id % 2 == 1){ echo "</tr>\n"; }
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td colspan='4' align='left' nowrap><br/><b>".$text['title-assumed_configuration']."</b></td>\n";
|
echo "<td colspan='4' align='left' nowrap><br/><b>".$text['title-assumed_configuration']."</b></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$id=0;
|
$id=0;
|
||||||
foreach ($switch_detect->get_vdirs() as $folder) {
|
foreach ($switch_detect->get_vdirs() as $folder) {
|
||||||
if($id % 2 == 0){ echo "<tr>\n"; }
|
if($id % 2 == 0){ echo "<tr>\n"; }
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='15%'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='15%'>\n";
|
||||||
echo $folder."\n";
|
echo $folder."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' width='35%' align='left'>\n";
|
echo "<td class='vtable' width='35%' align='left'>\n";
|
||||||
echo " ".$switch_detect->$folder()."\n";
|
echo " ".$switch_detect->$folder()."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
if($id % 2 == 1){ echo "</tr>\n"; }
|
if($id % 2 == 1){ echo "</tr>\n"; }
|
||||||
$id++;
|
$id++;
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,65 +1,65 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015-2016
|
Portions created by the Initial Developer are Copyright (C) 2015-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='30%' align='left' nowrap='nowrap'><b>".$text['header-select_language']."</b><br><br></td>\n";
|
echo " <td width='30%' align='left' nowrap='nowrap'><b>".$text['header-select_language']."</b><br><br></td>\n";
|
||||||
echo " <td width='70%' align='right'>";
|
echo " <td width='70%' align='right'>";
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-next']."'/>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-next']."'/>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo " <td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-select_language']."\n";
|
echo " ".$text['label-select_language']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <table cellpadding='0' cellspacing='0'>";
|
echo " <table cellpadding='0' cellspacing='0'>";
|
||||||
foreach($_SESSION['app']['languages'] as $lang_code){
|
foreach($_SESSION['app']['languages'] as $lang_code){
|
||||||
echo " <tr>";
|
echo " <tr>";
|
||||||
echo " <td width='15' class='vtable' valign='top' nowrap='nowrap'>\n";
|
echo " <td width='15' class='vtable' valign='top' nowrap='nowrap'>\n";
|
||||||
echo " <input type='radio' name='install_language' value='$lang_code' id='lang_$lang_code' ";
|
echo " <input type='radio' name='install_language' value='$lang_code' id='lang_$lang_code' ";
|
||||||
if($lang_code == $_SESSION['domain']['language']['code']) {
|
if($lang_code == $_SESSION['domain']['language']['code']) {
|
||||||
echo " checked='checked'";
|
echo " checked='checked'";
|
||||||
}
|
}
|
||||||
echo "/>";
|
echo "/>";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td class='vtable' align='left' valign='top' nowrap='nowrap'>\n";
|
echo " <td class='vtable' align='left' valign='top' nowrap='nowrap'>\n";
|
||||||
echo " <img src='<!--{project_path}-->/core/install/resources/images/flags/$lang_code.png' alt='$lang_code'/> ".$text["language-$lang_code"];
|
echo " <img src='<!--{project_path}-->/core/install/resources/images/flags/$lang_code.png' alt='$lang_code'/> ".$text["language-$lang_code"];
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td width='100%' class='vtable' valign='top'>\n";
|
echo " <td width='100%' class='vtable' valign='top'>\n";
|
||||||
echo " \n";
|
echo " \n";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
}
|
}
|
||||||
echo " </table>";
|
echo " </table>";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo " ".$text['description-select_language']."\n";
|
echo " ".$text['description-select_language']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,461 +1,461 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (if_group('superadmin')) {
|
if (if_group('superadmin')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
// retrieve software uuid
|
// retrieve software uuid
|
||||||
$sql = "select software_uuid, software_url, software_version from v_software";
|
$sql = "select software_uuid, software_url, software_version from v_software";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$software_uuid = $row["software_uuid"];
|
$software_uuid = $row["software_uuid"];
|
||||||
$software_url = $row["software_url"];
|
$software_url = $row["software_url"];
|
||||||
$software_version = $row["software_version"];
|
$software_version = $row["software_version"];
|
||||||
break; // limit to 1 row
|
break; // limit to 1 row
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql, $prep_statement);
|
unset($sql, $prep_statement);
|
||||||
|
|
||||||
if (count($_REQUEST) > 0) {
|
if (count($_REQUEST) > 0) {
|
||||||
|
|
||||||
// prepare demographic information **********************************************
|
// prepare demographic information **********************************************
|
||||||
|
|
||||||
// fusionpbx version
|
// fusionpbx version
|
||||||
$software_ver = $software_version;
|
$software_ver = $software_version;
|
||||||
|
|
||||||
// php version
|
// php version
|
||||||
$php_ver = phpversion();
|
$php_ver = phpversion();
|
||||||
|
|
||||||
// webserver name & version
|
// webserver name & version
|
||||||
$web_server = $_SERVER['SERVER_SOFTWARE'];
|
$web_server = $_SERVER['SERVER_SOFTWARE'];
|
||||||
|
|
||||||
// switch version
|
// switch version
|
||||||
$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) {
|
||||||
$switch_result = event_socket_request($fp, 'api version');
|
$switch_result = event_socket_request($fp, 'api version');
|
||||||
}
|
}
|
||||||
$switch_ver = trim($switch_result);
|
$switch_ver = trim($switch_result);
|
||||||
|
|
||||||
// database name & version
|
// database name & version
|
||||||
switch ($db_type) {
|
switch ($db_type) {
|
||||||
case "pgsql" : $db_ver_query = "select version() as db_ver;"; break;
|
case "pgsql" : $db_ver_query = "select version() as db_ver;"; break;
|
||||||
case "mysql" : $db_ver_query = "select version() as db_ver;"; break;
|
case "mysql" : $db_ver_query = "select version() as db_ver;"; break;
|
||||||
case "sqlite" : $db_ver_query = "select sqlite_version() as db_ver;"; break;
|
case "sqlite" : $db_ver_query = "select sqlite_version() as db_ver;"; break;
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare($db_ver_query);
|
$prep_statement = $db->prepare($db_ver_query);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$database_version = $row["db_ver"];
|
$database_version = $row["db_ver"];
|
||||||
break; // limit to 1 row
|
break; // limit to 1 row
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($db_ver_query, $prep_statement);
|
unset($db_ver_query, $prep_statement);
|
||||||
$db_ver = $database_version;
|
$db_ver = $database_version;
|
||||||
|
|
||||||
// operating system name & version
|
// operating system name & version
|
||||||
$os_platform = PHP_OS;
|
$os_platform = PHP_OS;
|
||||||
$os_info_1 = php_uname("a");
|
$os_info_1 = php_uname("a");
|
||||||
if ($os_platform == "Linux") {
|
if ($os_platform == "Linux") {
|
||||||
$os_info_2 = shell_exec("cat /etc/*{release,version}");
|
$os_info_2 = shell_exec("cat /etc/*{release,version}");
|
||||||
$os_info_2 .= shell_exec("lsb_release -d -s");
|
$os_info_2 .= shell_exec("lsb_release -d -s");
|
||||||
}
|
}
|
||||||
else if (substr(strtoupper($os_platform), 0, 3) == "WIN") {
|
else if (substr(strtoupper($os_platform), 0, 3) == "WIN") {
|
||||||
$os_info_2 = trim(shell_exec("ver"));
|
$os_info_2 = trim(shell_exec("ver"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
// check for demographic only submit
|
// check for demographic only submit
|
||||||
if (isset($_GET["demo"])) {
|
if (isset($_GET["demo"])) {
|
||||||
|
|
||||||
// update remote server record with new values
|
// update remote server record with new values
|
||||||
$url = "https://".$software_url."/app/notifications/notifications_manage.php";
|
$url = "https://".$software_url."/app/notifications/notifications_manage.php";
|
||||||
$url .= "?demo";
|
$url .= "?demo";
|
||||||
$url .= "&id=".$software_uuid;
|
$url .= "&id=".$software_uuid;
|
||||||
$url .= "&software_ver=".urlencode($software_ver);
|
$url .= "&software_ver=".urlencode($software_ver);
|
||||||
$url .= "&php_ver=".urlencode($php_ver);
|
$url .= "&php_ver=".urlencode($php_ver);
|
||||||
$url .= "&web_server=".urlencode($web_server);
|
$url .= "&web_server=".urlencode($web_server);
|
||||||
$url .= "&switch_ver=".urlencode($switch_ver);
|
$url .= "&switch_ver=".urlencode($switch_ver);
|
||||||
$url .= "&db_type=".urlencode($db_type);
|
$url .= "&db_type=".urlencode($db_type);
|
||||||
$url .= "&db_ver=".urlencode($db_ver);
|
$url .= "&db_ver=".urlencode($db_ver);
|
||||||
$url .= "&os_platform=".urlencode($os_platform);
|
$url .= "&os_platform=".urlencode($os_platform);
|
||||||
$url .= "&os_info_1=".urlencode($os_info_1);
|
$url .= "&os_info_1=".urlencode($os_info_1);
|
||||||
$url .= "&os_info_2=".urlencode($os_info_2);
|
$url .= "&os_info_2=".urlencode($os_info_2);
|
||||||
|
|
||||||
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
||||||
$response = file_get_contents($url);
|
$response = file_get_contents($url);
|
||||||
}
|
}
|
||||||
else if (function_exists('curl_version')) {
|
else if (function_exists('curl_version')) {
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt($curl, CURLOPT_URL, $url);
|
curl_setopt($curl, CURLOPT_URL, $url);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse response
|
// parse response
|
||||||
$response = json_decode($response, true);
|
$response = json_decode($response, true);
|
||||||
|
|
||||||
if ($response['result'] == 'submitted') {
|
if ($response['result'] == 'submitted') {
|
||||||
// set message
|
// set message
|
||||||
$_SESSION["message"] = $text['message-demographics_submitted'];
|
$_SESSION["message"] = $text['message-demographics_submitted'];
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Location: notification_edit.php");
|
header("Location: notification_edit.php");
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// retrieve submitted values
|
// retrieve submitted values
|
||||||
$project_notifications = check_str($_POST["project_notifications"]);
|
$project_notifications = check_str($_POST["project_notifications"]);
|
||||||
$project_security = check_str($_POST["project_security"]);
|
$project_security = check_str($_POST["project_security"]);
|
||||||
$project_releases = check_str($_POST["project_releases"]);
|
$project_releases = check_str($_POST["project_releases"]);
|
||||||
$project_events = check_str($_POST["project_events"]);
|
$project_events = check_str($_POST["project_events"]);
|
||||||
$project_news = check_str($_POST["project_news"]);
|
$project_news = check_str($_POST["project_news"]);
|
||||||
$project_notification_method = check_str($_POST["project_notification_method"]);
|
$project_notification_method = check_str($_POST["project_notification_method"]);
|
||||||
$project_notification_recipient = check_str($_POST["project_notification_recipient"]);
|
$project_notification_recipient = check_str($_POST["project_notification_recipient"]);
|
||||||
|
|
||||||
// get local project notification participation flag
|
// get local project notification participation flag
|
||||||
$sql = "select project_notifications from v_notifications";
|
$sql = "select project_notifications from v_notifications";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$current_project_notifications = $row["project_notifications"];
|
$current_project_notifications = $row["project_notifications"];
|
||||||
break; // limit to 1 row
|
break; // limit to 1 row
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql, $prep_statement);
|
unset($sql, $prep_statement);
|
||||||
|
|
||||||
// check if remote record should be removed
|
// check if remote record should be removed
|
||||||
if ($project_notifications == 'false') {
|
if ($project_notifications == 'false') {
|
||||||
|
|
||||||
if ($current_project_notifications == 'true') {
|
if ($current_project_notifications == 'true') {
|
||||||
// remove remote server record
|
// remove remote server record
|
||||||
$url = "https://".$software_url."/app/notifications/notifications_manage.php?id=".$software_uuid."&action=delete";
|
$url = "https://".$software_url."/app/notifications/notifications_manage.php?id=".$software_uuid."&action=delete";
|
||||||
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
||||||
$response = file_get_contents($url);
|
$response = file_get_contents($url);
|
||||||
}
|
}
|
||||||
else if (function_exists('curl_version')) {
|
else if (function_exists('curl_version')) {
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt($curl, CURLOPT_URL, $url);
|
curl_setopt($curl, CURLOPT_URL, $url);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse response
|
// parse response
|
||||||
$response = json_decode($response, true);
|
$response = json_decode($response, true);
|
||||||
|
|
||||||
if ($response['result'] == 'deleted') {
|
if ($response['result'] == 'deleted') {
|
||||||
// set local project notification participation flag to false
|
// set local project notification participation flag to false
|
||||||
$sql = "update v_notifications set project_notifications = 'false'";
|
$sql = "update v_notifications set project_notifications = 'false'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// redirect
|
// redirect
|
||||||
$_SESSION["message"] = $text['message-update'];
|
$_SESSION["message"] = $text['message-update'];
|
||||||
header("Location: notification_edit.php");
|
header("Location: notification_edit.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for invalid values
|
// check for invalid values
|
||||||
if ($project_notifications == 'true') {
|
if ($project_notifications == 'true') {
|
||||||
if (
|
if (
|
||||||
($project_notification_method == 'email' && !valid_email($project_notification_recipient)) ||
|
($project_notification_method == 'email' && !valid_email($project_notification_recipient)) ||
|
||||||
($project_notification_method == 'email' && $project_notification_recipient == '')
|
($project_notification_method == 'email' && $project_notification_recipient == '')
|
||||||
) {
|
) {
|
||||||
$_SESSION["postback"] = $_POST;
|
$_SESSION["postback"] = $_POST;
|
||||||
$_SESSION["message_mood"] = 'negative';
|
$_SESSION["message_mood"] = 'negative';
|
||||||
$_SESSION["message"] = $text['message-invalid_recipient'];
|
$_SESSION["message"] = $text['message-invalid_recipient'];
|
||||||
header("Location: notification_edit.php");
|
header("Location: notification_edit.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update remote server record with new values
|
// update remote server record with new values
|
||||||
$url = "https://".$software_url."/app/notifications/notifications_manage.php";
|
$url = "https://".$software_url."/app/notifications/notifications_manage.php";
|
||||||
$url .= "?id=".$software_uuid;
|
$url .= "?id=".$software_uuid;
|
||||||
$url .= "&security=".$project_security;
|
$url .= "&security=".$project_security;
|
||||||
$url .= "&releases=".$project_releases;
|
$url .= "&releases=".$project_releases;
|
||||||
$url .= "&events=".$project_events;
|
$url .= "&events=".$project_events;
|
||||||
$url .= "&news=".$project_news;
|
$url .= "&news=".$project_news;
|
||||||
$url .= "&method=".$project_notification_method;
|
$url .= "&method=".$project_notification_method;
|
||||||
$url .= "&recipient=".urlencode($project_notification_recipient);
|
$url .= "&recipient=".urlencode($project_notification_recipient);
|
||||||
$url .= "&software_ver=".urlencode($software_ver);
|
$url .= "&software_ver=".urlencode($software_ver);
|
||||||
$url .= "&php_ver=".urlencode($php_ver);
|
$url .= "&php_ver=".urlencode($php_ver);
|
||||||
$url .= "&web_server=".urlencode($web_server);
|
$url .= "&web_server=".urlencode($web_server);
|
||||||
$url .= "&switch_ver=".urlencode($switch_ver);
|
$url .= "&switch_ver=".urlencode($switch_ver);
|
||||||
$url .= "&db_type=".urlencode($db_type);
|
$url .= "&db_type=".urlencode($db_type);
|
||||||
$url .= "&db_ver=".urlencode($db_ver);
|
$url .= "&db_ver=".urlencode($db_ver);
|
||||||
$url .= "&os_platform=".urlencode($os_platform);
|
$url .= "&os_platform=".urlencode($os_platform);
|
||||||
$url .= "&os_info_1=".urlencode($os_info_1);
|
$url .= "&os_info_1=".urlencode($os_info_1);
|
||||||
$url .= "&os_info_2=".urlencode($os_info_2);
|
$url .= "&os_info_2=".urlencode($os_info_2);
|
||||||
|
|
||||||
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
||||||
$response = file_get_contents($url);
|
$response = file_get_contents($url);
|
||||||
}
|
}
|
||||||
else if (function_exists('curl_version')) {
|
else if (function_exists('curl_version')) {
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt($curl, CURLOPT_URL, $url);
|
curl_setopt($curl, CURLOPT_URL, $url);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse response
|
// parse response
|
||||||
$response = json_decode($response, true);
|
$response = json_decode($response, true);
|
||||||
|
|
||||||
if ($response['result'] == 'updated' || $response['result'] == 'inserted') {
|
if ($response['result'] == 'updated' || $response['result'] == 'inserted') {
|
||||||
// set local project notification participation flag to true
|
// set local project notification participation flag to true
|
||||||
$sql = "update v_notifications set project_notifications = 'true'";
|
$sql = "update v_notifications set project_notifications = 'true'";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
// set message
|
// set message
|
||||||
$_SESSION["message"] = $text['message-update'];
|
$_SESSION["message"] = $text['message-update'];
|
||||||
if (
|
if (
|
||||||
$project_security == 'false' &&
|
$project_security == 'false' &&
|
||||||
$project_releases == 'false' &&
|
$project_releases == 'false' &&
|
||||||
$project_events == 'false' &&
|
$project_events == 'false' &&
|
||||||
$project_news == 'false'
|
$project_news == 'false'
|
||||||
) {
|
) {
|
||||||
$_SESSION["message_mood"] = 'alert';
|
$_SESSION["message_mood"] = 'alert';
|
||||||
$_SESSION["message"] = $_SESSION["message"]." - ".$text['message-no_channels'];
|
$_SESSION["message"] = $_SESSION["message"]." - ".$text['message-no_channels'];
|
||||||
}
|
}
|
||||||
// redirect
|
// redirect
|
||||||
header("Location: notification_edit.php");
|
header("Location: notification_edit.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check postback session
|
// check postback session
|
||||||
if (!isset($_SESSION["postback"])) {
|
if (!isset($_SESSION["postback"])) {
|
||||||
|
|
||||||
// check local project notification participation flag
|
// check local project notification participation flag
|
||||||
$sql = "select project_notifications from v_notifications";
|
$sql = "select project_notifications from v_notifications";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$setting["project_notifications"] = $row["project_notifications"];
|
$setting["project_notifications"] = $row["project_notifications"];
|
||||||
break; // limit to 1 row
|
break; // limit to 1 row
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($sql, $prep_statement);
|
unset($sql, $prep_statement);
|
||||||
|
|
||||||
// if participation enabled
|
// if participation enabled
|
||||||
if ($setting["project_notifications"] == 'true') {
|
if ($setting["project_notifications"] == 'true') {
|
||||||
|
|
||||||
// get current project notification preferences
|
// get current project notification preferences
|
||||||
$url = "https://".$software_url."/app/notifications/notifications_manage.php?id=".$software_uuid;
|
$url = "https://".$software_url."/app/notifications/notifications_manage.php?id=".$software_uuid;
|
||||||
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
if (file_get_contents(__FILE__) && ini_get('allow_url_fopen')) {
|
||||||
$response = file_get_contents($url);
|
$response = file_get_contents($url);
|
||||||
}
|
}
|
||||||
else if (function_exists('curl_version')) {
|
else if (function_exists('curl_version')) {
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt($curl, CURLOPT_URL, $url);
|
curl_setopt($curl, CURLOPT_URL, $url);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse response
|
// parse response
|
||||||
$setting = json_decode($response, true);
|
$setting = json_decode($response, true);
|
||||||
$setting["project_notifications"] = 'true';
|
$setting["project_notifications"] = 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
// load postback variables
|
// load postback variables
|
||||||
$setting = fix_postback($_SESSION["postback"]);
|
$setting = fix_postback($_SESSION["postback"]);
|
||||||
unset($_SESSION["postback"]);
|
unset($_SESSION["postback"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
$document['title'] = $text['title-notifications'];
|
$document['title'] = $text['title-notifications'];
|
||||||
|
|
||||||
// show the content
|
// show the content
|
||||||
echo "<form method='post' name='frm' action=''>\n";
|
echo "<form method='post' name='frm' action=''>\n";
|
||||||
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' nowrap='nowrap'><b>".$text['header-notifications']."</b><br><br></td>\n";
|
echo " <td align='left' nowrap='nowrap'><b>".$text['header-notifications']."</b><br><br></td>\n";
|
||||||
echo " <td align='right'>";
|
echo " <td align='right'>";
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo " <br><br>";
|
echo " <br><br>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' colspan='2'>\n";
|
echo " <td align='left' colspan='2'>\n";
|
||||||
echo " ".$text['description-notifications']."<br /><br />\n";
|
echo " ".$text['description-notifications']."<br /><br />\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo " <td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_notifications']."\n";
|
echo $text['label-project_notifications']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <select name='project_notifications' class='formfld' style='width: auto;' onchange=\"$('#notification_channels').slideToggle();\">\n";
|
echo " <select name='project_notifications' class='formfld' style='width: auto;' onchange=\"$('#notification_channels').slideToggle();\">\n";
|
||||||
echo " <option value='false' ".(($setting["project_notifications"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
echo " <option value='false' ".(($setting["project_notifications"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
||||||
echo " <option value='true' ".(($setting["project_notifications"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
echo " <option value='true' ".(($setting["project_notifications"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo $text['description-project_notifications']."\n";
|
echo $text['description-project_notifications']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
echo "<div id='notification_channels' ".(($setting["project_notifications"] != 'true') ? "style='display: none;'" : null).">\n";
|
echo "<div id='notification_channels' ".(($setting["project_notifications"] != 'true') ? "style='display: none;'" : null).">\n";
|
||||||
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_security']."\n";
|
echo $text['label-project_security']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <select name='project_security' class='formfld' style='width: auto;'>\n";
|
echo " <select name='project_security' class='formfld' style='width: auto;'>\n";
|
||||||
echo " <option value='false' ".(($setting["project_security"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
echo " <option value='false' ".(($setting["project_security"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
||||||
echo " <option value='true' ".(($setting["project_security"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
echo " <option value='true' ".(($setting["project_security"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo $text['description-project_security']."\n";
|
echo $text['description-project_security']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
|
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_releases']."\n";
|
echo $text['label-project_releases']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <select name='project_releases' class='formfld' style='width: auto;'>\n";
|
echo " <select name='project_releases' class='formfld' style='width: auto;'>\n";
|
||||||
echo " <option value='false' ".(($setting["project_releases"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
echo " <option value='false' ".(($setting["project_releases"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
||||||
echo " <option value='true' ".(($setting["project_releases"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
echo " <option value='true' ".(($setting["project_releases"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo $text['description-project_releases']."\n";
|
echo $text['description-project_releases']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_events']."\n";
|
echo $text['label-project_events']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <select name='project_events' class='formfld' style='width: auto;'>\n";
|
echo " <select name='project_events' class='formfld' style='width: auto;'>\n";
|
||||||
echo " <option value='false' ".(($setting["project_events"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
echo " <option value='false' ".(($setting["project_events"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
||||||
echo " <option value='true' ".(($setting["project_events"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
echo " <option value='true' ".(($setting["project_events"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo $text['description-project_events']."\n";
|
echo $text['description-project_events']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
|
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_news']."\n";
|
echo $text['label-project_news']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <select name='project_news' class='formfld' style='width: auto;'>\n";
|
echo " <select name='project_news' class='formfld' style='width: auto;'>\n";
|
||||||
echo " <option value='false' ".(($setting["project_news"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
echo " <option value='false' ".(($setting["project_news"] == 'false') ? "selected='selected'" : null).">".$text['option-disabled']."</option>\n";
|
||||||
echo " <option value='true' ".(($setting["project_news"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
echo " <option value='true' ".(($setting["project_news"] == 'true') ? "selected='selected'" : null).">".$text['option-enabled']."</option>\n";
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo $text['description-project_news']."\n";
|
echo $text['description-project_news']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo " <input type='hidden' name='project_notification_method' value='email'>\n";
|
echo " <input type='hidden' name='project_notification_method' value='email'>\n";
|
||||||
/*
|
/*
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_notification_method']."\n";
|
echo $text['label-project_notification_method']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||||
echo " <select name='project_notification_method' class='formfld' style='width: auto;'>\n";
|
echo " <select name='project_notification_method' class='formfld' style='width: auto;'>\n";
|
||||||
echo " <option value='email' ".(($setting["project_notification_method"] == 'email') ? "selected='selected'" : null).">".$text['option-email']."</option>\n";
|
echo " <option value='email' ".(($setting["project_notification_method"] == 'email') ? "selected='selected'" : null).">".$text['option-email']."</option>\n";
|
||||||
echo " </select><br />\n";
|
echo " </select><br />\n";
|
||||||
echo $text['description-project_notification_method']."\n";
|
echo $text['description-project_notification_method']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td class='vncellreq' valign='top' align='left' nowrap>\n";
|
echo " <td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||||
echo $text['label-project_notification_recipient']."\n";
|
echo $text['label-project_notification_recipient']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class='vtable' align='left'>\n";
|
echo " <td class='vtable' align='left'>\n";
|
||||||
echo " <input class='formfld' type='text' name='project_notification_recipient' maxlength='50' value='".$setting["project_notification_recipient"]."'><br />\n";
|
echo " <input class='formfld' type='text' name='project_notification_recipient' maxlength='50' value='".$setting["project_notification_recipient"]."'><br />\n";
|
||||||
echo $text['description-project_notification_recipient']."\n";
|
echo $text['description-project_notification_recipient']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td colspan='2' class='vtable' style='padding: 15px;' align='right'>\n";
|
echo " <td colspan='2' class='vtable' style='padding: 15px;' align='right'>\n";
|
||||||
echo " ".$text['message-disclaimer']."\n";
|
echo " ".$text['message-disclaimer']."\n";
|
||||||
echo " <br /><br />\n";
|
echo " <br /><br />\n";
|
||||||
echo " ".$text['message-demographics']." <a href='?demo'>".$text['message-demographics_click_here']."</a>.\n";
|
echo " ".$text['message-demographics']." <a href='?demo'>".$text['message-demographics_click_here']."</a>.\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
echo "<table cellpadding='0' cellspacing='0' width='100%' border='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='right'>\n";
|
echo " <td align='right'>\n";
|
||||||
echo " <br>";
|
echo " <br>";
|
||||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
// include the footer
|
// include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
+248
-248
@@ -1,249 +1,249 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
set_time_limit(600); //sec (10 min)
|
set_time_limit(600); //sec (10 min)
|
||||||
|
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
|
|
||||||
//check the permission
|
//check the permission
|
||||||
if (
|
if (
|
||||||
!permission_exists('upgrade_source') &&
|
!permission_exists('upgrade_source') &&
|
||||||
!permission_exists('upgrade_schema') &&
|
!permission_exists('upgrade_schema') &&
|
||||||
!permission_exists('upgrade_apps') &&
|
!permission_exists('upgrade_apps') &&
|
||||||
!permission_exists('menu_restore') &&
|
!permission_exists('menu_restore') &&
|
||||||
!permission_exists('group_edit')
|
!permission_exists('group_edit')
|
||||||
) {
|
) {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
if (sizeof($_POST) > 0) {
|
if (sizeof($_POST) > 0) {
|
||||||
|
|
||||||
$do = $_POST['do'];
|
$do = $_POST['do'];
|
||||||
|
|
||||||
// run source update
|
// run source update
|
||||||
if ($do["source"] && permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx")) {
|
if ($do["source"] && permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx")) {
|
||||||
chdir($_SERVER["PROJECT_ROOT"]);
|
chdir($_SERVER["PROJECT_ROOT"]);
|
||||||
exec("git pull", $response_source_update);
|
exec("git pull", $response_source_update);
|
||||||
$update_failed = true;
|
$update_failed = true;
|
||||||
if (sizeof($response_source_update) > 0) {
|
if (sizeof($response_source_update) > 0) {
|
||||||
$_SESSION["response_source_update"] = $response_source_update;
|
$_SESSION["response_source_update"] = $response_source_update;
|
||||||
foreach ($response_source_update as $response_line) {
|
foreach ($response_source_update as $response_line) {
|
||||||
if (substr_count($response_line, "Updating ") > 0 || substr_count($response_line, "Already up-to-date.") > 0) {
|
if (substr_count($response_line, "Updating ") > 0 || substr_count($response_line, "Already up-to-date.") > 0) {
|
||||||
$update_failed = false;
|
$update_failed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($update_failed) {
|
if ($update_failed) {
|
||||||
$_SESSION["message_delay"] = 3500;
|
$_SESSION["message_delay"] = 3500;
|
||||||
$_SESSION["message_mood"] = 'negative';
|
$_SESSION["message_mood"] = 'negative';
|
||||||
$response_message = $text['message-upgrade_source_failed'];
|
$response_message = $text['message-upgrade_source_failed'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// load an array of the database schema and compare it with the active database
|
// load an array of the database schema and compare it with the active database
|
||||||
if ($do["schema"] && permission_exists("upgrade_schema")) {
|
if ($do["schema"] && permission_exists("upgrade_schema")) {
|
||||||
$response_message = $text['message-upgrade_schema'];
|
$response_message = $text['message-upgrade_schema'];
|
||||||
|
|
||||||
$upgrade_data_types = check_str($do["data_types"]);
|
$upgrade_data_types = check_str($do["data_types"]);
|
||||||
require_once "resources/classes/schema.php";
|
require_once "resources/classes/schema.php";
|
||||||
$obj = new schema();
|
$obj = new schema();
|
||||||
$_SESSION["schema"]["response"] = $obj->schema("html");
|
$_SESSION["schema"]["response"] = $obj->schema("html");
|
||||||
}
|
}
|
||||||
|
|
||||||
// process the apps defaults
|
// process the apps defaults
|
||||||
if ($do["apps"] && permission_exists("upgrade_apps")) {
|
if ($do["apps"] && permission_exists("upgrade_apps")) {
|
||||||
$response_message = $text['message-upgrade_apps'];
|
$response_message = $text['message-upgrade_apps'];
|
||||||
|
|
||||||
require_once "resources/classes/domains.php";
|
require_once "resources/classes/domains.php";
|
||||||
$domain = new domains;
|
$domain = new domains;
|
||||||
$domain->upgrade();
|
$domain->upgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore defaults of the selected menu
|
// restore defaults of the selected menu
|
||||||
if ($do["menu"] && permission_exists("menu_restore")) {
|
if ($do["menu"] && permission_exists("menu_restore")) {
|
||||||
$sel_menu = explode('|', check_str($_POST["sel_menu"]));
|
$sel_menu = explode('|', check_str($_POST["sel_menu"]));
|
||||||
$menu_uuid = $sel_menu[0];
|
$menu_uuid = $sel_menu[0];
|
||||||
$menu_language = $sel_menu[1];
|
$menu_language = $sel_menu[1];
|
||||||
$included = true;
|
$included = true;
|
||||||
require_once("core/menu/menu_restore_default.php");
|
require_once("core/menu/menu_restore_default.php");
|
||||||
unset($sel_menu);
|
unset($sel_menu);
|
||||||
$response_message = $text['message-upgrade_menu'];
|
$response_message = $text['message-upgrade_menu'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore default permissions
|
// restore default permissions
|
||||||
if ($do["permissions"] && permission_exists("group_edit")) {
|
if ($do["permissions"] && permission_exists("group_edit")) {
|
||||||
$included = true;
|
$included = true;
|
||||||
require_once("core/users/permissions_default.php");
|
require_once("core/users/permissions_default.php");
|
||||||
$response_message = "Permission Defaults Restored";
|
$response_message = "Permission Defaults Restored";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($_POST['do']) > 1) {
|
if (sizeof($_POST['do']) > 1) {
|
||||||
$response_message = $text['message-upgrade'];
|
$response_message = $text['message-upgrade'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["message"] = $response_message;
|
$_SESSION["message"] = $response_message;
|
||||||
header("Location: ".PROJECT_PATH."/core/upgrade/index.php");
|
header("Location: ".PROJECT_PATH."/core/upgrade/index.php");
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
|
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
$document['title'] = $text['title-upgrade'];
|
$document['title'] = $text['title-upgrade'];
|
||||||
|
|
||||||
echo "<b>".$text['header-upgrade']."</b>";
|
echo "<b>".$text['header-upgrade']."</b>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo $text['description-upgrade'];
|
echo $text['description-upgrade'];
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
echo "<form name='frm' method='post' action=''>\n";
|
echo "<form name='frm' method='post' action=''>\n";
|
||||||
|
|
||||||
if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx") && is_writeable($_SERVER["PROJECT_ROOT"]."/.git")) {
|
if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx") && is_writeable($_SERVER["PROJECT_ROOT"]."/.git")) {
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " ".$text['label-upgrade_source'];
|
echo " ".$text['label-upgrade_source'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_source'><input type='checkbox' name='do[source]' id='do_source' value='1'> ".$text['description-upgrade_source']."</label>\n";
|
echo " <label for='do_source'><input type='checkbox' name='do[source]' id='do_source' value='1'> ".$text['description-upgrade_source']."</label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permission_exists("upgrade_schema")) {
|
if (permission_exists("upgrade_schema")) {
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " ".$text['label-upgrade_schema'];
|
echo " ".$text['label-upgrade_schema'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_schema'><input type='checkbox' name='do[schema]' id='do_schema' value='1' onchange=\"$('#do_data_types').prop('checked', false); $('#tr_data_types').slideToggle('fast');\"> ".$text['description-upgrade_schema']."</label>\n";
|
echo " <label for='do_schema'><input type='checkbox' name='do[schema]' id='do_schema' value='1' onchange=\"$('#do_data_types').prop('checked', false); $('#tr_data_types').slideToggle('fast');\"> ".$text['description-upgrade_schema']."</label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
echo "<div id='tr_data_types' style='display: none;'>\n";
|
echo "<div id='tr_data_types' style='display: none;'>\n";
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " ".$text['label-upgrade_data_types'];
|
echo " ".$text['label-upgrade_data_types'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_data_types'><input type='checkbox' name='do[data_types]' id='do_data_types' value='true'> ".$text['description-upgrade_data_types']."</label>\n";
|
echo " <label for='do_data_types'><input type='checkbox' name='do[data_types]' id='do_data_types' value='true'> ".$text['description-upgrade_data_types']."</label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permission_exists("upgrade_apps")) {
|
if (permission_exists("upgrade_apps")) {
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " ".$text['label-upgrade_apps'];
|
echo " ".$text['label-upgrade_apps'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_apps'><input type='checkbox' name='do[apps]' id='do_apps' value='1'> ".$text['description-upgrade_apps']."</label>\n";
|
echo " <label for='do_apps'><input type='checkbox' name='do[apps]' id='do_apps' value='1'> ".$text['description-upgrade_apps']."</label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permission_exists("menu_restore")) {
|
if (permission_exists("menu_restore")) {
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " ".$text['label-upgrade_menu'];
|
echo " ".$text['label-upgrade_menu'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_menu'>";
|
echo " <label for='do_menu'>";
|
||||||
echo "<input type='checkbox' name='do[menu]' id='do_menu' value='1' onchange=\"$('#sel_menu').fadeToggle('fast');\">";
|
echo "<input type='checkbox' name='do[menu]' id='do_menu' value='1' onchange=\"$('#sel_menu').fadeToggle('fast');\">";
|
||||||
echo "<select name='sel_menu' id='sel_menu' class='formfld' style='display: none; vertical-align: middle; margin-left: 5px;'>";
|
echo "<select name='sel_menu' id='sel_menu' class='formfld' style='display: none; vertical-align: middle; margin-left: 5px;'>";
|
||||||
$sql = "select * from v_menus ";
|
$sql = "select * from v_menus ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
echo "<option value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>";
|
echo "<option value='".$row["menu_uuid"]."|".$row["menu_language"]."'>".$row["menu_name"]."</option>";
|
||||||
}
|
}
|
||||||
unset ($sql, $result, $prep_statement);
|
unset ($sql, $result, $prep_statement);
|
||||||
echo "</select>";
|
echo "</select>";
|
||||||
echo " ".$text['description-upgrade_menu'];
|
echo " ".$text['description-upgrade_menu'];
|
||||||
echo "</label>\n";
|
echo "</label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permission_exists("group_edit")) {
|
if (permission_exists("group_edit")) {
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <td width='30%' class='vncell'>\n";
|
echo " <td width='30%' class='vncell'>\n";
|
||||||
echo " ".$text['label-upgrade_permissions'];
|
echo " ".$text['label-upgrade_permissions'];
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
|
||||||
echo " <label for='do_permissions'><input type='checkbox' name='do[permissions]' id='do_permissions' value='1'> ".$text['description-upgrade_permissions']."</label>\n";
|
echo " <label for='do_permissions'><input type='checkbox' name='do[permissions]' id='do_permissions' value='1'> ".$text['description-upgrade_permissions']."</label>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
echo "<div style='text-align: right;'><input type='submit' class='btn' value='".$text['button-upgrade_execute']."'></div>";
|
echo "<div style='text-align: right;'><input type='submit' class='btn' value='".$text['button-upgrade_execute']."'></div>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
// output result of source update
|
// output result of source update
|
||||||
if (sizeof($_SESSION["response_source_update"]) > 0) {
|
if (sizeof($_SESSION["response_source_update"]) > 0) {
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<b>".$text['header-source_update_results']."</b>";
|
echo "<b>".$text['header-source_update_results']."</b>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
echo "<pre>";
|
echo "<pre>";
|
||||||
echo implode("\n", $_SESSION["response_source_update"]);
|
echo implode("\n", $_SESSION["response_source_update"]);
|
||||||
echo "</pre>";
|
echo "</pre>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
unset($_SESSION["response_source_update"]);
|
unset($_SESSION["response_source_update"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// output result of upgrade schema
|
// output result of upgrade schema
|
||||||
if ($_SESSION["schema"]["response"] != '') {
|
if ($_SESSION["schema"]["response"] != '') {
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<b>".$text['header-upgrade_schema_results']."</b>";
|
echo "<b>".$text['header-upgrade_schema_results']."</b>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
echo $_SESSION["schema"]["response"];
|
echo $_SESSION["schema"]["response"];
|
||||||
unset($_SESSION["schema"]["response"]);
|
unset($_SESSION["schema"]["response"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
+1259
-1259
File diff suppressed because it is too large
Load Diff
@@ -1,43 +1,43 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][0]['title']['en-us'] = "Account Settings";
|
$apps[$x]['menu'][0]['title']['en-us'] = "Account Settings";
|
||||||
$apps[$x]['menu'][0]['title']['es-cl'] = "Config de Cuenta";
|
$apps[$x]['menu'][0]['title']['es-cl'] = "Config de Cuenta";
|
||||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "Configuration du Compte";
|
$apps[$x]['menu'][0]['title']['fr-fr'] = "Configuration du Compte";
|
||||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "Configurações da Conta";
|
$apps[$x]['menu'][0]['title']['pt-pt'] = "Configurações da Conta";
|
||||||
$apps[$x]['menu'][0]['title']['pt-br'] = "Configurações da Conta";
|
$apps[$x]['menu'][0]['title']['pt-br'] = "Configurações da Conta";
|
||||||
$apps[$x]['menu'][0]['title']['pl'] = "Ustawienia konta";
|
$apps[$x]['menu'][0]['title']['pl'] = "Ustawienia konta";
|
||||||
$apps[$x]['menu'][0]['title']['he'] = "הגדרת חשבון";
|
$apps[$x]['menu'][0]['title']['he'] = "הגדרת חשבון";
|
||||||
$apps[$x]['menu'][0]['title']['uk'] = "Обліковий запис";
|
$apps[$x]['menu'][0]['title']['uk'] = "Обліковий запис";
|
||||||
$apps[$x]['menu'][0]['title']['sv-se'] = "Kontoinställningar";
|
$apps[$x]['menu'][0]['title']['sv-se'] = "Kontoinställningar";
|
||||||
$apps[$x]['menu'][0]['title']['de-at'] = "Kontoeinstellungen";
|
$apps[$x]['menu'][0]['title']['de-at'] = "Kontoeinstellungen";
|
||||||
$apps[$x]['menu'][0]['title']['ro'] = "Setări cont";
|
$apps[$x]['menu'][0]['title']['ro'] = "Setări cont";
|
||||||
$apps[$x]['menu'][0]['title']['ar-eg'] = "إعدادات الحساب";
|
$apps[$x]['menu'][0]['title']['ar-eg'] = "إعدادات الحساب";
|
||||||
$apps[$x]['menu'][0]['uuid'] = "4d532f0b-c206-c39d-ff33-fc67d668fb69";
|
$apps[$x]['menu'][0]['uuid'] = "4d532f0b-c206-c39d-ff33-fc67d668fb69";
|
||||||
$apps[$x]['menu'][0]['parent_uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788";
|
$apps[$x]['menu'][0]['parent_uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788";
|
||||||
$apps[$x]['menu'][0]['category'] = "internal";
|
$apps[$x]['menu'][0]['category'] = "internal";
|
||||||
$apps[$x]['menu'][0]['path'] = "/core/user_settings/user_edit.php";
|
$apps[$x]['menu'][0]['path'] = "/core/user_settings/user_edit.php";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "user";
|
$apps[$x]['menu'][0]['groups'][] = "user";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "admin";
|
$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['menu'][1]['title']['en-us'] = "Dashboard";
|
$apps[$x]['menu'][1]['title']['en-us'] = "Dashboard";
|
||||||
$apps[$x]['menu'][1]['title']['es-cl'] = "Dashboard Usuario";
|
$apps[$x]['menu'][1]['title']['es-cl'] = "Dashboard Usuario";
|
||||||
$apps[$x]['menu'][1]['title']['fr-fr'] = "Tableau de bord de l'utilisateur";
|
$apps[$x]['menu'][1]['title']['fr-fr'] = "Tableau de bord de l'utilisateur";
|
||||||
$apps[$x]['menu'][1]['title']['pt-pt'] = "Painel de Controle do Usuário";
|
$apps[$x]['menu'][1]['title']['pt-pt'] = "Painel de Controle do Usuário";
|
||||||
$apps[$x]['menu'][1]['title']['pt-br'] = "Painel de Controle do Usuário";
|
$apps[$x]['menu'][1]['title']['pt-br'] = "Painel de Controle do Usuário";
|
||||||
$apps[$x]['menu'][1]['title']['pl'] = "Panel użytkowników";
|
$apps[$x]['menu'][1]['title']['pl'] = "Panel użytkowników";
|
||||||
$apps[$x]['menu'][1]['title']['he'] = "ממשק משתמש";
|
$apps[$x]['menu'][1]['title']['he'] = "ממשק משתמש";
|
||||||
$apps[$x]['menu'][1]['title']['uk'] = "Панель користувача";
|
$apps[$x]['menu'][1]['title']['uk'] = "Панель користувача";
|
||||||
$apps[$x]['menu'][1]['title']['sv-se'] = "Användarpanel";
|
$apps[$x]['menu'][1]['title']['sv-se'] = "Användarpanel";
|
||||||
$apps[$x]['menu'][1]['title']['de-at'] = "Benutzerübersicht";
|
$apps[$x]['menu'][1]['title']['de-at'] = "Benutzerübersicht";
|
||||||
$apps[$x]['menu'][1]['title']['ro'] = "Panou control utilizator";
|
$apps[$x]['menu'][1]['title']['ro'] = "Panou control utilizator";
|
||||||
$apps[$x]['menu'][1]['title']['ar-eg'] = "الصفحه الرئيسيه للمستخدم";
|
$apps[$x]['menu'][1]['title']['ar-eg'] = "الصفحه الرئيسيه للمستخدم";
|
||||||
$apps[$x]['menu'][1]['uuid'] = "92c8ffdb-3c82-4f08-aec0-82421ec41bb5";
|
$apps[$x]['menu'][1]['uuid'] = "92c8ffdb-3c82-4f08-aec0-82421ec41bb5";
|
||||||
$apps[$x]['menu'][1]['parent_uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788";
|
$apps[$x]['menu'][1]['parent_uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788";
|
||||||
$apps[$x]['menu'][1]['category'] = "internal";
|
$apps[$x]['menu'][1]['category'] = "internal";
|
||||||
$apps[$x]['menu'][1]['path'] = "/core/user_settings/user_dashboard.php";
|
$apps[$x]['menu'][1]['path'] = "/core/user_settings/user_dashboard.php";
|
||||||
$apps[$x]['menu'][1]['groups'][] = "user";
|
$apps[$x]['menu'][1]['groups'][] = "user";
|
||||||
$apps[$x]['menu'][1]['groups'][] = "admin";
|
$apps[$x]['menu'][1]['groups'][] = "admin";
|
||||||
$apps[$x]['menu'][1]['groups'][] = "superadmin";
|
$apps[$x]['menu'][1]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+421
-421
@@ -1,421 +1,421 @@
|
|||||||
<?php
|
<?php
|
||||||
//application details
|
//application details
|
||||||
$apps[$x]['name'] = "User Manager";
|
$apps[$x]['name'] = "User Manager";
|
||||||
$apps[$x]['uuid'] = "112124b3-95c2-5352-7e9d-d14c0b88f207";
|
$apps[$x]['uuid'] = "112124b3-95c2-5352-7e9d-d14c0b88f207";
|
||||||
$apps[$x]['category'] = "Core";
|
$apps[$x]['category'] = "Core";
|
||||||
$apps[$x]['subcategory'] = "";
|
$apps[$x]['subcategory'] = "";
|
||||||
$apps[$x]['version'] = "";
|
$apps[$x]['version'] = "";
|
||||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||||
$apps[$x]['description']['en-us'] = "Add, edit, delete, and search for users.";
|
$apps[$x]['description']['en-us'] = "Add, edit, delete, and search for users.";
|
||||||
$apps[$x]['description']['es-cl'] = "Agregar, Editar, Eliminar y Buscar Usuarios.";
|
$apps[$x]['description']['es-cl'] = "Agregar, Editar, Eliminar y Buscar Usuarios.";
|
||||||
$apps[$x]['description']['de-de'] = "";
|
$apps[$x]['description']['de-de'] = "";
|
||||||
$apps[$x]['description']['de-ch'] = "";
|
$apps[$x]['description']['de-ch'] = "";
|
||||||
$apps[$x]['description']['de-at'] = "";
|
$apps[$x]['description']['de-at'] = "";
|
||||||
$apps[$x]['description']['fr-fr'] = "Ajouter, Editer, Supprimer et Chercher des Usagers";
|
$apps[$x]['description']['fr-fr'] = "Ajouter, Editer, Supprimer et Chercher des Usagers";
|
||||||
$apps[$x]['description']['fr-ca'] = "";
|
$apps[$x]['description']['fr-ca'] = "";
|
||||||
$apps[$x]['description']['fr-ch'] = "";
|
$apps[$x]['description']['fr-ch'] = "";
|
||||||
$apps[$x]['description']['pt-pt'] = "Adicionar, editar, apagar e pesquisa pelos utilizadores.";
|
$apps[$x]['description']['pt-pt'] = "Adicionar, editar, apagar e pesquisa pelos utilizadores.";
|
||||||
$apps[$x]['description']['pt-br'] = "";
|
$apps[$x]['description']['pt-br'] = "";
|
||||||
|
|
||||||
//permission details
|
//permission details
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_view";
|
$apps[$x]['permissions'][$y]['name'] = "user_view";
|
||||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
$apps[$x]['permissions'][$y]['menu']['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_add";
|
$apps[$x]['permissions'][$y]['name'] = "user_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_edit";
|
$apps[$x]['permissions'][$y]['name'] = "user_edit";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_delete";
|
$apps[$x]['permissions'][$y]['name'] = "user_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = 'user_domain';
|
$apps[$x]['permissions'][$y]['name'] = 'user_domain';
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = 'user_all';
|
$apps[$x]['permissions'][$y]['name'] = 'user_all';
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_view";
|
$apps[$x]['permissions'][$y]['name'] = "group_view";
|
||||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_add";
|
$apps[$x]['permissions'][$y]['name'] = "group_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_edit";
|
$apps[$x]['permissions'][$y]['name'] = "group_edit";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_delete";
|
$apps[$x]['permissions'][$y]['name'] = "group_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = 'group_domain';
|
$apps[$x]['permissions'][$y]['name'] = 'group_domain';
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = 'group_all';
|
$apps[$x]['permissions'][$y]['name'] = 'group_all';
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_member_view";
|
$apps[$x]['permissions'][$y]['name'] = "group_member_view";
|
||||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_member_add";
|
$apps[$x]['permissions'][$y]['name'] = "group_member_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_member_delete";
|
$apps[$x]['permissions'][$y]['name'] = "group_member_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_permissions";
|
$apps[$x]['permissions'][$y]['name'] = "group_permissions";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_user_view";
|
$apps[$x]['permissions'][$y]['name'] = "group_user_view";
|
||||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_user_add";
|
$apps[$x]['permissions'][$y]['name'] = "group_user_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_user_edit";
|
$apps[$x]['permissions'][$y]['name'] = "group_user_edit";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_user_delete";
|
$apps[$x]['permissions'][$y]['name'] = "group_user_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_view";
|
$apps[$x]['permissions'][$y]['name'] = "group_permission_view";
|
||||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_add";
|
$apps[$x]['permissions'][$y]['name'] = "group_permission_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_edit";
|
$apps[$x]['permissions'][$y]['name'] = "group_permission_edit";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_delete";
|
$apps[$x]['permissions'][$y]['name'] = "group_permission_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_view";
|
$apps[$x]['permissions'][$y]['name'] = "user_setting_view";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_add";
|
$apps[$x]['permissions'][$y]['name'] = "user_setting_add";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_edit";
|
$apps[$x]['permissions'][$y]['name'] = "user_setting_edit";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_delete";
|
$apps[$x]['permissions'][$y]['name'] = "user_setting_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_category_edit";
|
$apps[$x]['permissions'][$y]['name'] = "user_setting_category_edit";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
|
|
||||||
//schema details
|
//schema details
|
||||||
$y = 0; //table array index
|
$y = 0; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
$apps[$x]['db'][$y]['table'] = "v_users";
|
$apps[$x]['db'][$y]['table'] = "v_users";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "password";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "password";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "salt";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "salt";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
//$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
//$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
//$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_contacts";
|
//$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_contacts";
|
||||||
//$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "contact_uuid";
|
//$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "contact_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_email";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_email";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "useremail";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "useremail";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_status";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_status";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "userstatus";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "userstatus";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_time_zone";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_time_zone";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "usertimezone";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "usertimezone";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "api_key";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "api_key";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_enabled";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_enabled";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_user";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_user";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_date";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_date";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
$y = 1; //table array index
|
$y = 1; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
$apps[$x]['db'][$y]['table'] = "v_groups";
|
$apps[$x]['db'][$y]['table'] = "v_groups";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_protected";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_protected";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_description";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_description";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupdesc";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupdesc";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
$y = 2; //table array index
|
$y = 2; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
$apps[$x]['db'][$y]['table'] = "v_group_users";
|
$apps[$x]['db'][$y]['table'] = "v_group_users";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_user_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_user_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_groups";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_groups";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
$y = 3; //table array index
|
$y = 3; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
$apps[$x]['db'][$y]['table'] = "v_group_permissions";
|
$apps[$x]['db'][$y]['table'] = "v_group_permissions";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_permission_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_permission_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "group_permission_name";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "group_permission_name";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "permission_name";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "permission_name";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "permission_id";
|
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "permission_id";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_name";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_name";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
$y = 4; //table array index
|
$y = 4; //table array index
|
||||||
$z = 0; //field array index
|
$z = 0; //field array index
|
||||||
$apps[$x]['db'][$y]['table'] = "v_user_settings";
|
$apps[$x]['db'][$y]['table'] = "v_user_settings";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_category";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_category";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the category.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the category.";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_subcategory";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_subcategory";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the subcategory.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the subcategory.";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_name";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_name";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name.";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_value";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_value";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the value.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the value.";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_order";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_order";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_enabled";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_enabled";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_description";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_description";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
?>
|
?>
|
||||||
|
|||||||
+1072
-1072
File diff suppressed because it is too large
Load Diff
+35
-35
@@ -1,36 +1,36 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$apps[$x]['menu'][2]['title']['en-us'] = "Users";
|
$apps[$x]['menu'][2]['title']['en-us'] = "Users";
|
||||||
$apps[$x]['menu'][2]['title']['es-cl'] = "Gestor de Usuarios";
|
$apps[$x]['menu'][2]['title']['es-cl'] = "Gestor de Usuarios";
|
||||||
$apps[$x]['menu'][2]['title']['fr-fr'] = "Gestion des utilisteurs";
|
$apps[$x]['menu'][2]['title']['fr-fr'] = "Gestion des utilisteurs";
|
||||||
$apps[$x]['menu'][2]['title']['pt-pt'] = "Gestão de Utilizadores";
|
$apps[$x]['menu'][2]['title']['pt-pt'] = "Gestão de Utilizadores";
|
||||||
$apps[$x]['menu'][2]['title']['pt-br'] = "Gerencir utiliários";
|
$apps[$x]['menu'][2]['title']['pt-br'] = "Gerencir utiliários";
|
||||||
$apps[$x]['menu'][2]['title']['pl'] = "Menedżer użytkowników";
|
$apps[$x]['menu'][2]['title']['pl'] = "Menedżer użytkowników";
|
||||||
$apps[$x]['menu'][2]['title']['uk'] = "Користувачі";
|
$apps[$x]['menu'][2]['title']['uk'] = "Користувачі";
|
||||||
$apps[$x]['menu'][2]['title']['sv-se'] = "Användar Inställningar";
|
$apps[$x]['menu'][2]['title']['sv-se'] = "Användar Inställningar";
|
||||||
$apps[$x]['menu'][2]['title']['de-at'] = "Benutzerverwaltung";
|
$apps[$x]['menu'][2]['title']['de-at'] = "Benutzerverwaltung";
|
||||||
$apps[$x]['menu'][2]['title']['he'] = "מנהל משתמש";
|
$apps[$x]['menu'][2]['title']['he'] = "מנהל משתמש";
|
||||||
$apps[$x]['menu'][2]['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
$apps[$x]['menu'][2]['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
||||||
$apps[$x]['menu'][2]['parent_uuid'] = "bc96d773-ee57-0cdd-c3ac-2d91aba61b55";
|
$apps[$x]['menu'][2]['parent_uuid'] = "bc96d773-ee57-0cdd-c3ac-2d91aba61b55";
|
||||||
$apps[$x]['menu'][2]['category'] = "internal";
|
$apps[$x]['menu'][2]['category'] = "internal";
|
||||||
$apps[$x]['menu'][2]['path'] = "/core/users/index.php";
|
$apps[$x]['menu'][2]['path'] = "/core/users/index.php";
|
||||||
$apps[$x]['menu'][2]['groups'][] = "admin";
|
$apps[$x]['menu'][2]['groups'][] = "admin";
|
||||||
$apps[$x]['menu'][2]['groups'][] = "superadmin";
|
$apps[$x]['menu'][2]['groups'][] = "superadmin";
|
||||||
|
|
||||||
$apps[$x]['menu'][3]['title']['en-us'] = "Group Manager";
|
$apps[$x]['menu'][3]['title']['en-us'] = "Group Manager";
|
||||||
$apps[$x]['menu'][3]['title']['es-cl'] = "Administración de Grupos";
|
$apps[$x]['menu'][3]['title']['es-cl'] = "Administración de Grupos";
|
||||||
$apps[$x]['menu'][3]['title']['fr-fr'] = "Gestion des groupes";
|
$apps[$x]['menu'][3]['title']['fr-fr'] = "Gestion des groupes";
|
||||||
$apps[$x]['menu'][3]['title']['pt-pt'] = "'Gestão de Grupos";
|
$apps[$x]['menu'][3]['title']['pt-pt'] = "'Gestão de Grupos";
|
||||||
$apps[$x]['menu'][3]['title']['pt-br'] = "Gerenciar grupos";
|
$apps[$x]['menu'][3]['title']['pt-br'] = "Gerenciar grupos";
|
||||||
$apps[$x]['menu'][3]['title']['pl'] = "Menedżer grup";
|
$apps[$x]['menu'][3]['title']['pl'] = "Menedżer grup";
|
||||||
$apps[$x]['menu'][3]['title']['uk'] = "Групи";
|
$apps[$x]['menu'][3]['title']['uk'] = "Групи";
|
||||||
$apps[$x]['menu'][3]['title']['sv-se'] = "Grupp Inställningar";
|
$apps[$x]['menu'][3]['title']['sv-se'] = "Grupp Inställningar";
|
||||||
$apps[$x]['menu'][3]['title']['de-at'] = "Gruppenverwaltung";
|
$apps[$x]['menu'][3]['title']['de-at'] = "Gruppenverwaltung";
|
||||||
$apps[$x]['menu'][3]['title']['he'] = "מנהל קבוצה";
|
$apps[$x]['menu'][3]['title']['he'] = "מנהל קבוצה";
|
||||||
$apps[$x]['menu'][3]['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
$apps[$x]['menu'][3]['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||||
$apps[$x]['menu'][3]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
$apps[$x]['menu'][3]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||||
$apps[$x]['menu'][3]['category'] = "internal";
|
$apps[$x]['menu'][3]['category'] = "internal";
|
||||||
$apps[$x]['menu'][3]['path'] = "/core/users/groups.php";
|
$apps[$x]['menu'][3]['path'] = "/core/users/groups.php";
|
||||||
$apps[$x]['menu'][3]['groups'][] = "superadmin";
|
$apps[$x]['menu'][3]['groups'][] = "superadmin";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+311
-311
@@ -1,312 +1,312 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
FusionPBX
|
FusionPBX
|
||||||
Version: MPL 1.1
|
Version: MPL 1.1
|
||||||
|
|
||||||
The contents of this file are subject to the Mozilla Public License Version
|
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
|
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
|
the License. You may obtain a copy of the License at
|
||||||
http://www.mozilla.org/MPL/
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
for the specific language governing rights and limitations under the
|
for the specific language governing rights and limitations under the
|
||||||
License.
|
License.
|
||||||
|
|
||||||
The Original Code is FusionPBX
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
|
|
||||||
//check permissions
|
//check permissions
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('group_edit')) {
|
if (permission_exists('group_edit')) {
|
||||||
//access allowed
|
//access allowed
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "access denied";
|
echo "access denied";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
//process update
|
//process update
|
||||||
if (count($_POST) > 0) {
|
if (count($_POST) > 0) {
|
||||||
//set the variables
|
//set the variables
|
||||||
$group_uuid = check_str($_POST['group_uuid']);
|
$group_uuid = check_str($_POST['group_uuid']);
|
||||||
$group_name = check_str($_POST['group_name']);
|
$group_name = check_str($_POST['group_name']);
|
||||||
$group_name_previous = check_str($_POST['group_name_previous']);
|
$group_name_previous = check_str($_POST['group_name_previous']);
|
||||||
$domain_uuid = check_str($_POST["domain_uuid"]);
|
$domain_uuid = check_str($_POST["domain_uuid"]);
|
||||||
$domain_uuid_previous = check_str($_POST["domain_uuid_previous"]);
|
$domain_uuid_previous = check_str($_POST["domain_uuid_previous"]);
|
||||||
$group_description = check_str($_POST["group_description"]);
|
$group_description = check_str($_POST["group_description"]);
|
||||||
|
|
||||||
//check for global/domain duplicates
|
//check for global/domain duplicates
|
||||||
$sql = "select count(*) as num_rows from v_groups where ";
|
$sql = "select count(*) as num_rows from v_groups where ";
|
||||||
$sql .= "group_name = '".$group_name."' ";
|
$sql .= "group_name = '".$group_name."' ";
|
||||||
$sql .= "and group_uuid <> '".$group_uuid."' ";
|
$sql .= "and group_uuid <> '".$group_uuid."' ";
|
||||||
$sql .= "and domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ");
|
$sql .= "and domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ");
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
$group_exists = ($row['num_rows'] > 0) ? true : false;
|
$group_exists = ($row['num_rows'] > 0) ? true : false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$group_exists = false;
|
$group_exists = false;
|
||||||
}
|
}
|
||||||
unset($sql, $prep_statement, $row);
|
unset($sql, $prep_statement, $row);
|
||||||
|
|
||||||
//update group
|
//update group
|
||||||
if (!$group_exists) {
|
if (!$group_exists) {
|
||||||
$sql = "update v_groups ";
|
$sql = "update v_groups ";
|
||||||
$sql .= "set ";
|
$sql .= "set ";
|
||||||
$sql .= "group_name = '".$group_name."', ";
|
$sql .= "group_name = '".$group_name."', ";
|
||||||
$sql .= "domain_uuid = ".(($domain_uuid != '') ? "'".$domain_uuid."'" : "null").", ";
|
$sql .= "domain_uuid = ".(($domain_uuid != '') ? "'".$domain_uuid."'" : "null").", ";
|
||||||
$sql .= "group_description = '".$group_description."' ";
|
$sql .= "group_description = '".$group_description."' ";
|
||||||
$sql .= "where group_uuid = '".$group_uuid."' ";
|
$sql .= "where group_uuid = '".$group_uuid."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
echo "<pre>".print_r($error, true)."</pre>";
|
echo "<pre>".print_r($error, true)."</pre>";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//group changed from global to domain-specific
|
//group changed from global to domain-specific
|
||||||
if ($domain_uuid_previous == '' && $domain_uuid != '') {
|
if ($domain_uuid_previous == '' && $domain_uuid != '') {
|
||||||
//remove any users assigned to the group from the old domain
|
//remove any users assigned to the group from the old domain
|
||||||
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid <> '".$domain_uuid."' ";
|
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid <> '".$domain_uuid."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//update permissions to use new domain uuid
|
//update permissions to use new domain uuid
|
||||||
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid is null ";
|
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid is null ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//change group name
|
//change group name
|
||||||
if ($group_name != $group_name_previous && $group_name != '') {
|
if ($group_name != $group_name_previous && $group_name != '') {
|
||||||
//change group name in group users
|
//change group name in group users
|
||||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//change group name in permissions
|
//change group name in permissions
|
||||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//group changed from one domain to another
|
//group changed from one domain to another
|
||||||
else if ($domain_uuid_previous != '' && $domain_uuid != '' && $domain_uuid_previous != $domain_uuid) {
|
else if ($domain_uuid_previous != '' && $domain_uuid != '' && $domain_uuid_previous != $domain_uuid) {
|
||||||
//remove any users assigned to the group from the old domain
|
//remove any users assigned to the group from the old domain
|
||||||
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid = '".$domain_uuid_previous."' ";
|
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//update permissions to use new domain uuid
|
//update permissions to use new domain uuid
|
||||||
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid = '".$domain_uuid_previous."' ";
|
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//change group name
|
//change group name
|
||||||
if ($group_name != $group_name_previous && $group_name != '') {
|
if ($group_name != $group_name_previous && $group_name != '') {
|
||||||
//change group name in group users
|
//change group name in group users
|
||||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//change group name in permissions
|
//change group name in permissions
|
||||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//group changed from domain-specific to global
|
//group changed from domain-specific to global
|
||||||
else if ($domain_uuid_previous != '' && $domain_uuid == '') {
|
else if ($domain_uuid_previous != '' && $domain_uuid == '') {
|
||||||
//change group name
|
//change group name
|
||||||
if ($group_name != $group_name_previous && $group_name != '') {
|
if ($group_name != $group_name_previous && $group_name != '') {
|
||||||
//change group name in group users
|
//change group name in group users
|
||||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//change group name in permissions
|
//change group name in permissions
|
||||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid_previous."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid_previous."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//update permissions to not use a domain uuid
|
//update permissions to not use a domain uuid
|
||||||
$sql = "update v_group_permissions set domain_uuid = null where group_name = '".$group_name."' and domain_uuid = '".$domain_uuid_previous."' ";
|
$sql = "update v_group_permissions set domain_uuid = null where group_name = '".$group_name."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//domain didn't change, but name may still
|
//domain didn't change, but name may still
|
||||||
else {
|
else {
|
||||||
//change group name
|
//change group name
|
||||||
if ($group_name != $group_name_previous && $group_name != '') {
|
if ($group_name != $group_name_previous && $group_name != '') {
|
||||||
//change group name in group users
|
//change group name in group users
|
||||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
//change group name in permissions
|
//change group name in permissions
|
||||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ")." and group_name = '".$group_name_previous."' ";
|
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ")." and group_name = '".$group_name_previous."' ";
|
||||||
if (!$db->exec(check_sql($sql))) {
|
if (!$db->exec(check_sql($sql))) {
|
||||||
$error = $db->errorInfo();
|
$error = $db->errorInfo();
|
||||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["message"] = $text['message-update'];
|
$_SESSION["message"] = $text['message-update'];
|
||||||
header("Location: groups.php");
|
header("Location: groups.php");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_SESSION['message_mood'] = 'negative';
|
$_SESSION['message_mood'] = 'negative';
|
||||||
$_SESSION["message"] = $text['message-group_exists'];
|
$_SESSION["message"] = $text['message-group_exists'];
|
||||||
header("Location: groupedit.php?id=".$group_uuid);
|
header("Location: groupedit.php?id=".$group_uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect the user
|
//redirect the user
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
$group_uuid = check_str($_REQUEST['id']);
|
$group_uuid = check_str($_REQUEST['id']);
|
||||||
if ($group_uuid != '') {
|
if ($group_uuid != '') {
|
||||||
$sql = "select * from v_groups where ";
|
$sql = "select * from v_groups where ";
|
||||||
$sql .= "group_uuid = '".$group_uuid."' ";
|
$sql .= "group_uuid = '".$group_uuid."' ";
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
$group_name = $row['group_name'];
|
$group_name = $row['group_name'];
|
||||||
$domain_uuid = $row['domain_uuid'];
|
$domain_uuid = $row['domain_uuid'];
|
||||||
$group_description = $row['group_description'];
|
$group_description = $row['group_description'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//include the header
|
//include the header
|
||||||
include "resources/header.php";
|
include "resources/header.php";
|
||||||
$document['title'] = $text['title-group_edit'];
|
$document['title'] = $text['title-group_edit'];
|
||||||
|
|
||||||
//copy group javascript
|
//copy group javascript
|
||||||
echo "<script language='javascript' type='text/javascript'>\n";
|
echo "<script language='javascript' type='text/javascript'>\n";
|
||||||
echo " function copy_group() {\n";
|
echo " function copy_group() {\n";
|
||||||
echo " var new_group_name;\n";
|
echo " var new_group_name;\n";
|
||||||
echo " var new_group_desc;\n";
|
echo " var new_group_desc;\n";
|
||||||
echo " new_group_name = prompt('".$text['message-new_group_name']."');\n";
|
echo " new_group_name = prompt('".$text['message-new_group_name']."');\n";
|
||||||
echo " if (new_group_name != null) {\n";
|
echo " if (new_group_name != null) {\n";
|
||||||
echo " new_group_desc = prompt('".$text['message-new_group_description']."');\n";
|
echo " new_group_desc = prompt('".$text['message-new_group_description']."');\n";
|
||||||
echo " if (new_group_desc != null) {\n";
|
echo " if (new_group_desc != null) {\n";
|
||||||
echo " window.location = 'permissions_copy.php?group_name=".$group_name."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n";
|
echo " window.location = 'permissions_copy.php?group_name=".$group_name."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n";
|
||||||
echo " }\n";
|
echo " }\n";
|
||||||
echo " }\n";
|
echo " }\n";
|
||||||
echo " }\n";
|
echo " }\n";
|
||||||
echo "</script>\n";
|
echo "</script>\n";
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<form name='login' method='post' action=''>\n";
|
echo "<form name='login' method='post' action=''>\n";
|
||||||
echo "<input type='hidden' name='group_uuid' value='".$group_uuid."'>\n";
|
echo "<input type='hidden' name='group_uuid' value='".$group_uuid."'>\n";
|
||||||
|
|
||||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' valign='top'>\n";
|
echo " <td align='left' valign='top'>\n";
|
||||||
echo " <b>".$text['header-group_edit']."</b>\n";
|
echo " <b>".$text['header-group_edit']."</b>\n";
|
||||||
echo " <br><br>\n";
|
echo " <br><br>\n";
|
||||||
echo " ".$text['description-group_edit']."\n";
|
echo " ".$text['description-group_edit']."\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td align='right' valign='top'>\n";
|
echo " <td align='right' valign='top'>\n";
|
||||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
|
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
|
||||||
echo " <input type='button' class='btn' alt='".$text['button-copy']."' onclick='copy_group();' value='".$text['button-copy']."'>";
|
echo " <input type='button' class='btn' alt='".$text['button-copy']."' onclick='copy_group();' value='".$text['button-copy']."'>";
|
||||||
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
|
||||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td width='30%' class='vncellreq' valign='top'>\n";
|
echo "<td width='30%' class='vncellreq' valign='top'>\n";
|
||||||
echo $text['label-group_name']."\n";
|
echo $text['label-group_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td width='70%' align='left' class='vtable'>\n";
|
echo "<td width='70%' align='left' class='vtable'>\n";
|
||||||
echo " <input type='hidden' name='group_name_previous' value=\"".$group_name."\">\n";
|
echo " <input type='hidden' name='group_name_previous' value=\"".$group_name."\">\n";
|
||||||
echo " <input type='text' class='formfld' name='group_name' value=\"".$group_name."\">\n";
|
echo " <input type='text' class='formfld' name='group_name' value=\"".$group_name."\">\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if (permission_exists('group_domain')) {
|
if (permission_exists('group_domain')) {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top'>\n";
|
echo "<td class='vncell' valign='top'>\n";
|
||||||
echo " ".$text['label-domain']."\n";
|
echo " ".$text['label-domain']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <input type='hidden' name='domain_uuid_previous' value='".$domain_uuid."'>\n";
|
echo " <input type='hidden' name='domain_uuid_previous' value='".$domain_uuid."'>\n";
|
||||||
echo " <select class='formfld' name='domain_uuid'>\n";
|
echo " <select class='formfld' name='domain_uuid'>\n";
|
||||||
echo " <option value='' ".((strlen($domain_uuid) == 0) ? "selected='selected'" : null).">".$text['option-global']."</option>\n";
|
echo " <option value='' ".((strlen($domain_uuid) == 0) ? "selected='selected'" : null).">".$text['option-global']."</option>\n";
|
||||||
foreach ($_SESSION['domains'] as $row) {
|
foreach ($_SESSION['domains'] as $row) {
|
||||||
echo "<option value='".$row['domain_uuid']."' ".(($row['domain_uuid'] == $domain_uuid) ? "selected='selected'" : null).">".$row['domain_name']."</option>\n";
|
echo "<option value='".$row['domain_uuid']."' ".(($row['domain_uuid'] == $domain_uuid) ? "selected='selected'" : null).">".$row['domain_name']."</option>\n";
|
||||||
}
|
}
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
echo " <br />\n";
|
echo " <br />\n";
|
||||||
echo $text['description-domain_name']."\n";
|
echo $text['description-domain_name']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<input type='hidden' name='domain_uuid' value='".$domain_uuid."'>";
|
echo "<input type='hidden' name='domain_uuid' value='".$domain_uuid."'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top'>\n";
|
echo "<td class='vncell' valign='top'>\n";
|
||||||
echo $text['label-group_description']."\n";
|
echo $text['label-group_description']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td align='left' class='vtable' valign='top'>\n";
|
echo "<td align='left' class='vtable' valign='top'>\n";
|
||||||
echo " <textarea name='group_description' class='formfld' style='width: 250px; height: 50px;'>".$group_description."</textarea>\n";
|
echo " <textarea name='group_description' class='formfld' style='width: 250px; height: 50px;'>".$group_description."</textarea>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td colspan='2' align='right'>\n";
|
echo "<td colspan='2' align='right'>\n";
|
||||||
echo " <br />";
|
echo " <br />";
|
||||||
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
include "resources/footer.php";
|
include "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+747
-747
File diff suppressed because it is too large
Load Diff
+138
-138
@@ -1,139 +1,139 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cache class provides an abstracted cache
|
* cache class provides an abstracted cache
|
||||||
*
|
*
|
||||||
* @method string set
|
* @method string set
|
||||||
* @method string get
|
* @method string get
|
||||||
* @method string delete
|
* @method string delete
|
||||||
* @method string flush
|
* @method string flush
|
||||||
*/
|
*/
|
||||||
class cache {
|
class cache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//place holder
|
//place holder
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a specific item in the cache
|
* Add a specific item in the cache
|
||||||
* @var string $key the cache id
|
* @var string $key the cache id
|
||||||
* @var string $value string to be cached
|
* @var string $value string to be cached
|
||||||
*/
|
*/
|
||||||
public function set($key, $value) {
|
public function set($key, $value) {
|
||||||
// connect to event socket
|
// connect to event socket
|
||||||
$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 === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send a custom event
|
//send a custom event
|
||||||
|
|
||||||
//run the memcache
|
//run the memcache
|
||||||
$command = "memcache set ".$key." ".$value;
|
$command = "memcache set ".$key." ".$value;
|
||||||
$result = event_socket_request($fp, 'api '.$command);
|
$result = event_socket_request($fp, 'api '.$command);
|
||||||
|
|
||||||
//close event socket
|
//close event socket
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a specific item from the cache
|
* Get a specific item from the cache
|
||||||
* @var string $key cache id
|
* @var string $key cache id
|
||||||
*/
|
*/
|
||||||
public function get($key) {
|
public function get($key) {
|
||||||
// connect to event socket
|
// connect to event socket
|
||||||
$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 === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send a custom event
|
//send a custom event
|
||||||
|
|
||||||
//run the memcache
|
//run the memcache
|
||||||
$command = "memcache get ".$key;
|
$command = "memcache get ".$key;
|
||||||
$result = event_socket_request($fp, 'api '.$command);
|
$result = event_socket_request($fp, 'api '.$command);
|
||||||
|
|
||||||
//close event socket
|
//close event socket
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a specific item from the cache
|
* Delete a specific item from the cache
|
||||||
* @var string $key cache id
|
* @var string $key cache id
|
||||||
*/
|
*/
|
||||||
public function delete($key) {
|
public function delete($key) {
|
||||||
// connect to event socket
|
// connect to event socket
|
||||||
$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 === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send a custom event
|
//send a custom event
|
||||||
$event = "sendevent CUSTOM\n";
|
$event = "sendevent CUSTOM\n";
|
||||||
$event .= "Event-Name: MEMCACHE\n";
|
$event .= "Event-Name: MEMCACHE\n";
|
||||||
$event .= "Event-Subclass: delete\n";
|
$event .= "Event-Subclass: delete\n";
|
||||||
$event .= "API-Command: memcache\n";
|
$event .= "API-Command: memcache\n";
|
||||||
$event .= "API-Command-Argument: delete ".$key."\n";
|
$event .= "API-Command-Argument: delete ".$key."\n";
|
||||||
event_socket_request($fp, $event);
|
event_socket_request($fp, $event);
|
||||||
|
|
||||||
//run the memcache
|
//run the memcache
|
||||||
$command = "memcache delete ".$key;
|
$command = "memcache delete ".$key;
|
||||||
$result = event_socket_request($fp, 'api '.$command);
|
$result = event_socket_request($fp, 'api '.$command);
|
||||||
|
|
||||||
//close event socket
|
//close event socket
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the entire cache
|
* Delete the entire cache
|
||||||
*/
|
*/
|
||||||
public function flush() {
|
public function flush() {
|
||||||
// connect to event socket
|
// connect to event socket
|
||||||
$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 === false) {
|
if ($fp === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send a custom event
|
//send a custom event
|
||||||
$event = "sendevent CUSTOM\n";
|
$event = "sendevent CUSTOM\n";
|
||||||
$event .= "Event-Name: MEMCACHE\n";
|
$event .= "Event-Name: MEMCACHE\n";
|
||||||
$event .= "Event-Subclass: flush\n";
|
$event .= "Event-Subclass: flush\n";
|
||||||
$event .= "API-Command: memcache\n";
|
$event .= "API-Command: memcache\n";
|
||||||
$event .= "API-Command-Argument: flush\n";
|
$event .= "API-Command-Argument: flush\n";
|
||||||
event_socket_request($fp, $event);
|
event_socket_request($fp, $event);
|
||||||
|
|
||||||
//run the memcache
|
//run the memcache
|
||||||
$command = "memcache flush";
|
$command = "memcache flush";
|
||||||
$result = event_socket_request($fp, 'api '.$command);
|
$result = event_socket_request($fp, 'api '.$command);
|
||||||
|
|
||||||
//close event socket
|
//close event socket
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+126
-126
@@ -1,127 +1,127 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* config
|
* config
|
||||||
*
|
*
|
||||||
* @method get config.php
|
* @method get config.php
|
||||||
* @method find find the path to the config.php file
|
* @method find find the path to the config.php file
|
||||||
* @method exists determin if the the config.php file exists
|
* @method exists determin if the the config.php file exists
|
||||||
*/
|
*/
|
||||||
class config {
|
class config {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* database variables and config path
|
* database variables and config path
|
||||||
*/
|
*/
|
||||||
public $db_type;
|
public $db_type;
|
||||||
public $db_name;
|
public $db_name;
|
||||||
public $db_username;
|
public $db_username;
|
||||||
public $db_password;
|
public $db_password;
|
||||||
public $db_host;
|
public $db_host;
|
||||||
public $db_path;
|
public $db_path;
|
||||||
public $db_port;
|
public $db_port;
|
||||||
public $config_path;
|
public $config_path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//place holder
|
//place holder
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the config.php exists
|
* Determine whether the config.php exists
|
||||||
* @var string $db_type - type of database
|
* @var string $db_type - type of database
|
||||||
* @var string $db_name - name of the database
|
* @var string $db_name - name of the database
|
||||||
* @var string $db_username - username to access the database
|
* @var string $db_username - username to access the database
|
||||||
* @var string $db_password - password to access the database
|
* @var string $db_password - password to access the database
|
||||||
* @var string $db_host - hostname of the database server
|
* @var string $db_host - hostname of the database server
|
||||||
* @var string $db_path - path of the database file
|
* @var string $db_path - path of the database file
|
||||||
* @var string $db_port - network port to connect to the database
|
* @var string $db_port - network port to connect to the database
|
||||||
*/
|
*/
|
||||||
public function get() {
|
public function get() {
|
||||||
$this->find();
|
$this->find();
|
||||||
if ($this->exists()) {
|
if ($this->exists()) {
|
||||||
require $this->config_path;
|
require $this->config_path;
|
||||||
$this->db_type = $db_type;
|
$this->db_type = $db_type;
|
||||||
$this->db_name = $db_name;
|
$this->db_name = $db_name;
|
||||||
$this->db_username = $db_username;
|
$this->db_username = $db_username;
|
||||||
$this->db_password = $db_password;
|
$this->db_password = $db_password;
|
||||||
$this->db_host = $db_host;
|
$this->db_host = $db_host;
|
||||||
$this->db_path = $db_path;
|
$this->db_path = $db_path;
|
||||||
$this->db_port = $db_port;
|
$this->db_port = $db_port;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the path to the config.php
|
* Find the path to the config.php
|
||||||
* @var string $config_path - full path to the config.php file
|
* @var string $config_path - full path to the config.php file
|
||||||
*/
|
*/
|
||||||
public function find() {
|
public function find() {
|
||||||
//get the PROJECT PATH
|
//get the PROJECT PATH
|
||||||
include "root.php";
|
include "root.php";
|
||||||
// find the file
|
// find the file
|
||||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
||||||
$this->config_path = $_SERVER["PROJECT_ROOT"]."/resources/config.php";
|
$this->config_path = $_SERVER["PROJECT_ROOT"]."/resources/config.php";
|
||||||
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
} elseif (file_exists("/etc/fusionpbx/config.php")) {
|
||||||
$this->config_path = "/etc/fusionpbx/config.php";
|
$this->config_path = "/etc/fusionpbx/config.php";
|
||||||
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
|
||||||
$this->config_path = "/usr/local/etc/fusionpbx/config.php";
|
$this->config_path = "/usr/local/etc/fusionpbx/config.php";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->config_path = '';
|
$this->config_path = '';
|
||||||
}
|
}
|
||||||
//return the path
|
//return the path
|
||||||
return $this->config_path;
|
return $this->config_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the config.php exists
|
* Determine whether the config.php exists
|
||||||
*/
|
*/
|
||||||
public function exists() {
|
public function exists() {
|
||||||
$this->find();
|
$this->find();
|
||||||
if (strlen($this->config_path) > 0) {
|
if (strlen($this->config_path) > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
$config = new config;
|
$config = new config;
|
||||||
$config_exists = $config->exists();
|
$config_exists = $config->exists();
|
||||||
$config_path = $config->find();
|
$config_path = $config->find();
|
||||||
$config->get();
|
$config->get();
|
||||||
$db_type = $config->db_type;
|
$db_type = $config->db_type;
|
||||||
$db_name = $config->db_name;
|
$db_name = $config->db_name;
|
||||||
$db_username = $config->db_username;
|
$db_username = $config->db_username;
|
||||||
$db_password = $config->db_password;
|
$db_password = $config->db_password;
|
||||||
$db_host = $config->db_host;
|
$db_host = $config->db_host;
|
||||||
$db_path = $config->db_path;
|
$db_path = $config->db_path;
|
||||||
$db_port = $config->db_port;
|
$db_port = $config->db_port;
|
||||||
echo "config_path: ".$config_path."\n";
|
echo "config_path: ".$config_path."\n";
|
||||||
if ($config_exists) {
|
if ($config_exists) {
|
||||||
echo "config_exists: true\n";
|
echo "config_exists: true\n";
|
||||||
} else {
|
} else {
|
||||||
echo "config_exists: false\n";
|
echo "config_exists: false\n";
|
||||||
}
|
}
|
||||||
echo "db_type: ".$db_type."\n";
|
echo "db_type: ".$db_type."\n";
|
||||||
echo "db_name: ".$db_name."\n";
|
echo "db_name: ".$db_name."\n";
|
||||||
echo "db_username: ".$db_username."\n";
|
echo "db_username: ".$db_username."\n";
|
||||||
echo "db_password: ".$db_password."\n";
|
echo "db_password: ".$db_password."\n";
|
||||||
echo "db_host: ".$db_host."\n";
|
echo "db_host: ".$db_host."\n";
|
||||||
echo "db_path: ".$db_path."\n";
|
echo "db_path: ".$db_path."\n";
|
||||||
echo "db_port: ".$db_port."\n";
|
echo "db_port: ".$db_port."\n";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+280
-280
@@ -1,280 +1,280 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* destinations
|
* destinations
|
||||||
*
|
*
|
||||||
* @method get_array get the destinations
|
* @method get_array get the destinations
|
||||||
* @method select build the html select
|
* @method select build the html select
|
||||||
*/
|
*/
|
||||||
class destinations {
|
class destinations {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* destinations array
|
* destinations array
|
||||||
*/
|
*/
|
||||||
public $destinations;
|
public $destinations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the object is created
|
* Called when the object is created
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
//set the global variables
|
//set the global variables
|
||||||
global $db, $db_type;
|
global $db, $db_type;
|
||||||
|
|
||||||
//get the array from the app_config.php files
|
//get the array from the app_config.php files
|
||||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($config_list as &$config_path) {
|
foreach ($config_list as &$config_path) {
|
||||||
include($config_path);
|
include($config_path);
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($apps as $x => &$app) {
|
foreach ($apps as $x => &$app) {
|
||||||
if (isset($app['destinations'])) foreach ($app['destinations'] as &$row) {
|
if (isset($app['destinations'])) foreach ($app['destinations'] as &$row) {
|
||||||
$this->destinations[] = $row;
|
$this->destinations[] = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//put the array in order
|
//put the array in order
|
||||||
foreach ($this->destinations as $row) {
|
foreach ($this->destinations as $row) {
|
||||||
$option_groups[] = $row['label'];
|
$option_groups[] = $row['label'];
|
||||||
}
|
}
|
||||||
array_multisort($option_groups, SORT_ASC, $this->destinations);
|
array_multisort($option_groups, SORT_ASC, $this->destinations);
|
||||||
|
|
||||||
//add the sql and data to the array
|
//add the sql and data to the array
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($this->destinations as $row) {
|
foreach ($this->destinations as $row) {
|
||||||
if ($row['type'] = 'sql') {
|
if ($row['type'] = 'sql') {
|
||||||
if (isset($row['sql'])) {
|
if (isset($row['sql'])) {
|
||||||
if (is_array($row['sql'])) {
|
if (is_array($row['sql'])) {
|
||||||
$sql = trim($row['sql'][$db_type])." ";
|
$sql = trim($row['sql'][$db_type])." ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = trim($row['sql'])." ";
|
$sql = trim($row['sql'])." ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$field_count = count($row['field']);
|
$field_count = count($row['field']);
|
||||||
$fields = '';
|
$fields = '';
|
||||||
$c = 1;
|
$c = 1;
|
||||||
foreach ($row['field'] as $key => $value) {
|
foreach ($row['field'] as $key => $value) {
|
||||||
if ($field_count != $c) { $delimiter = ','; } else { $delimiter = ''; }
|
if ($field_count != $c) { $delimiter = ','; } else { $delimiter = ''; }
|
||||||
$fields .= $value." as ".$key.$delimiter." ";
|
$fields .= $value." as ".$key.$delimiter." ";
|
||||||
$c++;
|
$c++;
|
||||||
}
|
}
|
||||||
$sql = "select ".$fields;
|
$sql = "select ".$fields;
|
||||||
$sql .= " from v_".$row['name']." ";
|
$sql .= " from v_".$row['name']." ";
|
||||||
}
|
}
|
||||||
if (isset($row['where'])) {
|
if (isset($row['where'])) {
|
||||||
$sql .= trim($row['where'])." ";
|
$sql .= trim($row['where'])." ";
|
||||||
}
|
}
|
||||||
$sql .= "order by ".trim($row['order_by']);
|
$sql .= "order by ".trim($row['order_by']);
|
||||||
$sql = str_replace("\${domain_uuid}", $_SESSION['domain_uuid'], $sql);
|
$sql = str_replace("\${domain_uuid}", $_SESSION['domain_uuid'], $sql);
|
||||||
$sql = trim($sql);
|
$sql = trim($sql);
|
||||||
$statement = $db->prepare($sql);
|
$statement = $db->prepare($sql);
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
$result = $statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
unset($statement);
|
unset($statement);
|
||||||
|
|
||||||
$this->destinations[$x]['result']['sql'] = $sql;
|
$this->destinations[$x]['result']['sql'] = $sql;
|
||||||
$this->destinations[$x]['result']['data'] = $result;
|
$this->destinations[$x]['result']['data'] = $result;
|
||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
$this->destinations[$x]['type'] = 'array';
|
$this->destinations[$x]['type'] = 'array';
|
||||||
$this->destinations[$x]['label'] = 'other';
|
$this->destinations[$x]['label'] = 'other';
|
||||||
$this->destinations[$x]['name'] = 'dialplan';
|
$this->destinations[$x]['name'] = 'dialplan';
|
||||||
$this->destinations[$x]['field']['name'] = "name";
|
$this->destinations[$x]['field']['name'] = "name";
|
||||||
$this->destinations[$x]['field']['destination'] = "destination";
|
$this->destinations[$x]['field']['destination'] = "destination";
|
||||||
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
|
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
|
||||||
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
|
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
|
||||||
$this->destinations[$x]['select_label'] = "\${name}";
|
$this->destinations[$x]['select_label'] = "\${name}";
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
|
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
|
||||||
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
|
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
|
||||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
|
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
|
||||||
$y++;
|
$y++;
|
||||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
|
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
|
||||||
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
|
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
|
||||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
|
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
|
||||||
$y++;
|
$y++;
|
||||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
|
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
|
||||||
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
|
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
|
||||||
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
|
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
|
||||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
|
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
|
||||||
$y++;
|
$y++;
|
||||||
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
|
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
|
||||||
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
|
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
|
||||||
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
|
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
|
||||||
$y++;
|
$y++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when there are no references to a particular object
|
* Called when there are no references to a particular object
|
||||||
* unset the variables used in the class
|
* unset the variables used in the class
|
||||||
*/
|
*/
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
foreach ($this as $key => $value) {
|
foreach ($this as $key => $value) {
|
||||||
unset($this->$key);
|
unset($this->$key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the destination menu
|
* Get the destination menu
|
||||||
* @var string $destination_type can be ivr, dialplan, call_center_contact or bridge
|
* @var string $destination_type can be ivr, dialplan, call_center_contact or bridge
|
||||||
* @var string $destination_name - current name
|
* @var string $destination_name - current name
|
||||||
* @var string $destination_value - current value
|
* @var string $destination_value - current value
|
||||||
*/
|
*/
|
||||||
public function select($destination_type, $destination_name, $destination_value) {
|
public function select($destination_type, $destination_name, $destination_value) {
|
||||||
|
|
||||||
//remove special characters from the name
|
//remove special characters from the name
|
||||||
$destination_id = str_replace("]", "", $destination_name);
|
$destination_id = str_replace("]", "", $destination_name);
|
||||||
$destination_id = str_replace("[", "_", $destination_id);
|
$destination_id = str_replace("[", "_", $destination_id);
|
||||||
|
|
||||||
//add additional
|
//add additional
|
||||||
if (if_group("superadmin")) {
|
if (if_group("superadmin")) {
|
||||||
$response = "<script>\n";
|
$response = "<script>\n";
|
||||||
$response .= "var Objs;\n";
|
$response .= "var Objs;\n";
|
||||||
$response .= "\n";
|
$response .= "\n";
|
||||||
$response .= "function changeToInput".$destination_id."(obj){\n";
|
$response .= "function changeToInput".$destination_id."(obj){\n";
|
||||||
$response .= " tb=document.createElement('INPUT');\n";
|
$response .= " tb=document.createElement('INPUT');\n";
|
||||||
$response .= " tb.type='text';\n";
|
$response .= " tb.type='text';\n";
|
||||||
$response .= " tb.name=obj.name;\n";
|
$response .= " tb.name=obj.name;\n";
|
||||||
$response .= " tb.className='formfld';\n";
|
$response .= " tb.className='formfld';\n";
|
||||||
$response .= " tb.setAttribute('id', '".$destination_id."');\n";
|
$response .= " tb.setAttribute('id', '".$destination_id."');\n";
|
||||||
$response .= " tb.setAttribute('style', '".$select_style."');\n";
|
$response .= " tb.setAttribute('style', '".$select_style."');\n";
|
||||||
if ($onchange != '') {
|
if ($onchange != '') {
|
||||||
$response .= " tb.setAttribute('onchange', \"".$onchange."\");\n";
|
$response .= " tb.setAttribute('onchange', \"".$onchange."\");\n";
|
||||||
$response .= " tb.setAttribute('onkeyup', \"".$onchange."\");\n";
|
$response .= " tb.setAttribute('onkeyup', \"".$onchange."\");\n";
|
||||||
}
|
}
|
||||||
$response .= " tb.value=obj.options[obj.selectedIndex].value;\n";
|
$response .= " tb.value=obj.options[obj.selectedIndex].value;\n";
|
||||||
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'hidden';\n";
|
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'hidden';\n";
|
||||||
$response .= " tbb=document.createElement('INPUT');\n";
|
$response .= " tbb=document.createElement('INPUT');\n";
|
||||||
$response .= " tbb.setAttribute('class', 'btn');\n";
|
$response .= " tbb.setAttribute('class', 'btn');\n";
|
||||||
$response .= " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
$response .= " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
||||||
$response .= " tbb.type='button';\n";
|
$response .= " tbb.type='button';\n";
|
||||||
$response .= " tbb.value=$('<div />').html('◁').text();\n";
|
$response .= " tbb.value=$('<div />').html('◁').text();\n";
|
||||||
$response .= " tbb.objs=[obj,tb,tbb];\n";
|
$response .= " tbb.objs=[obj,tb,tbb];\n";
|
||||||
$response .= " tbb.onclick=function(){ Replace".$destination_id."(this.objs); }\n";
|
$response .= " tbb.onclick=function(){ Replace".$destination_id."(this.objs); }\n";
|
||||||
$response .= " obj.parentNode.insertBefore(tb,obj);\n";
|
$response .= " obj.parentNode.insertBefore(tb,obj);\n";
|
||||||
$response .= " obj.parentNode.insertBefore(tbb,obj);\n";
|
$response .= " obj.parentNode.insertBefore(tbb,obj);\n";
|
||||||
$response .= " obj.parentNode.removeChild(obj);\n";
|
$response .= " obj.parentNode.removeChild(obj);\n";
|
||||||
$response .= " Replace".$destination_id."(this.objs);\n";
|
$response .= " Replace".$destination_id."(this.objs);\n";
|
||||||
$response .= "}\n";
|
$response .= "}\n";
|
||||||
$response .= "\n";
|
$response .= "\n";
|
||||||
$response .= "function Replace".$destination_id."(obj){\n";
|
$response .= "function Replace".$destination_id."(obj){\n";
|
||||||
$response .= " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
$response .= " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
||||||
$response .= " obj[0].parentNode.removeChild(obj[1]);\n";
|
$response .= " obj[0].parentNode.removeChild(obj[1]);\n";
|
||||||
$response .= " obj[0].parentNode.removeChild(obj[2]);\n";
|
$response .= " obj[0].parentNode.removeChild(obj[2]);\n";
|
||||||
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n";
|
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n";
|
||||||
if ($onchange != '') {
|
if ($onchange != '') {
|
||||||
$response .= " ".$onchange.";\n";
|
$response .= " ".$onchange.";\n";
|
||||||
}
|
}
|
||||||
$response .= "}\n";
|
$response .= "}\n";
|
||||||
$response .= "</script>\n";
|
$response .= "</script>\n";
|
||||||
$response .= "\n";
|
$response .= "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//set default to false
|
//set default to false
|
||||||
$select_found = false;
|
$select_found = false;
|
||||||
|
|
||||||
$response .= " <select name='".$destination_name."' id='".$destination_id."' class='formfld' style='".$select_style."' onchange=\"".$onchange."\">\n";
|
$response .= " <select name='".$destination_name."' id='".$destination_id."' class='formfld' style='".$select_style."' onchange=\"".$onchange."\">\n";
|
||||||
$response .= " <option value=''></option>\n";
|
$response .= " <option value=''></option>\n";
|
||||||
foreach ($this->destinations as $row) {
|
foreach ($this->destinations as $row) {
|
||||||
|
|
||||||
$name = $row['name'];
|
$name = $row['name'];
|
||||||
$label = $row['label'];
|
$label = $row['label'];
|
||||||
$destination = $row['field']['destination'];
|
$destination = $row['field']['destination'];
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
|
||||||
$language2 = new text;
|
$language2 = new text;
|
||||||
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
|
||||||
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
|
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
|
||||||
$label2 = $label;
|
$label2 = $label;
|
||||||
foreach ($row['result']['data'] as $data) {
|
foreach ($row['result']['data'] as $data) {
|
||||||
$select_value = $row['select_value'][$destination_type];
|
$select_value = $row['select_value'][$destination_type];
|
||||||
$select_label = $row['select_label'];
|
$select_label = $row['select_label'];
|
||||||
foreach ($row['field'] as $key => $value) {
|
foreach ($row['field'] as $key => $value) {
|
||||||
if ($key == 'destination' and is_array($value)){
|
if ($key == 'destination' and is_array($value)){
|
||||||
if ($value['type'] == 'csv') {
|
if ($value['type'] == 'csv') {
|
||||||
$array = explode($value['delimiter'], $data[$key]);
|
$array = explode($value['delimiter'], $data[$key]);
|
||||||
$select_value = str_replace("\${destination}", $array[0], $select_value);
|
$select_value = str_replace("\${destination}", $array[0], $select_value);
|
||||||
$select_label = str_replace("\${destination}", $array[0], $select_label);
|
$select_label = str_replace("\${destination}", $array[0], $select_label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (strpos($value,',') !== false) {
|
if (strpos($value,',') !== false) {
|
||||||
$keys = explode(",", $value);
|
$keys = explode(",", $value);
|
||||||
foreach ($keys as $k) {
|
foreach ($keys as $k) {
|
||||||
if (strlen($data[$k]) > 0) {
|
if (strlen($data[$k]) > 0) {
|
||||||
$select_value = str_replace("\${".$key."}", $data[$k], $select_value);
|
$select_value = str_replace("\${".$key."}", $data[$k], $select_value);
|
||||||
if (strlen($data['label']) == 0) {
|
if (strlen($data['label']) == 0) {
|
||||||
$select_label = str_replace("\${".$key."}", $data[$k], $select_label);
|
$select_label = str_replace("\${".$key."}", $data[$k], $select_label);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$label = $data['label'];
|
$label = $data['label'];
|
||||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
|
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
|
||||||
if (strlen($data['label']) == 0) {
|
if (strlen($data['label']) == 0) {
|
||||||
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
|
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$label = $data['label'];
|
$label = $data['label'];
|
||||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//application: hangup
|
//application: hangup
|
||||||
if (strlen($data['application']) > 0) {
|
if (strlen($data['application']) > 0) {
|
||||||
$select_value = str_replace("transfer", $data['application'], $select_value);
|
$select_value = str_replace("transfer", $data['application'], $select_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$select_value = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_value);
|
$select_value = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_value);
|
||||||
$select_value = str_replace("\${context}", $_SESSION['context'], $select_value); //to do: context can come from the array
|
$select_value = str_replace("\${context}", $_SESSION['context'], $select_value); //to do: context can come from the array
|
||||||
$select_label = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_label);
|
$select_label = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_label);
|
||||||
$select_label = str_replace("\${context}", $_SESSION['context'], $select_label);
|
$select_label = str_replace("\${context}", $_SESSION['context'], $select_label);
|
||||||
$select_label = trim($select_label);
|
$select_label = trim($select_label);
|
||||||
if ($select_value == $destination_value) { $selected = "selected='selected' "; $select_found = true; } else { $selected = ''; }
|
if ($select_value == $destination_value) { $selected = "selected='selected' "; $select_found = true; } else { $selected = ''; }
|
||||||
if ($label2 == 'destinations') { $select_label = format_phone($select_label); }
|
if ($label2 == 'destinations') { $select_label = format_phone($select_label); }
|
||||||
$response .= " <option value='".$select_value."' ".$selected.">".$select_label."</option>\n";
|
$response .= " <option value='".$select_value."' ".$selected.">".$select_label."</option>\n";
|
||||||
}
|
}
|
||||||
$response .= " </optgroup>\n";
|
$response .= " </optgroup>\n";
|
||||||
unset($text);
|
unset($text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$select_found) {
|
if (!$select_found) {
|
||||||
$destination_label = str_replace(":", " ", $destination_value);
|
$destination_label = str_replace(":", " ", $destination_value);
|
||||||
$destination_label = str_replace("menu-exec-app:", " ", $destination_label);
|
$destination_label = str_replace("menu-exec-app:", " ", $destination_label);
|
||||||
$response .= " <option value='".$destination_value."' selected='selected'>".trim($destination_label)."</option>\n";
|
$response .= " <option value='".$destination_value."' selected='selected'>".trim($destination_label)."</option>\n";
|
||||||
}
|
}
|
||||||
$response .= " </select>\n";
|
$response .= " </select>\n";
|
||||||
if (if_group("superadmin")) {
|
if (if_group("superadmin")) {
|
||||||
$response .= "<input type='button' id='btn_select_to_input_".$destination_id."' class='btn' name='' alt='back' onclick='changeToInput".$destination_id."(document.getElementById(\"".$destination_id."\"));this.style.visibility = \"hidden\";' value='◁'>";
|
$response .= "<input type='button' id='btn_select_to_input_".$destination_id."' class='btn' name='' alt='back' onclick='changeToInput".$destination_id."(document.getElementById(\"".$destination_id."\"));this.style.visibility = \"hidden\";' value='◁'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
//return the formatted destinations
|
//return the formatted destinations
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
$obj = new destinations;
|
$obj = new destinations;
|
||||||
//$destinations = $obj->destinations;
|
//$destinations = $obj->destinations;
|
||||||
echo $obj->select('ivr', 'example1', 'menu-exec-app:transfer 32 XML voip.fusionpbx.com');
|
echo $obj->select('ivr', 'example1', 'menu-exec-app:transfer 32 XML voip.fusionpbx.com');
|
||||||
echo $obj->select('ivr', 'example2', '');
|
echo $obj->select('ivr', 'example2', '');
|
||||||
echo $obj->select('ivr', 'example3', '');
|
echo $obj->select('ivr', 'example3', '');
|
||||||
echo $obj->select('ivr', 'example4', '');
|
echo $obj->select('ivr', 'example4', '');
|
||||||
echo $obj->select('ivr', 'example5', '');
|
echo $obj->select('ivr', 'example5', '');
|
||||||
echo $obj->select('ivr', 'example6', '');
|
echo $obj->select('ivr', 'example6', '');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user