Update fifo_exec.php

This commit is contained in:
FusionPBX 2019-06-16 10:24:47 -06:00 committed by GitHub
parent b04395c44b
commit 99610ad828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 62 additions and 59 deletions

View File

@ -17,15 +17,19 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010
Copyright (C) 2010 - 2019
All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('active_queue_edit')) {
//access granted
}
@ -34,16 +38,15 @@ else {
exit;
}
if (count($_GET)>0) {
//get variables
if (is_array($_GET)>0) {
$switch_cmd = trim($_GET["cmd"]);
$action = trim($_GET["action"]);
$direction = trim($_GET["direction"]);
}
//GET to PHP variables
if (count($_GET)>0) {
if (is_array($_GET)) {
//fs cmd
if (strlen($switch_cmd) > 0) {
/*
@ -77,11 +80,11 @@ if (count($_GET)>0) {
}
*/
//connect to the 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']);
//send the command over event socket
if ($fp) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//if ($fp) {
// $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
//}
}
}