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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
| <?
require ("news_config.inc.php");
$niveau=1;
require ("../" . INCLUDEDIR . "/protection.inc.php");
require ("../" . INCLUDEDIR . "/format.inc.php");
require ("../" . INCLUDEDIR . "/date.inc.php");
?>
<html>
<head>
<title><? echo $lang[0]; ?></title>
</head>
<body onContextMenu="return false">
<form name="form" method="post" action="">
<link href="../style.css" rel="stylesheet" type="text/css">
<link href="../style_inputtext.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../fonctions.js"></script>
<script language="JavaScript" src="fonctions.js"></script>
<script language="JavaScript">
<!--
if (top.location.href == self.location.href) window.location.href = 'frames.php';
//-->
</script>
<h3 align=center><? echo $lang[0]; ?></h3>
<p align=center class=10><a href="news_form.php?act=0" OnClick="news_form=open_news_form('');" target="news_form"><? echo $lang[11]; ?></a> - <a href="index_inscrits.php"><? echo $lang[18]; ?></a></p>
<?
if ($_GET['act']==2 && isset($_GET[nid]))
{
$sql="DELETE FROM $tables[news] WHERE new_id='$_GET[nid]'";
$result=mysql_query($sql);
$sql="DELETE FROM $tables[news_photos] WHERE new_id='$_GET[nid]'";
$result=mysql_query($sql);
}
if (isset($_GET['s']) && $_GET['s']==0) { $sens="DESC"; $s=1; }
else { $sens="ASC"; $s=0; }
include("../includes/navigation_mois.inc.php");
?>
<table border="0" align="center" cellpadding="0" cellspacing="0" class=TABLEBORDER width="70%">
<tr>
<td><? // bordure ?><table width="100%" border=0 cellspacing=1 cellpadding=3 align=center>
<tr>
<th width=100%><a href="?a=<? echo $_GET['a']; ?>&m=<? echo $m; ?>&o=0&s=<? echo $_GET['s']; ?>"><? echo $lang[13]; ?></a></th>
<th><a href="?a=<? echo $_GET['a']; ?>&m=<? echo $m; ?>&o=1&s=<? echo $_GET['s']; ?>"><? echo $lang[16]; ?></a></th>
<th><a href="?a=<? echo $_GET['a']; ?>&m=<? echo $m; ?>&o=2&s=<? echo $_GET['s']; ?>"><? echo $lang[14]; ?></a></th>
<th width=15><img src="../images/editer.gif" alt="<? echo $bt_lang[1] ?>"></th>
<th width=15><img src="../images/supprimer.gif" alt="<? echo $bt_lang[2] ?>"></th></tr>
</tr>
<?
$order[]="titre";
$order[]="nick";
$order[]="date";
if ($order[$_GET['o']]=="") $o=2;
else $o=$_GET['o'];
$sql="SELECT t1.*, nick FROM $tables[news] as t1, $tables[users] as t2
WHERE t1.user_id=t2.user_id
AND year(date)=".$a."
AND month(date)=".$m."
ORDER BY " . $order[$o] . " $sens";
$result=mysql_query($sql);
for ($i=0;$result && $row=mysql_fetch_array($result);$i++)
{
$date=mysql2date($row['date']);
/* if ($row[texte]!="") $texte="<img src=\"". WWWROOT . "/" . IMAGESDIR ."/notes.gif\" alt=\"".addslashes(remove_tags($row[texte]))."\" align=absmiddle>";
else $texte="";
*/
if ($i & 1) $style=1; else $style=2;
echo "<tr class=TABLEDATA$style onmouseover=\"this.className='TABLEDATAO'\"
onmouseout=\"this.className='TABLEDATA$style'\">
<td nowrap>".remove_tags($row['titre'])." $texte</td>
<td>$row[nick]</td>
<td align=center nowrap>$date - $row[heure]</td>
<td align=center>
<a href=\"news_form.php?act=1&nid=$row[new_id]\" OnClick=\"news_form=open_news_form('');\" target=\"news_form\">
<img src=\"../images/editer.gif\" border=0 alt=\"$bt_lang[1]\">
</a>
</td>
<td align=center>";
echo "<a href=\"?act=2&nid=$row[new_id]\" OnClick=\"if (confirm('$msg_lang[3]')) return true; else return false;\">";
echo "<img src=\"../images/supprimer.gif\" border=0 alt=\"$bt_lang[2]\">";
echo "</a>";
echo "</td></tr>\n";
}
?>
</table><? // bordure ?></td>
</tr>
</table>
<p align=center class=10><a href="news_form.php?act=0" OnClick="news_form=open_news_form('');" target="news_form"><? echo $lang[11]; ?></a> - <a href="index_inscrits.php"><? echo $lang[18]; ?></a></p>
</form>
</body>
</html> |
Partager