-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathheader.html
More file actions
executable file
·35 lines (30 loc) · 1.13 KB
/
Copy pathheader.html
File metadata and controls
executable file
·35 lines (30 loc) · 1.13 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
<?php
define('BASE_URL', "/autoindex");
function getPath() {
return dirname($_SERVER["REQUEST_URI"] . '/.');
}
function createFilePath() {
$dir = getPath();
$result = $current = "";
$folders = explode('/', $dir);
foreach($folders as $folder) {
if($folder != "" && $folder[0] != "?") {
$result .= '<a href="'.str_replace(' ', '+', $current.'/'.$folder).'">/' . str_replace('%20', ' ', $folder) . '</a>';
$current .= '/' . $folder;
}
}
return $result;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo getPath(); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php print BASE_URL ?>/css/reset.css" />
<link rel="stylesheet" href="<?php print BASE_URL ?>/css/autoindex_simple.css" />
</head>
<body>
<div id="page">
<div class="pathline"><a href="/"><img src="<?php print BASE_URL ?>/icons/home.png" alt="" /></a> <?php print createFilePath();?></div>
<div id="dirlist">