Completed
Push — master ( 702a44...77d52d )
by mains
02:36
created
index.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	$accessToken;
15 15
 	$newPositionStatus;
16 16
 	
17
-	if ($result->num_rows > 0)
17
+	if($result->num_rows > 0)
18 18
 	{
19 19
 		// output data of each row
20 20
 		while($row = $result->fetch_assoc())
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		  			<a href="index.php">
114 114
 						<h1>
115 115
 							JodelBlue
116
-							<?php if(!isset($_GET['postID']) && !isset($_GET['getPostDetails'])) echo '<i class="fa fa-refresh fa-1x"></i>';?>
116
+							<?php if(!isset($_GET['postID']) && !isset($_GET['getPostDetails'])) echo '<i class="fa fa-refresh fa-1x"></i>'; ?>
117 117
 						</h1>					
118 118
 					</a>
119 119
 				</div>
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 							//Set View
132 132
 							if(isset($_GET['view']))
133 133
 							{
134
-								switch ($_GET['view']) {
134
+								switch($_GET['view']) {
135 135
 									case 'comment':
136 136
 										$view = 'comment';
137 137
 										break;
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
 							if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) {
155 155
 								//Header Nav in Comment View
156 156
 								?>
157
-								<a id="comment-back" href="index.php?view=<?php echo $view;?>#postId-<?php echo htmlspecialchars($_GET['postID']);?>">
157
+								<a id="comment-back" href="index.php?view=<?php echo $view; ?>#postId-<?php echo htmlspecialchars($_GET['postID']); ?>">
158 158
 									<i class="fa fa-angle-left fa-3x"></i>
159 159
 								</a>
160 160
 
161
-								<a id="comment-refresh" href="index.php?getPostDetails=<?php echo htmlspecialchars($_GET['getPostDetails']);?>&postID=<?php echo htmlspecialchars($_GET['postID']);?>">
161
+								<a id="comment-refresh" href="index.php?getPostDetails=<?php echo htmlspecialchars($_GET['getPostDetails']); ?>&postID=<?php echo htmlspecialchars($_GET['postID']); ?>">
162 162
 									<i class="fa fa-refresh fa-2x"></i>
163 163
 								</a>
164 164
 								<?php
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
 							//Get Posts
182 182
 							else
183 183
 							{
184
-								if($view=='comment')
184
+								if($view == 'comment')
185 185
 								{
186 186
 									$url = "/v2/posts/location/discussed/";
187 187
 								}
188 188
 								else
189 189
 								{
190
-									if($view=='upVote')
190
+									if($view == 'upVote')
191 191
 									{
192 192
 										$url = "/v2/posts/location/popular/";
193 193
 									}
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 							}
204 204
 							
205 205
 
206
-							for($i = 0; $i<$loops; $i++) {
206
+							for($i = 0; $i < $loops; $i++) {
207 207
 							
208 208
 							if(isset($posts[$i])) {
209 209
 							$lastPostId = $posts[$i]['post_id'];
@@ -221,24 +221,24 @@  discard block
 block discarded – undo
221 221
 							$timediff_inHours = (string)$timediff->format('%h');
222 222
 							$timediff_inDays = (string)$timediff->format('%d');
223 223
 							$timediff_inMonth = (string)$timediff->format('%m');
224
-							if($timediff_inMonth!=0) {
224
+							if($timediff_inMonth != 0) {
225 225
 									$timediff = $timediff_inMonth . "m";
226 226
 							}
227 227
 							else
228 228
 							{
229
-								if($timediff_inDays!=0)
229
+								if($timediff_inDays != 0)
230 230
 								{
231 231
 									$timediff = $timediff_inDays . "d";
232 232
 								}
233 233
 								else
234 234
 								{
235
-									if($timediff_inHours!=0)
235
+									if($timediff_inHours != 0)
236 236
 									{
237 237
 										$timediff = $timediff_inHours . "h";
238 238
 									}
239 239
 									else
240 240
 									{
241
-										if($timediff_inMinutes!=0)
241
+										if($timediff_inMinutes != 0)
242 242
 										{
243 243
 											$timediff = $timediff_inMinutes . "m";
244 244
 										}
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 							}
252 252
 						?>
253 253
 						
254
-						<article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"];?>;">
254
+						<article id ="postId-<?php echo $posts[$i]["post_id"]; ?>" class="jodel" style="background-color: #<?php echo $posts[$i]["color"]; ?>;">
255 255
 							<content>
256 256
 								<?php 
257 257
 								if(isset($posts[$i]["image_url"])) {
@@ -263,12 +263,12 @@  discard block
 block discarded – undo
263 263
 								?>
264 264
 							</content>
265 265
 							<aside>
266
-								<a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"];?>">
266
+								<a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"]; ?>">
267 267
 									<i class="fa fa-angle-up fa-3x"></i>
268 268
 								</a>	
269 269
 									<br />
270
-								<?php echo $posts[$i]["vote_count"];?><br />
271
-								<a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"];?>">
270
+								<?php echo $posts[$i]["vote_count"]; ?><br />
271
+								<a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"]; ?>">
272 272
 									<i class="fa fa-angle-down fa-3x"></i>
273 273
 								</a>
274 274
 							</aside>
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
 										<td class="time">
280 280
 											<span data-tooltip="Time">
281 281
 												<i class="fa fa-clock-o"></i>
282
-												<?php echo $timediff;?>
282
+												<?php echo $timediff; ?>
283 283
 											</span> 
284 284
 										</td>
285 285
 										<td class="comments">
286 286
 											<?php if($showCommentIcon) {?>
287 287
 											<span data-tooltip="Comments">
288
-												<a href="index.php?getPostDetails=true&view=<?php echo $view;?>&postID=<?php echo $posts[$i]["post_id"];?>">
288
+												<a href="index.php?getPostDetails=true&view=<?php echo $view; ?>&postID=<?php echo $posts[$i]["post_id"]; ?>">
289 289
 													<i class="fa fa-commenting-o"></i>
290 290
 													<?php if(array_key_exists("child_count", $posts[$i])) {
291 291
 																echo $posts[$i]["child_count"];
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 										<td class="distance">
299 299
 											<span data-tooltip="Distance">
300 300
 												<i class="fa fa-map-marker"></i>
301
-												<?php echo $posts[$i]["distance"];?> km
301
+												<?php echo $posts[$i]["distance"]; ?> km
302 302
 											</span>
303 303
 										</td>
304 304
 									</tr>
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 								<?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?>
346 346
 								<h2>Comment on Jodel</h2>
347 347
 								<form method="POST">				
348
-										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']);?>" />
348
+										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']); ?>" />
349 349
 										<textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> 
350 350
 									<br />
351 351
 									<input type="submit" value="SEND" /> 
@@ -373,13 +373,13 @@  discard block
 block discarded – undo
373 373
 				<div class="col-sm-12">
374 374
 					<div class="row">
375 375
 						<div class="col-sm-3">
376
-							<a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a>
376
+							<a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a>
377 377
 						</div>
378 378
 						<div class="col-sm-3">
379
-							<a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a>
379
+							<a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a>
380 380
 						</div>
381 381
 						<div class="col-sm-3">
382
-							<a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a>
382
+							<a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a>
383 383
 						</div>
384 384
 						<div class="col-sm-3">
385 385
 							<nav>
Please login to merge, or discard this patch.