-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
45 lines (43 loc) · 1.35 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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>P2PSP Slides</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header center">
<a href="https://p2psp.org"><img height="100px" src="images/p2pspsf.png"></a>
<div class="title">
<h1>P2PSP Slides</h1>
<h2>Enjoy the P2PSP slides on the Web</h2>
<span>Get the <a href="https://github.com/P2PSP/slides">source code</a>!</span>
</div>
</div>
<hr>
<div class="content center">
<?php
foreach (scandir(".",1) as $dir) {
if (substr($dir, 0,1) === "2" and file_exists($dir.'/index.html')) {
$slide_content = file_get_contents($dir."/index.html");
if (strpos($slide_content, 'lang="es"')){
$language = "🇪🇸";
}else{
$language = "🇬🇧";
}
?>
<a href="<?php echo $dir.'/index.html'; ?>">
<div class="slide">
<img width="90%" src="<?php echo $dir.'/snapshot.png'; ?>">
<?php list($year, $month, $name) = explode("-", $dir); ?>
<h3><?php echo str_replace("_"," ",$name); ?></h3>
<span class="lang"><?php echo "Language: ".$language; ?></span>
<span class="date"><?php echo " | Date: ".$month."-".$year; ?></span>
</div>
</a>
<?php
}
}
?>
</div>
</body>
</html>