mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
deviceDetails change notification overhaul
This commit is contained in:
@@ -12,6 +12,7 @@ require '/home/pi/pialert/front/php/templates/timezone.php';
|
||||
require '/home/pi/pialert/front/php/templates/skinUI.php';
|
||||
|
||||
|
||||
|
||||
$FUNCTION = [];
|
||||
$SETTINGS = [];
|
||||
|
||||
@@ -35,6 +36,10 @@ elseif ($FUNCTION == 'cleanLog')
|
||||
{
|
||||
cleanLog($SETTINGS);
|
||||
}
|
||||
elseif ($FUNCTION == 'saveNmapPort' && array_key_exists('index', $_REQUEST) && array_key_exists('value', $_REQUEST) )
|
||||
{
|
||||
saveNmapPort($_REQUEST['index'], $_REQUEST['value']);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Formatting data functions
|
||||
@@ -281,6 +286,29 @@ function saveSettings()
|
||||
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
function saveNmapPort($portIndex, $value)
|
||||
{
|
||||
if(is_integer($portIndex))
|
||||
{
|
||||
$value = escapeString($value);
|
||||
|
||||
// sql
|
||||
$sql = 'UPDATE Nmap_Scan SET Extra = "'. quotes($value) .'" WHERE Index="' . $portIndex .'"';
|
||||
// update Data
|
||||
$result = $db->query($sql);
|
||||
|
||||
// check result
|
||||
if ($result == TRUE) {
|
||||
echo lang('Gen_Upd');
|
||||
} else {
|
||||
echo lang('Gen_Upd_Fail')."\n\n$sql \n\n". $db->lastErrorMsg();
|
||||
}
|
||||
}
|
||||
echo "asdasdasasd";
|
||||
}
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
||||
function getString ($codeName, $default) {
|
||||
|
||||
$result = lang($codeName);
|
||||
|
||||
Reference in New Issue
Block a user