Old stuff/old_sites/epik/menu.php
(Deskargatu)
<?
if ($axx)
{
$query = "SELECT article_id,breves_id,download_id,liens_id FROM membres WHERE pseudo='$nick'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) {
$nick_article = $row[0];
$nick_breves = $row[1];
$nick_download = $row[2];
$nick_liens = $row[3];
}
}
?>
<div class="menu">
<div>
<p>IRC</p>
<ul>
<li><a title="Accueil du site" href="/site/accueil">Accueil</a></li>
<li><a title="presentation de la team" href="/site/team">La team</a></li>
<li><a title="règles a respecter sur irc" href="/site/regles">Règles</a></li>
<li><a title="Lien pour chatter" href="/site/chat">Chat</a></li>
</ul>
</div>
<div>
<p>Aide informatique</p>
<ul>
<li><a title="Actualite diveses" href="/site/breves">Brèves</a>
<?
if ($axx and $chemin[1] != "breves") {
$query = "SELECT MAX(id) FROM breves";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) { $breves_id = $row[0]; }
if ($breves_id > $nick_breves) { echo "<span class=\"new\">(N)</span>"; }
}
if ($chemin[1] == "breves")
{
echo "<ul>";
$sdate = mktime(0, 0, 0, date("n"), date("j") -1 , date("Y"));
$query = "SELECT COUNT(*) FROM breves WHERE 1 AND datetime LIKE '".date(Y,$sdate)."-".date(m,$sdate)."-".date(d,$sdate)." %:%:%'";
$result = mysql_query($query) or die(mysql_error());
$compteur = mysql_fetch_array($result);
echo "<li><a title=\"Actualite diveses de hier\" href=\"/site/breves/hier\">Hier (".$compteur[0].")</a></li>";
?>
<?
$query = "SELECT COUNT(*) FROM breves WHERE 1 AND datetime LIKE '".date(Y)."-".date(m)."-".date(d)." %:%:%'";
$result = mysql_query($query) or die(mysql_error());
$compteur = mysql_fetch_array($result);
echo "<li><a title=\"Actualite diveses d'aujourd'hui\" href=\"/site/breves/aujourdhui\">Aujourd'hui (".$compteur[0].")</a></li>";
?>
<?
$query = "SELECT COUNT(*) FROM breves WHERE 1 AND datetime LIKE '".date(Y)."-".date(m)."-% %:%:%'";
$result = mysql_query($query) or die(mysql_error());
$compteur = mysql_fetch_array($result);
echo "<li><a title=\"Actualite diveses de ce mois\" href=\"/site/breves/mois\">ce Mois (".$compteur[0].")</a></li>";
echo "</ul>";
}
?>
</li>
<? if ($axx) {
$query = "SELECT COUNT(id) FROM prop_breves";
$result = mysql_query($query) or die(mysql_error());
$rowa = mysql_fetch_array($result);
$query = "SELECT COUNT(id) FROM prop_lien";
$result = mysql_query($query) or die(mysql_error());
$rowb = mysql_fetch_array($result);
$query = "SELECT COUNT(id) FROM prop_article";
$result = mysql_query($query) or die(mysql_error());
$rowc = mysql_fetch_array($result);
echo " <li><a title=\"Actualite diveses\" href=\"/site/proposition\">Propositions</a> (".($rowa[0]+$rowb[0]+$rowc[0]).")</li> "; } ?>
<li><a title="Articles redigees" href="/site/article">Articles</a>
<?
if ($axx and $chemin[1] != "article")
{
$query = "SELECT MAX(id) FROM article";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) { $article_id = $row[0]; }
if ($article_id > $nick_article) { echo "<span class=\"new\">(N)</span>"; }
}
if ($chemin[1] == "article") {
echo "<ul>\n";
$query = "SELECT DISTINCT(arttyp) from article ORDER BY arttyp ASC";
$result = mysql_query($query) or die(mysql_error());;
while($row = mysql_fetch_assoc($result))
{
echo "<li><a href=\"/site/article/".sans_accents($row["arttyp"])."\" title=\"Breves section ".$row["arttyp"]."\">".$row["arttyp"]."</a></li>\n";
}
echo "</ul>\n";
}
?>
</li>
<li><a title="Fichiers proposes" href="/site/telechargement">Telechargement</a>
<?
if ($axx and $chemin[1] != "download")
{
$query = "SELECT MAX(id) FROM download";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) { $download_id = $row[0]; }
if ($download_id > $nick_download) { echo "<span class=\"new\">(N)</span>"; }
}
?>
</li>
<li><a title="Lien sur tout et n' importe quoi" href="/site/liens">Liens</a>
<?
if ($axx and $chemin[1] != "lien")
{
$query = "SELECT MAX(id) FROM lien";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) { $liens_id = $row[0]; }
if ($liens_id > $nick_liens) { echo "<span class=\"new\">(N)</span>"; }
}
?>
</li>
<li><a title="forum" href="/site/forum">Forum</a></li>
</ul>
</div>
<div>
<p>Outils</p>
<ul>
<li><a title="Changer de style" href="/site/css">Thèmes</a></li>
<li><a title="Recherche sur le site" href="/site/recherche">Recherche</a></li>
<li><a href="/site/rss" title="Utilisation">Utilisation du RSS</a></li>
<li><a href="/rss/breves" title="backend news">RSS Brèves</a></li>
<li><a href="/rss/article" title="backend articles">RSS Articles</a></li>
<li><a href="/rss/edito" title="backend editos">rss Édito</a></li>
</ul>
</div>
<div class="login">
<?
if (!empty($identified)) { echo "<p>$identified</p>"; }
if(isset($axx))
{
?>
<p>Section Membres</p>
<ul>
<li><a href="/site/anonymous">Se déconnecter</a></li>
<li><a href="/site/acc/">Mon compte</a></li>
</ul>
<? if ($axx > 6) { ?>
</div>
<div>
<p>Administration</p>
<ul>
<li><a href="/site/admin">Ajouter des éléments</a></li>
<li><a href="/site/team/modif">Modif Team</a></li>
<li><a href="/site/membres/modif">Modif Comptes</a></li>
<li><a href="/site/conf">Configuration</a></li>
</ul>
<? } ?>
<?
}
else {
echo "
<p><a href=\"#\" title=\"Log in\">Login</a></p>";
echo "
<form action=\"/site/accueil\" method=\"post\">
<ul>
<li><a href=\"/site/acc/new\" title=\"Pas encore membre? c'est pas ici!\">S'inscrire</a></li>
<li><a href=\"/site/acc/oublie\" title=\"Oublie le mot de passe?\">Mdp perdu?</a></li>
<li><input type=\"text\" name=\"nick\" value=\"Pseudo\" onfocus=\"if (this.value == this.defaultValue) { this.value=''; }\"/></li>
<li><input type=\"password\" name=\"password\" value=\"pass\" onfocus=\"if (this.value == this.defaultValue) { this.value=''; }\"/></li>
<li><input class=\"button\" type=\"submit\" value=\"Login\" /></li>
</ul>
</form>
";
}
?>
</div>
</div>