summaryrefslogtreecommitdiffstats
path: root/web/html/index.php
blob: b0f346da77132cd16ec20023a2711b5ef514ee36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');

include_once("config.inc.php");
include_once("routing.inc.php");

$path = rtrim($_SERVER['PATH_INFO'], '/');

if (get_route($path) !== NULL) {
	include get_route($path);
} else {
	switch ($path) {
	case "/css/archweb.css":
	case "/css/aur.css":
	case "/css/archnavbar/archnavbar.css":
		header("Content-Type: text/css");
		include "./$path";
		break;
	case "/css/archnavbar/archlogo.gif":
	case "/images/new.gif":
		header("Content-Type: image/gif");
		include "./$path";
		break;
	case "/css/archnavbar/archlogo.png":
	case "/images/AUR-logo-80.png":
	case "/images/AUR-logo.png":
	case "/images/favicon.ico":
	case "/images/feed-icon-14x14.png":
	case "/images/titlelogo.png":
	case "/images/x.png":
		header("Content-Type: image/png");
		include "./$path";
		break;
	}
}