„vm_control.php“ ändern
This commit is contained in:
parent
ec6907e7ed
commit
90ee712d37
1 changed files with 8 additions and 4 deletions
|
@ -18,9 +18,12 @@
|
||||||
// Auswertung der Argumente:
|
// Auswertung der Argumente:
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
$error_msg = "";
|
$error_msg = "";
|
||||||
|
$log_symbol = "️✅";
|
||||||
|
|
||||||
// leeren Parameter 'vmname' unterbinden:
|
// leeren Parameter 'vmname' unterbinden:
|
||||||
if(!isset($_GET['vmname'])){
|
if(!isset($_GET['vmname'])){
|
||||||
$error_msg = "EXIT - keine VM angegeben!<br>";
|
$error_msg = "EXIT - keine VM angegeben!<br>";
|
||||||
|
$log_symbol = "❌️";
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
|
@ -43,18 +46,19 @@
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// check Key:
|
// check Key:
|
||||||
if(strcmp($_GET['key'], "$defined_key")) {
|
if(strcmp($_GET['key'], "$defined_key")) {
|
||||||
$error_msg = $error_msg."Zugriff verweigert!";
|
$error_msg = $error_msg."Zugriff verweigert!<br>Geloggter Zugriff von IP: ".$_SERVER['REMOTE_ADDR'];
|
||||||
|
$log_symbol = "❌️";
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// schreibe Status in Array:
|
// schreibe Status in Array, sofern es keinen Fehler gab:
|
||||||
if(empty($error_msg)){
|
if(empty($error_msg)){
|
||||||
$vm_state[$_GET['vmname']] = $_GET['state'];
|
$vm_state[$_GET['vmname']] = $_GET['state']."_".date("Y-m-d_H-i-s", time());
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// letzten Zugriff dokumentieren:
|
// letzten Zugriff dokumentieren:
|
||||||
$log["LOG: ".date("Y-m-d_H-i-s", time())] = "VM: ".$_GET['vmname']." / Status: ".$_GET['state']." / Key: ".$_GET['key']." / IP: ".$_SERVER['REMOTE_ADDR'];
|
$log["LOG: ".date("Y-m-d_H-i-s", time())] = $log_symbol." VM: ".$_GET['vmname']." / Status: ".$_GET['state']." / Key: ".$_GET['key']." / IP: ".$_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// Daten speichern:
|
// Daten speichern:
|
||||||
|
|
Loading…
Reference in a new issue