-
Notifications
You must be signed in to change notification settings - Fork 0
/
explorationSingle.php
executable file
·181 lines (156 loc) · 6.31 KB
/
explorationSingle.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
179
180
181
<?php
require "lib/site.php";
$count = $explorations->getCount();
$titles = $explorations->getTitles();
$id_table = $explorations->getIDs();
$paths = $explorations->getPaths();
?>
<?php
ob_start();
if(isset($_GET['id'])) {
$id = $_GET['id'];
if($id == 0) {
$id = 1;
}
if(!is_numeric($id)) {
$id = 1;
}
$exploration = $explorations->get($id);
$stops = $exploration->getStops();
$area = $areas->get($id);
}else {
header('Location: /explorationSingle.php');
}
?>
<?php
$pagename = $exploration->getName();
$name = $pagename;
include('includes/head.php');
include('includes/header.php');
?>
<!--===============================
Landing Image
================================-->
<div id='landing' class="main" style="background: url('<?php echo $source.$exploration->getHeaderPath();?>') center center;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
position: relative;
overflow: hidden;">
<div id='landing-overlay-blend' class="main"></div>
</div>
<!--===============================
Exploration Nav & About
================================-->
<section id='main'>
<h2><?php echo $exploration->getName(); ?></h2>
<div class="placeNav">
<a href="explorationSingle-Map.php?id=<?php echo $id; ?>">
<div class="placeNavItem">
<img src="assets/svgs/map.svg"/>
<p class="placeNavItemTitle">START EXPLORATION</p>
</div>
</a>
<?php
foreach($explorations->getCommentsToggle($id)[0] as $val)
{
if($val == "true"){
?>
<a href="explorationSingle-Conversations.php?id=<?php echo $id; ?>">
<div class="placeNavItem">
<img src="assets/svgs/conversations.svg"/>
<p class="placeNavItemTitle">VIEW CONVERSATIONS</p>
</div>
</a>
<?php
break;
}
}
?>
</div>
<div id="description_place"><?php $exploration->getDes();?></div>
</section>
<!--===============================
Exploration Stops
================================-->
<section id='collections' class="main">
<div class="collectionTitle"><h4>Stops</h4></div>
<div id='collections-layout' class='collections-grid'>
<?php
for ($x = 0; $x < count($stops); $x++) {
/*$stops[$x] = str_replace("A", "", $stops[$x]);*/
$stopsArray = array();
$type = array();
if($locations->get($stops[$x]) == null || $areas->get(str_replace("A", "", $stops[$x])) == null){
if($locations->get($stops[$x]) != null){
$stop = $locations->get($stops[$x]);
echo '
<div class="collection-container">
<div class="collection-image">
<img src='.$source.$stop->getThumbPath().' />
</div>
<div class="collection-info">
<h2 class="collection-title">'.$stop->getName().'</h2>
<a href="placeSingle.php?id='.$stops[$x].'&type=L&s='.($x+1).'&t='.count($stops).'&expid='.$id.'" class="collection-link">View Project</a>
</div>
</div>
';
}
if($areas->get(str_replace("A", "", $stops[$x])) != null){
$stop = $areas->get(str_replace("A", "", $stops[$x]));
echo '
<div class="collection-container">
<div class="collection-image">
<img src='.$source.$stop->getThumbPath().' />
</div>
<div class="collection-info">
<h2 class="collection-title">'.$stop->getName().'</h2>
<a href="placeSingle.php?id='.str_replace("A", "", $stops[$x]).'&type=A&s='.($x+1).'&t='.count($stops).'&expid='.$id.'" class="collection-link">View Project</a>
</div>
</div>
';
}
}
if($locations->get($stops[$x]) != null && $areas->get(str_replace("A", "", $stops[$x])) != null){
if($locations->get($stops[$x]) != null){
$stop = $locations->get($stops[$x]);
echo '
<div class="collection-container">
<div class="collection-image">
<img src='.$source.$stop->getThumbPath().' />
</div>
<div class="collection-info">
<h2 class="collection-title">'.$stop->getName().'</h2>
<a href="placeSingle.php?id='.$stops[$x].'&type=L&s='.($x+1).'&t='.count($stops).'&expid='.$id.'" class="collection-link">View Project</a>
</div>
</div>
';
}
if($areas->get(str_replace("A", "", $stops[$x])) != null){
$stop = $areas->get(str_replace("A", "", $stops[$x]));
echo '
<div class="collection-container">
<div class="collection-image">
<img src='.$source.$stop->getThumbPath().' />
</div>
<div class="collection-info">
<h2 class="collection-title">'.$stop->getName().'</h2>
<a href="placeSingle.php?id='.str_replace("A", "", $stops[$x]).'&type=A&s='.($x+1).'&t='.count($stops).'&expid='.$id.'" class="collection-link">View Project</a>
</div>
</div>
';
}
$x++;
}
}
?>
</div>
</section>
<!--===============================
Scripts & Footer
================================-->
<script src='js/index.js'></script>
<script src='js/modals.js'></script>
<?php
include('includes/footer.php');
?>