-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
41 lines (36 loc) · 1.18 KB
/
search.php
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
40
41
<?php
include ('includes/connect.php');
include ("includes/language.php");
include ('includes/class.settlements.php');
$settlements = new settlements();
$settlements->setUser($_SESSION["osm_user"]);
$settlements->setPDO($dbh);
$pagetitle = "Search for ".$_GET["search"];
include ('includes/header.php');
?>
<h2><?= $pagetitle; ?></h2>
<?php
$stlm = $settlements->searchSettlement($_GET["search"]);
if ($stlm["Error"] == "yes")
{
echo "Not found";
}
else
{
echo "<ul>";
foreach($stlm as $set)
{
$thisrow = "";
$thisrow .= '<li><label class="placetype">'.$set["place"].'</label> ';
$thisrow .= '<label class="placename" title="'.$set["name_en"].'"><a href="settlement.php?ids='.$set["id_settlement"].'">'.$set["name"].'</a></label> (';
if ($set["subregion"] != "") { $thisrow .= $set["subregion"].", "; }
if ($set["region"] != "") { $thisrow .= $set["region"].", "; }
$thisrow .= $set["countryname_en"].") <label class='placetype'>".$set["lat"]." ".$set["lon"]."</label></li>";
echo $thisrow;
}
echo "</ul>";
}
?>
<?php
include("includes/javascripts.php");
include("includes/footer.php");?>