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
|
<body>
<div id="articles_mainframe">
<table>
<?php
$query = "select * from article";
$res = $sql->query($query);
while($champs = $sql->result($res)){
echo "<tr><td><div class=\"articles\">".$champs['ART_TITLE']."</div></td></tr>";
}
?>
</table>
</div>
<div id="header">
<form action="auth.script.php" method="POST">
<table summary="table login" id="table_login">
<?php
if(!isset($_SESSION['gu_user'])){
echo "<tr>
<td>Login : </td>
<td><input type=\"text\" id=\"txt_username\" name=\"txt_username\" /S></td>
<td>Mot de passe : </td>
<td><input type=\"password\" id=\"txt_password\" name=\"txt_password\" /></td>
<td><input type=\"submit\" value=\"Go\" /></td>
</tr>";
} elseif(isset($_SESSION['gu_user'])){
echo "<div style=\"position:absolute; top:5px; left:670px; color:white; text-align:right; width:300px;\">
Bienvenue ".$_SESSION['gu_user']->getNick()."
<a href=\"scripts/php/logout.script.php\">
<img src=\"images/l_logout.gif\" alt=\"logout\" border=\"no\" /></a></div>";
}
?>
</table>
</form>
<img src="images/loader.gif" id="load_pic" alt="chargement..." />
</div>
<div id="categories_panel">
<table><tr>
<td><span style="margin-top:10px;">Catégories :</span></td>
<?php
$query = "select CATEGORY_NAME from category";
$res = $sql->query($query);
while($champs = $sql->result($res)){
echo "<td><a href=\"#\">
<div class=\"categories\" onmouseover=\"this.style.backgroundColor='#FF9900';\" onmouseout=\"this.style.backgroundColor='#969696'\">
<span style=\"text-decoration:none\">".$champs['CATEGORY_NAME']."</span></div>
</a></td>";
}
?>
</tr>
</table>
</div>
</body> |
Partager