📄 index.php
字号:
<?
include("bbsdata/level.php");
require("global.php");
require("header.php");
if($open_music==1)
$index_mc="<bgsound src=$music_id loop='-1'>";
if (file_exists('bbsdata/admin.php')) {
$adminlist=file('bbsdata/admin.php');
$count=count($adminlist);
for ($i=0; $i<$count; $i++) {
$detail=explode("|", trim($adminlist[$i]));
$admin_list[]=$detail[1];
$forum_admin[$detail[0]][]=$detail[1];
}
}
//-------------------------------------
if (file_exists('bbsdata/newuser.php')) $newuserinfo=readfromfile('bbsdata/newuser.php');else $newuserinfo='|0|0';
$newuser_info=explode('|',$newuserinfo);
if (file_exists('bbsdata/ofstar.php')) $ofstarinfo=readfromfile('bbsdata/ofstar.php'); else $ofstarinfo='|||0|0|0|0|0|';
$ofstar_info=explode('|',$ofstarinfo);
$bbszts=$ofstar_info[3];
//-------------------------------------
if($ofstar_info[7]<$tdtime) {$tdzts=0;$ytzts=$ofstar_info[4];}
else {$tdzts=$ofstar_info[4];$ytzts=$ofstar_info[5];}
//-------------------------------------
$mostzts=$ofstar_info[6];
//-------------------------------------
if($login_status!=1){
$your_info="请先登陆论坛,头衔: <b>游客</b>";
$ifuserinfo="如果您第一次访问本站,请先注册.如果您已是会员,请重新登陆";
}
else {$lastlodate="上次登陆时间:".date("Y-m-d",$lastlogindate);
$your_info="您共发贴:$postamount,金钱:$usermoney,头衔:<b>$level</b>,<a href=vip.php>申请荣誉会员</a>";
$ifuserinfo="<a href=getmg.php>申请版主</a> <a href=search.php?keyword=$username&page=1&method=or&method1=2&method2=&forumid=all>您发起的主题</a> <a href=search.php?keyword=$username&page=1&method=or&method1=3&method2=&forumid=all>您参与的主题</a></td>";}
if($today_post)$ifposttoday="今日<font color=green><b>$tdzts</b></font>贴 | 昨日<font color=blue><b>$ytzts</b></font>贴 |";
//-------------------------------------
if (file_exists('bbsdata/announcement.php')) include('bbsdata/announcement.php');else $announcement='暂时没有发布公告';
$xzbfile="userdata/anc";
$w=1;$index_an.="<font color=blue>论坛公告:</font>$announcement";
for ($j=10; $j>=0; $j--) {
if (file_exists($xzbfile."/".$j)){
$xzb_arr=explode("|",readfromfile($xzbfile."/".$j));
$wtime=get_time($xzb_arr[1]);
if($xzb_arr[1]+86400>$tdtime){
$w++;
$index_an.=" <font color=#0000FF>{$xzb_arr[2]}</font>说:<a href='announcement.php?job=view&mode=$mode&id=$j' title=\"{$xzb_arr[4]}\">{$xzb_arr[3]}</a>({$wtime}) ";
if($w>5) break;
}
}
}
//-------------------------------------
if($show_headinfo)
{
$index_theadsong.="<table width=$tablewidth border=0 bgcolor=$bordercolor align=center cellspacing=1 cellpadding=1><tr><td bgcolor=$titlecolor colspan=1 width=50% class=title><b>-=></b><a class=title>歌 曲 点 播 发 布 栏</a>-----<a href=song.php target=_blank class=title>我要为朋友点歌</a>-----[<a href=dj.php class=title>DJ管理</a>]-----[<a href=game.php class=title>游戏殿堂</a>]</td><td bgcolor=$titlecolor colspan=1 width=50% ><div align=center><b><img src=images/system/copy.gif><a href=viewtop.php?topjob=atc class=title>论坛新贴</a></br></div></td></tr>
<tr><td style=\"background-image:url('images/dj.jpg');background-repeat:repeat-x\" width=63% bgcolor=$forumcolorone>";
$tmp=file("userdata/song/song.dat");
$index_theadsong.="<marquee scrollamount=1 direction=up height=70 onmouseover=this.stop(); onmouseout=this.start();>";
$count=count($tmp);
$tdates=date("Ymd",$timestamp);
$abc=0;
for($i=0;$i<$count;$i++){
$detail=explode("|", trim($tmp[$i]));
$dates=date("Ymd",$detail[2]);
if($tdates == $dates) {
$abc=1;
$timeds=getfulldate($detail[2]);
$index_theadsong.="<a href=javascript:popwin2('$detail[2]',410)><font color=blue>$detail[0]</font>点了一首<font color=$bordercolor>《$detail[4]》</font>送给<font color=RED>$detail[1]</font>听,并想对 $detail[1] 说: <font color=RED>$detail[5]</font></a>($timeds)<br>";
}else {
if($abc!=1) $index_theadsong.="今天暂时没有点歌信息。";
break;}}
$index_theadsong.= "</td><td width=37% bgcolor=$forumcolorone><table width=100%>";
//-------------------------------------
$article=file("bbsdata/newpost.php");
$count=count($article);
$c=min($count,10);
if ($count>=5) $show=$count-5;
else $show=0;
if($count>10) $use=$count-$c;
else $use=0;
for ($i=$count-1; $i>=$use; $i--){
$detail=explode("|",$article[$i]);
$filename=chop($detail[4]);
$forumnum=chop($detail[5]);
if ($use>0) $post=$post.$article[$count-1-$i+$use];
$forumname=$detail[6];
if (strlen($detail[0])>=28) $detail[0]=substr($detail[0],0,25)."...";
$detail[0]=str_replace("%a%","<img src=images/attach/img.gif border=0>",$detail[0]);
$dtime=getfulldate($detail[2]);
if ($i>=$show) $index_theadsong.="<tr> <td width=*>
<a onfocus=this.blur() href='read.php?forumid=$forumnum&filename=$filename&page=last#bottom' title='$dtime\n发表于 $forumname'>$detail[0]</a></td><td width=120><b>作者</b>:<a onfocus=this.blur() href=profile.php?job=show&target=$detail[1]>$detail[1]</a></td></tr>";
}
if ($use>0) writetofile("bbsdata/newpost.php",$post);
$index_theadsong.="</table></td></tr></table><br>";
}
//-------
$count=count($forumlist);
for ($i=0; $i<$count; $i++) {
$detail=explode('|',$forumlist[$i]);
if ($detail[0]!='category' && $detail[0]!='hidden' && $detail[4]==0) forum_line($detail[0]);
elseif ($detail[0]=='category') category_line($detail[1]);
if(check_permission($username,$detail[0]) && $detail[0]=='hidden') forum_line($detail[0]);
}
//------
if($show_star){
todaystars();
eval("\$index_showstar = \"".gettemplate('index_star')."\";");
}
//------
if($show_link) {//1
if (file_exists("bbsdata/shareforum.php")) {//2
$alliedforums=file("bbsdata/shareforum.php");
if (!empty($alliedforums)) {//3
$count=count($alliedforums);
if($share!="no") {//4
$index_link.="
<table width=$tablewidth cellpadding=0 cellspacing=0 border=0 align=center bgcolor=$bordercolor>
<tr>
<td>
<table cellpadding=5 cellspacing=1 border=0 width=100%>
<tr>
<td colspan=2 bgcolor=$titlecolor class=title><b>-=><a name=share>友情链接 </a></b>[<a href='index.php?share=no#share' class=title>关闭友情链接列表</a>]</td>
</tr>
<tr>
<td bgcolor=$forumcolortwo align=center width=26 rowspan=1><img src='images/system/shareforum.gif'></td>
<td bgcolor=$forumcolorone width=888> ";
if($scroll_shareforum) {$index_link.="<marquee scrolldelay=100 scrollamount=4 onmouseout='if (document.all!=null){this.start()}' onmouseover='if (document.all!=null){this.stop()}' behavior=alternate>";}
for ($i=0; $i<$count; $i++) {//5
list($alliedforumname,$alliedforumurl,$alliedforumtitle,$alliedforumlogo) = explode("|" , $alliedforums[$i]);
if ($alliedforumlogo=="") {//6
$index_link.=" <a href=$alliedforumurl target=_blank title=$alliedforumtitle>[$alliedforumname]</a> ";}//5
}//5
if($scroll_shareforum)$index_link.="</marquee>";
$index_link.="<br>";
if($scroll_shareforum) {$index_link.="<marquee scrolldelay=100 scrollamount=4 onmouseout='if (document.all!=null){this.start()}' onmouseover='if (document.all!=null){this.stop()}' behavior=alternate>";}
for ($i=0; $i<$count; $i++) {//5
list($alliedforumname,$alliedforumurl,$alliedforumtitle,$alliedforumlogo) = explode("|" , $alliedforums[$i]);
if ($alliedforumlogo!="") {//6
$index_link.=" <a href=$alliedforumurl target=_blank><img src=$alliedforumlogo width=87 height=32 alt=$alliedforumtitle border=0></a>";} //6
}//5
if($scroll_shareforum)$index_link.="</marquee>";
$index_link.="</td></tr></table></td></tr></table><br>";
}//4
else $index_link.="
<table width=$tablewidth cellpadding=0 cellspacing=0 border=0 align=center bgcolor=$bordercolor>
<tr>
<td>
<table cellpadding=5 cellspacing=1 border=0 width=100%>
<tr>
<td colspan=2 bgcolor=$titlecolor class=title><b>-=><a name=share>友情链接 </a></b>[当前有{$count}个友情链接] [<a href='index.php?share=yes#share' class=title>打开友情链接列表</a>]</td></tr></table></td></tr></table><br>";
}//3
}//2
}//1
if($show_birth==1) {
if($birth!="no") {
$index_birth.="
<tr>
<td colspan=2 bgcolor=$titlecolor class=title><b>-=><a name=birth>生日会员</a></b> [<a href='index.php?birth=tongji#birth' class=title>重新统计生日会员</a>] [<a href='index.php?birth=no#birth' class=title>关闭生日会员列表</a>]</td>
</tr>
<tr>
<td bgcolor=$forumcolortwo width=26 align=center><img src='images/system/birth.gif'></td>
<td bgcolor=$forumcolorone colspan=1>";
birthman();
$index_birth.="</td></tr>";
}
else
$index_birth.="
<tr>
<td colspan=2 bgcolor=$titlecolor class=title><b>-=><a name=birth>今天过生日的会员</a></b> [<a href=index.php?birth=yes#birth class=title>打开生日会员列表</a>]</td>
</tr>";
}
if ($view_online) {
if ($online=="no") $index_ifopenonline=' [<a href="index.php">打开在线列表</a>]<BR>';
else $index_ifopenonline=' [<a href="index.php?online=no">关闭在线列表</a>]<BR>';
} else {
if (!$online) $index_ifopenonline=' [<a href="index.php?online=yes#online">打开在线列表</a>]<BR>';
else $index_ifopenonline='<a name="online"></a> [<a href="index.php">关闭在线列表</a>]<BR>';
}
whosonline();
$usertotal=$userreg+$userhide+$userunreg;
$totalreg=$userreg+$userhide;
if ($yeinfo[0]<=$usertotal) {
writetofile('bbsdata/ye.php',$usertotal."|".$timestamp);
$yeinfo=explode('|',readfromfile('bbsdata/ye.php'));}
$ye_info=getfulldate($yeinfo[1]);
require("footer.php");
eval("dooutput(\"".gettemplate('index')."\");");
if(file_exists("bbsdata/ads.php")) require("bbsdata/ads.php");
if($ad_fly) include("addfly.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -