2024-10-04 08:36:45 +00:00
|
|
|
<?php
|
2024-10-04 11:18:28 +00:00
|
|
|
|
|
|
|
// sanitize all input vars that may end up in URLs or forms
|
2024-10-04 08:36:45 +00:00
|
|
|
|
|
|
|
$platform_id = htmlspecialchars($_REQUEST['platform']);
|
|
|
|
if (isset($_REQUEST['page'])) {
|
|
|
|
$page = htmlspecialchars($_REQUEST['page']);
|
|
|
|
} else {
|
|
|
|
$page = 'dashboard';
|
|
|
|
}
|
|
|
|
if (isset($_REQUEST['item'])) {
|
|
|
|
$item = htmlspecialchars($_REQUEST['item']);
|
|
|
|
} else {
|
|
|
|
$item = '';
|
|
|
|
}
|
2024-10-04 11:18:28 +00:00
|
|
|
|
|
|
|
if (isset($_REQUEST['from_time'])) {
|
|
|
|
$from_time = htmlspecialchars($_REQUEST['from_time']);
|
|
|
|
}
|
|
|
|
if (isset($_REQUEST['until_time'])) {
|
|
|
|
$until_time = htmlspecialchars($_REQUEST['until_time']);
|
|
|
|
}
|
|
|
|
|
2024-10-04 08:36:45 +00:00
|
|
|
if (isset($_SESSION['notice'])) {
|
|
|
|
$notice = htmlspecialchars($_SESSION['notice']); // 'notice' for all non-critical messages
|
|
|
|
}
|
|
|
|
if (isset($_SESSION['error'])) {
|
|
|
|
$error = htmlspecialchars($_SESSION['error']); // 'error' for errors
|
|
|
|
}
|
2024-10-04 11:18:28 +00:00
|
|
|
|
2024-10-30 17:11:23 +00:00
|
|
|
// hosts
|
|
|
|
if (isset($_POST['address'])) {
|
|
|
|
$address = htmlspecialchars($_POST['address']);
|
|
|
|
}
|
|
|
|
if (isset($_POST['port'])) {
|
|
|
|
$port = htmlspecialchars($_POST['port']);
|
|
|
|
}
|
|
|
|
if (isset($_POST['name'])) {
|
|
|
|
$name = htmlspecialchars($_POST['name']);
|
|
|
|
}
|
|
|
|
|
2024-10-04 11:18:28 +00:00
|
|
|
// agents
|
|
|
|
if (isset($_POST['type'])) {
|
|
|
|
$type = htmlspecialchars($_POST['type']);
|
2024-10-04 08:36:45 +00:00
|
|
|
}
|
2024-10-04 11:18:28 +00:00
|
|
|
if (isset($_POST['url'])) {
|
|
|
|
$url = htmlspecialchars($_POST['url']);
|
|
|
|
}
|
|
|
|
if (isset($_POST['secret_key'])) {
|
|
|
|
$secret_key = htmlspecialchars($_POST['secret_key']);
|
|
|
|
}
|
2024-10-24 09:11:35 +00:00
|
|
|
if (isset($_POST['check_period'])) {
|
|
|
|
$check_period = htmlspecialchars($_POST['check_period']);
|
|
|
|
}
|
2024-10-04 11:18:28 +00:00
|
|
|
|
|
|
|
// platforms
|
|
|
|
if (isset($_POST['name'])) {
|
|
|
|
$name = htmlspecialchars($_POST['name']);
|
2024-10-04 08:36:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|