-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
35 lines (33 loc) · 849 Bytes
/
Copy pathindex.php
File metadata and controls
35 lines (33 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// Minimal search page: one input + submit, results rendered by ipsearch().
include 'config.php';
include 'fortigate_api_user-search.php';
$query = '';
if (isset($_POST['ipsearch'])) {
$query = trim((string) $_POST['ipsearch']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>FortiGate User Search</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
label { display: inline-block; width: 140px; }
input[type="text"] { width: 300px; }
</style>
</head>
<body>
<form action="" method="post">
<label for="ipsearch">User/IP search</label>
<input type="text" id="ipsearch" name="ipsearch" value="<?php echo htmlspecialchars($query, ENT_QUOTES, 'UTF-8'); ?>" />
<button type="submit">Search</button>
</form>
<?php
if ($query !== '') {
ipsearch($query);
}
?>
</body>
</html>