summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/inc/display.php b/inc/display.php
index b988e3bc..132dcac5 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -14,8 +14,21 @@
return round($size, 2).$units[$i];
}
+ function commaize($n) {
+ $n = strval($n);
+ return (intval($n) < 1000) ? $n : commaize(substr($n, 0, -3)) . ',' . substr($n, -3);
+ }
+
function error($message) {
- die(Element('page.html', Array('index' => ROOT, 'title'=>'Error', 'subtitle'=>'An error has occured.', 'body'=>"<h1>$message</h1><p style=\"text-align:center;\"><a href=\"" . ROOT . FILE_INDEX . "\">Go back</a>.</p>")));
+ die(Element('page.html', Array(
+ 'index'=>ROOT,
+ 'title'=>'Error',
+ 'subtitle'=>'An error has occured.',
+ 'body'=>"<center>" .
+ "<h2>$message</h2>" .
+ "<p><a href=\"" . ROOT . FILE_INDEX . "\">Go back</a>.</p>" .
+ "</center>"
+ )));
}
class Post {
@@ -180,4 +193,5 @@
return $built;
}
};
-?> \ No newline at end of file
+?>
+