Update index.php

Prevent a php warning message.
This commit is contained in:
FusionPBX 2017-01-29 13:07:08 -07:00 committed by GitHub
parent b3f021bc82
commit 295f9f1c2d
1 changed files with 49 additions and 36 deletions

View File

@ -17,17 +17,20 @@
The Initial Developer of the Original Code is
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-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('operator_panel_view')) {
//access granted
}
@ -42,8 +45,8 @@ else {
//set user status
if (isset($_REQUEST['status']) && $_REQUEST['status'] != '') {
//update the status
$user_status = check_str($_REQUEST['status']);
//sql update
$sql = "update v_users set ";
$sql .= "user_status = '".$user_status."' ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
@ -64,11 +67,16 @@ else {
$response = event_socket_request($fp, $cmd);
}
//stop execution
exit;
}
//set the title
$document['title'] = $text['title-operator_panel'];
//include the header
require_once "resources/header.php";
?>
<!-- virtual_drag function holding elements -->
@ -427,11 +435,15 @@ require_once "resources/header.php";
</style>
<?php
//create simple array of users own extensions
unset($_SESSION['user']['extensions']);
if (is_array($_SESSION['user']['extension'])) {
foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
$_SESSION['user']['extensions'][] = $assigned_extensions['user'];
}
}
?>
<div id='ajax_reponse'></div>
@ -439,5 +451,6 @@ foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
<br><br>
<?php
//include the footer
require_once "resources/footer.php";
?>