-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
178 lines (159 loc) · 7.44 KB
/
index.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php
include "inc.default.php"; // should be included in EVERY file
$oSecurity = new security(TRUE);
$oLog = new log("page visit", array("url" => $oPage->filename()));
if (!isset($_GET["t"])) {
redirect("main.php?start");
} else {
$strType = $_GET["t"];
}
$oExperience = new experience(me());
$oExperience->detail("reason", "pageload");
$oExperience->add(1);
$oMe = user(me());
$oMe->expBijAanmelding();
$oActions = new actions(me());
?><!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();
?>
<script>
$(document).ready(function(){
$("ul.waardenfilter li").click(function(){
$(this).removeClass("show");
switch($(this).attr("rel")) {
case "true":
$(this).removeAttr("rel");
break;
default:
$(this).addClass("show").attr("rel", "true");
break;
}
showFilterResult();
return false;
})
function showFilterResult() {
arYes = Array();
arNo = Array();
arWaarden = Array();
$("ul.waardenfilter li").each(function(){
switch($(this).attr("rel")) {
case "true": arWaarden[arWaarden.length] = $(this).find("a").attr("rel"); break;
}
});
$("div#results").load("index.ajax.php", {"t": "<?php echo $strType; ?>", "show": arYes, "hide": arNo, "waarden": arWaarden});
}
loadModals(<?php echo json_encode($oActions->modals()); ?>);
})
</script>
</head>
<body id="index">
<?php echo $oPage->startTabs(); ?>
<div class="body content content-market container">
<div class="row">
<?php /*echo $oSecurity->me()->html("leftuserprofile.html"); */
echo $oMe->html("user.html");
?>
</div>
<!-- <div class="container sidecenterright"> -->
<div class="row">
<?php
$oNew = owaesitem(0);
$oNew->type($strType);
if ($oNew->editable()===TRUE) {
?>
<a href="owaesadd.php?t=<?php echo $strType; ?>" class="btn btn-default">
<span class="icon icon-plus"></span><span class="title">Aanbod toevoegen</span>
</a>
<?php
} else {
switch($oNew->editable()) {
case "emailverify":
?>
<a href="modal.mailnotverified.php" class="domodal btn btn-default">
<span class="icon icon-plus"></span><span class="title">Aanbod toevoegen</span>
</a>
<?php
break;
case "voorwaarden":
?>
<a href="modal.voorwaarden.php" class="domodal btn btn-default">
<span class="icon icon-plus"></span><span class="title">Aanbod toevoegen</span>
</a>
<?php
break;
case "level":
?>
<a href="modal.levelneeded.php?l=<?php echo $oNew->type()->minimumlevel(); ?>" class="domodal btn btn-default">
<span class="icon icon-plus"></span><span class="title">Aanbod toevoegen</span>
</a>
<?php
break;
}
}
?>
<?php
$oOwaesList = new owaeslist();
$oOwaesList->filterByType($strType);
$oOwaesList->filterByState(STATE_RECRUTE);
$oOwaesList->filterPassedDate(owaesTime());
$bDesc = isset($_GET["d"])?($_GET["d"]==1):FALSE;
switch(isset($_GET["order"])?$_GET["order"]:"") {
case "distance":
$oOwaesList->order("distance", $bDesc);
$strOrder = "Afstand";
break;
case "creation":
$oOwaesList->order("creation", $bDesc);
$strOrder = "Datum creatie";
break;
case "task":
$oOwaesList->order("task", $bDesc);
$strOrder = "Datum uitvoering";
break;
default:
$oOwaesList->optiOrder($oMe);
$strOrder = "Profielopbouw";
$bDesc = FALSE;
}
?>
<div class="btn-group">
<button type="button" href="index.php" class="btn btn-default" onclick="location.href='<?php echo fixPath("index.php?" . qry(array("d"=>($bDesc?0:1)))); ?>';"><span class="icon icon-order-<?php echo ($bDesc?"desc":"asc"); ?>"></span><span class="title"><?php echo $strOrder; ?></span></button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="padding: 17px 10px 18px; ">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<li><a href="<?php echo fixPath("index.php?" . qry(array(), array("order", "d"))); ?>">Profielopbouw</a></li>
<li><a href="<?php echo fixPath("index.php?" . qry(array("order"=>"creation", "d"=>1))); ?>">Datum creatie</a></li>
<li><a href="<?php echo fixPath("index.php?" . qry(array("order"=>"task"), array("d"))); ?>">Datum uitvoering</a></li>
<?php
if ($oMe->latitude() * $oMe->longitude() == 0) {
echo ("<li><a href=\"" . fixPath("modal.adres.php?r=" . urlencode(fixPath("index.php?" . qry(array("order"=>"distance"), array("d"))))) . "\" class=\"domodal\">Afstand</a></li>");
} else {
echo ("<li><a href=\"" . fixPath("index.php?" . qry(array("order"=>"distance"), array("d"))) . "\">Afstand</a></li>");
}
?>
</ul>
</div>
</div>
<div class="row">
<div class="main market">
<div id="results">
<?php
foreach ($oOwaesList->getList() as $oItem) {
echo $oItem->HTML("owaeskort.html");
}
?>
</div>
</div>
</div>
<?php echo $oPage->endTabs(); ?>
</div>
<div class="footer">
<?php echo $oPage->footer(); ?>
</div>
</body>
</html>