require("include/top.php");
$linebypage=25;
$query="SELECT count(*) FROM oneliner";
$result=mysql_query($query);
$nbmsg=mysql_result($result,0);
$allpages = (int)ceil($nbmsg/(float)$linebypage);
if(!$page)
$page=$allpages;
debuglog($nbmsg."/".$linebypage."=".($nbmsg/(float)$linebypage));
$query="SELECT oneliner.who,oneliner.message,users.avatar,users.nickname FROM oneliner LEFT JOIN users ON oneliner.who=users.id ORDER BY oneliner.quand ASC LIMIT ".(($page-1)*$linebypage).",".$linebypage;
debuglog($query);
$result=mysql_query($query);
while($tmp=mysql_fetch_array($result)) {
$onelines[]=$tmp;
}
?>
| |
the so complete pouët.net oneliner
|
|
for($i=0;$i
">
if($i%2) {
print("");
} else {
print(" | ");
}
?>
|
endfor; ?>
|
|
require("include/bottom.php"); ?>