require("include/top.php"); ?>
$query="SELECT * FROM ojnews ORDER BY quand DESC";
$result=mysql_query($query);
while($tmp=mysql_fetch_assoc($result)) {
$tmp["newstype"]="ojnews";
$ojnews[]=$tmp;
}
$query="SELECT * FROM news ORDER BY quand DESC";
$result=mysql_query($query);
while($tmp=mysql_fetch_assoc($result)) {
$tmp["newstype"]="pouetnews";
$mynews[]=$tmp;
}
$oj=0;
$po=0;
for($i=0;$i<(count($ojnews)+count($mynews));$i++) {
if($ojnews[$oj]["quand"]>$mynews[$po]["quand"]) {
$ojnews[$oj]["content"]=stripslashes(urldecode($ojnews[$oj]["content"]));
$ojnews[$oj]["title"]=stripslashes(urldecode($ojnews[$oj]["title"]));
$ojnews[$oj]["authornick"]=stripslashes(urldecode($ojnews[$oj]["authornick"]));
$ojnews[$oj]["authorgroup"]=stripslashes(urldecode($ojnews[$oj]["authorgroup"]));
$news[]=$ojnews[$oj];
$oj++;
} else {
$news[]=$mynews[$po];
$po++;
}
}
$query="SELECT id,nickname,avatar FROM users";
$result=mysql_query($query,$db);
while($tmp=mysql_fetch_array($result)) {
$users[$tmp["id"]]["nickname"]=$tmp["nickname"];
$users[$tmp["id"]]["avatar"]=$tmp["avatar"];
}
?>
for($i=0;$i
endfor; ?> |