summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-09-10 22:21:02 +0100
committerNick White <git@njw.me.uk>2009-09-10 22:21:02 +0100
commit22c52b1b71cd4fbeb8bf51df1afe1c7cecaa3da4 (patch)
tree49504610803af1485ba65f63d88ddd2ab13ce4c5
parent29a97bda58c12ecee78bf6fbe5c26b2ce2c776de (diff)
downloadnjw-website-source-22c52b1b71cd4fbeb8bf51df1afe1c7cecaa3da4.tar.bz2
njw-website-source-22c52b1b71cd4fbeb8bf51df1afe1c7cecaa3da4.zip
Fixed bug to correct last modified date
-rw-r--r--includes/footer.php16
-rw-r--r--index.php2
2 files changed, 13 insertions, 5 deletions
diff --git a/includes/footer.php b/includes/footer.php
index 056c6b1..7706ccf 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -16,15 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-$moddate = filemtime($_SERVER['DOCUMENT_ROOT'] . "/text/" . $_SERVER['PHP_SELF']);
-$moddate = date("d/m/Y", $moddate);
-?>
+function page_footer($contentpath) {
+
+$moddate = filemtime($contentpath);
+$moddate = date("d/m/Y", $moddate);
+print '
<div id="footer">
<div id="moddate">
- <p>Last updated: <?php print($moddate) ?></p>
+ <p>Last updated: ' . $moddate .'</p>
</div>
<div id="copyright">
@@ -36,4 +38,8 @@ $moddate = date("d/m/Y", $moddate);
</body>
-</html>
+</html>';
+
+}
+
+?>
diff --git a/index.php b/index.php
index e0741d2..8d7e965 100644
--- a/index.php
+++ b/index.php
@@ -49,4 +49,6 @@ print($body);
include($_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php");
+page_footer($contentpath);
+
?>