1<?php
2	$app['sitename'] = "Blood Frontier";
3	$app['siteblurb'] = "It's Bloody Fun!";
4	$app['siterelver'] = "v0.80 (Beta 1)";
5	$app['sitereldate'] = "24th February 2009";
6	$app['sitevideo'] = "http://www.youtube.com/v/uKnLsAiCVLk&amp;color1=0x000000&amp;color2=0x000000&amp;border=0&amp;fs=1&amp;egm=0&amp;showsearch=0&amp;showinfo=0&amp;ap=%2526fmt%3D18";
7	$app['sitevidlo'] = array (
8		'watch' => 'Watch this video on <a href="http://www.youtube.com/watch?v=uKnLsAiCVLk">YouTube</a>, <a href="http://animoto.com/play/9cEfKRX71W9dKr3SfMJs1g">Animoto</a>, or download the MP4: <a href="/bits/bfb2_lofi.mp4">Lo-fi</a>, <a href="/bits/bfb2_hifi.mp4">Hi-fi</a>.',
9		'creds' => 'Created with <a href="http://animoto.com/">Animoto</a>, the end of slideshows! Proud affiliate of Blood Frontier.'
10	);
11	$app['sitenotice'] = array(
12		'intro' => 'Blood Frontier is a <a href="/wiki/Collaborate">Free and Open Source</a> game (see our <a href="/wiki/License">License</a>), using <a href="http://libsdl.org/">SDL</a> and <a href="http://opengl.org/">OpenGL</a> which allows it to be ported to many platforms; you can <a href="/download">download a package</a> for <a href="/download/windows">Windows</a>, <a href="/download/linux">Linux/BSD</a>, <a href="/download/macosx">Mac OSX</a>, or grab a development copy from our <a href="/wiki/SVN">Subversion</a> repository and live on the bleeding edge. If you\'re an Ubuntu user, you might like to use the <a href="/playdeb">easy-to-install package available on PlayDeb.net</a>.',
13		'about' => 'The game is a single-player and multi-player first-person shooter, built as a total conversion of <a href="http://www.cubeengine.com/">Cube Engine 2</a>, which lends itself toward a balanced gameplay, completely at the control of map makers, while maintaining a general theme of tactics and low gravity. For more information, please see our <a href="/wiki">Wiki</a>.',
14		'outro' => 'In a true open source <i>by the people for the people</i> nature, it tries to work closely with the gaming and open source communities to provide a better overall experience, taking all sorts of feedback from your average player, to your seasoned developer, aiming to create a story-driven game environment that is flexible, fun, easy to use, and pleasing to the eye.'
15	);
16	$app['siteinfo'] = "In the distant future, humanity has spread throughout the universe, to ends of the galaxy and beyond. A vast communications network bridges from colony to colony, human to machine, and machine to human. This seemingly benign keystone of modern inter-planetary society, however, appears to be the carrier of a mysterious techno-biological plague. Any persons so-connected seem to fall ill and die, only to return as ravenous, sub-human cannibals. You, a machine intelligence, an android, remain unafflicted by this strange phenomenon and have been tasked with destroying the growing hordes of the infected, while, hopefully, locating and stopping the source of the epidemic.";
17	$app['sitepaypal'] = "212900";
18	$app['sitedonate'] = "Blood Frontier is developed by volunteers, and you get it free of charge; your donations go toward ongoing costs which keep this project alive.";
19	$app['sitemainlogo'] = "/bits/logo_bf.png";
20	$app['sitecss'] = "/bits/style.css";
21	$app['siteico'] = "/bits/favicon.ico";
22	$app['sitemiddle'] = "/bits/middle.png";
23	$app['siterightname'] = "Built on Cube Engine 2";
24	$app['siterighturl'] = "http://www.cubeengine.com/";
25	$app['siterightlogo'] = "/bits/logo_c2.png";
26	$app['sitecopyright'] = array(
27		'bf' => 'Blood Frontier, Copyright (C) 2006-2009 Anthony Cord, Quinton Reeves, Lee Salzman',
28		'c2' => 'Cube Engine 2, Copyright (C) 2001-2009 Wouter van Oortmerssen, Lee Salzman, Mike Dysart, Robert Pointon, and Quinton Reeves'
29	);
30
31	$app['sfproject'] = "bloodfrontier";
32	$app['sfgroupid'] = 198419;
33	$app['sflogo'] = 11;
34	$app['sfpiwik'] = 1; // use SF's piwik with idsite=N
35
36	$app['ircnetwork'] = "irc.freenode.net";
37	$app['ircchannel'] = "bloodfrontier";
38	$app['ircsetup'] = "bloodfrontier";
39
40	$app['deftarg'] = "home";
41	$app['defsearch'] = "%22Blood%20Frontier%22";
42
43	$app['targets'] = array('home' => array('name' => '', 'url' => '/', 'alturl' => '', 'nav' => -1, 'redir' => 0));
44	$app['targets']['download'] = array('name' => 'Download', 'url' => 'http://sourceforge.net/project/platformdownload.php?group_id='.$app['sfgroupid'], 'alturl' => 'http://sourceforge.net/project/platformdownload.php?group_id='.$app['sfgroupid'].'&amp;sel_platform=', 'nav' => 1, 'redir' => 1);
45	$app['targets']['blog'] = array('name' => 'Blog', 'url' => 'http://sourceforge.net/apps/wordpress/'.$app['sfproject'].'/', 'alturl' => 'http://sourceforge.net/apps/wordpress/'.$app['sfproject'].'/', 'nav' => 1, 'redir' => 1);
46	$app['targets']['wiki'] = array('name' => 'Wiki', 'url' => 'http://sourceforge.net/apps/mediawiki/'.$app['sfproject'].'/', 'alturl' => 'http://sourceforge.net/apps/mediawiki/'.$app['sfproject'].'/index.php?title=', 'nav' => 1, 'redir' => 1);
47	$app['targets']['forums'] = array('name' => 'Forums', 'url' => 'http://sourceforge.net/apps/phpbb/'.$app['sfproject'].'/', 'alturl' => 'http://sourceforge.net/apps/phpbb/'.$app['sfproject'].'/viewforum.php?f=', 'nav' => 1, 'redir' => 1);
48	//$app['targets']['chat'] = array('name' => 'Chat', 'url' => 'http://webchat.mibbit.com/?server='.$app['ircnetwork'].'&amp;channel=%23'.$app['ircchannel'].'&amp;settings='.$app['ircsetup'].'&amp;forcePrompt=true', 'alturl' => '', 'nav' => 1, 'redir' => 1);
49	$app['targets']['chat'] = array('name' => 'Chat', 'url' => 'http://webchat.freenode.net/?channels='.$app['ircchannel'], 'alturl' => '', 'nav' => 1, 'redir' => 1);
50	$app['targets']['gallery'] = array('name' => 'Gallery', 'url' => 'http://sourceforge.net/apps/gallery/'.$app['sfproject'].'/', 'alturl' => 'http://sourceforge.net/apps/gallery/'.$app['sfproject'].'/index.php?g2_itemId=', 'nav' => 1, 'redir' => 1);
51	$app['targets']['project'] = array('name' => 'Project', 'url' => 'http://sourceforge.net/projects/'.$app['sfproject'].'/', 'alturl' => '', 'nav' => 1, 'redir' => 1);
52	$app['targets']['svn'] = array('name' => 'SVN', 'url' => 'http://'.$app['sfproject'].'.svn.sourceforge.net/'.$app['sfproject'].'/', 'alturl' => 'http://'.$app['sfproject'].'.svn.sourceforge.net/viewvc/'.$app['sfproject'].'/?view=rev&amp;rev=', 'nav' => 1, 'redir' => 1);
53	$app['targets']['repo'] = array('name' => 'Repository', 'url' => 'http://'.$app['sfproject'].'.svn.sourceforge.net/viewvc/'.$app['sfproject'], 'alturl' => 'http://'.$app['sfproject'].'.svn.sourceforge.net/viewvc/'.$app['sfproject'].'/', 'nav' => -1, 'redir' => 1);
54	$app['targets']['youtube'] = array('name' => 'on YouTube', 'url' => 'http://www.youtube.com/results?search_query='.$app['defsearch'], 'alturl' => 'http://www.youtube.com/results?search_query='.$app['defsearch'].'+', 'nav' => 0, 'redir' => 1);
55	$app['targets']['google'] = array('name' => 'on Google', 'url' => 'http://www.google.com/search?q='.$app['defsearch'], 'alturl' => 'http://www.google.com/search?q='.$app['defsearch'].'+', 'nav' => 0, 'redir' => 1);
56	$app['targets']['facebook'] = array('name' => 'on Facebook', 'url' => 'http://www.facebook.com/group.php?gid=86675052192&amp;ref=mf', 'nav' => 0, 'redir' => 1);
57	$app['targets']['blackboxbeta'] = array('name' => 'on BlackBoxBETA', 'url' => 'http://www.blackboxbeta.net/blood-frontier-oss', 'nav' => 0, 'redir' => 1);
58	$app['targets']['playdeb'] = array('name' => 'on PlayDeb', 'url' => 'http://www.playdeb.net/updates/Blood%20Frontier', 'nav' => 0, 'redir' => 1);
59
60	function checkarg($arg = "", $def = "") {
61		return isset($_GET[$arg]) && $_GET[$arg] != "" ? $_GET[$arg] : $def;
62	}
63
64	$app['target'] = checkarg("target", $app['deftarg']);
65	if (!isset($app['targets'][$app['target']])) $app['target'] = $app['deftarg'];
66
67	$title = checkarg("title");
68	if ($app['targets'][$app['target']]['redir']) {
69		$app['url'] = $title != "" ? (
70				$app['targets'][$app['target']]['alturl'] != "" ? $app['targets'][$app['target']]['alturl'].$title : $app['targets'][$app['target']]['url'].$title
71		) : $app['targets'][$app['target']]['url'];
72		header("Location: ".$app['url']);
73		exit;
74	}
75	else {
76		$app['url'] = $title != "" ? (
77				$app['targets'][$app['target']]['alturl'] != "" ? $app['targets'][$app['target']]['alturl'].$title : $app['targets'][$app['target']]['url'].$title
78		) : $app['targets'][$app['target']]['url'];
79		$app['navbar'] = ''; // cache the navbar
80		foreach ($app['targets'] as $key => $targ) {
81			if ($key != "" && $targ['name'] != "" && $targ['nav'] == 1) {
82				$app['navbar'] .= '<a href="/'.$key.'">'. $targ['name'] .'</a> ';
83			}
84		}
85?>
86<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
87<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
88	<head>
89		<title><?php echo $app['sitename'].($app['targets'][$app['target']]['name'] != "" ? ": ".$app['targets'][$app['target']]['name'] : ", ".$app['siteblurb']); ?></title>
90		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
91		<link rel="shortcut icon" href="<?php echo $app['siteico']; ?>" />
92		<link rel="stylesheet" type="text/css" href="<?php echo $app['sitecss']; ?>" />
93<?php if ($app['sfpiwik'] > 0) { ?>
94		<script type="text/javascript"><!--
95			var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/<?php echo $app['sfproject']; ?>/" : "http://sourceforge.net/apps/piwik/<?php echo $app['sfproject']; ?>/");
96			document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
97		--></script>
98		<script type="text/javascript"><!--
99			piwik_action_name = '<?php echo $app['target']; ?>';
100			piwik_idsite = 1;
101			piwik_url = pkBaseURL + "piwik.php";
102			piwik_log(piwik_action_name, piwik_idsite, piwik_url);
103		--></script>
104		<object><noscript><p><img src="http://sourceforge.net/apps/piwik/<?php echo $app['sfproject']; ?>/piwik.php?idsite=<?php echo $app['sfpiwik']; ?>" alt="piwik"/></p></noscript></object>
105<?php } ?>
106	</head>
107	<body>
108		<div id="container">
109			<div id="header">
110				<a href="/home"><img src="<?php echo $app['sitemainlogo']; ?>" alt="<?php echo $app['sitename']; ?>" title="<?php echo $app['sitename']; ?>" width="304" height="143" border="0" /></a>
111				<img src="<?php echo $app['sitemiddle']; ?>" alt="<?php echo $app['siteblurb']; ?>" title="<?php echo $app['siteblurb']; ?>" width="323" height="143" border="0" />
112				<a href="<?php echo $app['siterighturl']; ?>"><img src="<?php echo $app['siterightlogo']; ?>" alt="<?php echo $app['siterightname']; ?>" title="<?php echo $app['siterightname']; ?>" width="193" height="143" border="0" /></a>
113			</div>
114			<div id="page">
115				<div id="links"><?php echo $app['navbar']; ?></div>
116				<div id="noticebg">
117					<div id="list">
118						<ul>
119<?php						foreach ($app['targets'] as $key => $targ) {
120								if ($key != "" && $targ['name'] != "" && $targ['nav'] == 0) {
121									echo "<li><a href=\"/". $key ."\">" . $targ['name'] ."</a></li>";
122								}
123							} ?>
124						</ul>
125						<div id="listdonate">
126							<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
127								<input type="hidden" name="cmd" value="_s-xclick" />
128								<input type="hidden" name="hosted_button_id" value="<?php echo $app['sitepaypal']; ?>" />
129								<input type="image" src="https://www.paypal.com/en_AU/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="<?php echo $app['sitedonate']; ?>" />
130								<img alt="<?php echo $app['sitedonate']; ?>" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1" />
131							</form>
132							<p id="donatemsg"><i><?php echo $app['sitedonate']; ?></i></p>
133						</div>
134					</div>
135					<img src="/bits/block_up.png" alt="" width="549" height="20" border="0" id="blockborder" />
136					<div id="redblock" align="center">
137						<p id="version">Current Version: <b><a href="/download"><?php echo $app['siterelver']; ?></a></b> released <i><?php echo $app['sitereldate']; ?></i></p>
138						<hr />
139<?php					foreach ($app['sitenotice'] as $key => $targ) {
140							echo "<p id=\"notice\">" . $targ . "</p>";
141						} ?>
142					</div>
143					<img src="/bits/block_down.png" alt="" width="549" height="20" border="0" id="blockborder" />
144				</div>
145				<div id="video">
146					<div id="subtext" align="center">
147						<h2><?php echo $app['sitename']; ?></h2>
148						<h3><i><?php echo $app['siteblurb']; ?></i></h3>
149						<p><?php echo $app['siteinfo']; ?></p>
150					</div>
151					<div id="player">
152						<object width="500" height="308" type="application/x-shockwave-flash" data="<?php echo $app['sitevideo']; ?>">
153							<param name="movie" value="<?php echo $app['sitevideo']; ?>" />
154							<param name="allowscriptaccess" value="always" />
155							<param name="allowFullScreen" value="true" />
156						</object>
157					</div>
158					<div id="vidlow" align="center">
159<?php					foreach ($app['sitevidlo'] as $key => $targ) {
160							echo "<p>" . $targ . "</p>";
161						} ?>
162					</div>
163				</div>
164			</div>
165			<div id="footer">
166<?php			if ($app['sflogo'] > 0) { ?>
167					<div id="sflogo">
168						<a href="/project">
169							<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=<?php echo $app['sfgroupid']; ?>&amp;type=<?php echo $app['sflogo']; ?>" alt="Get <?php echo $app['sitename']; ?> at SourceForge" title="Get <?php echo $app['sitename']; ?> at SourceForge" width="120" height="30" border="0" id="sflogo"/>
170						</a>
171					</div>
172<?php			} ?>
173				<a href="/download">Download</a>, <a href="/wiki">Learn More</a>, or <a href="/chat">Get Help</a> today.
174			</div>
175			<div id="copyright" align="center">
176<?php				foreach ($app['sitecopyright'] as $key => $targ) {
177					echo "<p>" . $targ . "</p>";
178				} ?>
179			</div>
180		</div>
181	</body>
182</html>
183<?php } ?>
184