com web/doc: No more template and language system: include/docw eb_language.class.php include/docweb_template.class .php include/init.inc.php templates/README template s/all/www/checkent.tpl.php templates/all/www/entities.t pl.php templates/all/www/error.tpl.php templates/all/ www/missingexamples.tpl.php templates/all/www/notes_sta ts.tpl.php templates/all/www/shared/error_msg.tpl.p hp templates/all/www/undocfuncs.tpl.php www/error.php
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
Commit: c0df2665ed22c6c42b0b67bd6a3631ca54e927b5 Author: Sobak <[email protected]> Sat, 22 Mar 2014 06:27:05 +0100 Parents: 2f643491bcc27c4947203b194bec840df1fc5484 Branches: master Link: http://git.php.net/?p=web/doc.git;a=commitdiff;h=c0df2665ed22c6c42b0b67bd6a3631ca54e927b5 Log: No more template and language system Changed paths: D include/docweb_language.class.php D include/docweb_template.class.php M include/init.inc.php D templates/README D templates/all/www/checkent.tpl.php D templates/all/www/entities.tpl.php D templates/all/www/error.tpl.php D templates/all/www/missingexamples.tpl.php D templates/all/www/notes_stats.tpl.php D templates/all/www/shared/error_msg.tpl.php D templates/all/www/undocfuncs.tpl.php M www/error.php
diff_c0df2665ed22c6c42b0b67bd6a3631ca54e927b5.txt
(text/plain, 25.5 KB)
diff --git a/include/docweb_language.class.php b/include/docweb_language.class.php deleted file mode 100644 index d8dfb99..0000000 --- a/include/docweb_language.class.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: -+----------------------------------------------------------------------+ -| PHP Documentation Tools Site Source Code | -+----------------------------------------------------------------------+ -| Copyright (c) 1997-2011 The PHP Group | -+----------------------------------------------------------------------+ -| This source file is subject to version 3.0 of the PHP license, | -| that is bundled with this package in the file LICENSE, and is | -| available through the world-wide-web at the following url: | -| http://www.php.net/license/3_0.txt. | -| If you did not receive a copy of the PHP license and are unable to | -| obtain it through the world-wide-web, please send a note to | -| [email protected] so we can mail you a copy immediately. | -+----------------------------------------------------------------------+ -| Authors: Sean Coates <[email protected]> | -+----------------------------------------------------------------------+ -$Id$ -*/ - -/** -* PHP DocWeb - Language Class -* -* Simple language class. Allows for very simple i18n of DocWeb content -* Gets data from [svn]phpdoc-all -* -* @package docweb -* @since 2004.09.25 -* @author Sean Coates <[email protected]> -*/ -class DocWeb_Language -{ - var $lang; - var $defaultEntities = array(); - var $nativeEntities = array(); - var $entities = array(); - - /** - * Constructor -- (old school (wrapper)) - */ - function DocWeb_Language($lang) - { - return $this->__construct($lang); - } - - /** - * Constructor -- sets the language - */ - function __construct($lang) - { - // verify $lang - if (in_array($lang, array_keys($GLOBALS['LANGUAGES']))) { - - // get default text - $this->defaultEntities = $this->getTextData($GLOBALS['defaultFallbackLanguage']); - - // fixate default language ('all' isn't a language) - // and get native entities (if applicable) - if ($lang == $GLOBALS['defaultLanguage']) { - $this->lang = $GLOBALS['defaultFallbackLanguage']; - $this->nativeEntities =& $this->defaultEntities; - } else { - $this->lang = $lang; - $this->nativeEntities = $this->getTextData($this->lang); - } - - // now, merge the default and native arrays, to form a full set - $this->entities = array_merge($this->defaultEntities, $this->nativeEntities); - - } else { - trigger_error("Invalid language ('$lang');\n", E_USER_ERROR); - } - } - - /** - * Gets entity data from svn:phpdoc-all/$lang/docweb/main.ent - * - * @param string $lang language to 'get' - * @return array native language texts - */ - function getTextData($lang=FALSE) - { - // use class default, if $lang is not provided - if (!$lang) { - $lang = $this->lang; - } - - // use this file: - $entFile = SVN_DIR .'/' .DOC_DIR ."/$lang/docweb/main.ent"; - - if (is_readable($entFile)) { - // file is good; get its contents - $entData = file_get_contents($entFile); - - // try to find the encoding of the file - preg_match('/<?.*encoding\s*=\s*["\']([^"\']+)["\'].*?>/', $entData, $matches); - $charset = isset($matches[1]) ? $matches[1] : 'UTF-8'; - - // find entities in the file - $entMatchRegex = '/<!ENTITY ('. preg_quote(DOCWEB_ENTITIY_PREFIX) - .'\..*?) ([\'"])(.*?)\2>/s'; - preg_match_all($entMatchRegex, $entData, $matches); - - // init local entities variable - $entities = array(); - - // loop through matches, creating entities dataset - foreach ($matches[0] as $index => $val) { - $entities[$matches[1][$index]] = @iconv($charset, 'UTF-8//IGNORE', $matches[3][$index]); - } - return $entities; - } else { - // entities file not found - // return empty array, to allow default - return array(); - } - } - - /** - * Gives a single entity's text - * - * @param string $ent Entity to get - * @param array $params Optional array of dynamic parameters - * @return mixed text associated with $ent, or FALSE on failure (not present) - */ - function get($ent, $params=FALSE) - { - - $params = (array) $params; - - static $paramEntMatchRegex = FALSE; - if (!$paramEntMatchRegex) { - $paramEntMatchRegex = '/&('. preg_quote(DOCWEB_PARAM_ENTITIY_PREFIX) .'\..*?);/'; - } - - if ($this->entities) { - $text = isset($this->entities[$ent]) ? stripslashes($this->entities[$ent]) : $ent; - preg_match_all($paramEntMatchRegex, $text, $matches); - for ($i=0; $i<count($matches[0]); $i++) { - $rep = substr($matches[1][$i], strlen(DOCWEB_PARAM_ENTITIY_PREFIX) + 1); - if (isset($params[$rep])) { - $text = str_replace($matches[0][$i], $params[$rep], $text); - } - } - return $text; - } else { - return $ent; - } - } -} -?> diff --git a/include/docweb_template.class.php b/include/docweb_template.class.php deleted file mode 100644 index b87ba44..0000000 --- a/include/docweb_template.class.php +++ /dev/null @@ -1,175 +0,0 @@ -<?php -/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: -+----------------------------------------------------------------------+ -| PHP Documentation Tools Site Source Code | -+----------------------------------------------------------------------+ -| Copyright (c) 1997-2011 The PHP Group | -+----------------------------------------------------------------------+ -| This source file is subject to version 3.0 of the PHP license, | -| that is bundled with this package in the file LICENSE, and is | -| available through the world-wide-web at the following url: | -| http://www.php.net/license/3_0.txt. | -| If you did not receive a copy of the PHP license and are unable to | -| obtain it through the world-wide-web, please send a note to | -| [email protected] so we can mail you a copy immediately. | -+----------------------------------------------------------------------+ -| Authors: Sean Coates <[email protected]> | -+----------------------------------------------------------------------+ -$Id$ -*/ - -/** -* PHP DocWeb - Templating Class -* -* This is a very simple templating system, if we decide to go with one of -* the more "mature" template engines, down the road, this can be used as -* a wrapper to maintain BC. Please see docweb/templates/README for the rules. -* -* @package docweb -* @since 2004.09.25 -* @author Sean Coates <[email protected]> -*/ -class DocWeb_Template -{ - var $rendered = FALSE; - var $params = array(); - - var $language; - - /** - * BC constructor - * - * @param string $filename template file - * @see DocWeb_Template::__construct() - */ - function DocWeb_Template($filename) - { - return $this->__construct($filename); - } - - /** - * Template constructor - * - * Use DocWeb_Template::factory(...) to instanciate this object - * - * @param string $filename template file - */ - function __construct($filename) - { - $this->filename = $filename; - // always pass $Language - $this->params['Language'] =& $GLOBALS['Language']; - return TRUE; - } - - /** - * Template Factory - * - * Safely instanciates DocWeb_Template object - * Encapsulates external data (project, lang & defaults) - * - * @param string $template template (file) name - * @return mixed DocWeb_Template object on success, FALSE on failure - */ - function factory($template) - { - // vars (become onject properties after instanciation) - $language = 'all'; - $project = SITE; - $defaultLanguage = $GLOBALS['defaultLanguage']; - $defaultProject = $GLOBALS['defaultProject']; - - // set up paths: - $templateRoot = PATH_ROOT . '/templates'; - - // determine proper filename (fallback to defaults) - if (is_readable("$templateRoot/$language/$project/$template")) { - // specific (language:project) template exists, and is usable - $filename = "$templateRoot/$language/$project/$template"; - } elseif (is_readable("$templateRoot/$language/$defaultProject/$template")) { - // semi-specific (language:default) template exists, use it - $filename = "$templateRoot/$language/$defaultProject/$template"; - } elseif (is_readable("$templateRoot/$defaultLanguage/$defaultProject/$template")) { - // default template exists: - $filename = "$templateRoot/$defaultLanguage/$defaultProject/$template"; - } else { - // can't find usable template - trigger_error("No usable template ('$template');\n", E_USER_ERROR); - return FALSE; - } - - // template file is readable, instanciate class - $Template = new DocWeb_Template($filename); - $Template->language = $language; - return $Template; - } - - /** - * Renders template from file - * - * @return string rendered template (output) - */ - function render() - { - extract($this->params); - ob_start(); - require($this->filename); - $tplOut = ob_get_contents(); - ob_end_clean(); - $this->output = $this->replace_entities($tplOut); - $this->rendered = TRUE; - return $this->output; - } - - /** - * Get a template - * - * Called statically - * Convenience function to instanciate & render - * - * @param array $template template (file) name - * @param array $params - */ - function get($template, $params=FALSE) - { - - $Template =& DocWeb_Template::factory($template); - if ($params) { - $Template->params = $params; - } - return $Template->render(); - } - - /** - * For the given text, replace docweb entities with their appropriate values - * - * @param string $text text in which to replace entities - * @return string text containing expanded entities - */ - function replace_entities($text) - { - $Language =& $GLOBALS['Language']; - - static $entMatchRegex = FALSE; - if (!$entMatchRegex) { - $entMatchRegex = '/&('. preg_quote(DOCWEB_ENTITIY_PREFIX) .'\..*?);/'; - } - - preg_match_all($entMatchRegex, $text, $matches); - $replaceCounter = 0; - for ($i=0; $i<count($matches[0]); $i++) { - if ($rep = $Language->get($matches[1][$i])) { - $text = str_replace($matches[0][$i], $rep, $text); - $replaceCounter++; - } - } - - // recurse, if there were replacements, and there are possibly more - if ($replaceCounter && preg_match($entMatchRegex, $text)) { - $text = $this->replace_entities($text); - } - - return $text; - } -} -?> diff --git a/include/init.inc.php b/include/init.inc.php index 3e59319..7da6ca5 100644 --- a/include/init.inc.php +++ b/include/init.inc.php @@ -18,7 +18,6 @@ | Gabor Hojtsy <[email protected]> | | Sean Coates <[email protected]> | +----------------------------------------------------------------------+ -$Id$ */ // get paths @@ -62,19 +61,4 @@ if (!isset($inCli) OR $inCli != true) { } // general support library -require_once('lib_general.inc.php'); - -if ($inCli != true) { - // language & template constants - define('DOCWEB_ENTITIY_PREFIX', 'docweb'); - define('DOCWEB_PARAM_ENTITIY_PREFIX', 'param'); - - // language engine - require_once('docweb_language.class.php'); - $Language = new DocWeb_Language(LANGC); - - // template engine - require_once('docweb_template.class.php'); -} - -?> +require_once('lib_general.inc.php'); \ No newline at end of file diff --git a/templates/README b/templates/README deleted file mode 100644 index 4db27a1..0000000 --- a/templates/README +++ /dev/null @@ -1,48 +0,0 @@ -Templates README -$Id$ - -This directory hierarchy contains very simple templates for the docweb -templating system. - -The templating engine is equipped with a natural fallback procedure. This -procedure allows a developer to create templates in different languages, -and for different sub-projects, while maintaining a "default" language and -project when specific templates are not found. - -The fallback procedure is as follows: - - if the specified template, for the active language and project is - available: use it. - - if the specified template, for the active language is available, but - there is no template for the active project, use the active language, - default project template. - - if the above two conditions are not met, use the default language and - default project template. - - if the above condition is not met (there is no default template, trigger - a fatal error (coding problem). - -For this reason, you will notice that the "en" tree is completely empty (this -is redundant, unless the default ever changes to another language), and the -[lang]/www trees are also empty (as www is the default project). - ----- - -Templates & Rules - -Currently, templates are just PHP source files. The DocWeb template engine is -simple enough that if there is ever a decision to move towards another engine, -this will be possible with minimal re-coding (by using DocWeb_Template as a -wrapper). - -Using the native language (PHP) for templates presents certain dangers, in the -form of power. For this reason, whem creating/maintaining templates, the -following rules should be observed. - - Templates are designed for DISPLAY LOGIC ONLY. That is, avoid performing - any non-display logic inside the templates. For instance, it is acceptable - to loop through an array of links to output their values. It is not, - however, acceptable to loop through a list of files, and check readability. - This type of logic should be performed outside of the template. - - When rendering, templates are given their own scope (the $params - argument). It is possible to use external values (such as $this (the - template object), or $GLOBALS. Avoid this, and pass all required values - as parameters. - - As a convenience, templates may/should omit the PHP License header. diff --git a/templates/all/www/checkent.tpl.php b/templates/all/www/checkent.tpl.php deleted file mode 100644 index dd4efb5..0000000 --- a/templates/all/www/checkent.tpl.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: -/* - TODO: - - language-entity this -*/ - -if ($isComplete) { ?> -<h2>Entities last checked: <?php echo date('Y-m-d H:i:s', $startTime); ?></h2> -<h2>Protocols: <?php echo $schemes; ?></h2> -<?php } else { ?> - <h3>Check not complete.</h3> -<?php } ?> -<?php if($wideMode) { ?> -Viewing in wide mode. <a href="checkent.php?wideMode=0">Switch to normal mode?</a><br /> -<?php } else { ?> -<a href="checkent.php?wideMode=1">Switch to wide mode?</a><br /> -<?php } ?> -<br /> - -<?php foreach ($entData as $resultType => $results) { ?> - <h2><?php echo $resultLkp[$resultType]; ?> (<?php echo count($results); ?>)</h2> - <table border="0"> - <tr> - <th>Entity Name</th> - <?php if ($extraCol[$resultType]) { ?> - <?php if ($wideMode) { ?> - <th>URL</th> - <?php } ?> - <th>Redirect URL</th> - <?php } else { ?> - <th>URL</th> - <?php } ?> - </tr> - <?php foreach ($results AS $r) { ?> - <tr> - <?php if ($extraCol[$resultType]) { ?> - <?php if ($wideMode) { ?> - <td><?php echo $r['entity']; ?></td> - <td><a href="<?php echo $r['url']; ?>" rel="nofollow"><?php echo $r['url']; ?></a></td> - <td><a href="<?php echo $r['return_val']; ?>" rel="nofollow"><?php echo $r['return_val']; ?></a></td> - <?php } else { ?> - <td><a href="<?php echo $r['url']; ?>"><?php echo $r['entity']; ?></a></td> - <td> - <a href="<?php echo $r['return_val']; ?>" rel="nofollow" title="<?php echo $r['return_val']; ?>"> - <?php echo str_chop($r['return_val'], 60, TRUE); ?> - </a> - </td> - <?php } ?> - <?php } else { ?> - <td><?php echo $r['entity']; ?></td> - <?php if ($wideMode) { ?> - <td><a href="<?php echo $r['url']; ?>" rel="nofollow"><?php echo $r['url']; ?></a></td> - <?php } else { ?> - <td> - <a href="<?php echo $r['url']; ?>" rel="nofollow" title="<?php echo $r['url']; ?>"> - <?php echo str_chop($r['url'], 60, TRUE); ?> - </a> - </td> - <?php } ?> - <?php } ?> - </tr> - <?php } ?> - </table> - <br /> -<?php } ?> diff --git a/templates/all/www/entities.tpl.php b/templates/all/www/entities.tpl.php deleted file mode 100644 index 289aee7..0000000 --- a/templates/all/www/entities.tpl.php +++ /dev/null @@ -1,16 +0,0 @@ -<h1>Entities in the PHP Documentation</h1> -(non-file entities) - -<table> - <tr> - <th>Entitiy ID</th> - <th>Value</th> - </tr> - - <?php foreach ($entData as $eID => $eVal) { ?> - <tr> - <td valign="top"><a name="ent-<?php echo $eID;?>"><?php echo $eID; ?></a></td> - <td valign="top"><?php echo $eVal; ?></td> - </tr> - <?php } ?> -</table> diff --git a/templates/all/www/error.tpl.php b/templates/all/www/error.tpl.php deleted file mode 100644 index 5a6e14d..0000000 --- a/templates/all/www/error.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - $red_status = isset($_SERVER["REDIRECT_STATUS"]) ? $_SERVER["REDIRECT_STATUS"] : ''; -?> -<h2>&docweb.common.header.error; <?php echo $red_status; ?></h2> -<p> -<?php -if (isset($_SERVER['REDIRECT_ERROR_NOTES'])) { - echo $_SERVER['REDIRECT_ERROR_NOTES']; -} elseif (isset($_SERVER['REDIRECT_REDIRECT_ERROR_NOTES'])) { - echo $_SERVER['REDIRECT_REDIRECT_ERROR_NOTES']; -} else { - if ($red_status == 404) { - ?> - &docweb.error.404;: - <?php - echo htmlspecialchars($_SERVER['REQUEST_URI']); - } else { - ?> - &docweb.error.nomesg; - <?php - } -} -?> -</p> diff --git a/templates/all/www/missingexamples.tpl.php b/templates/all/www/missingexamples.tpl.php deleted file mode 100644 index d0a8fc1..0000000 --- a/templates/all/www/missingexamples.tpl.php +++ /dev/null @@ -1,13 +0,0 @@ -<h1>Functions with missing examples</h1> -There are <?php echo $missingEgCount; ?> functions that are missing examples. - -<table> - <?php foreach ($missingEgData as $name => $ext) { ?> - <tr> - <th><a href="http://php.net/<?php echo $name ?>"><?php echo $name.'</a> ('.count($ext).')'; ?></th> - </tr> - <?php foreach ($ext as $function) { ?> - <tr><td valign="top"><a href="http://php.net/<?php echo $function; ?>"><?php echo $function; ?>()</a></td></tr> - <?php } ?> - <?php } ?> -</table> diff --git a/templates/all/www/notes_stats.tpl.php b/templates/all/www/notes_stats.tpl.php deleted file mode 100644 index 313033c..0000000 --- a/templates/all/www/notes_stats.tpl.php +++ /dev/null @@ -1,119 +0,0 @@ -<h3><strong><?php echo $last_article; ?></strong> subjects parsed</h3> - -<table border="0" cellspacing="10"> - <tr valign="top"> - <td valign="top"> - <table border='0'> - <tr> - <th colspan="5" align="center">Total Editors Stats</th> - </tr> - <tr> - <th>user</th> - <th>deleted</th> - <th>rejected</th> - <th>modified</th> - <th>total</th> - </tr> - <?php - $bg = '#EBEBEB'; - foreach ($data as $id => $c) { - ?> - <tr bgcolor="<?php echo $bg = ($bg == '#EBEBEB') ? '#BEBEBE' : '#EBEBEB'; ?>"> - <td><?php echo $id ?></td> - <td><?php echo isset($c['deleted']) ? $c['deleted'] : '0'; ?></td> - <td><?php echo isset($c['rejected']) ? $c['rejected'] : '0'; ?></td> - <td><?php echo isset($c['modified']) ? $c['modified'] : '0'; ?></td> - <td><?php echo $total[$id]; ?></td> - </tr> - <?php - } - ?> - </table> - </td> - <td valign="top"> - Last year (with more than <?php echo $minact; ?> actions counted) - <table border='0'> - <tr> - <th colspan="5" align="center">Recent Editors stats</th> - </tr> - <tr> - <th>user</th> - <th>deleted</th> - <th>rejected</th> - <th>modified</th> - <th>total</th> - </tr> - <?php - $bg = '#EBEBEB'; - foreach ($data_new as $id => $c) { - if($c['total'] >= $minact) { - ?> - <tr bgcolor="<?php echo $bg = ($bg == '#EBEBEB') ? '#BEBEBE' : '#EBEBEB'; ?>"> - <td><?php echo $id; ?></td> - <td><?php echo isset($c['deleted']) ? $c['deleted'] : '0'; ?></td> - <td><?php echo isset($c['rejected']) ? $c['rejected'] : '0'; ?></td> - <td><?php echo isset($c['modified']) ? $c['modified'] : '0'; ?></td> - <td><?php echo $c['total']; ?></td> - </tr> - <?php - } - } - ?> - </table> - <br /> - <table border='0'> - <tr> - <th colspan="3" align="center">Editors top 15</th> - </tr> - <tr> - <th>rank</th> - <th>user</th> - <th>total</th> - </tr> - <?php - $i = 0; - foreach($total as $id => $val) { - ?> - <tr bgcolor="<?php echo $bg = ($bg == '#EBEBEB') ? '#BEBEBE' : '#EBEBEB'; ?>"> - <td><?php echo ++$i; ?></td> - <td><?php echo $id; ?></td> - <td><?php echo $val; ?></td> - </tr> - <?php - if ($i == 15) { - break; - } - } - ?> - </table> - <br /> - <table border='0'> - <tr> - <th colspan="3" align="center">Manual pages most active top 20</th> - </tr> - <tr> - <th>rank</th> - <th>page</th> - <th>total</th> - </tr> - <?php - $i = 0; - foreach ($manual as $id => $c) { - ?> - <tr bgcolor="<?php echo $bg = ($bg == '#EBEBEB') ? '#BEBEBE' : '#EBEBEB'; ?>"> - <td><?php echo ++$i ?></td> - <td><?php echo $id ?></td> - <td><?php echo $c; ?></td> - </tr> - <?php - if ($i == 20) { - break; - } - } - ?> - </table> - </td> - </tr> -</table> -&docweb.notes-stats.last-updated; <?php echo $build_date; ?><br /> -<br /> diff --git a/templates/all/www/shared/error_msg.tpl.php b/templates/all/www/shared/error_msg.tpl.php deleted file mode 100644 index 56a4fcd..0000000 --- a/templates/all/www/shared/error_msg.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php -// Common Error Template -// yes, this is logic, but it's DISPLAY logic - -// header -if ($header) { - echo site_header($header); -} - -// body -if ($body) { - if (isset($body[0])) { - echo "<h2>{$body[0]}</h2>"; - } - if (isset($body[1])) { - echo $body[1]; - } -} - -// footer -if (!isset($footer) || !$footer) { - echo site_footer(); -} -?> diff --git a/templates/all/www/undocfuncs.tpl.php b/templates/all/www/undocfuncs.tpl.php deleted file mode 100644 index f114616..0000000 --- a/templates/all/www/undocfuncs.tpl.php +++ /dev/null @@ -1,13 +0,0 @@ -<h1>Undocumented Functions</h1> -There are <?php echo $undocCount; ?> undocumented functions. - -<table> - <?php foreach ($undocData as $name => $ext) { ?> - <tr> - <th><a href="http://php.net/<?php echo $name ?>"><?php echo $name.'</a> ('.count($ext).')'; ?></th> - </tr> - <?php foreach ($ext as $function) { ?> - <tr><td valign="top"><a href="http://php.net/<?php echo $function; ?>"><?php echo $function; ?>()</a></td></tr> - <?php } ?> - <?php } ?> -</table> diff --git a/www/error.php b/www/error.php index 20259a3..a212d9c 100644 --- a/www/error.php +++ b/www/error.php @@ -1,9 +1,14 @@ <?php -/* $Id$ */ - include '../include/init.inc.php'; -echo site_header('docweb.common.header.error'); -echo DocWeb_Template::get('error.tpl.php'); -echo site_footer(); -?> +site_header(); + +echo '<h2>Error 404</h2>'; +if ($_SERVER['REDIRECT_STATUS'] == 404) { + echo '<p>File not found: '.htmlspecialchars($_SERVER['REQUEST_URI']).'</p>'; +} +else { + echo '<p>An error occured</p>'; +} + +site_footer(); \ No newline at end of file