2012-06-04 16:58:40 +02:00
|
|
|
<?php
|
|
|
|
|
/*
|
|
|
|
|
FusionPBX
|
|
|
|
|
Version: MPL 1.1
|
|
|
|
|
|
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
|
1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
|
for the specific language governing rights and limitations under the
|
|
|
|
|
License.
|
|
|
|
|
|
|
|
|
|
The Original Code is FusionPBX
|
|
|
|
|
|
|
|
|
|
The Initial Developer of the Original Code is
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
|
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
|
|
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
Contributor(s):
|
|
|
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
|
|
|
*/
|
2013-07-06 10:15:16 +02:00
|
|
|
|
|
|
|
|
//include the root directory
|
|
|
|
|
include "root.php";
|
|
|
|
|
|
|
|
|
|
//if config.php file does not exist then redirect to the install page
|
2016-01-17 08:01:13 +01:00
|
|
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
2013-07-06 10:15:16 +02:00
|
|
|
//do nothing
|
2016-01-17 08:01:13 +01:00
|
|
|
} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/resources/config.php")) {
|
2013-07-06 10:15:16 +02:00
|
|
|
//original directory
|
|
|
|
|
} elseif (file_exists("/etc/fusionpbx/config.php")){
|
|
|
|
|
//linux
|
|
|
|
|
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){
|
|
|
|
|
//bsd
|
|
|
|
|
} else {
|
|
|
|
|
header("Location: ".PROJECT_PATH."/resources/install.php");
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//additional includes
|
|
|
|
|
require_once "resources/check_auth.php";
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2014-07-06 05:50:18 +02:00
|
|
|
//disable login message
|
|
|
|
|
if ($_GET['msg'] == 'dismiss') {
|
|
|
|
|
unset($_SESSION['login']['message']['text']);
|
|
|
|
|
|
|
|
|
|
$sql = "update v_default_settings ";
|
|
|
|
|
$sql .= "set default_setting_enabled = 'false' ";
|
|
|
|
|
$sql .= "where ";
|
|
|
|
|
$sql .= "default_setting_category = 'login' ";
|
2014-07-06 06:50:56 +02:00
|
|
|
$sql .= "and default_setting_subcategory = 'message' ";
|
|
|
|
|
$sql .= "and default_setting_name = 'text' ";
|
2014-07-06 05:50:18 +02:00
|
|
|
$db->exec(check_sql($sql));
|
|
|
|
|
unset($sql);
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-10 00:19:08 +02:00
|
|
|
//add multi-lingual support
|
2015-01-18 10:22:07 +01:00
|
|
|
$language = new text;
|
|
|
|
|
$text = $language->get();
|
2014-07-10 00:19:08 +02:00
|
|
|
|
2015-01-18 10:22:07 +01:00
|
|
|
//load header
|
2014-07-10 00:19:08 +02:00
|
|
|
require_once "resources/header.php";
|
2014-07-10 02:32:50 +02:00
|
|
|
$document['title'] = $text['title-user_dashboard'];
|
2014-07-10 00:19:08 +02:00
|
|
|
|
2016-03-04 03:01:58 +01:00
|
|
|
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
|
|
|
|
echo " <tr>\n";
|
|
|
|
|
echo " <td valign='top'>";
|
|
|
|
|
echo " <b>".$text['header-user_dashboard']."</b><br />";
|
|
|
|
|
echo " ".$text['description-user_dashboard'];
|
|
|
|
|
echo " </td>\n";
|
|
|
|
|
echo " <td valign='top' style='text-align: right; white-space: nowrap;'>\n";
|
2016-03-04 03:35:14 +01:00
|
|
|
echo " <input type='button' class='btn' value='".$_SESSION["username"]."' onclick=\"document.location.href='".PROJECT_PATH."/core/user_settings/user_edit.php';\">";
|
2016-03-04 03:01:58 +01:00
|
|
|
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/voicemails/voicemail_messages.php")) {
|
2016-03-04 03:35:14 +01:00
|
|
|
echo " <input type='button' class='btn' value='".$text['button-voicemail']."' onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php';\">";
|
2016-03-04 03:01:58 +01:00
|
|
|
}
|
|
|
|
|
echo " </td>\n";
|
|
|
|
|
echo " </tr>\n";
|
|
|
|
|
echo "</table>\n";
|
|
|
|
|
echo "<br /><br />";
|
2014-07-09 23:56:11 +02:00
|
|
|
|
2014-07-06 05:50:18 +02:00
|
|
|
//display login message
|
|
|
|
|
if (if_group("superadmin") && $_SESSION['login']['message']['text'] != '') {
|
2014-07-10 00:19:08 +02:00
|
|
|
echo "<br /><br /><br />";
|
2014-07-06 05:50:18 +02:00
|
|
|
echo "<div class='login_message' width='100%'><b>".$text['login-message_attention']."</b> ".$_SESSION['login']['message']['text']." (<a href='?msg=dismiss'>".$text['login-message_dismiss']."</a>)</div>";
|
|
|
|
|
}
|
2012-06-04 16:58:40 +02:00
|
|
|
|
2016-03-04 03:01:58 +01:00
|
|
|
//call routing
|
2012-11-21 09:19:17 +01:00
|
|
|
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/calls/calls.php")) {
|
2014-02-17 15:57:19 +01:00
|
|
|
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
|
2012-06-04 16:58:40 +02:00
|
|
|
$is_included = "true";
|
2016-03-04 03:01:58 +01:00
|
|
|
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
|
|
|
|
echo " <tr>\n";
|
|
|
|
|
echo " <td valign='top'><b>".$text['header-call_routing']."</b><br><br></td>\n";
|
|
|
|
|
echo " <td valign='top' style='text-align: right;'><input id='btn_viewall_callrouting' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/calls/calls.php';\"></td>\n";
|
|
|
|
|
echo " </tr>\n";
|
|
|
|
|
echo "</table>\n";
|
2012-11-21 07:05:45 +01:00
|
|
|
require_once "app/calls/calls.php";
|
2016-03-04 03:01:58 +01:00
|
|
|
echo "<br>\n";
|
2014-02-17 15:57:19 +01:00
|
|
|
}
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
|
|
|
|
|
2016-03-04 03:01:58 +01:00
|
|
|
//reload language values
|
|
|
|
|
$language = new text;
|
|
|
|
|
$text = $language->get();
|
|
|
|
|
|
2013-08-16 08:38:35 +02:00
|
|
|
//ring group forward
|
|
|
|
|
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ring_groups/ring_group_forward.php")) {
|
2014-02-17 15:57:19 +01:00
|
|
|
if (permission_exists('ring_group_forward')) { //ring_group_forward
|
2012-06-04 16:58:40 +02:00
|
|
|
$is_included = "true";
|
2016-03-04 03:01:58 +01:00
|
|
|
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
|
|
|
|
echo " <tr>\n";
|
|
|
|
|
echo " <td valign='top'><b>".$text['header-ring_groups']."</b><br><br></td>\n";
|
|
|
|
|
echo " <td valign='top' style='text-align: right;'><input id='btn_viewall_ringgroups' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/ring_groups/ring_group_forward.php';\"></td>\n";
|
|
|
|
|
echo " </tr>\n";
|
|
|
|
|
echo "</table>\n";
|
2013-08-16 08:38:35 +02:00
|
|
|
require_once "app/ring_groups/ring_group_forward.php";
|
2016-03-04 03:01:58 +01:00
|
|
|
echo "<br>\n";
|
2014-02-17 15:57:19 +01:00
|
|
|
}
|
2012-06-04 16:58:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//show the footer
|
2013-07-06 08:29:50 +02:00
|
|
|
require_once "resources/footer.php";
|
2012-10-09 00:04:57 +02:00
|
|
|
?>
|