-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
65 lines (60 loc) · 2.05 KB
/
header.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
<?php
define('BASE_URL', "/icons/");
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" />
<base target=’_blank‘/>
<link rel="stylesheet" href="<?php print BASE_URL ?>/css/reset.css" />
<link rel="stylesheet" href="<?php print BASE_URL ?>/css/autoindex.css" />
<script type="text/javascript" src="<?php print BASE_URL ?>/jquery.min.js"></script>
<script type="text/javascript" src="<?php print BASE_URL ?>/scrolltopcontrol.min.js"></script>
<!--[if lte IE 6]>
<style>
div.irtopo img, div.irtopo a {
position:absolute;
bottom:0px;
right:0;
}
</style>
<![endif]-->
<!--[if lte IE 7]>
<style>
div.irtopo img,div.irtopo a {
position:absolute;
bottom:0px;
right:0;
}
</style>
<![endif]-->
<!--[if lte IE 8]>
<style>
div.irtopo img,div.irtopo a {
position:absolute;
bottom:0;
right:0;
}
</style>
<![endif]-->
</head>
<body>
<div id="page">
<div class="pathline"><a href="/"><img src="<?php print BASE_URL ?>/icons/home.png" alt="" /></a> <?php print createFilePath();?> | <?php echo $_SERVER['SCRIPT_FILENAME'] ?></div>
<div id="dirlist">