没有装在线时间的朋友 把下面的代码存成 poststar.php 代替原来的看看 呵呵!
- <?
- $month=date(n);
- $date=date(j);
- $year=date(Y);
- $time=mktime(0,0,0,$month,$date,$year);
- $query=$db->query("select count(pid) as num,authorid,author from $table_posts where dateline>=$time group by authorid order by num desc limit 10");
- while($result=$db->fetch_array($query)){
- $poststar.="<a href=viewpro.php?uid=".$result[authorid].">".$result[author]."</a>[".$result[num]."] ";
- }
- $star_info_sql="m.uid,m.credit,m.money,m.bank,m.avatar,m.postnum,m.groupid,m.avatarwidth,m.avatarheight";
- $query=$db->query("select count(p.pid) as num,p.author,p.authorid,$star_info_sql from $table_posts p left join $table_members m on p.authorid=m.uid where p.dateline>$time and m.gender=1 group by p.authorid order by num desc limit 1");
- while($star=$db->fetch_array($query)){
- $mname=$star[author];
- $mcredit=$star[credit];
- $mmoney=$star[money];
- $mbank=$star[bank];
- $mpostnum=$star[postnum];
- $mtodaynum=$star[num];
- $mavatar=$star[avatar];
- $mavatarwidth=$star[avatarwidth];
- $mavatarheight=$star[avatarheight];
- if($star[groupid]<=3)
- $mgroup=$_DCACHE['usergroups'][$star['groupid']]['grouptitle'];
- else {
- foreach($_DCACHE['ranks'] as $ranks) {
- if($mpostnum>=$ranks['posthigher'])
- $mgroup=$ranks['ranktitle'];
- }
- }
- }
- $query=$db->query("select count(p.pid) as num,p.author,p.authorid,$star_info_sql from $table_posts p left join $table_members m on p.authorid=m.uid where p.dateline>$time and m.gender=2 group by p.authorid order by num desc limit 1");
- while($star=$db->fetch_array($query)){
- $fname=$star[author];
- $fcredit=$star[credit];
- $fmoney=$star[money];
- $fbank=$star[bank];
- $fpostnum=$star[postnum];
- $ftodaynum=$star[num];
- $fonlinetime=$star[onlinetime];
- $favatar=$star[avatar];
- $favatarwidth=$star[avatarwidth];
- $favatarheight=$star[avatarheight];
- if($star[groupid]<=3)
- $fgroup=$_DCACHE['usergroups'][$star['groupid']]['grouptitle'];
- else {
- foreach($_DCACHE['ranks'] as $ranks) {
- if($mpostnum>=$ranks['posthigher'])
- $fgroup=$ranks['ranktitle'];
- }
- }
- }
- ?>
复制代码
[ Last edited by 长发和尚 on 2005-5-4 at 09:51 ] |