Added response message (at the top) on phone reboot.
This commit is contained in:
@@ -36,6 +36,16 @@
|
|||||||
$text['error-event-socket']['pt-pt'] = "A conexão ao Event Socket falhou.";
|
$text['error-event-socket']['pt-pt'] = "A conexão ao Event Socket falhou.";
|
||||||
$text['error-event-socket']['fr-fr'] = "Connexion a l'Event Socket en echec.";
|
$text['error-event-socket']['fr-fr'] = "Connexion a l'Event Socket en echec.";
|
||||||
|
|
||||||
|
$text['label-event']['en-us'] = "Event:";
|
||||||
|
$text['label-event']['es-cl'] = "Evento:";
|
||||||
|
$text['label-event']['pt-pt'] = "Evento:";
|
||||||
|
$text['label-event']['fr-fr'] = "Evénement:";
|
||||||
|
|
||||||
|
$text['label-response']['en-us'] = "Response:";
|
||||||
|
$text['label-response']['es-cl'] = "Respuesta:";
|
||||||
|
$text['label-response']['pt-pt'] = "Resposta:";
|
||||||
|
$text['label-response']['fr-fr'] = "Réponse:";
|
||||||
|
|
||||||
$text['button-reboot']['en-us'] = "Reboot";
|
$text['button-reboot']['en-us'] = "Reboot";
|
||||||
$text['button-reboot']['pt-pt'] = "Reinicialização";
|
$text['button-reboot']['pt-pt'] = "Reinicialização";
|
||||||
$text['button-reboot']['fr-fr'] = "Redémarrage";
|
$text['button-reboot']['fr-fr'] = "Redémarrage";
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ else {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
require_once "app_languages.php";
|
||||||
|
foreach($text as $key => $value) {
|
||||||
|
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||||
|
}
|
||||||
|
|
||||||
//set the variables
|
//set the variables
|
||||||
$cmd = check_str($_GET['cmd']);
|
$cmd = check_str($_GET['cmd']);
|
||||||
$rdr = check_str($_GET['rdr']);
|
$rdr = check_str($_GET['rdr']);
|
||||||
@@ -69,8 +75,10 @@ else {
|
|||||||
if ($fp) {
|
if ($fp) {
|
||||||
//app.lua event_notify
|
//app.lua event_notify
|
||||||
if ($cmd == "reboot" || $cmd == "resync") {
|
if ($cmd == "reboot" || $cmd == "resync") {
|
||||||
$cmd = "api luarun app.lua event_notify ".$cmd." ".$user." ".$domain." ".$vendor;
|
$cmd_complete = "api luarun app.lua event_notify ".$cmd." ".$user." ".$domain." ".$vendor;
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd_complete);
|
||||||
|
|
||||||
|
$_SESSION['message'] = $text['label-event']." ".ucwords($cmd)." ".$text['label-response'].$response;
|
||||||
unset($cmd);
|
unset($cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +92,7 @@ else {
|
|||||||
echo $response;
|
echo $response;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header("Location: status_registrations.php?profile=internal&savemsg=".urlencode($response));
|
header("Location: status_registrations.php?profile=internal");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user