summaryrefslogtreecommitdiff
path: root/public_html/functions.php
blob: a5dbd83583e3e1b4cb9fb0334165363d4c2024b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}