-
Notifications
You must be signed in to change notification settings - Fork 9
/
results.php
65 lines (53 loc) · 1.69 KB
/
results.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
<?php
require_once 'global.php';
require_once 'header.php';
$self = $_SERVER['REQUEST_URI'];
if(isset($_GET['sort'])) {
$sort = $_GET['sort'];
$self = str_replace('&sort='.$sort,'',$self);
} else {
$sort = 'time';
}
if($is_index)
$self .= "index.php?";
if($_GET['t'] == 'a') {
$eventIDs = get_advance_search_ids();
} elseif ($_GET['t'] == 'b') {
$eventIDs = get_basic_search_ids();
} elseif ($_GET['t'] == 't') {
$eventIDs = get_tag_ids($_GET['tag']);
} else {
$eventIDs = array();
}
$events = get_events($eventIDs,$sort,20);
?>
<div class="body">
<div class="col large">
<?php if($_GET['delete'] == 't') : ?>
<h1 class="head info">Event deleted successfully</h1>
<?php endif; ?>
<div class="sortby">
<span style="float: left;">
<?php
if (isset($_GET['w']) && $_GET['w'] != '') {
echo urldecode(stripslashes($_GET['w']));
} else {
$num_IDs = $events ? count($events) : 0;
echo "Showing $num_IDs events";
}
?>
</span>
Sort by:
<a href="<?php echo $self; ?>&sort=time">Time</a>
<a href="<?php echo $self; ?>&sort=category">Category</a>
<a href="<?php echo $self; ?>&sort=location">Location</a>
</div>
<?php
display_events_inter($events,$sort);
?>
</div>
<?php include 'sidebar.php'; ?>
</div>
<?php include 'footer.php'; ?>
</body>
</html>