forked from 20xd6/simple_blog
Update authors/index.php
This commit is contained in:
parent
f57ace3bad
commit
17cf1d28f0
@ -1,10 +1,12 @@
|
|||||||
<nav id="body_nav" class="jmenu">
|
|
||||||
<div class="pmenu">
|
|
||||||
<?php
|
<?php
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<h1>Authors</h1>
|
||||||
|
<nav id="body_nav" class="jmenu">
|
||||||
|
<div class="pmenu">
|
||||||
|
|
||||||
<ul><li><a href=/>Home</a></li></ul>
|
<ul><li><a href=/>Home</a></li></ul>
|
||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
||||||
@ -33,10 +35,11 @@ if (file_exists($dir) && is_dir($dir) ) {
|
|||||||
$file_path = "./".$file;
|
$file_path = "./".$file;
|
||||||
// Get the file extension
|
// Get the file extension
|
||||||
$file_ext = pathinfo($file_path, PATHINFO_EXTENSION);
|
$file_ext = pathinfo($file_path, PATHINFO_EXTENSION);
|
||||||
if ($file_ext=="php" || $file_ext=="html" || $file_ext=="htm" || $file_ext == "") {
|
if ($file_ext == "") {
|
||||||
$file_array[] = $file;
|
$file_array[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (sizeof($file_array) != 0){
|
||||||
foreach($file_array as $file) {//Renders the folder names as more readable titles.
|
foreach($file_array as $file) {//Renders the folder names as more readable titles.
|
||||||
$_replace = array('.php', '.html', '.htm');//Remove file extensions from webpages.
|
$_replace = array('.php', '.html', '.htm');//Remove file extensions from webpages.
|
||||||
$link_title = str_replace('_',' ',$file);//Remove undersores and replace them with spaces
|
$link_title = str_replace('_',' ',$file);//Remove undersores and replace them with spaces
|
||||||
@ -46,6 +49,9 @@ if (file_exists($dir) && is_dir($dir) ) {
|
|||||||
$link_title = remove_sorting_number($link_title);//Removes the number used to keep articles in post order from the displayed title.
|
$link_title = remove_sorting_number($link_title);//Removes the number used to keep articles in post order from the displayed title.
|
||||||
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo "<ul><li>No Authors</li></ul>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "Directory does not exists";
|
echo "Directory does not exists";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user