-
Notifications
You must be signed in to change notification settings - Fork 3
/
badges.php
97 lines (84 loc) · 3.44 KB
/
badges.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
include "inc.default.php"; // should be included in EVERY file
$oSecurity = new security(TRUE);
$oLog = new log("page visit", array("url" => $oPage->filename()));
//$oBadgesList = new badseslist();
//$oBadgesList->filter("visible");
$oExperience = new experience(me());
$oExperience->detail("reason", "pageload");
$oExperience->add(1);
$oPage->tab("lijsten");
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
echo $oPage->getHeader();
?>
</head>
<body id="badges">
<?php echo $oPage->startTabs(); ?>
<div class="body content content-lists content-lists-badges container">
<div class="row">
<?php /*echo $oSecurity->me()->html("leftuserprofile.html"); */
echo $oSecurity->me()->html("user.html");
?>
</div>
<h2>Badges</h2>
<p>Hier zie je de verzameling badges die je hebt verdient, alsook de badges die je nog kan verdienen. Zijn er geen resterende badges meer? Dan zijn er nog steeds de verborgen badges...</p>
<?php
$arMyBadges = user(me())->getBadges();
$arBadges = array();
$oDB = new database("select * from tblBadges where zichtbaar = 1;", TRUE);
while ($oDB->nextRecord()) {
$arBadges[$oDB->get("mkey")] = array(
"img" => $oDB->get("img"),
"title" => $oDB->get("title"),
"info" => $oDB->get("info"),
);
}
if (count($arMyBadges)>0) {
echo ('<h3>Behaalde badges</h3>
<div class="row sidecenterright behaaldebadges">');
foreach ($arMyBadges as $strKey=>$arBadge) {
echo ('<div class="col-md-6 badgeslistitem">
<div class="row">
<div class="col-xs-2">
<img src="img/badges/' . $arBadge["img"] . '" alt="' . $arBadge["title"] . '" width="57" height="57">
</div>
<div class="col-xs-10">
<h2>' . $arBadge["title"] . '</h2>
<p class="badgedescription">' . $arBadge["info"] . '</p>
</div>
</div>
</div>');
if (isset($arBadges[$strKey])) unset($arBadges[$strKey]);
}
echo ('</div>');
}
if (count($arBadges)>0) {
echo ('<h3>Nog niet behaalde badges</h3>
<div class="row sidecenterright resterendebadges">');
foreach ($arBadges as $strKey=>$arBadge) {
echo ('
<div class="col-md-6 badgeslistitem">
<div class="row">
<div class="col-xs-2">
<img src="img/badges/' . $arBadge["img"] . '" alt="' . $arBadge["title"] . '" width="57" height="57">
</div>
<div class="col-xs-10">
<h2>' . $arBadge["title"] . '</h2>
<p class="badgedescription">' . $arBadge["info"] . '</p>
</div>
</div>
</div>');
}
echo ('</div>');
}
?>
<?php echo $oPage->endTabs(); ?>
</div>
<div class="footer">
<?php echo $oPage->footer(); ?>
</div>
</body>
</html>