Update fifo_exec.php
This commit is contained in:
parent
b04395c44b
commit
99610ad828
|
|
@ -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);
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue