|
@@ -4,28 +4,27 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
$config = array(
|
|
$config = array(
|
|
- 'footer' => 'Technical Contact: <a href="mailto:x@example.com">x@example.com</a>'
|
|
|
|
|
|
+ 'footer' => 'Technical Contact: <a href="mailto:x@example.com">x@example.com</a>'
|
|
);
|
|
);
|
|
|
|
|
|
// load pages
|
|
// load pages
|
|
$pages = require('pages.php');
|
|
$pages = require('pages.php');
|
|
|
|
|
|
// load inline css
|
|
// load inline css
|
|
-$css = trim(file_get_contents('Resources/Layout.css'));
|
|
|
|
|
|
+$css = trim(file_get_contents('assets/Layout.css'));
|
|
|
|
|
|
// generate each error page
|
|
// generate each error page
|
|
foreach ($pages as $code => $page){
|
|
foreach ($pages as $code => $page){
|
|
-
|
|
|
|
- // assign variables
|
|
|
|
- $v_code = intval($code);
|
|
|
|
- $v_title = nl2br(htmlspecialchars($page['title']));
|
|
|
|
- $v_message = nl2br(htmlspecialchars($page['message']));
|
|
|
|
-
|
|
|
|
- // render template
|
|
|
|
- ob_start();
|
|
|
|
- require('template.phtml');
|
|
|
|
- $errorpage = ob_get_clean();
|
|
|
|
-
|
|
|
|
- // store template
|
|
|
|
- file_put_contents('Build/HTTP'.$v_code.'.html', $errorpage);
|
|
|
|
|
|
+ // assign variables
|
|
|
|
+ $v_code = intval($code);
|
|
|
|
+ $v_title = nl2br(htmlspecialchars($page['title']));
|
|
|
|
+ $v_message = nl2br(htmlspecialchars($page['message']));
|
|
|
|
+
|
|
|
|
+ // render template
|
|
|
|
+ ob_start();
|
|
|
|
+ require('template.phtml');
|
|
|
|
+ $errorpage = ob_get_clean();
|
|
|
|
+
|
|
|
|
+ // store template
|
|
|
|
+ file_put_contents('dist/HTTP'.$v_code.'.html', $errorpage);
|
|
}
|
|
}
|