-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (45 loc) · 1.19 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
<?php
//Settings
$directory = "./chat/";
$ignoreds = [".", "..", ".DS_Store", "assets"];
$logo = "assets/dossier.png";
$logoSize = "225x225";
$title = "DirManager";
$underlined = false;
$buttonText = "Go";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $title; ?></title>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="icon" type="image/png" sizes="<?php echo $logoSize; ?>" href="<?php echo $logo; ?>">
</head>
<body>
<form method="GET" action="" class="form">
<input type="text" name="search" class="searchBar" placeholder="Search.">
<input type="submit" name="submit" class="submit" value="📙">
</form>
<ul class="tilesWrap">
<?php
$dirs = scandir($directory);
$dirn = 0;
foreach ($dirs as $dir) {
if(!in_array($dir, $ignoreds)) {
$dirn += 1;
?>
<a href="<?php echo $directory . $dir; ?>">
<li class="li">
<h2 class="<?php if ($underlined) { echo "underline"; } ?>">0<?php echo $dirn; ?></h2>
<h3><?php echo $dir; ?></h3>
<input type="button" class="redirect" value="<?php echo $buttonText; ?>"></input>
</li>
</a>
<?php
}
}
?>
</ul>
</body>
</html>