-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
89 lines (84 loc) · 1.84 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/* @Author Dharmawan Sukma
* @Email [email protected]
* @Juni 30th 2013
*/
include('conf.php');
?>
<HTML>
<HEAD>
<title>Localhost</title>
<link rel="stylesheet" href="style.css">
<script src="js/jquery.js"></script>
<script type="text/javascript">
<!--
function show(object) {
if (object == "buat")
{
document.getElementById('inputan').style.visibility = 'visible';
}
else
{
document.getElementById('inputan').style.visibility = 'hidden';
}
}
//-->
</script>
</HEAD>
<BODY>
<?php
$scanned_directory = array_diff(scandir(DIR), array('..', '.'));
?>
<div id="wrap">
<div id="header">
<div id="judul">
<span><div class='half'>Local</div>Host</span>
<span id="nd">Document Management</span>
</div>
<div id="mid1"></div>
<div id="mid2"></div>
<div id="mid3"></div>
<a href="http://localhost/phpmyadmin/"><div id="content"></div></a>
</div>
<?php
echo '<a href="'.SUBLIME.'">';
echo '<div class="sublime">';
echo '</div>';
echo '</a>';
?>
<div id="maincontent">
<?php
foreach ($scanned_directory as $dir) {
if(is_dir($dir)){
echo '<div id="box">';
echo '<div id="dir">';
echo '<a href="'.$dir.'">';
echo '<div id="dirhead">'.$dir;
echo '</div>'.'</a>';
$folder = $dir.'/';
//if(is_dir($folder)){
// print_r($folder);
//}
if(is_dir($folder)){
$dh=opendir($folder) or die('error');
while(($f=readdir($dh)) !== false){
//if(is_file($folder.$f)){ }untuk filter file only
if($f!='.' && $f!='..')
echo '<a href="'.$folder.$f.'">
<fieldset class="list">
'.$f.'
</fieldset>';
echo '</a>';
}
}
echo "<br>";
//closedir($dh);
echo '</div>';
echo '</div>';
}
}
?>
</div>
</div>
</BODY>
</HTML>