mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
saving port info + links
This commit is contained in:
@@ -10,16 +10,28 @@
|
||||
|
||||
require '/home/pi/pialert/front/php/templates/timezone.php';
|
||||
require '/home/pi/pialert/front/php/templates/skinUI.php';
|
||||
// require '/home/pi/pialert/front/php/templates/language/lang.php';
|
||||
// require '/home/pi/pialert/front/php/server/db.php';
|
||||
|
||||
|
||||
|
||||
$FUNCTION = [];
|
||||
$SETTINGS = [];
|
||||
|
||||
// displayMessage($_REQUEST);
|
||||
|
||||
|
||||
// echo 'hereeeeeeeeeeeeeeeeeeeeee1';
|
||||
|
||||
// init request params
|
||||
if(array_key_exists('function', $_REQUEST) != FALSE)
|
||||
{
|
||||
{
|
||||
displayMessage(array_key_exists('function', $_REQUEST));
|
||||
displayMessage(array_key_exists('index', $_REQUEST));
|
||||
displayMessage(array_key_exists('value', $_REQUEST));
|
||||
$FUNCTION = $_REQUEST['function'];
|
||||
displayMessage($FUNCTION);
|
||||
|
||||
}
|
||||
|
||||
if(array_key_exists('settings', $_REQUEST) != FALSE)
|
||||
@@ -36,10 +48,7 @@ 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
|
||||
@@ -287,27 +296,7 @@ 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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user