Hash :
94046104
Author :
Thomas de Grivel
Date :
2020-02-24T15:19:27
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
<?PHP
if ($_REQUEST['previous'] == 1) {
echo '<div align="left">'."\n";
echo '<font size="5">Archives</font>'."\n";
echo '</div>'."\n";
echo '<div align="right">'."\n";
echo '<font size="2">'."\n";
echo 'Back to <a href="'.$PHP_SELF.'?p='.$_GET['p'].'">news</a>'."\n";
echo '</font>'."\n";
echo '</div>'."\n";
echo '<br>'."\n";
require ((dirname ($_SERVER['PATH_TRANSLATED'])).'/pages/oldnews.inc.php');
}
else {
mysql_connect ('mysql4-p', 'p133991ro', '99#o)u[') ||
die ('Could not connect: ' . mysql_error ());
mysql_select_db ('p133991_pw13') ||
die ('Could not select database');
/* read news */
$rows = "id,UNIX_TIMESTAMP(date),title,text,author";
$result = mysql_query("SELECT $rows FROM news ORDER BY id DESC LIMIT 10");
if (!$result)
die ('Query failed: ' . mysql_error ());
while ($L = mysql_fetch_array ($result)) {
echo '<H3>'.date("l jS, F Y", $L[1]).' '."\n";
echo $L[2].'</H3>'."\n";
echo nl2br ($L[3]).'<br>'."\n";
echo '<div align="right">'."\n";
echo '<font size="-1">'.$L[4].'</font><br>'."\n";
echo '</div>'."\n";
echo '<br><br>'."\n";
}
echo '<div align="left">'."\n";
echo '<font size="2">'."\n";
echo 'Previous news :'."\n";
echo '<a href="'.$_SERVER['REQUEST_URI'].'&previous=1">1</a>'."\n";
echo '</font>'."\n";
echo '</div>'."\n";
}
?>