forked from Ramaerel/emulatorjs-GameLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (33 loc) · 1.14 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
<!DOCTYPE html>
<html>
<head>
<title>EmulatorJS Library - Arcade</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<!-- Navbar -->
<nav>
<ul>
<li><a href="#">Arcade</a></li>
<li><a href="upload.php">Upload</a></li>
</ul>
</nav>
<br />
<!-- Game Arcade -->
<div class="arcadelist">
<?php
$files = scandir("./roms/");
foreach($files as $file) {
if(!in_array($file, array('.', '..'))) {
$file_url = 'play.php?game=' . urlencode($file);
if (file_exists("./img/$file.png")) {
echo("<a href='".$file_url."'><img class='linkimg' src='img/".$file.".png '/></a>");
} else {
echo("<a href='$file_url' class='link'><p>$file</p></a>");
}
}
}
?>
</div>
</body>
</html>