summaryrefslogtreecommitdiff
path: root/public_html/functions.php
diff options
context:
space:
mode:
authorHorus32014-09-18 14:19:56 +0200
committerHorus32014-09-18 14:19:56 +0200
commite2e66e5ebb845f96703fbdacabfd0b75b29b705c (patch)
tree08a6224457eaa328243a0f71e8a11fa8eaccc36a /public_html/functions.php
parent548e11e863e906bb80695fe7b2789fe4af3f0f39 (diff)
downloadvfs-e2e66e5ebb845f96703fbdacabfd0b75b29b705c.tar.gz
class vfsdb
Diffstat (limited to 'public_html/functions.php')
-rw-r--r--public_html/functions.php22
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;
+}