dvelist.js
来自「胜天购物销售系统前台购买特征: 时代购物系统前台购物车部分界面友好」· JavaScript 代码 · 共 375 行 · 第 1/2 页
JS
375 行
Dvbbs.totalrec=0
Dvbbs.Elist='';
document.write ('<iframe width=0 height=0 src="" id="hiddenframe"></iframe>');
function ShowNews()
{
Dvbbs.News=Dvbbs.News.split("|||")
document.write ('<table cellspacing=1 cellpadding=3 align=center border=0 width='+ Dvbbs.Forum_Body[12] +'>');
document.write ('<tr><td align=center width=100% valign=middle colspan=2>');
document.write ('<a href="javascript:openScript(\'announcements.asp?action=showone&boardid=' + Dvbbs.BoardID + '\',500,400)\">'+Dvbbs.News[0]+'</a>'+Dvbbs.News[1]);
document.write ('</td></tr></table>');
}
//显示在线表格
function BbsOnlineTable()
{
document.write ('<TABLE cellpadding="3" cellspacing="1" class="tableborder1" align="center">');
document.write ('<tr>');
document.write ('<Th height="25" width="100%" align=left id=tabletitlelink style="font-weight:normal">-=> 论坛在线统计:总在线<b id=all>'+Dvbbs.allonline+'</b>人,其中'+ Dvbbs.BoardType +'上共有 <b id=allu>'+Dvbbs.onlinenum+'</b> 位会员与 <b id=allg>'+ Dvbbs.guestnum +'</b> 位客人。今日贴子 <b><font color="'+ Dvbbs.Forum_Body[8]+'">'+ Dvbbs.todayNum +'</font></b> ');
document.write ('[<span id=showtype onClick="ShowOnline();" style="CURSOR: hand">显示详细列表</span>]');
document.write ('</Th></TR>');
document.write ('<tr style="display:none" id="follow0" ><td colspan="2" class="tablebody1">');
document.write ('<table cellpadding="2" cellspacing="1" border="0" width="100%" style="word-break:break-all;">');
document.write ('<tr><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></tr>');
document.write ('</TABLE>');
document.write ('<BR>');
}
function ShowOnline()
{
var targetDiv =eval("document.all.follow0");
if (targetDiv.style.display!='block')
{
targetDiv.style.display="block";
document.frames["hiddenframe"].location.replace('Dvonline.asp?Boardid='+Dvbbs.BoardID);
showtype.innerText='关闭详细列表';
}
else
{
targetDiv.style.display="none";
showtype.innerText='显示详细列表';
}
}
function SmallPapers()
{
this.topic=new Array();
this.postuser=new Array();
this.id=new Array();
}
var SmallPaper=new SmallPapers();
function ShowbbsBoard()
{
//发贴按钮
document.write ('<table cellpadding="0" cellspacing="0" border="0" width="'+Dvbbs.Forum_Body[12]+'" align="center" valign="middle"><tr>');
document.write ('<td align="center" width="2"> </td>');
document.write ('<td align="left"> ');
if ((Dvbbs.Board_Setting[43]=='0' && Dvbbs.Board_Setting[0]=='0')|| Dvbbs.Board_Setting[43]=='0' && Dvbbs.Board_Setting[0]=='1' && (Dvbbs.master || Dvbbs.superboardmaster ||Dvbbs.boardmaster))
{
document.write ('<a href="announce.asp?boardid='+Dvbbs.BoardID+'"><img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_boardpic[1]+'" border="0" alt="发新帖"></a>');
document.write (' <a href="vote.asp?boardid='+Dvbbs.BoardID+'"><img src="'+ Dvbbs.Forum_Info[7]+Dvbbs.Forum_boardpic[2]+'" border="0" alt="发起新投票"></a>');
document.write (' <a href="smallpaper.asp?boardid='+Dvbbs.BoardID+'"><img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_boardpic[3]+'" border="0" alt="发布小字报"></a>');
}
else
{
if (Dvbbs.Board_Setting[0]=='1')
{
document.write ('<B>本论坛在锁定状态,不允许进行发贴/回帖等操作</B>');
}
}
document.write ('</td>');
document.write ('<td align="right"><img src="'+Dvbbs.Forum_Info[7]+'team2.gif" align="absmiddle"> 本版版主:'+replacemasterstring(Dvbbs.BoardMaster)+' </td></tr></table>');
document.write ('<TABLE cellPadding="1" cellSpacing="1" class="tableborder1" align="center">');
}
//分解版主列表的函数
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);
}
}
var showstatspic=new Array();
showstatspic[0]='<img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_statePic[0]+'" alt="开放主题">';
showstatspic[1]='<img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_statePic[1]+'" alt="热门主题">';
showstatspic[2]='<img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_statePic[2]+'" alt="本主题已锁定">';
showstatspic[3]='<img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_statePic[3]+'" alt="固顶主题">';
showstatspic[4]='<img src="'+Dvbbs.Forum_Info[7]+Dvbbs.Forum_statePic[4]+'" alt="精华帖子">';
//贴子信息函数
function bbstopic()
{
this.id=new Array();
this.Announceid=new Array();
this.RootID=new Array();
this.BoardID=new Array();
this.Title=new Array();
this.PostUserName=new Array();
this.PostUserID=new Array();
this.DateAndTime=new Array();
this.Expression=new Array();
}
var topiclist=new bbstopic();
//显示贴子列表
function Showtopiclist()
{
//分解数据
Dvbbs.Elist=dvhtmlencode(Dvbbs.Elist)
Dvbbs.Elist=Dvbbs.Elist.split("bb^%$#")
var liststr
for(i=0;i<Dvbbs.Elist.length-1;i++)
{
liststr=Dvbbs.Elist[i].split("^*%$")
topiclist.id[i]=liststr[0];
topiclist.Announceid[i]=liststr[1];
topiclist.RootID[i]=liststr[2];
topiclist.BoardID[i]=liststr[3];
topiclist.Title[i]=liststr[4];
topiclist.PostUserName[i]=liststr[5];
topiclist.PostUserID[i]=liststr[6];
topiclist.DateAndTime[i]=liststr[7];
topiclist.Expression[i]=liststr[8];
}
if ((Dvbbs.currentpage-1)%10==0)
{
Dvbbs.p=(Dvbbs.currentpage-1) /10
}
else
{
Dvbbs.p=((Dvbbs.currentpage-1) /10)-((Dvbbs.currentpage-1)%10)/10
}
document.write ('<TABLE cellPadding=1 cellSpacing=1 class=tableborder1 align=center>');
document.write ('<TR align=middle>');
document.write ('<Th height="25" width="32" id="tabletitlelink"><a href="list.asp?boardid='+Dvbbs.BoardID+'&page='+Dvbbs.currentpage+'&action=batch">状态</a></th>');
document.write ('<Th width=*>主 题 </Th>');
document.write ('<Th width="80">作 者</Th>');
document.write ('<Th width="195">最后更新 </Th>');
document.write ('</TR>');
if (topiclist.id.length==0)
{
document.write ('<tr><td colSpan=5 width=100% class=tablebody1 height=25>本论坛暂无精华贴:)</td></tr>');
}
//循环
for (i=0;i<topiclist.id.length;i++)
{
document.write ('<TR align=middle><TD class=tablebody2 width=32 height=27>');
document.write (showstatspic[4]);
document.write ('</TD><TD align=left class=tablebody1 width=*>');
document.write (' <img src="'+Dvbbs.Forum_Info[8] +topiclist.Expression[i]+'" width=15 height=15> ');
document.write (' <a href="dispbbs.asp?boardID='+topiclist.BoardID[i]+'&ID='+topiclist.RootID[i]+'&replyID='+topiclist.Announceid[i]+'&skin=1">');
if (topiclist.Title[i].length>46)
{
document.write (dvhtmlencode(topiclist.Title[i].substring(0,46)+'....'));
}
else
{
document.write (dvhtmlencode(topiclist.Title[i]));
}
document.write ('</a>');
document.write ('</TD>');
document.write (' <TD class=tablebody2 width=80>');
document.write ('<a href="dispuser.asp?id='+topiclist.PostUserID[i]+'" target="_blank">'+topiclist.PostUserName[i]+'</a>');
document.write ('</TD>');
document.write ('<TD align=left class=tablebody2 width=195> ');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?