Code Duplication    Length = 12-12 lines in 4 locations

utility/Header.class.inc.php 4 locations

@@ 50-61 (lines=12) @@
47
		self::send($array);
48
	}
49
50
	public static function sendJSON()
51
	{
52
		$array = array(
53
			'HTTP/1.1 200 OK',
54
			'Cache-Control: no-cache',
55
			'Content-Language: en',
56
			'Content-Type: application/json',
57
			'Expires: ' . self::get_date(time() - 1),
58
			'Last-Modified: ' . self::get_date(),
59
			'X-Powered-By: jacobemerick.com');
60
		self::send($array);
61
	}
62
63
	public static function sendSitemap()
64
	{
@@ 89-100 (lines=12) @@
86
		self::send($array);
87
	}
88
89
	public static function sendHTML()
90
	{
91
		$array = array(
92
			'HTTP/1.1 200 OK',
93
			'Cache-Control: no-cache',
94
			'Content-Language: en',
95
			'Content-Type: text/html',
96
			'Expires: ' . self::get_date(time() - 1),
97
			'Last-Modified: ' . self::get_date(),
98
			'X-Powered-By: jacobemerick.com');
99
		self::send($array);
100
	}
101
102
	public static function redirect($location, $method = 301)
103
	{
@@ 108-119 (lines=12) @@
105
		exit();
106
	}
107
108
	public static function send404()
109
	{
110
		$array = array(
111
			'HTTP/1.1 404 Not Found',
112
			'Cache-Control: no-cache',
113
			'Content-Language: en',
114
			'Content-Type: text/html',
115
			'Expires: ' . self::get_date(time() - 1),
116
			'Last-Modified: ' . self::get_date(),
117
			'X-Powered-By: jacobemerick.com');
118
		self::send($array);
119
	}
120
121
	public static function send503()
122
	{
@@ 121-132 (lines=12) @@
118
		self::send($array);
119
	}
120
121
	public static function send503()
122
	{
123
		$array = array(
124
			'HTTP/1.1 503 Service Unavailable',
125
			'Cache-Control: no-cache',
126
			'Content-Language: en',
127
			'Content-Type: text/html',
128
			'Expires: ' . self::get_date(time() - 1),
129
			'Last-Modified: ' . self::get_date(),
130
			'X-Powered-By: jacobemerick.com');
131
		self::send($array);
132
	}
133
134
	private static function send($array, $gzip = true)
135
	{