2020-08-04 12:22:09 +02:00
|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
$currentFile = !empty($_SESSION['file']) ? $_SESSION['file'] : null;
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
2024-04-25 17:52:58 +02:00
|
|
|
<html lang="en">
|
2020-08-04 12:22:09 +02:00
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" type="text/css" href="index.css" />
|
|
|
|
<style>
|
|
|
|
#board{width:300px;height:300px; margin:200px auto;}
|
|
|
|
#start{display:block;}
|
|
|
|
.current{background-color:yellow;}
|
|
|
|
</style>
|
2024-04-25 17:52:58 +02:00
|
|
|
<title>Blind Laby - Create your own</title>
|
2020-08-04 12:22:09 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="board">
|
|
|
|
<?php
|
2024-04-25 17:52:58 +02:00
|
|
|
$folder = new DirectoryIterator('../custom/');
|
2020-08-04 12:22:09 +02:00
|
|
|
|
|
|
|
foreach($folder as $file){
|
2024-04-25 17:52:58 +02:00
|
|
|
if (!$file->isDir() && $file->getExtension() === 'js') {
|
2020-08-04 12:22:09 +02:00
|
|
|
echo '<a href="http://labs.shikiryu.com/experimental-games/2/?level='.substr($file->getFileName(), 0, -3).'" title="laby '.substr($file->getFileName(), 0, -3).'"';
|
2024-04-25 17:52:58 +02:00
|
|
|
if($currentFile !== null && $currentFile === $file->getFileName()) echo ' class="current"';
|
2020-08-04 12:22:09 +02:00
|
|
|
echo '>laby '.substr($file->getFileName(), 0, -3).'</a><br/>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?></div>
|
|
|
|
</body>
|
|
|
|
</html>
|