mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-25 05:01:37 +02:00
Added getListedPath() function and used it to set the page header
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<?php include('resources/DirectoryLister.php'); $lister = new DirectoryLister(); ?>
|
||||
|
||||
<head>
|
||||
<title>Directory listing of <DIRECTORY></title>
|
||||
<title>Directory listing of <?php echo $lister->getListedPath(); ?></title>
|
||||
<link rel="shortcut icon" href="resources/img/icons/folder.png" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="resources/css/bootstrap.min.css" />
|
||||
@@ -17,8 +19,6 @@
|
||||
|
||||
<body>
|
||||
|
||||
<?php include('resources/DirectoryLister.php'); $lister = new DirectoryLister(); ?>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="breadcrumb-wrapper">
|
||||
|
@@ -200,6 +200,25 @@ class DirectoryLister {
|
||||
// Return the breadcrumb array
|
||||
return $breadcrumbsArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets path of the listed directory
|
||||
*
|
||||
* @return string Pat of the listed directory
|
||||
* @acces public
|
||||
*/
|
||||
public function getListedPath() {
|
||||
|
||||
// Build the path
|
||||
if ($this->_directory == '.') {
|
||||
$path = $this->_appURL;
|
||||
} else {
|
||||
$path = $this->_appURL . $this->_directory;
|
||||
}
|
||||
|
||||
// Return the path
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user