/********************************************************************************/
/*   for Dv7 v1.1 ʽ       				 	*/
/* ========================      						*/
/* ӭʹ  ,ʼʹ֮ǰ,Ķȫ˵	*/
/********************************************************************************/
/* Welcome to http://www.chenwang.net/leadbbs					*/
/********************************************************************************/

޸ϸ˵:
޸(Page_dispbbs)  template.html(2)template.html(4)̳Dv7 SP2δ
޸ģֱ滻滻֮ǰ뱸ԭ롣

һtemplate.html(2)
1.ϸ޸˵
ҵ&nbsp;&nbsp;ע᣺{$regdate}<BR>룬һ
{$userpet}

2.޸ĺĴ룺
<!---->
<TABLE cellPadding=5 cellSpacing=1 align=center class=tableborder1 style="table-layout:fixed;word-break:break-all">
<tr><td class="{$tablebody}" valign=top width=175>
<table width=100% cellpadding=4 cellspacing=0><tr>
<td width=* valign=middle style="{$namestyle}">&nbsp;
<font color="{$usercolor}"><B>{$username}</B></font>
</td><td width=25 valign=middle>{$onlinepic}
</td><td width=16 valign=middle>{$birthday}</td>
</tr></table>
{$userface}
&nbsp;&nbsp;<img src="{$titlepic}"><br>
{$raytitle}
{$usertitle}
&nbsp;&nbsp;ȼ{$userclass} <BR>
{$userpower}
&nbsp;&nbsp;£{$article}<br>
&nbsp;&nbsp;֣{$userep}<br>
{$usergroup}
&nbsp;&nbsp;ע᣺{$regdate}<BR>
{$userpet}
{$topicvote}
</td><td class={$tablebody} valign=top width=*>
<table width=100% ><tr><td width=*>
{$raytopic}
{$raysms}
<a href="javascript:openScript('messanger.asp?action=new&touser={$username}',500,400)"><img src="{$PicUrl}message.gif" border=0 alt="{$username}һϢ" align=absmiddle></a>&nbsp;
<a href="friendlist.asp?action=addF&myFriend={$username}" target=_blank><img src="{$PicUrl}friend.gif" border=0 alt="{$username}" align=absmiddle></a>&nbsp;
<a href="dispuser.asp?id={$userid}" target=_blank><img src="{$PicUrl}profile.gif" border=0 alt="鿴{$username}ĸ" align=absmiddle></a>&nbsp;
<a href="query.asp?stype=1&nSearch=3&keyword={$username}&BoardID={$boardid}&SearchDate=ALL" target=_blank><img src="{$PicUrl}find.gif" border=0 alt="{$username}{$boardtype}" align=absmiddle></a>&nbsp;
{$email}{$useroicq}{$homepage}{$UserUC}
<a href="post.asp?action=re&BoardID={$boardid}&replyID={$announceid}&id={$topicid}&star={$star}&reply=true"><img src="{$PicUrl}reply.gif" border=0 alt=ûظ align=absmiddle></a>&nbsp;
<a href="post.asp?action=re&BoardID={$boardid}&replyID={$announceid}&id={$topicid}&star={$star}"><img src="{$PicUrl}reply_a.gif" border=0 alt=ظ align=absmiddle></a></td><td width=80>
{$floor}
</td></tr>
<tr><td height=1 colspan=2>
<table border=0 cellspacing=0 cellpadding=0 align=center style="width:100%" class=tableborder1>
<tr><td> </td></tr>
</table>
</td></tr>
</table>
<blockquote><table class=tablebody2 border=0 width=90% style="table-layout:fixed;word-break:break-all"><tr>
<td width="100%" style="font-size:{$fontsize}pt;line-height:{$lineheight}pt">
{$topicinfo}
</td></tr></table></blockquote>
</td></tr>
<tr><td class="{$tablebody}" valign=middle align=center width=175>
<a href="look_ip.asp?boardid={$boardid}&userid={$userid}&ip={$ip}&action=lookip" target=_blank>
<img align=absmiddle border=0 src="{$PicUrl}ip.gif" alt="鿴ûԴIP{$ip}"></a> {$dateandtime}</td>
<td class="{$tablebody}" valign=middle width=*>
<table width=100% cellpadding=0 cellspacing=0><tr><td align=left valign=middle> 
{$raytopicsms}
{$raysmsad}
&nbsp;</td><td align="right" nowarp valign="bottom" width="200">
{$manageinfo}
</td>
<td align=right valign=bottom width=4> </td>
</tr></table>
</td></tr></table>

template.html(4)
1.ϸ޸˵
function dvbbs_show_topic(AnnounceID,BoardID,UserName,Topic,isagree,useremail,userim,UserMobile,face,Topic_Ads,title,sign,UserGroup,body,dateandtime,Expression,ip,RootID,signflag,isbest,PostUserid,layer,userclass,width,height,article,addDate,userWealth,userEP,userCP,birthday,sex,LockUser,userPower,titlepic,UserGroupID,LastLogin,IsChallenge,i,tablebody,isOnline,LockPage)Ϊ
function dvbbs_show_topic(AnnounceID,BoardID,UserName,Topic,isagree,useremail,userim,UserMobile,face,Topic_Ads,title,sign,UserGroup,body,dateandtime,Expression,ip,RootID,signflag,isbest,PostUserid,layer,userclass,width,height,article,addDate,userWealth,userEP,userCP,birthday,sex,LockUser,userPower,titlepic,UserGroupID,LastLogin,IsChallenge,i,tablebody,isOnline,LockPage,userpet)

ҵstr = str.replace(/{\$topicinfo}/gi,topicinfo); 룬һ
str = str.replace(/{\$userpet}/gi,userpet);

2.޸ĺĴ룺
function dvbbs_show_topic(AnnounceID,BoardID,UserName,Topic,isagree,useremail,userim,UserMobile,face,Topic_Ads,title,sign,UserGroup,body,dateandtime,Expression,ip,RootID,signflag,isbest,PostUserid,layer,userclass,width,height,article,addDate,userWealth,userEP,userCP,birthday,sex,LockUser,userPower,titlepic,UserGroupID,LastLogin,IsChallenge,i,tablebody,isOnline,LockPage,userpet){
	var str=TempStr;
	var sstr=sTempStr;
	var UserIM=dvhtmlencode(userim).split("\|\|\|");
	var homepage=UserIM[0];
	var oicq=UserIM[1];
	var uc=UserIM[6];
	//жϲ滻
	if (facesetting=='1' && face!=''){
		var facestr=sstr[0];
		facestr = facestr.replace(/{\$faceurl}/gi,dvhtmlencode(FilterJS(face)));
		facestr = facestr.replace(/{\$facewidth}/gi,width);
		facestr = facestr.replace(/{\$faceheight}/gi,height);
		str = str.replace(/{\$userface}/gi,facestr);
	}
	str = str.replace(/{\$userface}/gi,"");
	if (IsChallenge=='1'){
		str = str.replace(/{\{$raytitle}/gi,sstr[1]);
	}
	str = str.replace(/{\$raytitle}/gi,"");
	if (title!=''){
		str = str.replace(/{\$usertitle}/gi,sstr[2]);
		str = str.replace(/{\$title}/gi,dvhtmlencode(title));
	}
	str = str.replace(/{\$usertitle}/gi,"");
	if (userPower!='' && userPower!='0'){
		str = str.replace(/{\$userpower}/gi,sstr[3]);
		str = str.replace(/{\$power}/gi,userPower);
	}
	str = str.replace(/{\$userpower}/gi,"");
	if (UserGroup!='' && UserGroup!=''){
		str = str.replace(/{\$usergroup}/gi,sstr[4]);
		str = str.replace(/{\$groups}/gi,dvhtmlencode(UserGroup));
	}
	str = str.replace(/{\$usergroup}/gi,"");
	if (LockUser=='2' || LockPage=='2'){
		str = str.replace(/{\$topicinfo}/gi,lockuserinfo1);
	}
	if (LockUser=='1'){
		str = str.replace(/{\$topicinfo}/gi,lockuserinfo2);
	}
	if (isbest=='1' && GroupSetting41=='0'){
		str = str.replace(/{\$topicinfo}/gi,noviewbest);
	}
	var topicinfo='';
	var manageinfo='';
	manageinfo=sstr[14];
	topicinfo = sstr[11];
	if (i=='0' && star=='1'){
		if (isagree==''){isagree="0|0";}
		isagree=isagree.split("|");
		str = str.replace(/{\$topicvote}/gi,sstr[5]);
		str = str.replace(/{\$fnum}/gi,isagree[0]);
		str = str.replace(/{\$dnum}/gi,isagree[1]);
		str = str.replace(/{\$floor}/gi,topfloor);
	topicinfo = topicinfo.replace(/{\$topic}/gi,dvbbs_topicmode(Topic,TopicMode));
	}else{manageinfo+= sstr[15];}
	topicinfo = topicinfo.replace(/{\$topic}/gi,dvhtmlencode(Topic));
	topicinfo = topicinfo.replace(/{\$body}/gi,body);
	topicinfo = topicinfo.replace(/{\$expression}/gi,"{$PicUrl}topicface/"+Expression);
	if (signflag=='1' && Forum_Setting42=='1' && sign!='' && LockUser=='0'){
		topicinfo+= sstr[12];
		topicinfo = topicinfo.replace(/{\$usersign}/gi,sign);
	}
	
	manageinfo+= sstr[16];
	var actioninfo=''
	if (isbest=='1'){
		actioninfo=actioninfo1;
	}else{actioninfo=actioninfo2;}
	manageinfo+= sstr[17];
	manageinfo = manageinfo.replace(/{\$actioninfo}/gi,actioninfo);
	manageinfo+= sstr[18].replace(/{\$actioninfo3}/gi,actioninfo3);

	str = str.replace(/{\$manageinfo}/gi,manageinfo);
	str = str.replace(/{\$floor}/gi,floor.replace(/{\$floornum}/gi,((Board_Setting27*(star-1))+(i+1))));
	str = str.replace(/{\$usemoney}/gi,votemoney);
	str = str.replace(/{\$topicvote}/gi,"");
	if (Forum_ChanSetting0=='1' && Forum_ChanSetting7=='1')
	{
		str = str.replace(/{\$raytopic}/gi,sstr[6]);
	}
	str = str.replace(/{\$raytopic}/gi,"");
	if (Forum_ChanSetting0=='1' && Forum_ChanSetting6=='1')
	{
		str = str.replace(/{\$raysms}/gi,sstr[7]);
		str = str.replace(/{\$raytopicsms}/gi,sstr[13]);
	}
	str = str.replace(/{\$raysms}/gi,"");
	str = str.replace(/{\$raytopicsms}/gi,"");
	str = str.replace(/{\$raysmsad}/gi,unhtml(Topic_Ads));
	
	if (useremail!=''){
		str = str.replace(/{\$email}/gi,sstr[8]);
		str = str.replace(/{\$useremail}/gi,dvhtmlencode(useremail));
	}
	str = str.replace(/{\$email}/gi,"");
	//UserIM
	if (oicq!=''){
		str = str.replace(/{\$useroicq}/gi,sstr[9]);
		str = str.replace(/{\$oicq}/gi,oicq);
	}
	str = str.replace(/{\$useroicq}/gi,"");
	if (homepage!=''){
		str = str.replace(/{\$homepage}/gi,sstr[10]);
		str = str.replace(/{\$hpage}/gi,homepage);
	}
	str = str.replace(/{\$homepage}/gi,"");
	if (uc!=''){
		str = str.replace(/{\$UserUC}/gi,sstr[19]);
		str = str.replace(/{\$uc}/gi,uc);
	}
	str = str.replace(/{\$UserUC}/gi,"");

	str = str.replace(/{\$boardid}/gi,BoardID);
	str = str.replace(/{\$announceid}/gi,AnnounceID);
	str = str.replace(/{\$topicid}/gi,RootID);
	str = str.replace(/{\$username}/gi,dvhtmlencode(UserName));
	str = str.replace(/{\$userid}/gi,PostUserid);
	str = str.replace(/{\$alertcolor}/gi,alertcolor);
	str = str.replace(/{\$star}/gi,star);
	str = str.replace(/{\$titlepic}/gi,"{$PicUrl}star/"+titlepic);
	str = str.replace(/{\$userclass}/gi,userclass);
	str = str.replace(/{\$article}/gi,article);
	str = str.replace(/{\$userep}/gi,userEP);
	str = str.replace(/{\$regdate}/gi,addDate);
	str = str.replace(/{\$dateandtime}/gi,dateandtime);
	str = str.replace(/{\$ip}/gi,ip);
	str = str.replace(/{\$fontsize}/gi,fontsize);
	str = str.replace(/{\$lineheight}/gi,lineheight);
	str = str.replace(/{\$tablebody}/gi,tablebody);
	str = str.replace(/{\$birthday}/gi,astro(birthday));
	str = str.replace(/{\$onlinepic}/gi,OnlinePic(isOnline,sex));
	str = str.replace(/{\$tableline}/gi,mainsetting[12]);
	str = str.replace(/{\$namestyle}/gi,namestyle(UserGroupID));
	str = str.replace(/{\$usercolor}/gi,usercolor(UserGroupID));
	str = str.replace(/{\$topicinfo}/gi,topicinfo);
	str = str.replace(/{\$userpet}/gi,userpet);
return(str);
 
}
function FilterJS(str){
	if (str!='')
	{
		str = str.replace(/(&#)/gi,"<I>&#</I>");
		str = str.replace(/(javascript)/gi,"<I>javascript</I>");
		str = str.replace(/(jscript:)/gi,"<I>jscript:</I>");
		str = str.replace(/(js:)/gi,"<I>js:</I>");
		str = str.replace(/(value)/gi,"<I>value</I>");
		str = str.replace(/(about:)/gi,"<I>about:</I>");
		str = str.replace(/(file:)/gi,"<I>file:</I>");
		str = str.replace(/(ment.cookie)/gi,"<I>ment.cookie</I>");
		str = str.replace(/(vbscript:)/gi,"<I>vbscript:</I>");
		str = str.replace(/(vbs:)/gi,"<I>vbs:</I>");
		str = str.replace(/(on(mouse|exit|error|click|key))/gi,"<I>on$2</I>");
	}
	else{
		str='';
	}
	return(str);
}
//һ
function dvhtmlencode(str)
{
	if (str!='')
	{	
		str=str.replace(/ /gi,"&nbsp;")
		str=str.replace(/>/gi,"&#62;")
		str=str.replace(/</gi,"&#60;")
		str=str.replace("/","&#47;")
		str=str.replace(/\r/gi,"")
		str=str.replace(/\n/gi,"")
		str=str.replace(/\'/gi,"&#39;")
		str=str.replace(/\"/gi,'&#34;')
		str=str.replace(/'/gi,"&#39;")
		str=str.replace(/"/gi,'&#34;')
	}
	else
	{
		str='';
	}return(str);
}
function dvbbs_topicmode(str,tmode){
	switch(tmode)
	{
		case '1': return(str);
		case '2': return("<font color=red>" + dvhtmlencode(str) + "</font>");
		case '3': return("<font color=blue>" + dvhtmlencode(str) + "</font>");
		case '4': return("<font color=green>" + dvhtmlencode(str) + "</font>");
		default: return(dvhtmlencode(str));
	}
}

function unhtml(str){
	if (str!='')
	{
		str=str.replace(/&lt;/gi,"<")
		str=str.replace(/&gt;/gi,">")
		return(str);
	}else{
		return(str);
	}
}
function astro(birth)
{
	if (birth!='')
	{	var abc;
		var bstr;
		var mm;
		var yy;
		var dd;
		var birthmonth;
		abc=birth.split(" ")
		bstr=abc[0]
		abc=bstr.split("-")
		yy=(abc[0]*1)
		mm=(abc[1]*1)
		dd=(abc[2]*1)
		if (mm=='1')
		{
			if(dd>=21){return('<img src={$PicUrl}birth/z11.gif alt=ˮƿ'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z10.gif alt=ħ'+mm+'-'+dd+'>');}
		}
		if (mm=='2')
		{
			if(dd>=20){return('<img src={$PicUrl}birth/z12.gif alt=˫'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z11.gif alt=ˮƿ'+mm+'-'+dd+'>');}
		}
		if (mm=='3')
		{
			if(dd>=21){return('<img src={$PicUrl}birth/z1.gif alt='+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z12.gif alt=˫'+mm+'-'+dd+'>');}
		}
		if (mm=='4')
		{
			if(dd>=21){return('<img src={$PicUrl}birth/z2.gif alt=ţ'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z1.gif alt='+mm+'-'+dd+'>');}
		}
		if (mm=='5')
		{
			if(dd>=22){return('<img src={$PicUrl}birth/z3.gif alt=˫'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z2.gif alt=ţ'+mm+'-'+dd+'>');}
		}
		if (mm=='6')
		{
			if(dd>=22){return('<img src={$PicUrl}birth/z4.gif alt=з'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z3.gif alt=˫'+mm+'-'+dd+'>');}
		}
		if (mm=='7')
		{
			if(dd>=23){return('<img src={$PicUrl}birth/z5.gif alt=ʨ'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z4.gif alt=з'+mm+'-'+dd+'>');}
		}
		if (mm=='8')
		{
			if(dd>=24){return('<img src={$PicUrl}birth/z6.gif alt=Ů'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z5.gif alt=ʨ'+mm+'-'+dd+'>');}
		}
		if (mm=='9')
		{
			if(dd>=24){return('<img src={$PicUrl}birth/z7.gif alt='+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z6.gif alt=Ů'+mm+'-'+dd+'>');}
		}
		if (mm=='10')
		{
			if(dd>=24){return('<img src={$PicUrl}birth/z8.gif alt=Ы'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z7.gif alt='+mm+'-'+dd+'>');}
		}
		if (mm=='11')
		{
			if(dd>=23){return('<img src={$PicUrl}birth/z9.gif alt='+mm+'-'+dd+'>');}else{return('<img src={$PicUrl}birth/z8.gif alt=Ы'+mm+'-'+dd+'>');}
		}
		if (mm=='12')
		{
			if(dd>=22){return('<img src={$PicUrl}birth/z10.gif alt=ħ'+mm+'-'+dd+'>');}
			else{return('<img src={$PicUrl}birth/z9.gif alt='+mm+'-'+dd+'>');}
		}
	}else{return('');}
}
//ͼ
function OnlinePic(ID,sex)
{
	if (ID=='0'&& sex=='1')
	{return('<img src="{$PicUrl}ofMale.gif" alt="˧Ӵߣ">');}
	if (ID=='0'&& sex!='1')
	{return('<img src="{$PicUrl}ofFeMale.gif" alt="ŮѽߣҰɣ">');}
	if (ID=='1'&& sex=='1')
	{return('<img src="{$PicUrl}Male.gif" alt="˧Ӵߣ">');}
	if (ID=='1'&& sex!='1')
	{return('<img src="{$PicUrl}FeMale.gif" alt="ŮѽߣҰɣ">');}
}
function namestyle(UserGroupID)
{
	if (UserGroupID=='1')
	{return('filter:glow(color='+mainsetting[9]+',strength=2)');}
	if (UserGroupID=='3' || UserGroupID=='2')
	{return('filter:glow(color='+mainsetting[7]+',strength=2)');}
	if (UserGroupID=='8')
	{return('filter:glow(color='+mainsetting[11]+',strength=2)');}
	if (UserGroupID!='8' && UserGroupID!='3' && UserGroupID!='1')
	{return('filter:glow(color='+mainsetting[5]+',strength=2)');}
}
function usercolor(UserGroupID)
{
	if (UserGroupID=='1')
	{return(mainsetting[8]);}
	if (UserGroupID=='3')
	{return(mainsetting[6]);}
	if (UserGroupID=='8')
	{return(mainsetting[10]);}
	if (UserGroupID!='8' && UserGroupID!='3' && UserGroupID!='1')
	{return(mainsetting[4]);}
}
