summaryrefslogtreecommitdiff
blob: c11c48087e0a2088c40984fc61e1c53ffb123583 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
ob_start();
echo xmlheader();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="<?php echo url('style.css'); ?>" />
<link rel="shortcut icon" href="<?php echo url('images/favicon.ico'); ?>" />
<link rel="icon" href="<?php echo url('images/favicon.png'); ?>" type="image/gif" />
<title><?php
echo ($S['title'] != null?$S['title'].' | ':'').$conf['title'];
?></title>
<?php
$scripts=array('GetXmlHttpObject', 'url', 'ajax');
if ($conf['debug']) {
	array_unshift($scripts, 'debug');
}
foreach (array_merge($S['scripts'], $scripts) as $script) {
	echo '<script type="text/javascript" src="'.url('js/'.$script.'.js').'"></script>'."\n";
}
foreach ($S['head_scripts'] as $script) {
	$S['head'].='<script type="text/javascript">'."\n$script\n</script>\n";
}
foreach ($S['head_css'] as $style) {
	$S['head'].='<style type="text/css">'."\n$style\n</style>\n";
}
if (isset($S['head'])) {
	echo $S['head'];
}
?>
</head>
<body>
<div id="left" class="box">
<h1><a href="<?php echo url(); ?>"><img src="<?php echo url('images/ingenue.png'); ?>" alt="Ingenue" /></a></h1>
<ul>
<?php
//echo '<li><a href="'.url().'">Home</a></li>';
echo '<li><a href="'.url('create').'">New configuration</a></li>';
echo '<li><a href="'.url('configurations').'">My configurations</a></li>';
echo '<li><a href="'.url('builds').'">My builds</a></li>';
if (isset($S['user'])) {
	if ($conf['invite'] && ($S['user']->has_flag('a') || $conf['invite'] != 'admin'))
		echo '<li><a href="'.url('invite').'">Invite</a></li>';
} elseif ($conf['registration'])
	echo '<li><a href="'.url('register').'">Register</a>';
?>
</ul>
</div>
<div id="top" class="box">
<?php
	$links=array();
	if (isset($S['user'])) {
		$links['logout'.(strlen($S['request'])?'/'.$S['request']:'')]='Logout';
	} else {
		$links['login'.(strlen($S['request'])?'/'.$S['request']:'')]='Login';
		if ($conf['registration']) $links['register']='Register';
	}
	foreach ($links as $url => $text) {
		$links[$url]='<a href="'.url($url).'">'.htmlentities($text).'</a>';
	}
	echo implode(' &bull; ', $links);
?>
</div>
<div id="main" class="box">
<?php
	if (isset($death)) {
		echo $death;
		$death='';
	}
?>