mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Merge pull request #409 from cvc90/Pi.Alert-Fixes-deviceDetails.php
Pi.alert fixes in deviceDetails.php
This commit is contained in:
@@ -594,9 +594,10 @@
|
|||||||
<?php
|
<?php
|
||||||
if ($_REQUEST['mac'] == 'Internet') {
|
if ($_REQUEST['mac'] == 'Internet') {
|
||||||
?>
|
?>
|
||||||
<h4 class=""><i class="fa-solid fa-globe"></i> <?= lang('DevDetail_Tab_Internet_Info_Title');?></h4>
|
<h4 class=""><i class="fa-solid fa-globe"></i> <?= lang('DevDetail_Tab_Tools_Internet_Info_Title');?></h4>
|
||||||
|
<h5 class=""><?= lang('DevDetail_Tab_Tools_Internet_Info_Description');?></h5>
|
||||||
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
<div style="width:100%; text-align: center; margin-bottom: 50px;">
|
||||||
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()"><?= lang('DevDetail_Tab_Internet_Info_Start');?></button>
|
<button type="button" id="internetinfo" class="btn btn-primary pa-btn" style="margin: auto;" onclick="internetinfo()"><?= lang('DevDetail_Tab_Tools_Internet_Info_Start');?></button>
|
||||||
<br><div id="internetinfooutput" style="margin-top: 10px;"></div>
|
<br><div id="internetinfooutput" style="margin-top: 10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -620,6 +621,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- tab page 3 ------------------------------------------------------------ -->
|
<!-- tab page 3 ------------------------------------------------------------ -->
|
||||||
<div class="tab-pane fade table-responsive" id="panPresence">
|
<div class="tab-pane fade table-responsive" id="panPresence">
|
||||||
|
|
||||||
|
|||||||
49
front/php/server/internetinfo.php
Normal file
49
front/php/server/internetinfo.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
###################################################################################
|
||||||
|
# Pi.Alert #
|
||||||
|
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||||
|
# #
|
||||||
|
# internetinfo.php # Front module. Server side. System Information #
|
||||||
|
###################################################################################
|
||||||
|
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||||
|
# jokob#sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||||
|
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||||
|
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||||
|
###################################################################################
|
||||||
|
|
||||||
|
// Get init.php
|
||||||
|
require dirname(__FILE__).'/../server/init.php';
|
||||||
|
|
||||||
|
// Perform a test with the PING command
|
||||||
|
$output = shell_exec("curl ipinfo.io");
|
||||||
|
|
||||||
|
// Check if there is error
|
||||||
|
if (!isset($output) || empty($output)) {
|
||||||
|
// Error message
|
||||||
|
$output = lang('DevDetail_Tab_Tool_Internet_Info_Error');
|
||||||
|
// Show the result
|
||||||
|
echo "<pre>";
|
||||||
|
echo $output;
|
||||||
|
echo "</pre>";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Replace "{" with ""
|
||||||
|
$output = str_replace("{", "", $output);
|
||||||
|
|
||||||
|
// Replace "}" with ""
|
||||||
|
$output = str_replace("}", "", $output);
|
||||||
|
|
||||||
|
// Replace "," with ""
|
||||||
|
$output = str_replace(",", "", $output);
|
||||||
|
|
||||||
|
// Replace '"' with ""
|
||||||
|
$output = str_replace('"', "", $output);
|
||||||
|
|
||||||
|
// Show the result
|
||||||
|
echo "<pre>";
|
||||||
|
echo $output;
|
||||||
|
echo "</pre>";
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -118,6 +118,10 @@
|
|||||||
"DevDetail_Shortcut_DownAlerts" : "Down Meldungen",
|
"DevDetail_Shortcut_DownAlerts" : "Down Meldungen",
|
||||||
"DevDetail_Tab_Details" : "Details",
|
"DevDetail_Tab_Details" : "Details",
|
||||||
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Tools",
|
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Tools",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Title": "Internetinformationen",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Description": "Das Internet-Info-Tool zeigt Informationen über die Internetverbindung an, wie z. B. IP-Adresse, Stadt, Land, Ortsvorwahl und Zeitzone.",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Start": "Internet-Info starten",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Error": "Es ist ein Fehler aufgetreten",
|
||||||
"DevDetail_Tab_Nmap" : "Nmap",
|
"DevDetail_Tab_Nmap" : "Nmap",
|
||||||
"DevDetail_Tab_NmapTableIndex": "Index",
|
"DevDetail_Tab_NmapTableIndex": "Index",
|
||||||
"DevDetail_Tab_NmapTableTime": "Zeit",
|
"DevDetail_Tab_NmapTableTime": "Zeit",
|
||||||
|
|||||||
@@ -141,6 +141,10 @@
|
|||||||
"DevDetail_Shortcut_DownAlerts" : "Down Alerts",
|
"DevDetail_Shortcut_DownAlerts" : "Down Alerts",
|
||||||
"DevDetail_Tab_Details" : "<i class=\"fa fa-info-circle\"></i> Details",
|
"DevDetail_Tab_Details" : "<i class=\"fa fa-info-circle\"></i> Details",
|
||||||
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Tools",
|
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Tools",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Title": "Internet Info",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Description": "The Internet info tool displays information about the Internet connection, such as IP address, city, country, area code and time zone.",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Start": "Start Internet Info",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Error": "An error has occurred",
|
||||||
"DevDetail_Tab_Nmap" : "<i class=\"fa fa-ethernet\"></i> Nmap",
|
"DevDetail_Tab_Nmap" : "<i class=\"fa fa-ethernet\"></i> Nmap",
|
||||||
"DevDetail_Tab_Sessions" : "<i class=\"fa fa-list-ol\"></i> Sessions",
|
"DevDetail_Tab_Sessions" : "<i class=\"fa fa-list-ol\"></i> Sessions",
|
||||||
"DevDetail_Tab_Presence" : "<i class=\"fa fa-calendar\"></i> Presence",
|
"DevDetail_Tab_Presence" : "<i class=\"fa fa-calendar\"></i> Presence",
|
||||||
|
|||||||
@@ -141,6 +141,10 @@
|
|||||||
"DevDetail_Shortcut_DownAlerts" : "Alerta(s) de caída(s)",
|
"DevDetail_Shortcut_DownAlerts" : "Alerta(s) de caída(s)",
|
||||||
"DevDetail_Tab_Details" : "<i class=\"fa fa-info-circle\"></i> Detalles",
|
"DevDetail_Tab_Details" : "<i class=\"fa fa-info-circle\"></i> Detalles",
|
||||||
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Herramientas",
|
"DevDetail_Tab_Tools": "<i class=\"fa fa-screwdriver-wrench\"></i> Herramientas",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Title": "Información de Internet",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Description": "La herramienta de información de internet muestra información sobre la conexión a Internet, como dirección IP, ciudad, país, código de área y zona horaria.",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Start": "Iniciar información de Internet",
|
||||||
|
"DevDetail_Tab_Tools_Internet_Info_Error": "Se ha producido un error",
|
||||||
"DevDetail_Tab_Nmap" : "<i class=\"fa fa-ethernet\"></i> Nmap",
|
"DevDetail_Tab_Nmap" : "<i class=\"fa fa-ethernet\"></i> Nmap",
|
||||||
"DevDetail_Tab_Sessions" : "<i class=\"fa fa-list-ol\"></i> Sesiones",
|
"DevDetail_Tab_Sessions" : "<i class=\"fa fa-list-ol\"></i> Sesiones",
|
||||||
"DevDetail_Tab_Presence" : "<i class=\"fa fa-calendar\"></i> Historial",
|
"DevDetail_Tab_Presence" : "<i class=\"fa fa-calendar\"></i> Historial",
|
||||||
|
|||||||
Reference in New Issue
Block a user