diff options
| author | Horus3 | 2014-09-18 14:19:56 +0200 |
|---|---|---|
| committer | Horus3 | 2014-09-18 14:19:56 +0200 |
| commit | e2e66e5ebb845f96703fbdacabfd0b75b29b705c (patch) | |
| tree | 08a6224457eaa328243a0f71e8a11fa8eaccc36a /public_html/functions.php | |
| parent | 548e11e863e906bb80695fe7b2789fe4af3f0f39 (diff) | |
| download | vfs-e2e66e5ebb845f96703fbdacabfd0b75b29b705c.tar.gz | |
class vfsdb
Diffstat (limited to 'public_html/functions.php')
| -rw-r--r-- | public_html/functions.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/public_html/functions.php b/public_html/functions.php new file mode 100644 index 0000000..a5dbd83 --- /dev/null +++ b/public_html/functions.php @@ -0,0 +1,22 @@ +<?php + +function failure($reason, $httpcode, $ajax = true, $heading = NULL){ + + # send header with $httpcode + header($_SERVER['SERVER_PROTOCOL'] . " " . $httpcode) + + if($ajax){ + # just echo the reason to the ajax response + echo $reason; + exit + } + + // TODO: Put pretty HTML here, please + if($heading != NULL) + echo $heading; + + echo $reason; + + # exit the script here + exit; +} |
