Discuz教程网

[插件] PHPWind 首页九格支持6月13日PW6.3正式版版本

[复制链接]
authicon 09927306 发表于 2011-1-6 12:24:37 | 显示全部楼层 |阅读模式
修改方法:
查找index.htm
  1. <!--<?php print <<<EOT
  2. -->
复制代码
修改为:
  1. <!--<?php
  2. //首页调用开始
  3. //默认只显示开放板块,不显示正规、隐藏、投票、认证板块

  4. //幻灯图开始
  5. $cachepics=R_P."data/bbscache/index_toppics.php";//幻灯图片缓存文件
  6. $cachepicstime=60;//幻灯图片缓存自动更新时间,单位秒
  7. //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
  8. $showforum="(pf.f_type = \'forum\' or pf.f_type = \'former\')";
  9. if (($timestamp-@filemtime($cachepics)>=$cachepicstime)){
  10. $query=$db->query("SELECT pt.tid,pt.fid,pt.subject,pa.attachurl FROM pw_threads pt
  11. ,pw_attachs pa,pw_forums pf where pt.tid = pa.tid and pt.fid = pf.fid and pa.type=\'img\' and pt.ifcheck=\'1\' and ".$showforum." and pf.password = \'\'
  12. ORDER BY pt.postdate DESC
  13. LIMIT 60
  14. "); //可以根据需要调整,我这里是估算每个主题有10张图片的情况下。

  15. $imgcontent="<?php\\n";
  16. $pics=$links=$texts="";
  17. $rs_i=0;
  18. while ($imginfo = $db->fetch_array($query) and $rs_i<6) {//只调用6个主题的图片,且图片格式为.jpg
  19.   if(($rs_tid!=$imginfo[tid])&&(eregi("\\.(jpg)[code]<!--<?php
  20. //首页调用开始
  21. //默认只显示开放板块,不显示正规、隐藏、投票、认证板块

  22. //幻灯图开始
  23. $cachepics=R_P."data/bbscache/index_toppics.php";//幻灯图片缓存文件
  24. $cachepicstime=60;//幻灯图片缓存自动更新时间,单位秒
  25. //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
  26. $showforum="(pf.f_type = \'forum\' or pf.f_type = \'former\')";
  27. if (($timestamp-@filemtime($cachepics)>=$cachepicstime)){
  28. $query=$db->query("SELECT pt.tid,pt.fid,pt.subject,pa.attachurl FROM pw_threads pt
  29. ,pw_attachs pa,pw_forums pf where pt.tid = pa.tid and pt.fid = pf.fid and pa.type=\'img\' and pt.ifcheck=\'1\' and ".$showforum." and pf.password = \'\'
  30. ORDER BY pt.postdate DESC
  31. LIMIT 60
  32. "); //可以根据需要调整,我这里是估算每个主题有10张图片的情况下。

  33. $imgcontent="<?php\\n";
  34. $pics=$links=$texts="";
  35. $rs_i=0;
  36. while ($imginfo = $db->fetch_array($query) and $rs_i<6) {//只调用6个主题的图片,且图片格式为.jpg
  37.   if(($rs_tid!=$imginfo[tid])&&(eregi("\\.(jpg)[        DISCUZ_CODE_1        ]quot;,$imginfo[attachurl]))){
  38.     $pics.=$db_bbsurl."/".$attachpath."/".$imginfo[attachurl]."|";
  39.     $links.=$db_bbsurl."/read.php?tid=".$imginfo[tid]."|";
  40.     $texts.=$imginfo[subject]."|";
  41.     $rs_i++;//同一主题的只要最后上传的那张图片
  42.   }
  43.   $rs_tid=$imginfo[tid];
  44. }

  45. $pics=substr($pics,0,-1);
  46. $links=substr($links,0,-1);
  47. $texts=substr($texts,0,-1);

  48. $pics=\'$pics="\'.$pics.\'";\';
  49. $links=\'$links="\'.$links.\'";\';
  50. $texts=\'$texts="\'.$texts.\'";\';

  51. $imgcontent = $imgcontent.$pics."\\n".$links."\\n".$texts."\\n?>";
  52. writeover($cachepics,$imgcontent);
  53. }
  54. @require_once($cachepics);
  55. //幻灯图结束

  56. //会员排行+主题排行开始
  57. $cachelist=R_P."data/bbscache/index_toplist.php";//主题排行缓存文件
  58. $cachelisttime=5;//主题排行自动更新时间,单位秒
  59. //下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
  60. $showforum="(pf.f_type = \'forum\' or pf.f_type = \'former\')";
  61. if(($timestamp-@filemtime($cachelist)>=$cachelisttime)){
  62. $listnum=10;//主题显示个数
  63. $listlength=44;//主题标题长度
  64. $listnum1=10;//会员在线时间排行显示个数
  65. $copyright=" php开源网 [url]http://www.php-open.org[/url]";
  66. $memberonline=$memberposttoday=$newthreads=$digestthreads=$replythreads="";

  67. //会员在线时间排行开始
  68. $query = $db->query("SELECT m.uid,m.username,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.onlinetime order by md.onlinetime desc limit 0,$listnum");
  69. while($members=$db->fetch_array($query)){
  70. $members[onlinetime]=(int)($members[onlinetime]/3600);
  71. $i=0;
  72. while((5*$i*$i+15*$i)<=$members[onlinetime])
  73. {$i++;
  74. $C=5*$i*$i+15*$i;
  75. $N=$i;
  76. }
  77. $more= $C-$members[onlinetime];
  78. $lv= $N;
  79. $timelv.="<div style=\'width:95%\'><div style=\'width:65%;float:left\'><a href=\'profile.php?action=show&uid=$members[uid]\' title=\'在线等级:{$lv} 级\\n在线时长:{$members[onlinetime]} 小时\\n升级剩余时间:{$more} 小时\'>$members[username]</a></div><div style=\'float:left;width:30%\'><img src=\'$imgpath/lv/{$lv}.gif\' style=\'margin-top:2px\'></div></div>";
  80. }
  81. unset($members);
  82. unset($c_i);
  83. //会员在线时间排行结束

  84. //会员当日发帖排行开始
  85. $query=$db->query("SELECT m.uid,m.username,md.postnum,md.todaypost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>\'$tdtime\' ORDER BY md.todaypost DESC limit 0,$listnum");
  86. $c_i=1;//初始化图片序号
  87. while($members=$db->fetch_array($query)){
  88. $memberposttoday.="<div style=\'width:100%\'><div style=\'float:left;width:69%\'><a href=\'profile.php?action=show&uid=$members[uid]\' title=\'总发贴量:$members[postnum]\'>$members[username]</a></div& gt;<div style=\'float:left;width:31%\'><font color=red>$members[todaypost]</font> 贴</div></div>";
  89. $c_i++;
  90. }
  91. unset($members);
  92. unset($c_i);
  93. //会员当日发帖排行结束

  94. //会员本月发帖排行开始
  95. $query=$db->query("SELECT m.uid,m.username,md.postnum,md.digests,md.rvrc,md.money,md.monthpost,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>\'$montime\' ORDER BY md.monthpost DESC limit 0,$listnum");
  96. $c_i=1;//初始化图片序号
  97. while($members=$db->fetch_array($query)){
  98. $members[onlinetime]=(int)($members[onlinetime]/3600);
  99. $i=0;
  100. while((1*$i*$i+15*$i)<=$members[onlinetime]){
  101.   $i++;
  102.   $C=1*$i*$i+15*$i;
  103.   $N=$i;
  104. }
  105. $more=$C-$members[onlinetime];
  106. $lv=$N;
  107. if($lv > 48) $lv = 48;
  108. $memberpostmonth.="<div style=\'width:100%\'><div style=\'float:left;width:69%\'><a href=\'profile.php?action=show&uid=$members[uid]\' title=\'发帖: $members[postnum] 帖\\n精华: $members[digests] 帖\\n威望: $members[rvrc] 点\\n财富: $members[money] 贝壳\\n在线等级: $lv 级\\n在线时间: $members[onlinetime] 小时\\n升级剩余: $more 小时\'>$members[username]</a></div><div style=\'float:left;width:31%\'><font color=red>$members[monthpost]</font> 贴</div></div>";
  109. $c_i++;
  110. }
  111. unset($members);
  112. unset($c_i);
  113. //会员本月发帖排行结束

  114. //最新发表主题开始
  115. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.replies,pt.hits,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck=\'1\' and ".$showforum." and pf.password = \'\' order by pt.postdate desc limit 0,$listnum");
  116. $c_i=1;//初始化图片序号
  117. while($threads=$db->fetch_array($query)){
  118. $threads[postdate]=get_date($threads[postdate]);
  119. $threads[lastpost]=get_date($threads[lastpost]);
  120. $subject=substrs($threads[subject],42);
  121. $newthreads.="<div style=\'width:100%;\'><div style=\'float:left;width:78%\'><a href=\'thread.php?fid=$threads[fid]\' title=\'此文章发表在 $threads[name] 版块\\n点击进入此版块\'>[ $threads[name] ]</a> <a href=\'read.php?tid=$threads[tid]\' title=\'主 题: $threads[subject]\\n作 者: $threads[author]\\n时 间: $threads[postdate]\\n浏 览: $threads[hits] 次\\n最新回复: $threads[lastposter]\\n回复时间: $threads[lastpost]\\n回复次数: $threads[replies] 次\\n$copyright\'>$subject</a></div><div style=\'float:right;width:22%;color:gray\'><font color=gray>$threads[postdate]</font></div></div>";
  122. $c_i++;
  123. }
  124. unset($threads);
  125. unset($c_i);
  126. //最新发表主题结束

  127. //社区精华主题开始
  128. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck=\'1\' and pt.digest > 0 and ".$showforum." and pf.password = \'\' order by pt.postdate desc limit 0,$listnum");
  129. $c_i=1;//初始化图片序号
  130. while($threads=$db->fetch_array($query)){
  131. $threads[postdate]=get_date($threads[postdate]);
  132. $threads[lastpost]=get_date($threads[lastpost]);
  133. $subject=substrs($threads[subject],46);
  134. $digestthreads.="<div style=\'width:100%;\'><div style=\'float:left;width:78%\'><a href=\'thread.php?fid=$threads[fid]\' title=\'此文章发表在 $threads[name] 版块\\n点击进入此版块\'>[ $threads[name] ]</a> <a href=\'read.php?tid=$threads[tid]\' title=\'主题标题: $threads[subject]\\n主题作者: $threads[author]\\n发表时间: $threads[postdate]\\n浏览次数: $threads[hits] 次\\n最新回复: $threads[lastposter]\\n回复时间: $threads[lastpost]\\n回复次数: $threads[replies] 次\\n$copyright\'>$subject</a></div><div style=\'float:right;width:22%;color:gray\'><font color=#999990>$threads[author]</font></div></div>";
  135. $c_i++;
  136. }
  137. unset($threads);
  138. unset($c_i);
  139. //社区精华主题结束

  140. //社区评分推荐开始
  141. $query = $db->query("SELECT tid,fid,author,subject,replies,lastpost,lastposter,hits,ifmark FROM pw_threads where ifmark>0 order by postdate desc limit 0,$listnum");
  142. while($threads=$db->fetch_array($query)){
  143. $threads[forum]=substrs($forum[$threads[\'fid\']][\'name\']);
  144. $threads[lastpost]=get_date($threads[lastpost]);
  145. $threads[subjects]=substrs($threads[subject]);
  146. $threads[subject]=substrs($threads[subject],41);
  147. $ifmarkthreads.="<div style=\'width:100%;\'><div style=\'float:left;width:78%\'><a href=\'thread.php?fid=$threads[fid]\'>$threads[forum]</a> <a href=\'read.php?tid=$threads[tid]\' title=\'标  题:$threads[subjects]\\n作  者:$threads[author]\\n回  复:$threads[replies]\\n点  击:$threads[hits]\\n回复时间:$threads[lastpost]\\n最后回复:$threads[lastposter]\'>$threads[subject]</a>< /div><div style=\'float:right;width:22%;color:gray\'>$threads[author]</div></div>\\n";
  148. }
  149. unset($threads);
  150. unset($c_i);
  151. //社区评分推荐结束

  152. //最多点击主题开始
  153. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = \'1\' and ".$showforum." and pf.password = \'\' order by hits desc limit 0,$listnum");
  154. $c_i=1;//初始化图片序号
  155. while($threads=$db->fetch_array($query)){
  156. $threads[postdate]=get_date($threads[postdate]);
  157. $threads[lastpost]=get_date($threads[lastpost]);
  158. $subject=substrs($threads[subject],$listlength);
  159. $hotthreads.="<div style=\'width:100%;\'><div style=\'float:left;width:78%\'><a href=\'read.php?tid=$threads[tid]\' title=\'主题标题: $threads[subject]\\n主题作者: $threads[author]\\n发表时间: $threads[postdate]\\n浏览次数: $threads[hits] 次\\n最新回复: $threads[lastposter]\\n回复时间: $threads[lastpost]\\n回复次数: $threads[replies] 次\\n$copyright\'>$subject</a></div><div style=\'float:right;width:22%;color:gray\'><font color=gray>$threads[postdate]</font></div></div>";
  160. $c_i++;
  161. }
  162. unset($threads);
  163. unset($c_i);
  164. //最多点击主题结束

  165. //最新回复主题开始
  166. $query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pf.name,pt.replies,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = \'1\' and pt.replies > 0 and ".$showforum." and pf.password = \'\' order by lastpost desc limit 0,$listnum");
  167. $c_i=1;//初始化图片序号
  168. while($threads=$db->fetch_array($query)){
  169. $threads[postdate]=get_date($threads[postdate]);
  170. $threads[lastpost]=get_date($threads[lastpost]);
  171. $subject=substrs($threads[subject],42);
  172. $replythreads.="<div style=\'width:100%;\'><div style=\'float:left;width:78%\'><a href=\'thread.php?fid=$threads[fid]\' title=\'此文章发表在 $threads[name] 版块\\n点击进入此版块\'>[ $threads[name] ]</a> <a href=\'read.php?tid=$threads[tid]\' title=\'主题标题: $threads[subject]\\n主题作者: $threads[author]\\n发表时间: $threads[postdate]\\n浏览次数: $threads[hits] 次\\n最新回复: $threads[lastposter]\\n回复时间: $threads[lastpost]\\n回复次数: $threads[replies] 次\\n$copyright\'>$subject</a></div><div style=\'float:right;width:22%;color:gray\'><font color=#999990>$threads[lastposter]</font></div></div>";
  173. $c_i++;
  174. }
  175. unset($threads);
  176. unset($c_i);
  177. //最新回复主题结束

  178. @writeover($cachelist,"<?php\\n\\$timelv=\\"$timelv\\";\\n\\$memberposttoday=\\"$memberposttoday\\";\\n\\$newthreads=\\"$newthreads\\";\\n\\$digestthreads=\\"$digestthreads\\";\\n\\$replythreads=\\"$replythreads\\";\\n\\$randtreads=\\"$randtreads\\";\\n\\$memberpostmonth=\\"$memberpostmonth\\";\\n\\$hotthreads=\\"$hotthreads\\";\\n\\$ifmarkthreads=\\"$ifmarkthreads\\";?>");
  179. }
  180. @require_once($cachelist);
  181. //会员排行+主题排行结束

  182. //首页调用结束
  183. print <<<EOT
  184. -->
复制代码
quot;,$imginfo[attachurl]))){
    $pics.=$db_bbsurl.\"/\".$attachpath.\"/\".$imginfo[attachurl].\"|\";
    $links.=$db_bbsurl.\"/read.php?tid=\".$imginfo[tid].\"|\";
    $texts.=$imginfo[subject].\"|\";
    $rs_i++;//同一主题的只要最后上传的那张图片
  }
  $rs_tid=$imginfo[tid];
}

$pics=substr($pics,0,-1);
$links=substr($links,0,-1);
$texts=substr($texts,0,-1);

$pics=\'$pics=\"\'.$pics.\'\";\';
$links=\'$links=\"\'.$links.\'\";\';
$texts=\'$texts=\"\'.$texts.\'\";\';

$imgcontent = $imgcontent.$pics.\"\\n\".$links.\"\\n\".$texts.\"\\n?>\";
writeover($cachepics,$imgcontent);
}
@require_once($cachepics);
//幻灯图结束

//会员排行+主题排行开始
$cachelist=R_P.\"data/bbscache/index_toplist.php\";//主题排行缓存文件
$cachelisttime=5;//主题排行自动更新时间,单位秒
//下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
$showforum=\"(pf.f_type = \'forum\' or pf.f_type = \'former\')\";
if(($timestamp-@filemtime($cachelist)>=$cachelisttime)){
$listnum=10;//主题显示个数
$listlength=44;//主题标题长度
$listnum1=10;//会员在线时间排行显示个数
$copyright=\"清水之家 www.s234.cn\";
$memberonline=$memberposttoday=$newthreads=$digestthreads=$replythreads=\"\";






上一篇:利用smarty和php生成静态html常用函数及实例
下一篇:PHP文本数据表类
authicon  楼主| 09927306 发表于 2011-1-6 12:25:45 | 显示全部楼层
//会员在线时间排行开始
$query = $db->query("SELECT m.uid,m.username,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.onlinetime order by md.onlinetime desc limit 0,$listnum");
while($members=$db->fetch_array($query)){
$members[onlinetime]=(int)($members[onlinetime]/3600);
$i=0;
while((5*$i*$i+15*$i)<=$members[onlinetime])
{$i++;
$C=5*$i*$i+15*$i;
$N=$i;
}
$more= $C-$members[onlinetime];
$lv= $N;
$timelv.="<div style='width:95%'><div style='width:65%;float:left'><a href='profile.php?action=show&uid=$members[uid]' title='在线等级:{$lv} 级\n在线时长:{$members[onlinetime]} 小时\n升级剩余时间:{$more} 小时'>$members[username]</a></div><div style='float:left;width:30%'><img src='$imgpath/lv/{$lv}.gif' style='margin-top:2px'></div></div>";
}
unset($members);
unset($c_i);
//会员在线时间排行结束

//会员当日发帖排行开始
$query=$db->query("SELECT m.uid,m.username,md.postnum,md.todaypost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$tdtime' ORDER BY md.todaypost DESC limit 0,$listnum");
$c_i=1;//初始化图片序号
while($members=$db->fetch_array($query)){
$memberposttoday.="<div style='width:100%'><div style='float:left;width:69%'><a href='profile.php?action=show&uid=$members[uid]' title='总发贴量:$members[postnum]'>$members[username]</a></div& gt;<div style='float:left;width:31%'><font color=red>$members[todaypost]</font> 贴</div></div>";
$c_i++;
}
unset($members);
unset($c_i);
//会员当日发帖排行结束

//会员本月发帖排行开始
$query=$db->query("SELECT m.uid,m.username,md.postnum,md.digests,md.rvrc,md.money,md.monthpost,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$montime' ORDER BY md.monthpost DESC limit 0,$listnum");
$c_i=1;//初始化图片序号
while($members=$db->fetch_array($query)){
$members[onlinetime]=(int)($members[onlinetime]/3600);
$i=0;
while((1*$i*$i+15*$i)<=$members[onlinetime]){
  $i++;
  $C=1*$i*$i+15*$i;
  $N=$i;
}
$more=$C-$members[onlinetime];
$lv=$N;
if($lv > 48) $lv = 48;
$memberpostmonth.="<div style='width:100%'><div style='float:left;width:69%'><a href='profile.php?action=show&uid=$members[uid]' title='发帖: $members[postnum] 帖\n精华: $members[digests] 帖\n威望: $members[rvrc] 点\n财富: $members[money] 贝壳\n在线等级: $lv 级\n在线时间: $members[onlinetime] 小时\n升级剩余: $more 小时'>$members[username]</a></div><div style='float:left;width:31%'><font color=red>$members[monthpost]</font> 贴</div></div>";
$c_i++;
}
unset($members);
unset($c_i);
//会员本月发帖排行结束

//最新发表主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.replies,pt.hits,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck='1' and ".$showforum." and pf.password = '' order by pt.postdate desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=get_date($threads[postdate]);
$threads[lastpost]=get_date($threads[lastpost]);
$subject=substrs($threads[subject],42);
$newthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]' title='此文章发表在 $threads[name] 版块\n点击进入此版块'>[ $threads[name] ]</a> <a href='read.php?tid=$threads[tid]' title='主 题: $threads[subject]\n作 者: $threads[author]\n时 间: $threads[postdate]\n浏 览: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=gray>$threads[postdate]</font></div></div>";
$c_i++;
}
unset($threads);
unset($c_i);
//最新发表主题结束

//社区精华主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck='1' and pt.digest > 0 and ".$showforum." and pf.password = '' order by pt.postdate desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=get_date($threads[postdate]);
$threads[lastpost]=get_date($threads[lastpost]);
$subject=substrs($threads[subject],46);
$digestthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]' title='此文章发表在 $threads[name] 版块\n点击进入此版块'>[ $threads[name] ]</a> <a href='read.php?tid=$threads[tid]' title='主题标题: $threads[subject]\n主题作者: $threads[author]\n发表时间: $threads[postdate]\n浏览次数: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=#999990>$threads[author]</font></div></div>";
$c_i++;
}
unset($threads);
unset($c_i);
//社区精华主题结束

//社区评分推荐开始
$query = $db->query("SELECT tid,fid,author,subject,replies,lastpost,lastposter,hits,ifmark FROM pw_threads where ifmark>0 order by postdate desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],41);
$ifmarkthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]'>$threads[forum]</a> <a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a>< /div><div style='float:right;width:22%;color:gray'>$threads[author]</div></div>\n";
}
unset($threads);
unset($c_i);
//社区评分推荐结束

//最多点击主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies,pf.name,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = '1' and ".$showforum." and pf.password = '' order by hits desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=get_date($threads[postdate]);
$threads[lastpost]=get_date($threads[lastpost]);
$subject=substrs($threads[subject],$listlength);
$hotthreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='read.php?tid=$threads[tid]' title='主题标题: $threads[subject]\n主题作者: $threads[author]\n发表时间: $threads[postdate]\n浏览次数: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=gray>$threads[postdate]</font></div></div>";
$c_i++;
}
unset($threads);
unset($c_i);
//最多点击主题结束

//最新回复主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pf.name,pt.replies,pf.fid FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = '1' and pt.replies > 0 and ".$showforum." and pf.password = '' order by lastpost desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=get_date($threads[postdate]);
$threads[lastpost]=get_date($threads[lastpost]);
$subject=substrs($threads[subject],42);
$replythreads.="<div style='width:100%;'><div style='float:left;width:78%'><a href='thread.php?fid=$threads[fid]' title='此文章发表在 $threads[name] 版块\n点击进入此版块'>[ $threads[name] ]</a> <a href='read.php?tid=$threads[tid]' title='主题标题: $threads[subject]\n主题作者: $threads[author]\n发表时间: $threads[postdate]\n浏览次数: $threads[hits] 次\n最新回复: $threads[lastposter]\n回复时间: $threads[lastpost]\n回复次数: $threads[replies] 次\n$copyright'>$subject</a></div><div style='float:right;width:22%;color:gray'><font color=#999990>$threads[lastposter]</font></div></div>";
$c_i++;
}
unset($threads);
unset($c_i);
//最新回复主题结束

@writeover($cachelist,"<?php\n\$timelv=\"$timelv\";\n\$memberposttoday=\"$memberposttoday\";\n\$newthreads=\"$newthreads\";\n\$digestthreads=\"$digestthreads\";\n\$replythreads=\"$replythreads\";\n\$randtreads=\"$randtreads\";\n\$memberpostmonth=\"$memberpostmonth\";\n\$hotthreads=\"$hotthreads\";\n\$ifmarkthreads=\"$ifmarkthreads\";?>");
}
@require_once($cachelist);
//会员排行+主题排行结束

//首页调用结束
print <<<EOT
-->[/code]查找:
  1. <div id="notice"><a>最近没有论坛公告</a></div>
  2. <!--
  3. EOT;
  4. }print <<<EOT
  5. -->
复制代码
下面添加:
  1. <div style="margin-bottom:5px;">
  2. <table border=0 cellSpacing=0 cellPadding=0 width="100%"style="border-collapse: collapse; border:1px solid #AACCEE;border-right:none;">
  3.     <tr >
  4. <!--css-->
  5. <style type="text/css">
  6. .active2_6{FONT-SIZE: 12px; BACKGROUND:#FFFFFF; CURSOR: hand; COLOR: #030e5f; TEXT-ALIGN: center;border-right:1px solid #AACCEE}
  7. .active1_6{FONT-SIZE: 12px;BACKGROUND-IMAGE: url('$imgpath/hot/54_Label_1b_1.gif'); background-repeat:repeat-x;CURSOR: hand; COLOR: #030e5f; TEXT-ALIGN: center;border-right:1px solid #AACCEE}
  8. .divindex {overflow: hidden;height: 24px;width: 100%;}
  9. .pdiv{margin-top: 3px}
  10. .indextd2{line-height:22px;border-top:0px none;width:100%; }
  11. .divfr{float: right; width:131px; text-align:left;}
  12. .divfl{float: left;}
  13. .dis{display:block;}
  14. .undis{display:none;}
  15. </style>
  16. <!--css-->
  17. <script language="JavaScript">
  18. function g(o){
  19.     return document.getElementById(o);
  20. }
  21. function HoverLi(m,n,counter){
  22.     for(var i=1;i<=counter;i++){
  23.         g('tb_'+m+i).className='active1_6';
  24.         g('tbc_'+m+i).className='undis';
  25.     }
  26.     g('tbc_'+m+n).className='dis';
  27.     g('tb_'+m+n).className='active2_6';
  28. }
  29. </script>

  30.         <td width="30%"><div style="background:#EAF2FA;border-bottom:1px solid #AACCEE;height:23px;" align="center"><div style="margin-top:4px"> 论 坛 最 新 上 传 图 片 </div></div></td>
  31.         <td width="50%">
  32.         <table border="0" cellSpacing=0 cellPadding=0 width="100%" style="border-left:1px solid #AACCEE;height:24px">
  33.             <tbody>
  34.             <tr>
  35.                 <td class=active2_6 id=tb_11 align="center">最新主题</td>
  36.                 <td class=active1_6 id=tb_12 align="center">最新回复</td>
  37.                 <td class=active1_6 id=tb_13 align="center">精华推荐</td>
  38.                 <td class=active1_6 id=tb_14 align="center">评分推荐</td>
  39.                 <td class=active1_6 id=tb_15 align="center">热门主题</td>
  40.             </tr>
  41.             </tbody>
  42.         </table>
  43.         </td>
  44.         <td width="20%">
  45.         <table border="0" cellSpacing=0 cellPadding=0 width="100%" style="height:24px;">
  46.             <tbody>
  47.             <tr  class=indextd>
  48.                 <td class=active2_6 id=tb_21 align="center">今日发贴</td>
  49.                 <td class=active1_6 id=tb_22 align="center">本月发贴</td>
  50.                 <td class=active1_6 id=tb_23 align="center">在线排行</td>
  51.             </tr>
  52.             </tbody>
  53.         </table>
  54.         </td>
  55.     </tr>
  56.     <tr>
  57.     <td align=center style="border:1px solid #AACCEE;border-top:none;border-left:1px #AACCEE solid">
  58.     <table border="0" cellSpacing=0 cellPadding=0 width="100%">
  59.             <tbody>
  60.             <tr><td>
  61.     <script type="text/javascript">
  62. <!--
  63. var focus_width=288 //flash的宽度,可以根据需要调整
  64. var focus_height=200 //flash的高度,可以根据需要调整
  65. var text_height=30//flash文本的高度,可以根据需要调整
  66. var swf_height = focus_height+text_height
  67. var swf_height = focus_height+text_height

  68. var pics="$pics"
  69. var links="$links"
  70. var texts="$texts"

  71. document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com ... flash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
  72. document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="{$imgpath}/pic.swf"><param name="quality" value="high"><param name="bgcolor" value="#F4FBFF">');
  73. document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
  74. document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
  75. document.write('<embed src="{$imgpath}/pic.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
  76. document.write('</object>');

  77. //-->
  78. </script></td></tr></tbody></table>
  79. </td>
  80.         <td  style="">
  81.         <table border="0" cellSpacing=0 cellPadding=0 width="100%" style="padding-top:6px;border-right:1px solid #AACCEE">
  82.             <tbody>
  83.             <tr valign="top">
  84.                 <td><img src="./$imgpath/hot/cqtn_cn.gif"></td>
  85.                 <td class=indextd2>
  86.                 <div id="tbc_11" class="dis">$newthreads</div>
  87.                 <div id="tbc_12" class="undis">$replythreads</div>
  88.                 <div id="tbc_13" class="undis">$digestthreads</div>
  89.                 <div id="tbc_14" class="undis">$ifmarkthreads</div>
  90.                 <div id="tbc_15" class="undis">$hotthreads</div>
  91.                 </td>
  92.             </tr>
  93.             </tbody>
  94.         </table>
  95.         </td>
  96.         <td  style="border-right:1px solid #AACCEE">
  97.         <table border="0" cellSpacing=0 cellPadding=0 width="100%">
  98.             <tbody>
  99.             <tr valign="top">
  100.                 <td><img src="./$imgpath/hot/cqtn_cn.gif"></td>
  101.                 <td class=indextd2>
  102.                 <div id="tbc_21" class="dis">$memberposttoday</div>
  103.                 <div id="tbc_22" class="undis">$memberpostmonth</div>
  104.                 <div id="tbc_23" class="undis">$timelv</div>
  105.                 </td>
  106.             </tr>
  107.             <tbody>
  108.         </table>
  109.         </td>
  110.     </tr>
  111. </table>

  112. </div>
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-3 08:40

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表