diff options
| author | Horus3 | 2014-09-23 20:16:17 +0200 |
|---|---|---|
| committer | Horus3 | 2014-09-23 20:16:17 +0200 |
| commit | 790524e3dee3ddcf5a8250adc8b38853d0014c9f (patch) | |
| tree | 2965207a742727b3a10eb0b32dbca5c61b9ef372 /bootstrap/functions.php | |
| parent | 3c94eb3f608f9bf0dc8d19583abe273b3a67e5ff (diff) | |
| download | jungegemeinde-790524e3dee3ddcf5a8250adc8b38853d0014c9f.tar.gz | |
rebuild with bootstrap
Diffstat (limited to 'bootstrap/functions.php')
| -rw-r--r-- | bootstrap/functions.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap/functions.php b/bootstrap/functions.php new file mode 100644 index 0000000..8c998fc --- /dev/null +++ b/bootstrap/functions.php @@ -0,0 +1,24 @@ +<?php + +function failure($reason, $httpcode, $ajax = true, $heading = NULL){ + + # send header with $httpcode + header($_SERVER['SERVER_PROTOCOL'] . " " . $httpcode); + + # just echo the reason to the ajax response + if($ajax){ + echo $reason; + exit; + } + + // TODO: Put pretty HTML here, please + + # print full error page + if($heading != NULL) + echo $heading; + + echo $reason; + + # exit the script here + exit; +} |
