Daijoubuv2/index.php

67 lines
2.1 KiB
PHP

<?php
require_once('libs/lib.php'); //global used fonctions
@include('config.php'); //configuration file generated by install.php
if(!defined('CONFIG')) exit(setup());
clean_token(); //Destroy tokens for more security
clean_add_token();
ob_start();
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="design/default.css" media="screen,projection" />
<link rel="alternate" type="application/rss+xml" title="<?php echo $config['team']; ?> Releases RSS Feed" href="rss.xml" />
<link rel="shortcut icon" href="design/favicon.ico" />
<title><?php echo $config['team']; ?> Release Portal</title>
</head>
<body>
<div id="contentwrapper">
<div id="banner">
<?php
$bannersListe = directoryToArray('design/banners'); //Récupère la liste des bannières
$rand = mt_rand( 0 , count($bannersListe)-1 ); //Choisir une bannière au hasard
echo '<img src="', $bannersListe[$rand], '" alt="banniere" />';
unset($bannersListe, $rand);
?></div>
<div id="menu">
<ul>
<li><a href="index.php?crk=releases&spg=1">[ Latest Releases ]</a></li>
<li><a href="index.php?crk=search">[ Search Releases ]</a></li>
<li><a href="index.php?crk=about">[ About <?php echo $config['accro'] ?> ]</a></li>
<li><a href="rss.xml">[ RSS ]</a></li>
<li><a href="acp.php">[ Admin ]</a></li>
</ul>
</div>
<div id="maincontent"><?php
if(!empty($_GET['crk']))
{
$file = CleanVar($_GET['crk']);
if( file_exists ( 'portail/' . $file . '.php' ) )
require_once( 'portail/' . $file . '.php' );
else
include_once( 'bugslogger.php' );
}
else
require_once('portail/releases.php');
?></div>
<div id="footer">
<p><?php echo $config['team']; ?> &#1071;elease Portal v0.2.7</p>
<p>&copy; <?php echo date('Y'), ' ', $config['team']; ?></p>
</div>
</div>
</body>
</html>
<?php
ob_end_flush();