These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php include 'php/jodel-web.php';?> |
||
2 | <!DOCTYPE html> |
||
3 | <html lang="en"> |
||
4 | <head> |
||
5 | <title><?php echo $viewTest->getTitle($posts[0], $view, $isDetailedView);?></title> |
||
6 | |||
7 | <meta charset="utf-8"> |
||
8 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
||
9 | <meta http-equiv="x-ua-compatible" content="ie=edge"> |
||
10 | |||
11 | <meta name="description" content="<?php echo $viewTest->getMetaDescription($posts[0], $view, $isDetailedView);?>"> |
||
12 | <meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client, web-app, browser, app"> |
||
13 | |||
14 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous"> |
||
0 ignored issues
–
show
|
|||
15 | <link rel="stylesheet" href="<?php echo $baseUrl;?>css/font-awesome.min.css"> |
||
16 | <link rel="stylesheet" href="<?php echo $baseUrl;?>style.css" type="text/css"> |
||
17 | |||
18 | <link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico"> |
||
19 | <link rel="icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico"> |
||
20 | <link rel="icon" type="image/gif" href="<?php echo $baseUrl;?>img/favicon/favicon.gif"> |
||
21 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon.png"> |
||
22 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon.png"> |
||
23 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57"> |
||
24 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60"> |
||
25 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72"> |
||
26 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76"> |
||
27 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114"> |
||
28 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120"> |
||
29 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128"> |
||
30 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144"> |
||
31 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152"> |
||
32 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180"> |
||
33 | <link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-precomposed.png"> |
||
34 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-16x16.png" sizes="16x16"> |
||
35 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-32x32.png" sizes="32x32"> |
||
36 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-96x96.png" sizes="96x96"> |
||
37 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-160x160.png" sizes="160x160"> |
||
38 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-192x192.png" sizes="192x192"> |
||
39 | <link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-196x196.png" sizes="196x196"> |
||
40 | <meta name="msapplication-TileImage" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> |
||
41 | <meta name="msapplication-TileColor" content="#5682a3"> |
||
42 | <meta name="msapplication-navbutton-color" content="#5682a3"> |
||
43 | <meta name="application-name" content="JodelBlue"/> |
||
44 | <meta name="msapplication-tooltip" content="JodelBlue"/> |
||
45 | <meta name="apple-mobile-web-app-title" content="JodelBlue"/> |
||
46 | <meta name="msapplication-square70x70logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-70x70.png"> |
||
47 | <meta name="msapplication-square144x144logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> |
||
48 | <meta name="msapplication-square150x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-150x150.png"> |
||
49 | <meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x150.png"> |
||
50 | <meta name="msapplication-square310x310logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x310.png"> |
||
51 | </head> |
||
52 | |||
53 | <body> |
||
54 | <header> |
||
55 | <nav class="navbar navbar-full navbar-dark navbar-fixed-top"> |
||
56 | <div class="container"> |
||
57 | <?php |
||
58 | |||
59 | if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) |
||
60 | { |
||
61 | echo '<a id="comment-back" href="index.php?view=' . $view . '#postId-' . htmlspecialchars($_GET['postId']) . '">'; |
||
0 ignored issues
–
show
|
|||
62 | echo '<i class="fa fa-angle-left fa-3x"></i>'; |
||
63 | echo '</a>'; |
||
64 | echo '<h1>'; |
||
65 | echo '<a href="index.php?getPostDetails=' . htmlspecialchars($_GET['getPostDetails']) . '&postId=' . htmlspecialchars($_GET['postId']) . '" class="spinnable hidden-xs-down">'; |
||
0 ignored issues
–
show
|
|||
66 | } |
||
67 | else |
||
68 | { |
||
69 | echo '<h1>'; |
||
70 | echo '<a href="./" class="spinnable">'; |
||
71 | } |
||
72 | ?> |
||
73 | JodelBlue <i class="fa fa-refresh fa-1x"></i></a> |
||
74 | </h1> |
||
75 | |||
76 | <div id="location_mobile" class="hidden-sm-up"> |
||
77 | <form method="get"> |
||
78 | <input type="text" id="city_mobile" name="city" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required> |
||
0 ignored issues
–
show
|
|||
79 | |||
80 | <input type="submit" id="submit_mobile" class="fa" value="" /> |
||
81 | </form> |
||
82 | </div> |
||
83 | </div> |
||
84 | </nav> |
||
85 | </header> |
||
86 | |||
87 | <div class="mainContent container"> |
||
88 | <div class="content row"> |
||
89 | <article class="topContent col-sm-8"> |
||
90 | |||
91 | <content id="posts"> |
||
92 | <?php |
||
93 | for($i = 0; $i<$loops; $i++) |
||
94 | { |
||
95 | if(array_key_exists($i, $posts) && array_key_exists('post_id', $posts[$i]) && isset($posts[$i]['post_id'])) |
||
96 | { |
||
97 | $lastPostId = $posts[$i]['post_id']; |
||
98 | |||
99 | $viewTest::jodelToHtml($posts[$i], $view, $isDetailedView); |
||
100 | } |
||
101 | } ?> |
||
102 | |||
103 | </content> |
||
104 | |||
105 | <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?> |
||
106 | <p id="loading"> |
||
107 | Loading… |
||
108 | </p> |
||
109 | <?php } ?> |
||
110 | </article> |
||
111 | |||
112 | <aside class="topSidebar col-sm-4 sidebar-outer"> |
||
113 | <div class="fixed"> |
||
114 | <article> |
||
115 | <div> |
||
116 | <h2>Position / Hashtag</h2> |
||
117 | <form method="get"> |
||
118 | <input type="text" id="city" name="city" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required> |
||
0 ignored issues
–
show
|
|||
119 | <label>try: #jhj</label><br> |
||
120 | <input type="submit" value="Set Location" /> |
||
121 | </form> |
||
122 | </div> |
||
123 | </article> |
||
124 | |||
125 | <article> |
||
126 | <div> |
||
127 | <h2>Karma</h2> |
||
128 | <?php echo $jodelAccountForKarma->getKarma(); ?> |
||
129 | </div> |
||
130 | </article> |
||
131 | |||
132 | <article> |
||
133 | <div> |
||
134 | <?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?> |
||
135 | <h2>Comment on Jodel</h2> |
||
136 | <form method="POST"> |
||
137 | <input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" /> |
||
138 | <textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> |
||
0 ignored issues
–
show
|
|||
139 | <br /> |
||
140 | <input type="submit" value="SEND" /> |
||
141 | </form> |
||
142 | <?php } else { ?> |
||
143 | <h2>New Jodel</h2> |
||
144 | <form method="POST"> |
||
145 | <textarea id="message" name="message" placeholder="Send a Jodel to all students within 10km" required></textarea> |
||
0 ignored issues
–
show
|
|||
146 | <br /> |
||
147 | <select id="postColorPicker" name="color"> |
||
148 | <option value="06A3CB">Blue</option> |
||
149 | <option value="8ABDB0">Teal</option> |
||
150 | <option value="9EC41C">Green</option> |
||
151 | <option value="FFBA00">Yellow</option> |
||
152 | <option value="DD5F5F">Red</option> |
||
153 | <option value="FF9908">Orange</option> |
||
154 | </select> |
||
155 | <br /> |
||
156 | <input type="submit" value="SEND" /> |
||
157 | </form> |
||
158 | <?php } ?> |
||
159 | </div> |
||
160 | </article> |
||
161 | |||
162 | <article> |
||
163 | <div> |
||
164 | <h2>Login</h2> |
||
165 | </div> |
||
166 | </article> |
||
167 | </div> |
||
168 | </aside> |
||
169 | </div> |
||
170 | <?php include './template/nav-bottom.php';?> |
||
171 | |||
172 | |||
173 | <!-- jQuery, Tether, Bootstrap JS and own--> |
||
174 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script> |
||
0 ignored issues
–
show
|
|||
175 | <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js" integrity="sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8" crossorigin="anonymous"></script> |
||
0 ignored issues
–
show
|
|||
176 | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js" integrity="sha384-BLiI7JTZm+JWlgKa0M0kGRpJbF2J8q+qreVrKBC47e3K6BW78kGLrCkeRX6I9RoK" crossorigin="anonymous"></script> |
||
0 ignored issues
–
show
|
|||
177 | <script src="<?php echo $baseUrl;?>js/jQueryEmoji.js"></script> |
||
178 | |||
179 | <script> |
||
180 | //BackButton |
||
181 | function goBack() |
||
182 | { |
||
183 | window.history.back(); |
||
184 | } |
||
185 | |||
186 | $(document).ready(function() |
||
187 | { |
||
188 | //Transform UTF-8 Emoji to img |
||
189 | $('.jodel > content').Emoji(); |
||
190 | |||
191 | $('a').on('click', function(){ |
||
192 | $('a').removeClass('selected'); |
||
193 | $(this).addClass('selected'); |
||
194 | }); |
||
195 | |||
196 | function scrollToAnchor(aid){ |
||
197 | var aTag = $("article[id='"+ aid +"']"); |
||
198 | $('html,body').animate({scrollTop: aTag.offset().top-90},'slow'); |
||
199 | } |
||
200 | |||
201 | <?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?> |
||
202 | |||
203 | |||
204 | |||
205 | |||
206 | |||
207 | var win = $(window); |
||
208 | var lastPostId = "<?php echo $lastPostId; ?>"; |
||
209 | var view = "<?php echo $view; ?>" |
||
210 | var old_lastPostId = ""; |
||
211 | var morePostsAvailable = true; |
||
212 | |||
213 | if(window.location.hash) |
||
214 | { |
||
215 | var hash = window.location.hash.slice(1); |
||
216 | |||
217 | if(!$("article[id='"+ hash +"']").length) |
||
218 | { |
||
219 | for (var i = 5; i >= 0; i--) |
||
220 | { |
||
221 | if(!$("article[id='"+ hash +"']").length) |
||
222 | { |
||
223 | $.ajax({ |
||
224 | url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view, |
||
225 | dataType: 'html', |
||
226 | async: false, |
||
227 | success: function(html) { |
||
228 | var div = document.createElement('div'); |
||
229 | div.innerHTML = html; |
||
230 | var elements = div.childNodes; |
||
231 | old_lastPostId = lastPostId; |
||
232 | lastPostId = elements[3].textContent; |
||
233 | lastPostId = lastPostId.replace(/\s+/g, ''); |
||
234 | //alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId); |
||
235 | if(lastPostId == old_lastPostId) { |
||
236 | |||
237 | //morePostsAvailable = false; |
||
238 | } |
||
239 | else { |
||
240 | //alert(elements[3].textContent); |
||
241 | $('#posts').append(elements[1].innerHTML); |
||
242 | $('#posts').hide().show(0); |
||
243 | } |
||
244 | $('#loading').hide(); |
||
245 | } |
||
246 | }); |
||
247 | |||
248 | $('.jodel > content').Emoji(); |
||
249 | } |
||
250 | |||
251 | } |
||
252 | scrollToAnchor(hash); |
||
253 | |||
254 | } |
||
255 | } |
||
256 | |||
257 | // Each time the user scrolls |
||
258 | win.scroll(function() { |
||
259 | |||
260 | |||
261 | // End of the document reached? |
||
262 | if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && morePostsAvailable) |
||
263 | { |
||
264 | $('#loading').show(); |
||
265 | |||
266 | $.ajax({ |
||
267 | url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view, |
||
268 | dataType: 'html', |
||
269 | async: false, |
||
270 | success: function(html) { |
||
271 | var div = document.createElement('div'); |
||
272 | div.innerHTML = html; |
||
273 | var elements = div.childNodes; |
||
274 | old_lastPostId = lastPostId; |
||
275 | lastPostId = elements[3].textContent; |
||
276 | lastPostId = lastPostId.replace(/\s+/g, ''); |
||
277 | //alert('Neu: ' + lastPostId + " Alt: " + old_lastPostId); |
||
278 | if(lastPostId == old_lastPostId) |
||
279 | { |
||
280 | |||
281 | //morePostsAvailable = false; |
||
282 | } |
||
283 | else |
||
284 | { |
||
285 | //alert(elements[3].textContent); |
||
286 | $('#posts').append(elements[1].innerHTML); |
||
287 | } |
||
288 | $('#loading').hide(); |
||
289 | } |
||
290 | }); |
||
291 | |||
292 | $('.jodel > content').Emoji(); |
||
293 | } |
||
294 | }); |
||
295 | <?php } ?> |
||
296 | }); |
||
297 | |||
298 | </script> |
||
299 | |||
300 | <?php |
||
301 | if(is_file($baseUrl . 'piwik-script.html')) |
||
302 | { |
||
303 | require_once($baseUrl . 'piwik-script.html'); |
||
304 | } |
||
305 | ?> |
||
306 | |||
307 | </body> |
||
308 | </html> |
||
309 | |||
0 ignored issues
–
show
|
|||
310 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.