diff --git a/inc/display.php b/inc/display.php index 92f6eca8..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'=>"

$message

Go back.

"))); + die(Element('page.html', Array( + 'index'=>ROOT, + 'title'=>'Error', + 'subtitle'=>'An error has occured.', + 'body'=>"
" . + "

$message

" . + "

Go back.

" . + "
" + ))); } class Post { @@ -180,4 +193,5 @@ return $built; } }; -?> \ No newline at end of file +?> + diff --git a/inc/functions.php b/inc/functions.php index e251c054..10f23e7f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -8,11 +8,6 @@ array_values($replaces), $str); } - function commaize($n) { - $n = strval($n); - return (intval($n) < 1000) ? $n : commaize(substr($n, 0, -3)) . ',' . substr($n, -3); - } - function sql_open() { global $sql; $sql = @mysql_connect(MY_SERVER, MY_USER, MY_PASSWORD) or error('Database error.'); @@ -517,3 +512,4 @@ return chr($n & 255).chr(($n >> 8) & 255); } ?> +