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.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
| 1. / 2. / ...
<?php
error_reporting(E_ALL);
$curr_path = __FILE__;
$temp = explode('/',$curr_path);
$curr_file = end($temp);
$temp2 = count($temp) - 2;
$curr_dir = '/'.$temp[$temp2];
#echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'."rn";
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."rn";
echo '<html>'."rn";
echo '<head>'."rn";
echo ' <title>Index of '.$curr_dir.'</title>'."rn";
echo '</head>'."rn";
echo '<body>'."rnrn";
echo '<h1>Index of '.$curr_dir.'</h1>'."rnrn";
if ($goal = opendir('.')) {
$dirs = array();
$files = array();
while(false !== ($dir = readdir($goal))) {
if($dir != '..' AND $dir != '.') {
if (is_dir($dir)) {
$dirs[] = $dir;
} elseif ($dir != $curr_file) {
$files[] = $dir;
}
}
}
closedir($goal);
sort($dirs);
sort($files);
$data = array_merge($dirs,$files);
}
echo '<table width="100%" border="0" cellspacing="1" cellpadding="0">'."rn";
echo ' <tr>'."rn";
echo ' <td>Name</td>'."rn";
echo ' <td>Last modified</td>'."rn";
echo ' <td>Size</td>'."rn";
echo ' </tr>'."rn";
echo ' <tr>'."rn";
echo ' <td colspan="3"><hr /></td>'."rn";
echo ' </tr>'."rn";
for($x = 0; $x < count($data); $x++) {
$info = stat($data[$x]);
echo ' <tr>'."rn";
echo ' <td><a href="'.$data[$x].'?phpMyAdmin=a7d6a530ea7fe797a049ba44b388371f">'.$data[$x].'</a></td>'."rn";
echo ' <td>'.date('d.m.Y',$info[9]).' '.date('H:i',$info[9]).'</td>'."rn";
echo ' <td>'.round(($info[7] / 1024),2).' KB</td>'."rn";
echo ' </tr>'."rn";
}
echo '</table>';
?> |