-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuser.php
More file actions
63 lines (59 loc) · 2.23 KB
/
user.php
File metadata and controls
63 lines (59 loc) · 2.23 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
include ('includes/connect.php');
include ("includes/language.php");
include ("includes/class.osmuser.php");
$osmUser = new osmUser();
$osmUser->setPDO($dbh);
$thisuser = $osmUser->isUser($_GET["user"]);
$pagetitle = $thisuser["osm_user"];
include ('includes/header.php');
if ($thisuser["Error"] == "yes")
{
echo "<h2>User not found</h2>";
include("includes/footer.php");
exit;
}
else
{
?>
<h1><?= $thisuser["osm_user"];?></h1>
<?php
$actions = $osmUser->getUserActivity($_GET["user"]);
if ($actions["Error"] != "yes")
{
?>
<h2>Latest updates</h2>
<?php
foreach ($actions as $entry)
{
if ($entry["item_table"] == "settlement_areas")
{
if ($entry["name"] == "") { $entry["name"] = "[no name]"; }
$printout = "Updated <label class='placetype'>".$entry["place"]."</label>"
." <a href='settlement.php?ids=".$entry["item_id"]."'><label class='placename' title=\"".$entry["name_en"]."\">".$entry["name"]."</label></a>"
." in ";
if ($entry["subregion"] != "")
{
$printout .= $entry["subregion"].", ";
}
$printout .= $entry["region"].", <label title=\"".$entry["countryname_en"]."\">".$entry["countryname"]."</label><br />";
echo $printout;
}
else
{
$printout = "Updated <label class='placetype'>".$entry["place"]."</label>"
." <a href='farm.php?idf=".$entry["item_id"]."'><label class='placename' title=\"".$entry["name_en"]."\">".$entry["name"]."</label></a>"
." in ";
if ($entry["subregion"] != "")
{
$printout .= $entry["subregion"].", ";
}
$printout .= $entry["region"].", <label title=\"".$entry["countryname_en"]."\">".$entry["countryname"]."</label><br />";
echo $printout;
}
}
?>
</table>
<?php }
}
include("includes/footer.php");