Old stuff/old_sites/epik/site.php
(Deskargatu)
<?
include("func.php"); // fonctions
$startime = getmicrotime();
if (!empty($_SERVER['PATH_INFO']))
{
$chemin = explode('/',($_SERVER['PATH_INFO']));
}
else
{
$chemin[1]="accueil";
}
if (!empty($chemin[1]))
{
$page = $chemin[1];
}
else
{
$page = "accueil";
}
include("include/config.inc.php");
include("include/connect.php");
include("include/auth.php");
if ($page == "anonymous") { $page = "accueil"; }
if ($chemin[1] == "css" && !empty($chemin[2]))
{
$css_file = preg_replace("/[^a-zA-Z0-9.]/","",$chemin[2]).".css";
if (!file_exists(dirname(__FILE__)."/css/$css_file"))
{
$css_file = "new.css";
}
setcookie('css',$css_file,(time()+60*60*24*365),'/');
}
elseif (!empty($_COOKIE['css'])) { $css_file = $_COOKIE['css']; }
else { $css_file="new.css";}
?>
<!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" lang="eu-fr" xml:lang="eu-fr">
<head>
<?
echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/css/$css_file\" />";
$dh = opendir(dirname(__FILE__)."/css");
while(($file = readdir($dh)) !== FALSE)
{
if (ereg("([a-zA-Z]+)\.css",$file,$regs)){
echo "<link rel=\"alternate stylesheet\" title=\"$regs[1]\" type=\"text/css\" href=\"/css/$regs[1]\" media=\"screen\" />\n";
}
}
?>
<title>Site officiel du canal #informatique @ EpiKnet - page
<? $full_url = preg_replace("/-/"," ",implode(" ",$chemin)); echo $full_url; ?>
</title>
<base href="http://informatique.epiknet.org/" />
<meta name="keywords" content="<?=$full_url?> informatique epiknet epik team chat telechargement article edito news membres" />
<meta name="copyright" content="libre" />
<link rel="alternate" type="application/rss+xml" title="Breves informatique" href="http://informatique.epiknet.org/rss/breves" />
<link rel="alternate" type="application/rss+xml" title="Articles informatique" href="http://informatique.epiknet.org/rss/articles" />
<link rel="alternate" type="application/rss+xml" title="Editos informatique" href="http://informatique.epiknet.org/rss/edito" />
</head>
<body>
<div class="page">
<?
$ip = getenv('REMOTE_ADDR');
include("header.php"); // entete
include("menu.php"); //menu
echo "<div class=\"contenu\">\n";
if (file_exists(dirname(__FILE__)."/include/".$page.".php"))
{
include(dirname(__FILE__)."/include/".$page.".php");
}
else { include("include/404.php"); $page = "404";}
print "</div>\n\n"; // fin de l element contenu
include("footer.php"); // pied de page
?>
</div>
</body>
</html>