forked from CommonAccord/Site-Org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.php
More file actions
54 lines (40 loc) · 1.52 KB
/
list.php
File metadata and controls
54 lines (40 loc) · 1.52 KB
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
52
<?php
/*require('./vendor/autoload.php'); */
ini_set("allow_url_include", true);
include("header.php");
?>
<div class="row " >
<div class="container">
<div class = "col-lg-12" >
<?php
// <p align="center">
// <img src="assets/cmacc-trans.png" height="50px" />
// </p>
if(! ($dir == './')) {
$rootdir = pathinfo($dir);
echo "<div id='updir'><img src='assets/arrowup.png' height=25><h3 class='sc subtitle'><a href=$_SERVER[PHP_SELF]?action=list&file=".$rootdir['dirname']."/>Org".$rootdir['dirname']."</a>/".$rootdir['filename']."</h3>";
echo "              <a href=https://github.com/mcchan1/Org/blob/master/Doc/".$dir.">Github</a></div>";
# echo "<h2 class='sc subtitle2'>". $rootdir['filename']."</h2>";
}
$files = scandir($path.$dir);
if(file_exists($path.$dir . 'include.php')) {
echo "<div class='includers'>";
include $path.$dir . 'include.php';
echo "</div>";
}
echo '<div class="listings">';
echo "<div id='content-list'>";
foreach($files as $f) {
if(is_dir($path.$dir.$f)) {
if( !( ($f == '.') || ($f == '..')) ) {
echo "<br><img height=30 src='assets/folder.png'><a href=$_SERVER[PHP_SELF]?action=list&file=$dir$f/>$f</a>";
}
}
else {
if( !( ($f == 'include.php') || preg_match('/^\./', $f) ) ) {
echo "<br><img height=30 src='assets/play.png'><a href=$_SERVER[PHP_SELF]?action=source&file=$dir$f>$f</a>";
}
}
}
echo "</div></div>";
?>