Update cmd.php
This commit is contained in:
@@ -24,13 +24,19 @@
|
|||||||
Matthew Vale <github@mafoo.org>
|
Matthew Vale <github@mafoo.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include "root.php";
|
//includes
|
||||||
require_once "resources/require.php";
|
require_once "root.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/require.php";
|
||||||
if (!if_group("superadmin")) {
|
require_once "resources/check_auth.php";
|
||||||
echo "access denied";
|
|
||||||
exit;
|
//check permissions
|
||||||
}
|
if (permission_exists('number_translation_add') || permission_exists('number_translation_edit')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//set the variables
|
//set the variables
|
||||||
$cmd = check_str($_GET['cmd']);
|
$cmd = check_str($_GET['cmd']);
|
||||||
@@ -39,7 +45,6 @@ if (!if_group("superadmin")) {
|
|||||||
//create the event socket connection
|
//create 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']);
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
|
||||||
//reloadxml
|
//reloadxml
|
||||||
if ($cmd == "api reloadxml") {
|
if ($cmd == "api reloadxml") {
|
||||||
messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert');
|
messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert');
|
||||||
|
|||||||
Reference in New Issue
Block a user