@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | </article> |
92 | 92 | |
93 | 93 | <aside class="topSidebar col-sm-4 sidebar-outer"> |
94 | - <div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile');?>"> |
|
94 | + <div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile'); ?>"> |
|
95 | 95 | <article> |
96 | 96 | <div> |
97 | 97 | <h2>Position / Hashtag</h2> |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | <?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?> |
116 | 116 | <h2>Comment on Jodel</h2> |
117 | 117 | <form method="POST"> |
118 | - <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" /> |
|
118 | + <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']); ?>" /> |
|
119 | 119 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
120 | 120 | <br /> |
121 | 121 | <input type="submit" value="SEND" /> |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | </div> |
158 | 158 | </aside> |
159 | 159 | </div> |
160 | - <?php include 'templates/nav-bottom.php';?> |
|
160 | + <?php include 'templates/nav-bottom.php'; ?> |
|
161 | 161 | </div> |
162 | 162 | <?php |
163 | 163 | $includeEmojiAndAjax = TRUE; |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | |
21 | 21 | $posts[0] = $data; |
22 | 22 | |
23 | - if(array_key_exists('children', $data)) { |
|
23 | + if(array_key_exists('children', $data)) |
|
24 | + { |
|
24 | 25 | foreach($data['children'] as $key => $child) |
25 | 26 | { |
26 | 27 | |
@@ -83,7 +84,9 @@ discard block |
||
83 | 84 | } ?> |
84 | 85 | </content> |
85 | 86 | |
86 | - <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?> |
|
87 | + <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) |
|
88 | +{ |
|
89 | +?> |
|
87 | 90 | <p id="loading"> |
88 | 91 | Loading… |
89 | 92 | </p> |
@@ -91,12 +94,20 @@ discard block |
||
91 | 94 | </article> |
92 | 95 | |
93 | 96 | <aside class="topSidebar col-sm-4 sidebar-outer"> |
94 | - <div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile');?>"> |
|
97 | + <div class="fixed<?php if(!$view->isDetailedView) |
|
98 | +{ |
|
99 | + echo(' hide-mobile'); |
|
100 | +} |
|
101 | +?>"> |
|
95 | 102 | <article> |
96 | 103 | <div> |
97 | 104 | <h2>Position / Hashtag</h2> |
98 | 105 | <form method="get"> |
99 | - <input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required> |
|
106 | + <input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus)) |
|
107 | +{ |
|
108 | + echo $newPositionStatus; |
|
109 | +} |
|
110 | +?>" required> |
|
100 | 111 | <label>try: #jhj</label><br> |
101 | 112 | <input type="submit" value="Set Location" /> |
102 | 113 | </form> |
@@ -112,7 +123,9 @@ discard block |
||
112 | 123 | |
113 | 124 | <article> |
114 | 125 | <div> |
115 | - <?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?> |
|
126 | + <?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) |
|
127 | +{ |
|
128 | +?> |
|
116 | 129 | <h2>Comment on Jodel</h2> |
117 | 130 | <form method="POST"> |
118 | 131 | <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" /> |
@@ -120,7 +133,10 @@ discard block |
||
120 | 133 | <br /> |
121 | 134 | <input type="submit" value="SEND" /> |
122 | 135 | </form> |
123 | - <?php } else { ?> |
|
136 | + <?php } |
|
137 | +else |
|
138 | +{ |
|
139 | +?> |
|
124 | 140 | <h2>New Jodel</h2> |
125 | 141 | <form method="POST"> |
126 | 142 | <textarea id="message" name="message" placeholder="Send a Jodel to all students within 10km" required></textarea> |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | crossorigin="anonymous"></script> |
6 | 6 | <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script> |
7 | 7 | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script> |
8 | - <script src="<?php echo $baseUrl;?>js/jQueryEmoji.js"></script> |
|
8 | + <script src="<?php echo $baseUrl; ?>js/jQueryEmoji.js"></script> |
|
9 | 9 | |
10 | 10 | <script> |
11 | 11 | //BackButton |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | window.history.back(); |
15 | 15 | } |
16 | - <?php if(isset($includeEmojiAndAjax)){ ?> |
|
16 | + <?php if(isset($includeEmojiAndAjax)) { ?> |
|
17 | 17 | $(document).ready(function() |
18 | 18 | { |
19 | 19 | //Transform UTF-8 Emoji to img |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | function getMorePosts(lastPostId, view, hashtag, old_lastPostId) |
46 | 46 | { |
47 | 47 | $.ajax({ |
48 | - url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURIComponent(hashtag), |
|
48 | + url: '<?php echo $baseUrl; ?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURIComponent(hashtag), |
|
49 | 49 | dataType: 'html', |
50 | 50 | async: false, |
51 | 51 | success: function(html) { |
@@ -13,7 +13,9 @@ discard block |
||
13 | 13 | { |
14 | 14 | window.history.back(); |
15 | 15 | } |
16 | - <?php if(isset($includeEmojiAndAjax)){ ?> |
|
16 | + <?php if(isset($includeEmojiAndAjax)) |
|
17 | +{ |
|
18 | +?> |
|
17 | 19 | $(document).ready(function() |
18 | 20 | { |
19 | 21 | //Transform UTF-8 Emoji to img |
@@ -72,7 +74,9 @@ discard block |
||
72 | 74 | return {"lastPostId":lastPostId, "old_lastPostId":old_lastPostId}; |
73 | 75 | } |
74 | 76 | |
75 | - <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?> |
|
77 | + <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) |
|
78 | +{ |
|
79 | +?> |
|
76 | 80 | |
77 | 81 | if(window.location.hash) |
78 | 82 | { |
@@ -49,25 +49,25 @@ discard block |
||
49 | 49 | $timediff_inDays = (string)$timediff->format('%d'); |
50 | 50 | $timediff_inMonth = (string)$timediff->format('%m'); |
51 | 51 | |
52 | - if($timediff_inMonth!=0) |
|
52 | + if($timediff_inMonth != 0) |
|
53 | 53 | { |
54 | 54 | $timediff = $timediff_inMonth . "m"; |
55 | 55 | } |
56 | 56 | else |
57 | 57 | { |
58 | - if($timediff_inDays!=0) |
|
58 | + if($timediff_inDays != 0) |
|
59 | 59 | { |
60 | 60 | $timediff = $timediff_inDays . "d"; |
61 | 61 | } |
62 | 62 | else |
63 | 63 | { |
64 | - if($timediff_inHours!=0) |
|
64 | + if($timediff_inHours != 0) |
|
65 | 65 | { |
66 | 66 | $timediff = $timediff_inHours . "h"; |
67 | 67 | } |
68 | 68 | else |
69 | 69 | { |
70 | - if($timediff_inMinutes!=0) |
|
70 | + if($timediff_inMinutes != 0) |
|
71 | 71 | { |
72 | 72 | $timediff = $timediff_inMinutes . "m"; |
73 | 73 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | |
83 | 83 | ?> |
84 | - <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color'];?>;"> |
|
84 | + <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color']; ?>;"> |
|
85 | 85 | <content> |
86 | 86 | <?php |
87 | 87 | if(isset($post['image_url'])) |
@@ -99,24 +99,24 @@ discard block |
||
99 | 99 | <?php |
100 | 100 | if($this->isDetailedView) |
101 | 101 | {?> |
102 | - <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow"> |
|
102 | + <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id']; ?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']); ?>" rel="nofollow"> |
|
103 | 103 | <?php } |
104 | 104 | else |
105 | 105 | {?> |
106 | - <a href="index.php?vote=up&postId=<?php echo $post['post_id'];?>" rel="nofollow"> |
|
106 | + <a href="index.php?vote=up&postId=<?php echo $post['post_id']; ?>" rel="nofollow"> |
|
107 | 107 | <?php } ?> |
108 | 108 | <i class="fa fa-angle-up fa-3x"></i> |
109 | 109 | </a> |
110 | 110 | <br /> |
111 | - <?php echo $post["vote_count"];?><br /> |
|
111 | + <?php echo $post["vote_count"]; ?><br /> |
|
112 | 112 | <?php |
113 | 113 | if($this->isDetailedView) |
114 | 114 | {?> |
115 | - <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow"> |
|
115 | + <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id']; ?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']); ?>" rel="nofollow"> |
|
116 | 116 | <?php } |
117 | 117 | else |
118 | 118 | {?> |
119 | - <a href="index.php?vote=down&postId=<?php echo $post['post_id'];?>" rel="nofollow"> |
|
119 | + <a href="index.php?vote=down&postId=<?php echo $post['post_id']; ?>" rel="nofollow"> |
|
120 | 120 | <?php } ?> |
121 | 121 | <i class="fa fa-angle-down fa-3x"></i> |
122 | 122 | </a> |
@@ -128,14 +128,14 @@ discard block |
||
128 | 128 | <span class="time"> |
129 | 129 | <span class="tip" data-tooltip="Time"> |
130 | 130 | <i class="fa fa-clock-o"></i> |
131 | - <?php echo $timediff;?> |
|
132 | - <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s');?></span> |
|
131 | + <?php echo $timediff; ?> |
|
132 | + <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s'); ?></span> |
|
133 | 133 | </span> |
134 | 134 | </span> |
135 | 135 | <?php if(!$this->isDetailedView) {?> |
136 | 136 | <span class="comments"> |
137 | 137 | <span data-tooltip="Comments"> |
138 | - <a href="<?php echo $this->changePostId($post['post_id'])->toUrl();?>"> |
|
138 | + <a href="<?php echo $this->changePostId($post['post_id'])->toUrl(); ?>"> |
|
139 | 139 | <i class="fa fa-commenting-o"></i> |
140 | 140 | <?php if(array_key_exists("child_count", $post)) { |
141 | 141 | echo $post["child_count"]; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | </span> |
148 | 148 | <?php |
149 | 149 | } |
150 | - if (isUserAdmin()) |
|
150 | + if(isUserAdmin()) |
|
151 | 151 | { |
152 | 152 | ?> |
153 | 153 | <span class="voting"> |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | { |
178 | 178 | ?> |
179 | 179 | <span data-tooltip="Author"> |
180 | - <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"];?> | |
|
180 | + <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"]; ?> | |
|
181 | 181 | </span> |
182 | 182 | <?php |
183 | 183 | } |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | |
188 | 188 | <span class="tip" data-tooltip="Distance"> |
189 | 189 | <i class="fa fa-map-marker"></i> |
190 | - <?php echo $post['distance'];?> km |
|
191 | - <span class="tiptext"><?php echo $post['location']['name'];?></span> |
|
190 | + <?php echo $post['distance']; ?> km |
|
191 | + <span class="tiptext"><?php echo $post['location']['name']; ?></span> |
|
192 | 192 | </span> |
193 | 193 | </span> |
194 | 194 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | if($post != '' && $this->isDetailedView) |
229 | 229 | { |
230 | - $description = 'On JodelBlue in ' . htmlspecialchars($this->city) . ' with ' . htmlspecialchars($post['vote_count']) . ' Upvotes: ' . substr(htmlspecialchars($post['message']), 0, 130); |
|
230 | + $description = 'On JodelBlue in ' . htmlspecialchars($this->city) . ' with ' . htmlspecialchars($post['vote_count']) . ' Upvotes: ' . substr(htmlspecialchars($post['message']), 0, 130); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | return $description; |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | } |
14 | 14 | $db = new DatabaseConnect(); |
15 | -if ($db->connect_errno) { |
|
15 | +if($db->connect_errno) { |
|
16 | 16 | echo 'Sorry, die Verbindung zu unserem |
17 | 17 | Server ist hops gegangen. Wegen '.$db -> connect_error; |
18 | 18 | } |
@@ -12,7 +12,8 @@ |
||
12 | 12 | |
13 | 13 | } |
14 | 14 | $db = new DatabaseConnect(); |
15 | -if ($db->connect_errno) { |
|
15 | +if ($db->connect_errno) |
|
16 | +{ |
|
16 | 17 | echo 'Sorry, die Verbindung zu unserem |
17 | 18 | Server ist hops gegangen. Wegen '.$db -> connect_error; |
18 | 19 | } |
@@ -13,17 +13,17 @@ |
||
13 | 13 | public $varsToDump; |
14 | 14 | |
15 | 15 | function __construct($msg = 'not Set', $varsToDump = 'not Set', $view = 'not Set', $actions = 'not Set', $accountId = 'not Set', $isVerified = 'not Set', $isTokenFresh = 'not Set', $page = 'not Set', $referrer = 'not Set') |
16 | - { |
|
17 | - $this->view = $view; |
|
18 | - $this->actions = $actions; |
|
19 | - $this->accountId = $accountId; |
|
20 | - $this->isVerified = $isVerified; |
|
21 | - $this->isTokenFresh = $isTokenFresh; |
|
22 | - $this->page = $page; |
|
23 | - $this->referrer = $referrer; |
|
24 | - $this->msg = $msg; |
|
25 | - $this->varsToDump = $varsToDump; |
|
26 | - } |
|
16 | + { |
|
17 | + $this->view = $view; |
|
18 | + $this->actions = $actions; |
|
19 | + $this->accountId = $accountId; |
|
20 | + $this->isVerified = $isVerified; |
|
21 | + $this->isTokenFresh = $isTokenFresh; |
|
22 | + $this->page = $page; |
|
23 | + $this->referrer = $referrer; |
|
24 | + $this->msg = $msg; |
|
25 | + $this->varsToDump = $varsToDump; |
|
26 | + } |
|
27 | 27 | |
28 | 28 | function writeErrorToLog() |
29 | 29 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public $varsToDump; |
14 | 14 | |
15 | 15 | function __construct($msg = 'not Set', $varsToDump = 'not Set', $view = 'not Set', $actions = 'not Set', $accountId = 'not Set', $isVerified = 'not Set', $isTokenFresh = 'not Set', $page = 'not Set', $referrer = 'not Set') |
16 | - { |
|
16 | + { |
|
17 | 17 | $this->view = $view; |
18 | 18 | $this->actions = $actions; |
19 | 19 | $this->accountId = $accountId; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | error_log("=============================== ERROR ================================"); |
31 | 31 | error_log("msg: " . $this->msg); |
32 | - error_log("view: " . print_r($this->view, true)); |
|
32 | + error_log("view: " . print_r($this->view, TRUE)); |
|
33 | 33 | error_log("actions: " . $this->actionsToString()); |
34 | 34 | error_log("accountId: " . $this->accountId); |
35 | 35 | error_log("isVerified: " . $this->isVerified); |