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 106 107
|
<?php
$newsId= ( isset($_GET["id"])) ? $_GET['id'] : FALSE;
if ( is_numeric($newsId)) {
$sql = 'SELECT * FROM news WHERE newsId = ' . $newsId;
$rc = mysql_query($sql);
if ( $data = mysql_fetch_assoc($rc) ) {
$titre=cleanText($data['titre']);
}else
{
$titre='News en détails';
}
}else
{
$titre='News en détails';
}
$description='Les dernières news sur l\'actualité de Blind Guardian';
include('../includes/header.inc.php');
echo' <div class="news-left">
<h1>News :</h1>';
echo "\n ";
function cleanText($intext) {
return utf8_encode($intext);
}
$db_link = @mysql_connect($host,$login,$pass);
mysql_select_db($base);
$newsId= ( isset($_GET["id"])) ? $_GET['id'] : FALSE;
if ( is_numeric($newsId)) {
$sql = 'SELECT * FROM news WHERE newsId = ' . $newsId;
$rc = mysql_query($sql);
if ( $data = mysql_fetch_assoc($rc) ) {
$data['news'] = str_replace("\n"," <br />", $data['news']);
echo "<h2>";
echo date ( 'd/m/Y' , $data['time'] );
echo " - ";
echo ( cleanText($data['titre']) );
echo "</h2>";
echo "\n ";
print ''.cleanText($data['news']).'';
echo "\n ";
if (strlen($data['url_forum']) > 0) {
print '<div class="forum-news">(<a href="'.$data['url_forum'].'" title="'.cleanText($data['titre']).'">On en parle sur le forum</a>)</div>';
}
echo "<br />\n <br />\n <br />";
echo "\n ";
}
else {
$sql = 'SELECT * FROM news ORDER BY newsId DESC LIMIT 0,1';
$rc = mysql_query($sql);
$data = mysql_fetch_assoc($rc);
$data['news'] = str_replace("\n"," <br />", $data['news']);
echo "<h2>";
echo date ( 'd/m/Y' , $data['time'] );
echo " - ";
echo ( cleanText($data['titre']) );
echo "</h2>";
echo "\n ";
print ''.cleanText($data['news']).'';
echo "\n ";
if (strlen($data['url_forum']) > 0) {
print '<div class="forum-news">(<a href="'.$data['url_forum'].'" title="'.cleanText($data['titre']).'">On en parle sur le forum</a>)</div>';
}
echo "<br />\n <br />\n <br />";
echo "\n ";
}
}
else {
$sql = 'SELECT * FROM news ORDER BY newsId DESC LIMIT 0,1';
$rc = mysql_query($sql);
$data = mysql_fetch_assoc($rc);
$data['news'] = str_replace("\n"," <br />", $data['news']);
echo "<h2>";
echo date ( 'd/m/Y' , $data['time'] );
echo " - ";
echo ( cleanText($data['titre']) );
echo "</h2>";
echo "\n ";
print ''.cleanText($data['news']).'';
echo "\n ";
if (strlen($data['url_forum']) > 0) {
print '<div class="forum-news">(<a href="'.$data['url_forum'].'" title="'.cleanText($data['titre']).'">On en parle sur le forum</a>)</div>';
}
echo "<br />\n <br />\n <br />";
echo "\n ";
}
mysql_close();
echo'<div class="archives-news">- <a href="/html/archives-news-page1.php" title="Archives Des News">Archives Des News</a> -</div>';
echo'</div>
<div class="news-right">';
echo "\n";
include('../includes/news-right.inc.php');
echo'</div>';
echo "\n";
include('../includes/footer.inc.php');
?> |
Partager