diff --git a/app/helpers/pagination.php b/app/helpers/pagination.php index 9a36352..601a124 100644 --- a/app/helpers/pagination.php +++ b/app/helpers/pagination.php @@ -16,10 +16,10 @@ $param .= '&event=' . $_REQUEST['event']; } if (isset($_REQUEST['from_time'])) { - $param .= '&from_time=' . $_REQUEST['from_time']; + $param .= '&from_time=' . $from_time; } if (isset($_REQUEST['until_time'])) { - $param .= '&until_time=' . $_REQUEST['until_time']; + $param .= '&until_time=' . $until_time; } $max_visible_pages = 10; diff --git a/app/helpers/sanitize.php b/app/helpers/sanitize.php new file mode 100644 index 0000000..4ed6b19 --- /dev/null +++ b/app/helpers/sanitize.php @@ -0,0 +1,29 @@ + diff --git a/app/helpers/time_range.php b/app/helpers/time_range.php index 15f2924..e025244 100644 --- a/app/helpers/time_range.php +++ b/app/helpers/time_range.php @@ -1,16 +1,14 @@ $_POST['type'], - 'url' => $_POST['url'], - 'secret_key' => $_POST['secret_key'], + 'type_id' => $type, + 'url' => $url, + 'secret_key' => $secret_key, ]; $result = $agentObject->addAgent($platform_id, $newAgent); if ($result === true) { @@ -34,7 +40,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // new platform adding } elseif (isset($_POST['new']) && $_POST['new'] === 'true') { $newPlatform = [ - 'name' => $_POST['name'], + 'name' => $name, 'jitsi_url' => $_POST['jitsi_url'], 'jilo_database' => $_POST['jilo_database'], ]; @@ -58,9 +64,9 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { } elseif (isset($_POST['agent'])) { $updatedAgent = [ 'id' => $agent, - 'agent_type_id' => $_POST['type'], - 'url' => $_POST['url'], - 'secret_key' => $_POST['secret_key'], + 'agent_type_id' => $type, + 'url' => $url, + 'secret_key' => $secret_key, ]; $result = $agentObject->editAgent($platform_id, $updatedAgent); if ($result === true) { @@ -73,7 +79,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { } else { $platform = $_POST['platform']; $updatedPlatform = [ - 'name' => $_POST['name'], + 'name' => $name, 'jitsi_url' => $_POST['jitsi_url'], 'jilo_database' => $_POST['jilo_database'], ]; diff --git a/app/templates/agent-list.php b/app/templates/agent-list.php index 8cb9797..bba0403 100644 --- a/app/templates/agent-list.php +++ b/app/templates/agent-list.php @@ -1,14 +1,14 @@
Jilo Agents on platform = htmlspecialchars($platform_id) ?> (= htmlspecialchars($platformDetails[0]['name']) ?>)
+Jilo Agents on platform = $platform_id ?> (= $platformDetails[0]['name'] ?>)
- agent id: = htmlspecialchars($agent['id']) ?>
- agent type: = htmlspecialchars($agent['agent_type_id']) ?> (= htmlspecialchars($agent['agent_description']) ?>)
+ agent id: = $agent['id'] ?>
+ agent type: = $agent['agent_type_id'] ?> (= $agent['agent_description'] ?>)
- endpoint: = htmlspecialchars($agent['url']) ?>= htmlspecialchars($agent['agent_endpoint']) ?>
+ endpoint: = $agent['url'] ?>= $agent['agent_endpoint'] ?>
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
click a button to display data from the agent.+
click a button to display data from the agent.diff --git a/app/templates/block-results-filter.php b/app/templates/block-results-filter.php index 29132c2..5c984b5 100644 --- a/app/templates/block-results-filter.php +++ b/app/templates/block-results-filter.php @@ -3,9 +3,9 @@