-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlimDest.php
More file actions
39 lines (27 loc) · 1.29 KB
/
limDest.php
File metadata and controls
39 lines (27 loc) · 1.29 KB
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
36
37
38
39
<?php
$src = $_POST["src"];
$sql_query_dest = "select DISTINCT dest as dest from traceroute where src = '" . $src . "';";
include 'dtb.php';
$list = $dbh->query($sql_query_dest);
#if(pg_num_rows($list_four) == 0) {
# echo "<option value = \"No destinations found for this given source\"></option>";
#}
// echo "<option value = \"" . pg_num_rows($list_four) . "\"></option>";
while($row_list_dest = $list->fetch(PDO::FETCH_ASSOC)):
$dest = $row_list_dest["dest"];
$sql_query_name = "select distinct sitename as sitename from serverlookup where ipv4 = '" . $dest . "' or ipv6 = '" . $dest . "';";
$name = $dbh->query($sql_query_name);
$row_list_name = $name->fetch(PDO::FETCH_ASSOC);
$name = $row_list_name["sitename"];
$option = "<option value = \"" . $dest . "\">" . $name . "</option>";
echo $option;
endwhile;
?>
<?php
// $sql_query_name="select domain||'(" . $ip . ")' as domain from serverlookup where " . $ip . " = '" . $dest . "';";
// $list_five = $dbh->query($sql_query_name);
// if($row_list_site = $list_five->fetch(PDO::FETCH_ASSOC)) {
// $site = $row_list_site["domain"];
// }
// $option = "<option value = \"" . $site . "\"></option>";
?>