-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
495 lines (397 loc) · 20.3 KB
/
index.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<!DOCTYPE html>
<?php
$DB_SNAME = "";
$DB_SPORT = "";
$DB_UNAME = "";
$DB_UPSSW = "";
$DB_DNAME = "";
$DB_TABLE = "";
$DB_DCONN = new mysqli($DB_SNAME, $DB_UNAME,
$DB_UPSSW, $DB_DNAME,
$DB_SPORT);
if ($DB_DCONN->connect_errno) {
echo "Failed to connect to MySQL: (" .
$DB_DCONN->connect_errno .
") " .
$DB_DCONN->connect_error;
}
?>
<html lang="en">
<head>
<!-- Compatibility with Microsoft Edge -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Necessary for mobile-friendly view and scaling -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Charset: use UTF-8 for wider compatibility -->
<meta charset="UTF-8">
<!--
Just a few notes before we start:
IMAGES:
- make sure to upload and use only PNG (if strictly needed) or JPG
images,
- the latter should always be Progressive JPG and not too large in
size,
- we use a lazy loading utility in order to speed up page loading: we
can use some dummy images before we load the actual picture but please
make sure the dummies are no more than 10-20 kB in size,
HTML/CSS/JS:
- the actual webpage will be dynamic and written in PHP, therefore this
is just a static port of the original page with some ad hoc content,
- if you find a way to write such a huge CSS file in a better way, we
can think about switching to a custom file instead of using Bootstrap,
CODING ETIQUETTE:
- please remember to keep the indentation as consistent as possible
through the whole file,
- remember to comment appropriately every single bit of code you
change/use!!!
-->
<!-- Page metadata -->
<meta name="description" content="Torino - PhD programme in Physics - Journal Club">
<meta name="author" content="Riccardo Finotello, Michael Korsmeier">
<meta name="keywords" content="journal club, torino, phd, physics, university">
<meta name="theme-color" content="#608CB0">
<!-- Title -->
<title>PhD Torino - Journal Club</title>
<!-- Manifest file (web app) -->
<link rel="manifest" href="./manifest.json">
<!-- CSS file -->
<link rel="stylesheet" href="./css/main.min.css">
<!-- Scripts to open and close the menu of the mobile verion -->
<script src="./js/menue.min.js" async></script>
<!-- Scripts to control the picture gallery -->
<script src="./js/gallery.min.js" async></script>
<!-- Scrollreveal -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/scrollReveal.js/3.4.0/scrollreveal.min.js"></script>
<!-- LaTeX rendering with MathJax -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<!-- Main file for scripts (e.g.: service worker install) -->
<script src="./js/main.min.js"></script>
<!-- Initialise scroll reveal -->
<script>
window.sr = ScrollReveal();
</script>
<!-- Images for webapp functionalities -->
<link rel="apple-touch-icon" sizes="152x152" href="./images/campusnet_152x152.png">
<link rel="apple-touch-icon" sizes="120x120" href="./images/campusnet_120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="./images/campusnet_76x76.png">
<link rel="apple-touch-icon" sizes="60x60" href="./images/campusnet_60x60.png">
<link rel="apple-touch-icon" sizes="57x57" href="./images/campusnet_57x57.png">
<link rel="apple-touch-icon" sizes="72x72" href="./images/campusnet_72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="./images/campusnet_114x114.png">
<link rel="icon" sizes="128x128" href="./images/campusnet_128x128.png">
<link rel="icon" sizes="192x192" href="./images/campusnet_192x192.png">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="MyJC">
<meta name="application-name" content="MyJC">
<meta name="msapplication-TileColor" content="undefined">
<meta name="msapplication-square70x70logo" content="./images/campusnet_70x70.png">
<meta name="msapplication-square150x150logo" content="./images/campusnet_150x150.png">
<meta name="msapplication-wide310x150logo" content="./images/campusnet_310x150.png">
<meta name="msapplication-square310x310logo" content="./images/campusnet_310x310.png">
<!-- Open Graph metadata to display on Social Media and chats -->
<meta property="og:title" content="Torino PhD Journal Club">
<meta property="og:type" content="website">
<meta property="og:url" content="https://falstaff.ddns.net/journalclub">
<meta property="og:image" content="https://falstaff.ddns.net/journalclub/images/campusnet.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="2048">
<meta property="og:image:height" content="2048">
<meta property="og:image:alt" content="Campusnet Logo">
<meta property="og:description" content="JC schedule - PhD School in Physics in Torino, Italy">
<meta property="og:determiner" content="the">
<meta property="og:locale" content="en_GB">
</head>
<!-- Start slide show upon loading the page -->
<body onload="start()">
<!--Banner-->
<div id="banner">
<div class="pageWidth">
<div class='img'>
<img src="./images/campusnet_banner.png" alt="Physics Department of the University of Torino">
</div>
<div class="title">
<div>
<h2>Torino Doctoral School in Physics and Astrophysics</h2>
<hr>
<h1>Graduate Students Journal Club</h1>
</div>
</div>
<div class="end"></div>
</div>
</div>
<!-- Navbar -->
<div id="menue_bar">
<button id="open_close" aria-label="Navigation button">
</button>
<div id="menue">
<a href="#" onclick="klick_menue()"><div class="point">
Home
</div></a>
<a href="#nextEvent" onclick="klick_menue()"><div class="point">
Next Event
</div></a>
<a href="#pastEvents" onclick="klick_menue()"><div class="point">
Past Events
</div></a>
<a href="#links" onclick="klick_menue()"><div class="point">
Links
</div></a>
<a href="#contact" onclick="klick_menue()"><div class="point">
Contact
</div></a>
<div class="end">
</div>
</div>
</div>
<!-- Containers to have a maximal page width -->
<div class="pageWidth" >
<div id="content">
<!--Picture gallery-->
<div class='galleryPictureBox'>
<div class='galleryPictureBoxTop'>
<div class='galleryPictureContent'>
<img class='galleryPicture' src="images/01_carousel.jpg" alt="Slide 1">
<img class='galleryPicture' src="images/02_carousel.jpg" alt="Slide 2" style='opacity:0;'>
<img class='galleryPicture' src="images/03_carousel.jpg" alt="Slide 3" style='opacity:0;'>
<div class='galleryTouch'></div>
<img class='galleryButtonLeft' src='images/pictures_button_left.png' alt="Left button" onclick='gallery_last();'>
<img class='galleryButtonRight' src='images/pictures_button_right.png' alt="Right button" onclick='gallery_next();'>
</div>
</div>
</div>
<!-- Alert box -->
<h1 class="section-header">Notice board</h1>
<hr>
<!-- PHP driven notice -->
<?php
$file = './bulletin/message.md';
if (file_exists($file) and filesize($file)) {
include './bulletin/Parsedown.php';
$message = file_get_contents($file);
$parsedown = new Parsedown();
$parsedown->setSafeMode(true);
echo "<article class=\"bulletin\">";
echo $parsedown->text($message);
echo "<p class=\"sign\">~The webmasters~</p>";
echo "</article>";
}
else {
echo "<article class=\"bulletin\">";
echo "<p>There are no public messages on the bulletin board for today.</p>";
echo "<p>Have a nice day and remember: you are awesome!</p>";
echo "<p class=\"sign\">~The webmasters~</p>";
echo "</article>";
}
?>
<!-- Forthcoming events -->
<h1 id="nextEvent" class="section-header">Next event(s)</h1>
<hr>
<?php
$DB_QUERY = "SELECT * FROM " . $DB_TABLE . " WHERE DATE >= CURDATE() ORDER BY DATE";
$JC_TABLE = $DB_DCONN->query($DB_QUERY);
if ($JC_TABLE->num_rows > 0) {
while ($row = $JC_TABLE->fetch_assoc()) {
echo "<div id=\"" . $row["DATE"] . "\" class=\"card-body\">";
echo "<article>";
echo "<div>";
echo "<div>";
echo "<h1>";
echo $row["TITLE"];
echo "</h1>";
echo "<h2>";
echo "<strong>" . $row["SPEAKER"] . "</strong>";
echo "</h2>";
if ($abstract = $row["ABSTRACT"]) {
echo "<div>";
echo "<p class=\"next-abstract\">" . $abstract . "</p>";
echo "</div>";
echo "<form action=\"./abstract/abstract.php\" target=\"_blank\" method=\"post\" enctype=\"text/plain\">";
echo "<input type=\"hidden\" name=\"autore\" value=\"" . $row["SPEAKER"] . "\">";
echo "<input type=\"hidden\" name=\"titolo\" value=\"" . $row["TITLE"] . "\">";
echo "<input type=\"hidden\" name=\"data\" value=\"" . $row["DATE"] . "\">";
echo "<input type=\"hidden\" name=\"sommario\" value=\"" . $abstract . "\">";
echo "<input class=\"admin\" style=\"display:none;\" type=\"submit\" name=\"PDF\" value=\"PDF-generate\">";
echo "</form>";
echo "<a href=\"./abstract/abstract/" . $row["DATE"] . ".pdf\" target=\"_blank\" role=\"button\" rel=\"noopener noreferrer\">PDF</a>";
}
if ($reference = $row["REFERENCE"]) {
echo "<ul>";
echo "<li><strong>Main reference:</strong> <a href=\"" . $reference . "\" target=\"_blank\" rel=\"noopener noreferrer\">" . $row["REFERENCE_TXT"] . "</a></li>";
if ($reference2 = $row["REFERENCE2"]) {
echo "<li><strong>Other reference:</strong> <a href=\"" . $reference2 . "\" target=\"_blank\" rel=\"noopener noreferrer\">" . $row["REFERENCE2_TXT"] . "</a></li>";
}
echo "</ul>";
}
if ($attachment = $row["PROCEEDING"]) {
echo "<ul>";
echo "<li><strong>Attachment(s):</strong> <a href=\"" . $attachment . "\" target=\"_blank\" rel=\"noopener noreferrer\">" . $row["PROCEEDING_TXT"] . "</a></li>";
echo "</ul>";
}
$date = date("l j\<\s\u\p\>S\<\/\s\u\p\> F Y", strtotime($row["DATE"]));
$time = date("g:i a", strtotime($row["TIME"]));
echo "<ul>";
echo "<li><strong>Date:</strong> " . $date . "</li>";
echo "<li><strong>Time:</strong> " . $time . "</li>";
echo "<li><strong>Location:</strong> " . $row["PLACE"] . "</li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "</article>";
echo "</div>";
}
}
else {
echo "<div class=\"cow\">";
echo "<p>There are no seminars scheduled, so here is a thinking cow:</p>";
echo "<div>";
$text = shell_exec("/usr/games/fortune -n400 -s | /usr/games/cowthink -W25");
echo "<pre>" . nl2br($text) . "</pre>";
echo "</div>";
echo "</div>";
}
?>
<!-- Calendar -->
<h1 class="section-header">Calendar</h1>
<hr>
<div class="calendar">
<iframe title="journal-club-calendar" src="https://calendar.google.com/calendar/b/1/embed?showTitle=0&showCalendars=0&height=600&wkst=2&hl=en_GB&bgcolor=%23ffffff&src=edu.unito.it_85c3lhbnljm4i0nua2500li1ps%40group.calendar.google.com&color=%23853104&ctz=Europe%2FRome" style="border:none" width="800" height="600"></iframe>
</div>
<!-- Past events -->
<h1 id="pastEvents" class="section-header">Past events</h1>
<hr>
<?php
$DB_QUERY = "SELECT * FROM " . $DB_TABLE . " WHERE DATE < CURDATE() ORDER BY DATE DESC";
$JC_TABLE = $DB_DCONN->query($DB_QUERY);
if ($JC_TABLE->num_rows > 0) {
while ($row = $JC_TABLE->fetch_assoc()) {
echo "<div id=\"" . $row["DATE"] . "\" class=\"card-body\">";
echo "<article>";
echo "<div>";
echo "<div>";
echo "<h1>";
echo $row["TITLE"];
echo "</h1>";
echo "<h2>";
echo "<strong>" . $row["SPEAKER"] . "</strong>";
echo "</h2>";
if ($abstract = $row["ABSTRACT"]) {
echo "<div>";
echo "<p>" . $abstract . "</p>";
echo "</div>";
echo "<form action=\"./abstract/abstract.php\" target=\"_blank\" method=\"post\" enctype=\"text/plain\">";
echo "<input type=\"hidden\" name=\"autore\" value=\"" . $row["SPEAKER"] . "\">";
echo "<input type=\"hidden\" name=\"titolo\" value=\"" . $row["TITLE"] . "\">";
echo "<input type=\"hidden\" name=\"data\" value=\"" . $row["DATE"] . "\">";
echo "<input type=\"hidden\" name=\"sommario\" value=\"" . $abstract . "\">";
echo "<input class=\"admin\" style=\"display:none;\" type=\"submit\" name=\"PDF\" value=\"PDF-generate\">";
echo "</form>";
echo "<a href=\"./abstract/abstract/" . $row["DATE"] . ".pdf\" target=\"_blank\" role=\"button\" rel=\"noopener noreferrer\">PDF</a>";
}
if ($reference = $row["REFERENCE"]) {
echo "<ul>";
echo "<li<strong>Main reference:</strong> <a href=\"" . $reference . "\" target=\"_blank\" rel=\"noopener noreferrer\">" . $row["REFERENCE_TXT"] . "</a></li>";
if ($reference2 = $row["REFERENCE2"]) {
echo "<li><strong>Other reference:</strong> <a href=\"" . $reference2 . "\" target=\"_blank\" rel=\"noopener noreferrer\">" . $row["REFERENCE2_TXT"] . "</a></li>";
}
echo "</ul>";
}
if ($attachment = $row["PROCEEDING"]) {
echo "<ul>";
echo "<li><strong>Attachment(s):</strong> <a href=\"" . $attachment . "\" target=\"_blank\" rel=\"noopener noreferrer\">" . $row["PROCEEDING_TXT"] . "</a></li>";
echo "</ul>";
}
$date = date("l j\<\s\u\p\>S\<\/\s\u\p\> F Y", strtotime($row["DATE"]));
echo "<ul>";
echo "<li><strong>Date:</strong> " . $date . "</li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "</article>";
echo "</div>";
}
}
?>
</div> <!-- end of id="content" -->
</div> <!-- end of id="pageWidth" -->
<div id="links">
<div class="pageWidth" >
<!-- We finally show some useful links using the grid view of Bootstrap CSS
file: we need to instruct the CSS to display all the links in one line on
larger devices and two lines on smaller devices. -->
<h1 class="section-header">Useful Links</h1>
<a href="http://dottorato.ph.unito.it/" target="_blank" rel="noopener noreferrer">
<div class="link">
<img src="./images/dottorato.jpg" alt="Torino Graduate School">
<h2> Graduate School Home </h2>
</div><!-- class="link" -->
</a>
<a href="https://www.to.infn.it/" target="_blank" rel="noopener noreferrer">
<div class="link">
<img src="./images/infn.jpg" alt="INFN Sezione di Torino">
<h2> INFN Sezione di Torino </h2>
</div><!-- class="link" -->
</a>
<a href="https://arxiv.org/" target="_blank" rel="noopener noreferrer">
<div class="link">
<img src="./images/arxiv.jpg" alt="ArXiv.org">
<h2> ArXiv.org </h2>
</div><!-- class="link" -->
</a>
<a href="https://inspirehep.net/" target="_blank" rel="noopener noreferrer">
<div class="link">
<img src="./images/inspire.jpg" alt="INSPIRE-HEP">
<h2> INSPIRE-HEP </h2>
</div><!-- class="link" -->
</a>
<div class="clear"></div>
</div> <!-- id="links" -->
</div>
<div id="footer">
<div class="pageWidth">
<div id="contact">
Department of Physics<br>
Università degli Studi di Torino<br>and INFN - Sezione di Torino <br>
via Pietro Giuria 1 <br>
10125 Torino, Italy <br>
<br>
Contact: <br>
<div class="contact-name"><strong>Riccardo Finotello</strong></div> <div class="mail"><div></div>riccardo.finotello@unito.ít</div>
<br>
<div class="contact-name"><strong>Michael Korsmeier</strong></div> <div class="mail"><div></div>michael.korsmeier@to.infn.ít</div>
<br>
<div class="gitlab-page">For bug report and info, please visit our <a href="https://gitlab.com/phd-torino-physics/jc-homepage" target="_blank" rel="noopener noreferrer">Gitlab page</a>.</div>
</div>
</div>
</div>
<!-- Start slideshow as page has loaded -->
<script>
function start(){
StartSlideShow();
start_menue();
}
</script>
<!-- Event listener to open and close menu -->
<script>
document.getElementById('open_close').onclick = function () {
if (shown==0){
show();
}else{
hide();
}
};
</script>
<!-- Scrollreveal -->
<script>
sr.reveal('.section-header');
sr.reveal('.card-body');
sr.reveal('.calendar');
sr.reveal('.bulletin');
sr.reveal('#links');
</script>
</body>
</html>