aSiDe | voila le newsmodif.php en entier
Code :
- <?php require_once('../admin/connexion.php'); ?>
- <?php
- session_start(); // On relaye la session
- if (session_is_registered("authentification" )){ // vérification sur la session authentification (la session est elle enregistrée ?)
- // ici les éventuelles actions en cas de réussite de la connexion
- }
- else {
- header("Location:../admin/index.php?erreur=intru" ); // redirection en cas d'echec
- }
- ?>
- <? include ("../news/connexion.php" )?>
- <?
- $nb = 30;
- $c = @mysql_connect($host,$user,$pass) or die("connection impossible" );
- @mysql_select_db("$bdd",$c) or die("selection impossible" );
- if(empty($page)) $page = 1;
- if(empty($total)){
- $sql = "select count(*) as qte from news";
- $p = @mysql_query($sql,$c);
- $total = @mysql_result($p,"0","qte" );
- }
- $debut = ($page - 1) * $nb;
- $sql = "select * from news order by id DESC LIMIT $debut,$nb";
- if($p = @mysql_query($sql,$c)){
- echo "alo?";
- while($r = @mysql_fetch_array($p)){
- $id = "$r[id]";
- $login = "$r[login]";
- $titre = "$r[titre]";
- $date = "$r[date]";
- $txt = "$r[txt]";
- $txt=nl2br($txt);
- echo "test";
- echo "<table width=\"450\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
- echo "<tr>\n";
- echo "<td>$titre</td>\n";
- echo "<td width=\"175\">$date</td>\n";
- echo "<td width=\"50\"><a href=\"administration.php?dir=news&page=modif&id=$id\">Modifier</td>\n";
- echo "<td width=\"50\"><a href=\"administration.php?dir=news&page=supp&id=$id&supp=1\">Supprimer</td>\n";
- echo "</tr>\n";
- echo "</table>\n";
- }
- echo "<br>";
- }
- ?>
- <?php
- @mysql_close($c);
- ?>
|
|