📄 dvindex.js
字号:
function ShowthisList(ID,tKey)
{
var targetDiv =eval("document.all.ClistDiv"+ID);
var thisDiv=eval("document.all.listpic"+ID);
if (tKey==0)
{
if (Dvbbs.list[ID].IsShow=='0')
{
document.frames["hiddenframe"].location.replace('cookies.asp?action=setlistmod&thisvalue=1&id='+ID)
Dvbbs.list[ID].IsShow='1';
}
else
{
document.frames["hiddenframe"].location.replace('cookies.asp?action=setlistmod&thisvalue=0&id='+ID)
Dvbbs.list[ID].IsShow='0';
}
}
var tmpstr='';
var j=0
tmpstr+='<table cellspacing=1 cellpadding=0 align=center class=tableBorder1>';
if (Dvbbs.list[ID].IsShow=='0')
{
var tmpstr2
tmpstr2=1/Dvbbs.list[ID].board_setting
tmpstr2=tmpstr2*100
tmpstr2=tmpstr2+'%'
thisDiv.innerHTML='<img title="转到列表模式 " src="'+Dvbbs.Forum_Info[7]+ Dvbbs.Forum_boardpic[15] +' " border=0>';
for (k=0;k<Dvbbs.list[ID].boardid.length;k++)
{
if (j==0)
{
tmpstr+='<tr>';
}
tmpstr+='<td class=tablebody1 width="'+tmpstr2+'">';
tmpstr+='<TABLE cellSpacing=2 cellPadding=2 width=100% border=0><tr>';
tmpstr+='<td width="100%" title="'+dvhtmlencode(Dvbbs.list[ID].readme[k])+'" colspan=2>';
tmpstr+='<a href=list.asp?boardid='+Dvbbs.list[ID].boardid[k]+'>';
if (Dvbbs.list[ID].HaveNew[k]=='0')
{
tmpstr+='<font color="'+Dvbbs.Forum_Body[8]+'" alt="有新贴哦">'+Dvbbs.list[ID].BoardType[k]+'</font></a>';
}
else
{
tmpstr+='<font color="'+Dvbbs.Forum_Body[14]+'" alt="无新贴">'+Dvbbs.list[ID].BoardType[k]+'</font></a>';
}
if((Dvbbs.list[ID].Child[k])>0)
{
tmpstr+='(<font title="有'+Dvbbs.list[ID].Child[k]+'个下属论坛">'+Dvbbs.list[ID].Child[k]+')</font>';
}
tmpstr+='</td></tr><tr><td width="50%">';
tmpstr+='今日:<font color="'+ Dvbbs.Forum_Body[8]+'">'+Dvbbs.list[ID].todayNum[k]+'</font></td>';
tmpstr+='<td width="50%">发贴:'+Dvbbs.list[ID].lastbbsnum[k]+'</td></tr>';
tmpstr+='</table>';
tmpstr+='</td>';
j++
if (j==Dvbbs.list[ID].board_setting)
{
tmpstr+='</tr>';
j=0
}
}
if (j!=0)
{
for (k=j;k<Dvbbs.list[ID].board_setting;k++)
{
tmpstr+='<td class=tablebody1 width="'+tmpstr2+'">';
tmpstr+='<TABLE cellSpacing=2 cellPadding=2 width=100% border=0><tr>';
tmpstr+='<td width="100%" title="" colspan=2>';
tmpstr+='</td></tr><tr><td width="50%">';
tmpstr+='</td>';
tmpstr+='<td width="50%"></td></tr>';
tmpstr+='</table>';
tmpstr+='</td>';
}
tmpstr+='</tr>';
}
}
else
{
var tmpstr0;
var tmpstr1;
thisDiv.innerHTML='<img title="转到简洁模式 " src="'+Dvbbs.Forum_Info[7]+ Dvbbs.Forum_boardpic[16] +' " border=0>';
for (k=0;k<Dvbbs.list[ID].boardid.length;k++)
{
tmpstr0=Dvbbs.list[ID].Board_Setting[k].split(",")
tmpstr+='<tr><td align="middle" width="46" class="tablebody1">';
tmpstr+=Showbbsstat(Dvbbs.list[ID].HaveNew[k],tmpstr0[2]);
tmpstr+='</TD>';
tmpstr+='<TD vAlign="top" width="*" class="tablebody1">';
tmpstr+='<table cellSpacing="0" cellPadding="2" width="100%" border="0">';
tmpstr+='<tr><td class="tablebody1" width="*">';
tmpstr+='<a href="list.asp?boardid='+Dvbbs.list[ID].boardid[k]+'">';
tmpstr+='<font color="'+Dvbbs.Forum_Body[14]+'">'+Dvbbs.list[ID].BoardType[k]+'</font>';
tmpstr+='</a>';
if((Dvbbs.list[ID].Child[k])>0)
{
tmpstr+='(<font title="有'+Dvbbs.list[ID].Child[k]+'个下属论坛">'+Dvbbs.list[ID].Child[k]+')</font>';
}
tmpstr+='</td>';
tmpstr+='<td width="40" rowspan="2" align="center" class="tablebody1">';
if (Dvbbs.list[ID].indexIMG[k]!='')
{
tmpstr+='<table align="left"><tr><td><a href="list.asp?boardid='+Dvbbs.list[ID].boardid[k]+'"><img src='+Dvbbs.list[ID].indexIMG[k]+' align="top" border="0"></a></td><td width="20"></td></tr></table>';
}
tmpstr+='</td>';
tmpstr+='<td width="200" rowspan="2" class="tablebody1">';
if (tmpstr0[2]=='1'&&Dvbbs.Master!=true)
{
tmpstr+='认证论坛,请认证用户进入浏览';
}
else
{
tmpstr+=showlastpost(Dvbbs.list[ID].LastPost[k]);
}
tmpstr+='</TD></TR><TR>';
tmpstr+='<TD width=*><FONT face=Arial><img src='+Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[8]+' align=middle>';
tmpstr+=Dvbbs.list[ID].readme[k];
tmpstr+='</TR><TR><TD class=tablebody2 height=20 width=*>版主:';
tmpstr+=replacemasterstring(Dvbbs.list[ID].BoardMaster[k])+'</TD><td width="40" align="center" class="tablebody2"> </td><TD valign="middle" class="tablebody2" width="200"><table width="100%" border="0"><tr>';
tmpstr+='<td width="25%" valign="middle"><img src='+Dvbbs.Forum_Info[7]+'Forum_today.gif';
tmpstr+=' alt="今日帖" align="absmiddle"> <font color="'+ Dvbbs.Forum_Body[8]+'">'+Dvbbs.list[ID].todayNum[k]+'</font></td>';
tmpstr+='<td width="30%" valign="middle"><img src="'+Dvbbs.Forum_Info[7]+'forum_topic.gif" alt="主题" border="0" align="absmiddle"> '+Dvbbs.list[ID].lasttopicnum[k]+'</td><td width="45%" vAlign="middle">';
tmpstr+='<img src="'+ Dvbbs.Forum_Info[7]+'Forum_post.gif" alt="文章" border="0" align="absmiddle" > ';
tmpstr+=Dvbbs.list[ID].lastbbsnum[k];
tmpstr+='</td></tr>';
tmpstr+='</table>';
tmpstr+='</td></tr>';
tmpstr+='</table>';
tmpstr+='</td></tr>';
}
}
tmpstr+='</table>';
targetDiv.innerHTML=tmpstr;
tmpstr='';
}
//判断论坛状态输出相应的图标。参数:有无新贴,论坛性质
function Showbbsstat(HaveNew,BbsProperty)
{
if (HaveNew=='1'&&BbsProperty!='1')
{
return(Showpic(Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[6],'无新贴子'))
}
if (HaveNew=='1'&&BbsProperty=='1')
{
return(Showpic(Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[14],'无新贴子'))
}
if (HaveNew=='0'&&BbsProperty=='1')
{
return(Showpic(Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[15],'有新贴子'))
}
if (HaveNew=='0'&&BbsProperty!='1')
{
return(Showpic(Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[7],'有新贴子'))
}
}
//分解版主列表的函数
function replacemasterstring(masterlist)
{
if (masterlist=='')
{
masterlist='暂无';
return(masterlist)
}
else
{
var tmpstr='';
masterlist=masterlist.split("|");
for (tmpid=0;tmpid<masterlist.length;tmpid++)
{
tmpstr+=' <a onMouseOver=\'ShowMenu("<a style=font-size:9pt;line-height:14pt; href=dispuser.asp?name='+ masterlist[tmpid]+' target=_blank >查看资料</a><br><a style=font-size:9pt;line-height:14pt; href=messanger.asp?action=new&touser='+ masterlist[tmpid]+' target=_blank >给他留言</a>",50)\'>'+ masterlist[tmpid]+'</a> '
}
return(tmpstr);
}
}
//分解最后发贴字串的函数
function showlastpost(lastpoststr)
{
if (lastpoststr=='$$$$'||lastpoststr=='')
{
return('主题:无<br>作者:无<br>日期:无')
}
else
{
var str='';
lastpoststr=lastpoststr.split("$");
str+='主题:';
str+='<a href="Dispbbs.asp?boardid='+lastpoststr[7]+'&ID='+lastpoststr[6]+'&replyID='+lastpoststr[1]+'&skin=1" title="转到'+lastpoststr[3]+'">';
str+=lastpoststr[3].substring(0,10);
str+='</a>';
str+='<br>作者:';
str+='<a href="dispuser.asp?id='+lastpoststr[5]+'" target="_blank">'+lastpoststr[0] +'</a>';
str+='<br>日期:';
str+=lastpoststr[2] +' <a href="dispbbs.asp?Boardid='+lastpoststr[7]+'&ID='+ lastpoststr[6] +'&replyID=' + lastpoststr[1] +'&skin=1"><IMG border=0 src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_statePic[5]+'" title="转到:'+lastpoststr[3]+'"></a>';
return(str)
}
}
function showuserinfo()
{
document.write ('<table cellpadding="5" cellspacing="1" class="tableborder1" align="center" style="word-break:break-all;">');
document.write ('<TR><Th align="left" colSpan="2" height="25">-=> 用户来访信息</Th></TR>');
document.write ('<TR>');
document.write ('<TD valign="top" class="tablebody1" height="25" width="100%" >');
document.write ('您的真实IP 是:'+Dvbbs.userip+', ');
document.write (usersysinfo());
document.write ('</TD></TR>');
document.write ('<TR><Th colSpan="2" align="left" id="tabletitlelink" height="25" style="font-weight:normal"><b>-=> 论坛在线统计</b> ');
document.write ('[<span id="Showtxt" onClick="ShowOnline();" style="CURSOR: hand">显示详细列表</span>]');
document.write ('[<a href="boardstat.asp?reaction=online">查看在线用户位置</a>]</Th></TR>');
document.write ('<TR>');
document.write ('<TD width="100%" valign="top" class="tablebody1"> 目前论坛上总共有 <b id=all>'+Dvbbs.allonline+'</b> 人在线,其中注册会员 <b id=allu >'+ Dvbbs.onlinenum +'</b> 人,访客 <b id=allg>'+ Dvbbs.guestnum +'</b> 人。<br>');
document.write ('历史最高在线纪录是 <b>'+ Dvbbs.Maxonline +'</b> 人同时在线,发生在:'+Dvbbs.MaxonlineDate);
document.write ('<BR>');
document.write ('<font color="'+ Dvbbs.Forum_Body[8] +'">');
document.write ('名单图例</font>:');
for (i=0;i<Dvbbs.GroupListNum ;i++ )
{
document.write (Dvbbs.GroupList[i]);
if (i<Dvbbs.GroupListNum-1)
{
document.write (' ‖ ');
}
}
document.write (' <hr size=1 color="'+Dvbbs.Forum_Body[27]+'">');
document.write ('<table width="100%" border="0" cellspacing="0" cellpadding="0" >');
document.write ('<tr style="display:none" id="follow" ><td colspan=5><span id="followTd" ><div style="width:240px;margin-left:18px;border:1px solid black;background-color:lightyellow;color:black;padding:2px" onclick="showonline()">正在读取在线信息,请稍侯……</div></span></td></tr>');
document.write ('</table>');
document.write ('</TD>');
document.write ('</TR>');
document.write ('</TABLE>');
document.write ('<BR>');
document.write ('<table cellspacing="1" cellpadding="3" width="'+Dvbbs.Forum_Body[12]+'" border="0" align="center">');
document.write ('<tr><td align="center">');
document.write ('<img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[6]+'" align="absmiddle"> ');
document.write ('没有新的帖子 ');
document.write ('<img src="'+ Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[7]+'" align="absmiddle">');
document.write (' 有新的帖子 ');
document.write ('<img src="'+ Dvbbs.Forum_Info[7]+Dvbbs.Forum_pic[15]+'" align="absmiddle"> ');
document.write ('被锁定的论坛</td></tr>');
document.write ('</table>');
if (Dvbbs.Forum_Setting[15]=='1'||Dvbbs.Forum_Setting[14]=='1')
{
ShowOnline();
}
}
//检查用户浏览器版本和操作系统的函数
function usersysinfo()
{
var appVersion,tmpstr
tmpstr=navigator.appVersion.split(";")
tmpstr[2]=tmpstr[2].replace("NT 5.2","2003")
tmpstr[2]=tmpstr[2].replace("NT 5.1","XP")
tmpstr[2]=tmpstr[2].replace("NT 5.0","2000")
tmpstr[2]=tmpstr[2].replace("9x","ME")
tmpstr[2]=tmpstr[2].replace("(","")
tmpstr[2]=tmpstr[2].replace(")","")
appVersion='<B>操作系统</B>:'+tmpstr[2]+',<B>浏 览 器</B>:'+navigator.appName+tmpstr[1].replace("MSIE","")
return(appVersion)
}
//友情论坛
function showbbslink()
{
document.write ('<table cellpadding=3 cellspacing=1 align=center class=tableborder1>');
document.write ('<TR><Th colSpan=2 align=left height=25>-=> 友情论坛</Th></TR>');
document.write ('<TR><TD vAlign=top class=tablebody1 width=100% >');
document.write ('<table width=100% >');
Dvbbs.GetForumLink=Dvbbs.GetForumLink.split("$?&!@");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -