-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (29 loc) · 845 Bytes
/
index.php
File metadata and controls
33 lines (29 loc) · 845 Bytes
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
<?php
$title = 'Welcome';
?>
<?php include './localhost/header.php'; ?>
<h1>Welcome <?php echo $_SERVER['SERVER_NAME']; ?></h1>
<h2>Projects</h2>
<ul>
<?php
$folders = glob('./*', GLOB_ONLYDIR);
foreach ($folders as $f){
$tmp[basename($f)] = filemtime($f);
}
arsort($tmp);
$folders = array_keys($tmp);
foreach ($folders as $folder) {
if ($folder === '.' or $folder === '..') continue;
if (is_dir($folder) && file_exists('./' . $folder . '/web/app_dev.php')) {
?>
<li><span class="label label-info">Symfony</span> <a href="./<?php echo $folder . '/web/app_dev.php'; ?>"><?php echo $folder; ?></a></li>
<?php
} else if (is_dir($folder)) {
?>
<li><a href="./<?php echo $folder; ?>"><?php echo $folder; ?></a></li>
<?php
}
}
?>
</ul>
<?php include './localhost/footer.php'; ?>