<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
require_once INC_PATH.'dv_code.php';
global $_SERVER, $gettitle, $userinfo, $postbuyinfo,$forumuserinfo_spaceline,$show_user_fun_info,$useindexstatic;
$forumuserinfo_spaceline='<font color="#7AADC8"> & </font>';
//相关设置,一个个手工添加
$maxpostlen = $board_settings[49];
$piccheck = $board_settings[46];
$fontsize = $board_settings[80];
$postalipay = $board_settings[57];
$is_postlimit = intval($board_settings[52])?intval($board_settings[52]):0;
$postlimit = ($is_postlimit===1)?intval($board_settings[53])?intval($board_settings[53]):0:0;
$upostalipay = $fsetting['usertopic_alipay'];
$isspace = $fsetting['plus_blog'];
//如果要恢复行距设置请把下面一行屏蔽掉
$lineheight = $board_settings[81];
if($lineheight == 0)
	$lineheight= 'normal';
$indent = $board_settings[82];
$usertitle = $fsetting['usertitle'];
$menpai = $fsetting['ismenpai'];

if( $fsetting['plus_tools'] == 1 ){
} else{
}
$pos = strpos($TopicInfo['expression'],'|');

$mofaface = ( $pos !== false ? substr($TopicInfo['expression'],0,$pos) : '' );

$birthurl = $_DCACHE['forum_birth'][0];
$facpath = $_DCACHE['forum_postface'][0];
$parsedurl = parse_url(getRawUrl(true));
if (!empty($parsedurl['fragment'])) {
	$fragment = '#'.$parsedurl['fragment'];
} else {
	$fragment = '';
}

$styletitle = ShowCodeTitle($TopicInfo['topicmode'],$TopicInfo['topicfont'],1);
$ShowTopIcTitle = (!empty($styletitle))?'<em '.$styletitle.'>'.$gettitle.'</em>': $gettitle;

?>
<div id="MagicFace" style="position:absolute;z-index : 99;visibility:hidden; "></div>
<script type="text/javascript">
var $postlimit = <?=$postlimit?>;

function astro(birth)
{
	if (birth!='')
	{	var tmpstr;
		var bstr;
		var mm;
		var yy;
		var dd;
		var birthmonth;
		tmpstr=birth.split(' ')
		bstr=tmpstr[0]
		tmpstr=bstr.split('-')
		yy=(tmpstr[0]*1)
		mm=(tmpstr[1]*1)
		dd=(tmpstr[2]*1)
		switch(mm){
		case 1 :
		if(dd>=21){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][11]?> alt=<?=$lang['tpl.str1']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][10]?> alt=<?=$lang['tpl.str2']?>'+mm+'-'+dd+'>');}
		break;
		case 2 :
		if(dd>=20){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][12]?> alt=<?=$lang['tpl.str3']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][11]?> alt=<?=$lang['tpl.str1']?>'+mm+'-'+dd+'>');}
		break;
		case 3 :
		if(dd>=21){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][1]?> alt=<?=$lang['tpl.str4']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][12]?> alt=<?=$lang['tpl.str3']?>'+mm+'-'+dd+'>');}
		break;
		case 4 :
		if(dd>=21){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][2]?> alt=<?=$lang['tpl.str6']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][1]?> alt=<?=$lang['tpl.str4']?>'+mm+'-'+dd+'>');}
		break;
		case 5 :
		if(dd>=22){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][3]?> alt=<?=$lang['tpl.str8']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][2]?> alt=<?=$lang['tpl.str6']?>'+mm+'-'+dd+'>');}
		break;
		case 6 :
		if(dd>=22){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][4]?> alt=<?=$lang['tpl.str9']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][3]?> alt=<?=$lang['tpl.str8']?>'+mm+'-'+dd+'>');}
		break;
		case 7 :
		if(dd>=23){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][5]?> alt=<?=$lang['tpl.str10']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][4]?> alt=<?=$lang['tpl.str9']?>'+mm+'-'+dd+'>');}
		break;
		case 8 :
		if(dd>=24){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][6]?> alt=<?=$lang['tpl.str12']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][5]?> alt=<?=$lang['tpl.str10']?>'+mm+'-'+dd+'>');}
		break;
		case 9 :
		if(dd>=24){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][7]?> alt=<?=$lang['tpl.str13']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][6]?> alt=<?=$lang['tpl.str12']?>'+mm+'-'+dd+'>');}
		break;
		case 10 :
		if(dd>=24){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][8]?> alt=<?=$lang['tpl.str14']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][7]?> alt=<?=$lang['tpl.str13']?>'+mm+'-'+dd+'>');}
		break;
		case 11 :
		if(dd>=23){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][9]?> alt=<?=$lang['tpl.str15']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][8]?> alt=<?=$lang['tpl.str14']?>'+mm+'-'+dd+'>');}
		break;
		case 12 :
		if(dd>=22){return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][10]?> alt=<?=$lang['tpl.str2']?>'+mm+'-'+dd+'>');}
		else{return('<img src=<?=$birthurl.$_DCACHE['forum_birth'][9]?> alt=<?=$lang['tpl.str15']?>'+mm+'-'+dd+'>');}
		break;
		default : return('');
}
	}else{return('');}
}
function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;
  obj=document.getElementById("MagicFace");
  for (i=0; i<(args.length-2); i+=3) if (obj) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function DispMagicEmot(MagicID,H,W){
	MagicFaceUrl = "dv_plus/tools/magicface/swf/" + MagicID + ".swf";
	document.getElementById("MagicFace").innerHTML = '<OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + W + '" height="' + H + '"><PARAM NAME=movie VALUE="'+ MagicFaceUrl +'"><param name=menu value=false><PARAM NAME=quality VALUE=high><PARAM NAME=play VALUE=false><param name="wmode" value="transparent"><embed src="' + MagicFaceUrl +'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + W + '" height="' + H + '"></embed>';
	document.getElementById("MagicFace").style.top = '250px';
	document.getElementById("MagicFace").style.left = '250px';
	document.getElementById("MagicFace").style.visibility = 'visible';
	MagicID += Math.random();
	setTimeout("MM_showHideLayers('MagicFace','','hidden')",5000);
	NowMeID = MagicID;
}
function LoadMagicEmot(MagicID,topicid){
	var cookiesstr=readCookie('mofaface_'+ topicid);
	if (cookiesstr ==null){
		createCookie('mofaface_'+ topicid,MagicID,365)
		DispMagicEmot(MagicID,350,500)
	}
}

</script>  
<script src="templates/lang/<?=$GLOBALS['fsetting']['lang']?>/js/dv_ajaxclass.js" type="text/javascript"></script>	

<div class="mainbox" >	

<?$langlist = load_lang($lang, 'index.list' );?>
<div class="notice" style="height:40px;">
<?#--------------菜单列条部分 start-----------------?>
    <span class="float:left;">
	   <ul class="menu2" onmouseover="this.className='menu1'" onmouseout="this.className='menu2'" onclick="javasrcipt:document.location.href='post.php?action=new&amp;boardid=<?=$TopicInfo['boardid']?>'">&nbsp;  
	  <li class="list">
		<a href="post.php?action=new&amp;boardid=<?=$TopicInfo['boardid']?>"><span><img src="<?=$imgurl?>post/posticon.gif" border="0" /></span><?=$langlist['list.tpl_Active.str2']?></a>
<? if( $board_settings[57] == 1 ){#交易贴?>
	<a href="post.php?action=new&boardid=<?=$TopicInfo['boardid']?>&stype=1"><span><img src="<?=$imgurl?>post/posticon.gif" border="0" /></span><?=$langlist['list.tpl_Active.str5']?></a><!--交易贴-->
<? }?>    
		<a href="post.php?action=vote&amp;boardid=<?=$TopicInfo['boardid']?>"><span><img src="<?=$imgurl?>post/posticon.gif" border="0" /></span><?=$langlist['list.tpl_Active.str3']?></a>
		<a href="post.php?action=argue_topic&amp;boardid=<?=$TopicInfo['boardid']?>"><span><img src="<?=$imgurl?>post/posticon.gif" border="0" /></span><?=$langlist['list.tpl_Active.str4']?></a>
		<a href="post.php?action=active_topic&amp;boardid=<?=$TopicInfo['boardid']?>"><span><img src="<?=$imgurl?>post/posticon.gif" border="0" /></span><?=$langlist['list.tpl_Active.str1']?></a>
	  <div style="clear:both"></div>
	  </li>
	  </ul>
	  <div >
	  <?if( $TopicInfo['postuserid'] == 0 ){?>
<a href="post.php?action=re&boardid=<?=$TopicInfo['boardid']?>&id=<?=$TopicInfo['topicid']?>&star=<?=$TopicInfo['star']?>&page=<?=$TopicInfo['page']?>&guest=true"  class="repost" style="margin-left:102px;"></a><!-- 回复贴——0 -->
<?}else{?>
<a href="post.php?action=re&boardid=<?=$TopicInfo['boardid']?>&id=<?=$TopicInfo['topicid']?>&star=<?=$TopicInfo['star']?>&page=<?=$TopicInfo['page']?>"  class="repost" style="margin-left:102px;"></a><!-- 回复贴——1 -->
<?}?></div>
	  
    </span>

   <span style="float:right;">
      <?=str_replace('{$hits}','<FONT COLOR="#ff6600">'.$TopicInfo['hits'].'</FONT>',$lang['tpl.str7'])?>&nbsp;&nbsp;
<BR>
<a href="dispbbs_next.php?bid=<?=$boardid?>&id=<?=$_GET['id']?>&mode=1"><?=$lang['disp.user.fun.info21']?></a>
&nbsp;&nbsp;
<a href="dispbbs_next.php?bid=<?=$boardid?>&id=<?=$_GET['id']?>&mode=0"><?=$lang['disp.user.fun.info22']?></a>
   </span>
</div>
</div>
<?#--------------菜单列条部分 end-----------------?>
<?#--------------分页 start-------------------------

if( $TopicInfo['skin'] == 0 ){
	$v = 1;
	if( $v == 1 ){
		$perpage = 10;
		$PageStr = "dispbbs.php?boardid={$TopicInfo['boardid']}&replyid={$TopicInfo['replyid']}&id={$TopicInfo['topicid']}&skin={$TopicInfo['skin']}";
		$totalrec = intval($TopicInfo['child']) + 1;
		if ($fsetting['otherpagesize'] < 1) {
			$fsetting['otherpagesize'] = 20;
		}
		global $star,$board_settings;
		$pagesize = $board_settings[61];
		($pagesize < 1) AND ($pagesize = 30);
		$pagecount = ceil((float)$totalrec / (float)$pagesize);
		$ShowPage = '<base target="_self" />';
		$ShowPage .=  ($pagenationUI = pagenation_UI($totalrec, $NumRows, $star, $pagesize, $perpage, array('pagevar'=>'star', 'url'=>'dispbbs.php?boardid='.$TopicInfo['boardid'].'&amp;replyid='.$TopicInfo['replyid'].'&amp;id='.$TopicInfo['topicid'].'&amp;skin='.$TopicInfo['skin'].'&amp;page='.$page),1));
	}
} else{
	$ShowPage .=  '<span id="showpagelist"></span>';
}
#--------------分页 end-------------------------

#--------------投票区域 start-------------------
if( $TopicInfo['isvote'] == 1 ){ 
    $sumvote = $voteinfo['NumSum'];#取得总票数
?>
<table class="mainbox tableborder tablebox" cellspacing="0" cellpadding="2">
<form action="topicother.php?t=4&boardid=<?=$TopicInfo['boardid']?>&voteid=<?=$voteinfo['voteid']?>&id=<?=$TopicInfo['topicid']?>" method="post">
  <tr>
	  <th colspan="3"><h1>
	<?

	echo $lang['tpl.str16'];
	echo $ShowTopIcTitle
	
	?>	  
	  </h1></th>
  </tr>
<?
if( is_array($voteinfo['voteitem']) ){
	$position = 0;
	foreach ($voteinfo['voteitem'] AS $key => $currVoteItem ) {
		$position++;
		$currNum = $voteinfo['num'][$key];
?>
  <tr>
	<td width="5%"><?=$position?>.<? if( $voteinfo['votetype'] == 0 ){ ?><input type="radio" class="radio" name="postvote" value="<?=($position-1)?>" /><? } else{?><input type="checkbox" class="chkbox" name="postvote_<?=($position-1)?>" value="<?=($position-1)?>" /><? } ?></td>
	<td width="40%"><?=($currVoteItem)?></td>
	<td width="*">
	<? if( $sumvote == 0 ){ ?>
			<div style="float:left;width :40px;padding:0px 2px;"><img src="<?=("images/bar/bar".(($position-1)%10)+1).".gif"?>" width="0" height="8" alt="" /></div>
			<div style="float:left;"><b><?=$currNum?> <?=$lang['tpl.str17']?></b>0%</div>
	<? } else{ ?>
			<div style="float:left;width:<?=floor(($currNum/$sumvote)*80)?>%;padding-top:4px;"><img src="images/bar/bar<?=((($position-1)%10)+1)?>.gif" width="100%" height="8" alt="" /></div>
			<div style="float:left;"><b><?=$currNum?> <?=$lang['tpl.str17']?></b><?=floor((($currNum/$sumvote)*1000)/10)?>%</div>
	<? } ?>
	</td>
  </tr>
<?
	}
 }
?>
  <tr>
	  <td colspan="3" style="height:30px">&nbsp;&nbsp;
	<? if( $userid <= 0 ){ ?>
	<?=$lang['tpl.str18']?>
	<? } elseif( intval($voteinfo['istimeout']) ==1 ){ ?>
	<?=$lang['tpl.str19']?>
	<? } elseif( $TopicInfo['locktopic'] == 1 ){ ?>
	<?=$lang['tpl.str20']?>
	<? } elseif( $voteinfo['alreadyvote'] == 1 ){ ?>
	<?=$lang['tpl.str21']?>
	<? } else{ ?>

	<button onMousemove="button_move(this)" onMouseout="button_out(this)" name="Submit2" type="submit"  name="Submit"> <?=$lang['tpl.str16']?> </button>

	<? } ?>
    [<?=$lang['tpl.str22']?> <b><?=$sumvote?> <?=$lang['tpl.str17']?></b> <?=$lang['tpl.str23']?> <b><?=$voteinfo['voters']?></b> <?=$lang['tpl.str24']?><?=gmdate('Y-m-d H:i:s', $voteinfo['timeout'])?> | <a href="javascript:openScript('viewinfo.php?t=1&boardid=<?=$TopicInfo['boardid']?>&id=<?=$voteinfo['voteid']?>',300,500)"><?=$lang['tpl.str25']?></a>]
	</td>
  </tr>
  <tr>
	  <td colspan="3">
		<?=$lang['tpl.str26']?> <b><?=$voteinfo['uarticle']?></b> <?=$lang['tpl.str27']?> <b><?=$voteinfo['uep']?></b> <?=$lang['tpl.str28']?> <b><?=$voteinfo['ucp']?></b>  <?=$lang['tpl.str29']?> <b><?=$voteinfo['uwealth']?></b> <?=$lang['tpl.str30']?> <b><?=$voteinfo['upowe']?></b>
	</td>
  </tr>
</form>
</table>
<? } 
#--------------投票区域 end-------------------
?>

<? 
#------------------------- 活动显示 start------------
if( $TopicInfo['isvote'] == -2)
{ 
	if($activeinfo['sex'] == -1)
		$activesex = $lang['tpl_Active.str42'];
	elseif($activeinfo['sex'] ==1)
		$activesex = $lang['tpl_Active.str43'];
	else
		$activesex =$lang['tpl_Active.str44'];
	if($activeinfo['timemode']==0)
		$creation_date = gmdate('Y-m-d H:i', $activeinfo['starttime']);
	else
		$creation_date =gmdate('Y-m-d H:i', $activeinfo['starttime'])."-".gmdate('Y-m-d H:i', $activeinfo['endtime']);
		$end_time = gmdate('Y-m-d H:i', $activeinfo['expiretime']);
?>
<table class="mainbox tableborder" cellspacing="0" cellpadding="0">
	<form action="topicother.php?t=9&action=join&boardid=2&activeid=<?=$activeinfo['activeid']?>&id=<?=$TopicInfo['topicid']?>" method="post" name = "activity" onsubmit="return cclicksubmit(this.form);" >
	<INPUT TYPE="hidden" NAME="timemode" value="<?=$activeinfo['timemode']?>">
	<INPUT TYPE="hidden" NAME="starttime" value="<?=$activeinfo['starttime']?>">
	<INPUT TYPE="hidden" NAME="endtime" value="<?=$activeinfo['endtime']?>">
	<INPUT TYPE="hidden" NAME="expiretime" value="<?=$activeinfo['expiretime']?>">
  <tr>
	  <th colspan="2"><h1><?=$lang['tpl_Active.str1'].$activeinfo['activename']?>
	  </h1></th>
  </tr>
  <tr>
	<td class="list_post1">&nbsp;&nbsp;<?=$lang['tpl_Active.str45']?></td>
	<td class="list_post2"><?=$activeinfo['activecity']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str2']?></td>
	<td><?=$activeinfo['activeclass']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str3']?></td>
	<td><?=$creation_date?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str4']?></td>
	<td><?=$activeinfo['location']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str5']?></td>
	<td><?=$lang['tpl_Active.str6'].$activeinfo['cost'].$lang['tpl_Active.str7']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str9']?></td>
	<td><?=$activeinfo['strength']?> 人</td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str10']?></td>
	<td><?=$lang['tpl_Active.str11'].$activenonum['nonum'].$lang['tpl_Active.str12'].$activeisnum['isnum'].$lang['tpl_Active.str13'].$activeisnum['isnum']+$activenonum['nonum']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str14']?></td>
	<td><?=$end_time?></td>
  </tr>
<? if( $userid != 0 ){ ?>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str15']?></td>
	<td><INPUT class=radio type=radio CHECKED value=0 name=payment> <?=$lang['tpl_Active.str16']?> 
	<INPUT class=radio type=radio value=1 name=payment> <?=$lang['tpl_Active.str17']?> 
	<INPUT size=3 name=payvalue onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')"><?=$lang['tpl_Active.str7']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str18']?></td>
	<td><INPUT style="WIDTH: 80%" maxLength=20 name=contact onkeyup="this.value=this.value.replace(/[^0-9.-]/g,'')"> <INPUT CHECKED TYPE="checkbox" NAME="shield_contact" value="1"><?=$lang['tpl_Active.str52']?></td>
  </tr>
  <tr>
	<td>&nbsp;&nbsp;<?=$lang['tpl_Active.str19']?></td>
	<td><textarea name="message" style="WIDTH: 80%" rows="6" ></textarea></td>
  </tr>
  <tr>
	  <td colspan="3"><button onMousemove="button_move(this)" onMouseout="button_out(this)" name="Submit2" type="submit" name="Submit" > <?=$lang['tpl_Active.str20']?> </button></td>
  </tr>

<SCRIPT language=JavaScript>
<!--
function cclicksubmit(form)
{
	if(document.activity.contact.value.length==0 || document.activity.contact.value.length<8)   
	{   
		alert("<?=$lang['tpl_Active.str21']?>"); 
		document.activity.contact.focus();
		return false;   
	}   
	if(confirm("<?=$lang['tpl_Active.str22']?>"))
	{	
		//this.document.activity.submit();
		return true;
	}
	else
	{
		return false;
	}
}
//-->
</SCRIPT>
<?
}# $userid != 0 end
?>
</form>
</table>

<table class="mainbox tableborder" border=0 cellspacing="0" cellpadding="0">
	<form action="topicother.php?t=10&activeid=<?=$activeinfo['activeid']?>&id=<?=$TopicInfo['topicid']?>" method="post" name="Auditing">
  <tr>
	  <th colspan="7"><span><a href="dispbbs.php?boardid=2&replyid=10&id=10&skin=1#top"><?=$lang['tpl_Active.str23']?></a></span><h1><?=$lang['tpl_Active.str23']?></h1></th>
  </tr>
  <tr class="topline">
	<td width="40"><?=$lang['tpl_Active.str24']?></td>
	<td width="15%"><?=$lang['tpl_Active.str25']?></td>
	<td width="*"><?=$lang['tpl_Active.str26']?></td>
	<td width="20%"><?=$lang['tpl_Active.str27']?></td>
	<td width="10%"><?=$lang['tpl_Active.str28']?></td>
	<td width="15%"><?=$lang['tpl_Active.str29']?></td>
	<td width="10%"><?=$lang['tpl_Active.str31']?></td>
  </tr>
<?
if( is_array($_PostResults) ){
	$ActivePostuserid = $_PostResults[0][postuserid];
}
$ii = 0;		
while($rs = $db->fetch_array($joinquery)){
	$ii++;
	$jointime = gmdate('Y-m-d H:i', $rs['joindate']+getUserTimeZoneOffset());
	$getActiveUserName .= $rs['username'].",";
	if($rs['isexamine']==0)
		$isexamine = $lang['tpl_Active.str32'];
	else
		$isexamine = $lang['tpl_Active.str33'];
	if($rs['costmode'] ==0)
		$costmodej = $lang['tpl_Active.str34'];
	else
		$costmodej = $lang['tpl_Active.str35'].$rs['costnum'].$lang['tpl_Active.str7'];
	$rssystemmode=$rs['systemmode'];
	if (strpos($rssystemmode,'@&@') !== false){
		$arrsystemmode = explode('@&@',$rssystemmode);
		if ($arrsystemmode[1] == 1 and $userid!=$ActivePostuserid)
		{
			$rssystemmode = $lang['tpl_Active.str53'];
		}else{
			$rssystemmode = $arrsystemmode[0];			
		}
	}
?>
  <tr>
	<td>&nbsp;<input class="chkbox" type="checkbox" value="<?=$rs['id']?>" name="activeuserid[]"></td>
	<td>&nbsp;<span class="redfont"><?=$rssystemmode?></span></td>
	<td><?=$rs['message']?></td>
	<td><?=$costmodej?></td>
	<td><a target="_blank" href="dispuser.php?id=<?=$rs['userid']?>"><?=$rs['username']?></a></td>
	<td><?=$jointime?></td>
	<td><?=$isexamine?></td>
  </tr>
<?
} #while end

if ($userid===$activeinfo['postuserid'])
{
?>	
<tr>
	<td colSpan="7">
	<input class="chkbox" onclick="CheckAll(this.form);" type="checkbox" value="on" name="chkall"><?=$lang['tpl_Active.str36']?> 
	<input type="radio" name="actionz" value="is" checked="" class="radio"/><?=$lang['tpl_Active.str37']?> 
	<input type="radio" name="actionz" value="no" class="radio"/><?=$lang['tpl_Active.str38']?> 
	<input type="radio" name="actionz" value="del" class="radio"/><?=$lang['tpl_Active.str39']?> 
	&nbsp;<button onMousemove="button_move(this)" onMouseout="button_out(this)"  name="Submit2" type="submit"  name="Submit0"> <?=$lang['tpl_Active.str40']?> </button>
<SCRIPT language=JavaScript>
<!--
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
	{
	var e = form.elements[i];
	if (e.name == 'activeuserid[]')
	   e.checked = form.elements['chkall'].checked;
	}
}

function clicksubmit(form)
{
	if(confirm("<?=$lang['tpl_Active.str41']?>"))
	{	
		this.document.Auditing.submit();
		return true;
	}
	else
	{
		return false;
	}
}
//-->
</SCRIPT>
	</td>
</tr>
<?
} #$activeinfo['postuserid'] end
?>
	</form>
</table>
<BR>
<?
}#------------------------- 活动显示 end------------
?>

<?#--------------每楼显示部分 end-----------------?>
<?
if( is_array($_PostResults) )
{
function ShowDispbbs()
{
	global $_PostResults;
	global $PageCount;

	$position = 0;
	global $bodystyle,$position,$userinfo, $TrueMaster,$forum_ads,$lang,$currUserInfo,$_DCACHE,$imgurl,$postUserResult
		,$upostalipay,$isspace,$username,$userid,$plus_index_value,$TopicInfo,$GLOBALS,$boardmaster
		,$gettitle,$TopicMode,$ShowTopIcTitle,$mofaface;
	if (1 == $board_settings[68]) {
		$userinfo['cananony'] = 1;
	}
	$userinfo['truemaster'] = $TrueMaster;
	$isBuyUser = ((!empty($membername) AND is_array($postbuyusers)) ? in_array($membername,$postbuyusers) : false );
	$bodystyle = 'tablebody2';
	foreach( $_PostResults as $result ){
		//帖间随机广告
		if($forum_ads[12] && THIS_SCRIPT == 'dispbbs') {
			$dispbbs_ads = explode("\r\n", $forum_ads[13]);
			$num = count($dispbbs_ads) - 1;
			$num = rand(0, $num);
			$ShowAds = $dispbbs_ads[$num];
		}
		$currUserID = intval($result['postuserid']);
		$lastpostid = $result['announceid'];
		$position++;
		list($firstIP,$secondIP)=explode('.',$result['ip']);
		$currUserInfo =& $postUserResult["{$currUserID}"];
		if ( $bodystyle == 'tablebody2' ){
			$bodystyle = 'tablebody1';
		}else{
			$bodystyle = 'tablebody2';
		}
print <<<EOT
<table class="tablebox border" cellspacing="0" cellpadding="0" style="border-bottom:0px; margin-bottom:0px;">
EOT;
#---------主题 列条部分-----------------
if ( $position === 1) {
print <<<EOT
  <tr>
	  <th  style="border-bottom:0px;"><!-- 树形 打印 收藏 推荐 修复 主题 --><span>
EOT;
	if( $TopicInfo['skin'] != 1 ){ 
		echo "<a href=\"?boardid={$TopicInfo['boardid']}&replyid={$TopicInfo['replyid']}&id={$TopicInfo['topicid']}&star={$_GET['star']}&skin=1\" title=\"{$lang['tpl.str31']}\" style=\"margin-right: 10px;font-weight : normal ; \">{$lang['tpl.str32']}</a> ";
	} else{ 
		echo "<a href=\"?boardid={$TopicInfo['boardid']}&replyid={$TopicInfo['replyid']}&id={$TopicInfo['topicid']}&star={$_GET['star']}&skin=0\" title=\"{$lang['tpl.str33']}\" style=\"margin-right: 10px;font-weight : normal ; \">{$lang['tpl.str34']}</a> ";
	} 
	echo "<a href=\"topicother.php?t=5&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" target=\"_blank\" title=\"{$lang['tpl.str35']}\" style=\"margin-right: 10px;font-weight : normal ;  \">{$lang['tpl.str36']}</a>";
	if( $userid != 0 ){ 
		echo "<a href=\"favlist.php?action=add&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str37']}\" style=\"margin-right: 10px;font-weight : normal ; \">{$lang['tpl.str38']}</a> ";
		if(true){//$fsetting['sendmail']) 
			echo "<a href=\"topicother.php?t=7&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str39']}\" style=\"margin-right: 10px;font-weight : normal; \">{$lang['tpl.str40']}</a>"; 
		} 
		echo "<a href=\"admin_postings.php?action=p_do_fix_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str41']}\" style=\"margin-right: 10px;font-weight : normal; \">{$lang['tpl.str42']}</a>";
	} 
print <<<EOT
	  </span><h1>
	<base target="_blank" /><!-- 主题 -->
	{$ShowTopIcTitle}
	</h1></th>
  </tr>
EOT;
	}

print <<<EOT
</table>
<table class="tablebox border" cellspacing="0" cellpadding="0" style="table-layout:fixed" >
EOT;
#---------左边用户信息-----------------
	$ShowUserInfo='';
	$ShowUserFace='';
	$ShowUserico='';
	#匿名用户 发帖图像
	if (1 == $userinfo['cananony'] AND 2 == $result['signflag'] AND true !== $userinfo['truemaster'] AND $userid != $currUserID )
	{
		$ShowUserInfo = $lang['tpl.str44']."(".$firstIP.$secondIP.")";
		$ShowUserFace = "<img src='{$imgurl}anyon.gif' width=111 height=111 border=0 />";
	}
	#客人 发帖图像
	elseif( $result['postuserid'] == 0 )
	{
		$ShowUserInfo = $lang['tpl.str45']."(".$firstIP.$secondIP."*.*)";
		$ShowUserFace = "<img src='{$imgurl}guest.gif' width=111 height=111 border=0 />";
	}
	#会员
	else
	{
		$currGrpSettings =& getCurrUserGrpSettings($currUserInfo['usergroupid']);
		$currUserInfo['namestyle'] = $currGrpSettings[58];
		list($tmp1,$tmp2) = explode($lang['tpl.str211'], $currUserInfo['namestyle']);
		if( $currUserInfo['usergroupid'] < 9 ){
			$currNameGlow = $nameglow[$currUserInfo['usergroupid']-1];
		} else{
			$currNameGlow = $_DCACHE['stylecss'][39];
		}

		$ShowUserInfo .= <<<EOT
		<div class="user_self_nav">
		  <ul>	
		  <li class="user2" onMouseOver="this.className='user1'" onMouseOut="this.className='user2'">{$tmp1}{$result['username']}{$tmp2}<img src="{$imgurl}down.gif" style="margin:5px;vertical-align:middle">
			  <div class="user_list">
EOT;
		
	$userim = explode('|||',$currUserInfo['userim']);
	if( $result['postuserid'] != 0 && ($userinfo['cananony'] != 1 || $result['signflag'] != 2 || $TrueMaster === true || $userid == $result['postuserid']) )
	{
		if( $upostalipay == 1 ){
			$ShowUserInfo .=  "<a href=\"https://www.alipay.com/payto:{$currUserInfo[useremail]}&partner=2088002048522272\" target=\"_blank\"><img alt=\"{$lang['tpl.str64']}{$result[username]}{$lang['tpl.str65']}\" border=\"0\" src=\"{$imgurl}alipay_s.gif\"  align=\"middle\"/></a><br /> \r\n";
		}
		if( $isspace == 1 ){
			$ShowUserInfo .= "<a href=\"space.php?UserID_{$result[postuserid]}.index.html\" title=\"{$lang['tpl.str66']}{$result[username]}{$lang['tpl.str67']}\" target=\"_blank\"><img src=\"{$imgurl}space.gif\">&nbsp;".$lang['disp.user.fun.info1']."</a><br /> \r\n";
		}
		if( $userid>0 && $userim[1] != '' && is_numeric($userim[1])){#发送QQ消息
			$ShowUserInfo .= "<a href=\"http://wpa.qq.com/msgrd?V=1&Uin={$userim[1]}&Site={$fsetting['forumname']}&Menu=yes\" title=\"{$lang['tpl.str68']}{$result[username]}\" target=\"_blank\"><img src=\"{$imgurl}qq.gif\">&nbsp;".$lang['disp.user.fun.info18']."</a><br /> \r\n";
		}
		elseif( empty($userid) && $userim[1] != '' && is_numeric($userim[1])){
			$ShowUserInfo .= "<a href=\"http://wpa.qq.com/msgrd?V=1&Uin={$userim[1]}&Site={$fsetting['forumname']}&Menu=yes\" title=\"{$lang['tpl.str68']}{$result[username]}\" target=\"_blank\"><img src=\"{$imgurl}qq.gif\">&nbsp;".$lang['disp.user.fun.info18']."</a><br /> \r\n";
		}
		if( $userid != 0 )
		{
			$username = urlencode($result['username']);
			$ShowUserInfo .= <<<EOT
			<a href="friendlist.php?action=addF&myFriend={$username}" target="_blank" alt="{$lang['tpl.str71']}{$result[username]}{$lang['tpl.str72']}"><img src="{$imgurl}friend.gif">&nbsp;{$lang['disp.user.fun.info14']}</a><br />
			<a href="dispuser.php?id={$result[postuserid]}" target="_blank" alt="{$lang['tpl.str73']}{$result[username]}{$lang['tpl.str74']}"><img src="{$imgurl}profile.gif">&nbsp;{$lang['disp.user.fun.info15']}</a><br /> 					
EOT;
			if( $currUserInfo['useremail'] != '' ){
				$ShowUserInfo .= "<a href=\"mailto:{$currUserInfo[useremail]}\"  alt=\"{$lang['tpl.str77']}{$result[username]}\"><img src=\"{$imgurl}email.gif\">&nbsp;E-Mail</a><br />\r\n";
			}
		}
		if( $userim[0] != '' ){
			$ShowUserInfo .= "<a href=\"{$userim[0]}\" target=\"_blank\" alt=\"{$lang['tpl.str78']}{$result[username]}{$lang['tpl.str79']}\"><img src=\"{$imgurl}homepage.gif\">&nbsp;".$lang['disp.user.fun.info19']."</a><br /> \r\n";
		}
		if( $userim[6] != '' ){
			$ShowUserInfo .= "<a href=\"http://service.51uc.com/user_info/show_user_info_base.shtml?UID={$userim[6]}\" title=\"{$result[username]}[{$userim[6]}]{$lang['tpl.str80']}\" target=\"_blank\"><img src=\"{$imgurl}uc.gif\">&nbsp;".$lang['disp.user.fun.info20']."</a>\r\n";
		}
	}
	$ShowUserInfo .= <<<EOT
		  </div>
	  </li>
	  </ul>
	</div>
EOT;
		#头像 在线或离线
		if (1 == $currUserInfo['userhidden']){
			if( $currUserInfo['usersex'] != 1 ){
				$ShowUserico =  "<img src=\"{$imgurl}offemale.gif\" alt=\"{$lang['tpl.str46']}\"/>\r\n";
			} else{
				$ShowUserico =  "<img src=\"{$imgurl}ofmale.gif\" alt=\"{$lang['tpl.str47']}\"/>\r\n";
			}
		} else{
			if( $currUserInfo['usersex'] != 1 ){
				$ShowUserico =  "<img src=\"{$imgurl}female.gif\" alt=\"{$lang['tpl.str48']}\"/>\r\n";
			} else{
				$ShowUserico =  "<img src=\"{$imgurl}male.gif\" alt=\"{$lang['tpl.str49']}\"/>\r\n";
			}
		}
		#生日
		$ShowUserBirthday ='';
		if ( $currUserInfo['userbirthday'] != ''){
			$ShowUserBirthday = "<div class=\"buser\"><script type=\"text/javascript\" language=\"javascript\">document.write (astro('{$currUserInfo[userbirthday]}'));</script></div>\r\n";
		}
		#用户头像图片
		$ShowUserFace ='';
		$userface = $currUserInfo['userface'];
		if( strpos($userface,'|') != false ){
			list(,$userfacePath) = explode('|',$userface);
			$ShowUserFace .= "<img class=cimg src=\"{$userfacePath}\"  alt=\"\" width=\"{$currUserInfo[userwidth]}\" height=\"{$currUserInfo[userheight]}\" />\r\n";
			list($tmp1,$tmp2) = explode('|',$userface);
			if( $tmp1 != '0' ){
				$ShowUserFace .=  "<BR><a href=\"javascript:void(DispMagicEmot({$tmp1},350,500));\" target=\"_self\">{$lang['tpl.str50']}</a>\r\n";
			}
		} else{
			$ShowUserFace =  "<img  class=cimg src=\"{$userface}\" width=\"{$currUserInfo[userwidth]}\" height=\"{$currUserInfo[userheight]}\"/>\r\n";
		}
		#等级图片
		$ShowUserStar = "<img class=\"cimg\" src=\"images/star/{$currUserInfo[titlepic]}\"/ >\r\n";
		#勋章
		$ShowUserHonorpics='';
		if($currUserInfo['userhonor']!=''){
			if($currUserInfo['userhonor']!=''){
				if(strpos($currUserInfo['userhonor'],'|||')!==false){
					$tmpuserhonor=explode('|||',$currUserInfo['userhonor']);
					foreach ($tmpuserhonor as $tmpuserhonorarrs){			
						$h_title=honortitle($tmpuserhonorarrs);
						$ShowUserHonorpics.='<img class="cimg" src=dv_plus/honor/images/'.$tmpuserhonorarrs.' border=0 width=15 height=30 title='.$h_title.'>&nbsp;';
					}
				}
				else{			
					$h_title=honortitle($currUserInfo['userhonor']);
					$ShowUserHonorpics='<img class="cimg" src=dv_plus/honor/images/'.$currUserInfo['userhonor'].' border=0 width=15 height=30 title='.$h_title.'>';
				}
			}
			else{
				$ShowUserHonorpics='';
			}
		}
		#头衔
		$ShowUserTitle ='';
		if( $usertitle == 1 ){
			if( $currUserInfo['usertitle'] != '' ){
				$ShowUserTitle = "{$lang['tpl.str51']}{$currUserInfo['usertitle']}";
			}
		}
		#给用户发短信和用户发表帖子
		$ShowUserMessanger='';
		if( $userid > 0 ) {
			$ShowUserMessanger =  "<a href=\"messanger.php?action=new&touser={$username}\" title=\"{$lang['tpl.str69']}{$result[username]}{$lang['tpl.str70']}\" target=\"_parent\"><img src=\"{$imgurl}/message.gif\">{$lang['disp.user.fun.info13']}</a>&nbsp;&nbsp;<a href=\"query.php?stype=1&nsearch=3&keyword={$username}&boardid={$TopicInfo[boardid]}&searchdate=ALL\" target=\"_blank\" alt=\"{$lang['tpl.str75']}{$result[username]}{$lang['tpl.str214']}{$TopicInfo[boardtype]}{$lang['tpl.str76']}\"><img src=\"{$imgurl}/find.gif\">{$lang['disp.user.fun.info16']}</a>\r\n";
		}
		#等级
		$ShowUserClass = "{$lang['tpl.str52']}{$currUserInfo[userclass]}\r\n";
		#威望
		$ShowUserPower = '';
		if( $currUserInfo['userpower'] != 0 ){
			$ShowUserPower =  "{$lang['tpl.str53']}<font color=\"red\"><b>{$currUserInfo['userpower']}</b></font>\r\n";
		}
		#文章
		$ShowUserPostEp = "<p>{$lang['tpl.str54']}{$currUserInfo[userpost]}</p>\r\n";
		# 积分
		$ShowUserPostMONEY = "<p>{$lang['tpl.str55']}{$currUserInfo[userep]}</p>\r\n";
		#门派
		$groupname = $currUserInfo['usergroup'];
		$ShowUserGroup = '';
		if( $menpai == 1 && $currUserInfo['usergroup'] != '' ){
			$ShowUserGroup = "<p>{$lang['tpl.str56']}{$currUserInfo['usergroup']}</p>";
		}
		#注册日期
		$ShowUserJoindate = "{$lang['tpl.str58']}".gmdate("Y-m-d H:i:s",$currUserInfo['joindate']+getUserTimeZoneOffset());
		if (1== $userinfo['cananony'] AND 2 == $result['signflag']) {
			$ShowUserCananony = '';
			$ShowUserCananony = '<p><font color="ff0000">'.$lang['tpl.str212'].$lang['tpl.str59'].$lang['tpl.str213'].'</font></p>'."\r\n";
		}

	}#会员 end
#---------帖子右边部分-----------------
	$getpostdate = gmdate('Y-m-d H:i:s',$result['dateandtime']+getUserTimeZoneOffset()).'&nbsp;&nbsp;';
	#用户发帖IP和发帖时间
	$ShowUserPostIpDate = "<img src=\"{$imgurl}time.gif\"  border=\"0\" style=\"vertical-align:middle;\" />&nbsp;&nbsp;{$getpostdate}";
	global $useindexstatic,$groupsetting;
	if($useindexstatic){
		$ShowUserPostIpDate2= '<? if($groupsetting[30] == 1){echo "&nbsp;&nbsp;<img src=\"'.$imgurl.'ip.gif\" title=\"'.$lang['disp.user.fun.info23'].'\" alt=\"'.$lang['disp.user.fun.info23'].'\" border=\"0\" style=\"vertical-align:middle;\" />&nbsp;&nbsp;'.$result['ip'].'";}?>';
	}
	else{
		if($groupsetting[30] == 1){
			$ShowUserPostIpDate2= "&nbsp;&nbsp;<img src=\"{$imgurl}ip.gif\" title=\"{$lang['disp.user.fun.info23']}\" alt=\"{$lang['disp.user.fun.info23']}\" border=\"0\" style=\"vertical-align:middle;\" />&nbsp;&nbsp;{$result['ip']}";
		}
	}
	#收录该帖到我的空间
	if( $isspace == 1 ){
		$ShowUserIsSpace = '';
		$ShowUserIsSpace =  "<a href=\"spacemanage.php?s=1&t=1&m=1&boardid={$TopicInfo[boardid]}&replyid={$result[announceid]}&id={$TopicInfo[topicid]}\" title=\"{$lang['tpl.str60']}\" target=\"_blank\"><img src=\"{$imgurl}spacefav.gif\"  border=\"0\" align=\"middle\" /></a> \r\n";
	}
	#帖子楼数
	if( $TopicInfo['skin'] != 1 ){
		$ShowUserPosition = '';
		if( $TopicInfo['star'] == 1 ){
			switch($position){
				case 1: $ShowUserPosition = $lang['tpl.str61'];break;
				case 2: $ShowUserPosition = $lang['tpl.str61.1'];break;
				case 3: $ShowUserPosition = $lang['tpl.str61.2'];break;
				case 4: $ShowUserPosition = $lang['tpl.str61.3'];break;
				default: 
					$ShowUserPosition = "{$lang['tpl.str62']} <font color=\"red\">{$position}</font> {$lang['tpl.str63']}";
			}
		}
		else{
			$pagesize=10;
			$ShowUserPosition = $lang['tpl.str62'].' <font color="red">'.($position + ($TopicInfo['star'] - 1) * $pagesize).'</font> '.$lang['tpl.str63'];
		}
	}
	else{
		$ShowUserPosition = ' ';
	}
print <<<EOT
  <tr>
	<td class="infoleft leftcolor" valign="top" rowspan="4">
	   <a name="{$result['announceid']}"></a>
		<p class="username">{$ShowUserico}{$ShowUserInfo}</p>
		<p>{$ShowUserFace}</p>
		<p>{$ShowUserStar}</p>
		<p>{$ShowUserHonorpics}</p>
		<p>{$ShowUserTitle}</p>
		<p>{$ShowUserMessanger}</p>
		<p>{$ShowUserClass}</p>
		<p>{$ShowUserPower}</p>
		<p>{$ShowUserPostEp}</p>
		<p>{$ShowUserPostMONEY}</p>
		<p>{$ShowUserGroup}</p>
		<p>{$ShowUserJoindate}</p>
		<p>{$ShowUserCananony}</p>
	</td>
	<td class="usermenu">
		<em>{$ShowUserIsSpace} {$ShowUserPosition}</em>{$ShowUserPostIpDate}{$ShowUserPostIpDate2}
	</td>
  </tr>
EOT;
#---------右边内容-----------------
	#您无权查看精华帖子
	$checkinfo = '';  
	if( intval($result['isbest']) == 1 ){
		if( $groupsetting[41] != 1 ){
			$checkinfo = $lang['tpl.str81'];
		}
	} else{
		if( $result['locktopic'] == 2 ){
			$checkinfo = $lang['tpl.str82'];
		} else{
			if( $currUserInfo['lockuser'] == 1 ){
				$checkinfo = '<font color="red">'.$lang['tpl.str83'].'</font>';
			} elseif( $currUserInfo['lockuser'] == 2 ){
				$checkinfo = $lang['tpl.str84'];
			} elseif( $result['locktopic'] == 3 ){
				$checkinfo = $lang['tpl.str85'];
			}
		}
	}
	$ShowContentCheckInfo='';
	if( $checkinfo != '' ){
		$ShowContentCheckInfo = "<div class=\"lockuser\">{$checkinfo}</div>\r\n";
	}
	#内容处理部分
	$ShowContent = '';
	if( $checkinfo == '' || $userinfo['truemaster'] == 1 || ( $boardmaster && $userinfo['usergroupid'] != 3 ) ){
		#已参加活动
		if ( strpos($getActiveUserName , ",") and !empty($getActiveUserName))
		{
			if ( strpos ( $getActiveUserName , "{$result['username']}") !== false)
			$ShowContent .= "<div style=\"float:right;width:100px;\">".$lang['tpl_Active.str46']."</div>";
		}
		#魔法表型
		if( $result['parentid'] == 0 ){
			if( !empty($mofaface) ){
			$ShowContent .= <<<EOT
			<div style="float:right;margin-right:20px;"><a href="javascript:void(DispMagicEmot({$mofaface},350,500));" target="_self"><img src="dv_plus/tools/magicface/gif/{$mofaface}.gif" border="0"/><br />{$lang['tpl.str87']}</a></div>
			<script type="text/javascript" language="javascript">
			LoadMagicEmot('{$mofaface}','{$TopicInfo['topicid']}');
			</script>
EOT;
			}
		}
		#内容认证部分
		$ShowContent .= "<base target=\"_blank\" />\r\n<div class=\"bodys\" onload=\"this.style.overflowX='auto';\">\r\n";
		if( $result['parentid'] == 0 && $TopicInfo['getmoneytype'] == 3 ){
			$ShowContent .= '<fieldset style="border : 1px dotted #ccc;">';
			#以下内容需要支付
			if( $TopicInfo['postuserid'] == $userid ){
				$ShowContent .= "<legend style=\"text-indent:0px;\">{$lang['tpl.str88']} <b><font color=\"red\">{$TopicInfo['getmoney']}</font></b> {$lang['tpl.str89']}</legend>{$result['body']}";
			} else{
				#以下内容需要支付
				if( true === $userinfo['truemaster']){
					$ShowContent .= "<legend style=\"text-indent:0px;\">{$lang['tpl.str90']} <b><font color=\"red\">{$TopicInfo[getmoney]}</font></b> {$lang['tpl.str91']}</legend>{$result['body']}";
				} else{
					#以下内容需要支付
					if( $isBuyUser === true ){
						$ShowContent .= "<legend style=\"text-indent:0px;\">{$lang['tpl.str90']} <b><font color=\"red\">{$TopicInfo['getmoney']}</font></b> {$lang['tpl.str92']}</legend>{$result['body']}";
					} else{
						#以下内容需要支付
						if( $userinfo['vipgroupuser'] == 1 && $postbuyinfo['notvipbuy'] == 1 ){
							$ShowContent .= "<legend style=\"text-indent:0px;\">{$lang['tpl.str90']} <b><font color=\"red\">{$TopicInfo['getmoney']}</font></b> {$lang['tpl.str93']}</legend>{$result['body']}";
						} else{
							#以下内容需要支付
							if( $userid != 0 && ($postbuyinfo['buyuser'] == ',,' || strpos($postbuyinfo['buyuser'],",{$membername},") !== false) ){
								$ShowContent .= "<legend style=\"text-indent:0px;\">{$lang['tpl.str90']} <b><font color=\"red\">{$TopicInfo['getmoney']}</font></b> {$lang['tpl.str94']}</legend><input type=\"button\" value=\"{$lang['tpl.str95']}\" class=\"button\" onclick=\"location.href='buypost.php?action=buy&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}&replyid={$result['announceid']}&posttable={$TopicInfo['posttable']}'\"/>";
							} else{
								$ShowContent .= "<legend style=\"text-indent:0px;\">{$lang['tpl.str96']} <b><font color=\"red\">{$TopicInfo['getmoney']}</font></b> {$lang['tpl.str97']}</legend>";
								if( $userid != 0 ){
									$ShowContent .= $lang['tpl.str98'];#楼主设置了您不可以购买。
								} else{
									$ShowContent .= $lang['tpl.str99'];#您还未登录，不能购买。
								}
							}
						}
					}
				}
			}
			$ShowContent .= '</fieldset>';
		} else {
			$ShowContent .= $result['body'];
		}
		$ShowContent .= "</div>\r\n";

		#签名
		$UserSign='';
		$ShowUserSign='';
		if(!empty($currUserInfo['usersign'])){
			$UserSign .= "<base target=\"_self\" />\r\n";
			if (canusersign($currUserInfo['usergroupid']) AND (1 == $result['signflag'])){
				if (!isset($currUserInfo['UserSignCache'])){
					$currUserInfo['UserSignCache'] = trim(Dv_SignUbbCode($currUserInfo['usersign'],$currUserInfo['usergroupid']));
				}
				$UserSign .= $currUserInfo['UserSignCache'];
			}
			else{
				$UserSign = '';
			}
			if ($UserSign) {
				$ShowUserSign = "<img src=\"{$imgurl}sigline.gif\" /><BR>{$UserSign}\r\n";
			} else {
				$ShowUserSign= '';
			}
		}
		else{
			$ShowUserSign='';
		}
	}
	#本帖被加为精华||赠送金币帖，要送出
	$postinfo = '';
	if( intval($result['isbest']) == 1 ){
		$postinfo = "<img src=\"{$imgurl}jing.gif\" border=\"0\" title=\"{$lang['tpl.str100']}\" align=\"middle\"/> ";
	}
	#好评，获得|个金币奖励
	if( $result['isagree'] != '' && strpos($result['isagree'],'|') != false ){
		list($tmp1,$tmp2) = explode('|',$result['isagree']);
		if( !empty($tmp2) ){
			$postinfo = "<img src=\"{$imgurl}agree.gif\" border=\"0\" alt=\"{$lang['tpl.str101']}{$tmp2}{$lang['tpl.str102']}\" / > ";
		}
		if( !empty($tmp1) ){
			$postinfo = "<img src=\"{$imgurl}disagree.gif\" border=\"0\" alt=\"{$lang['tpl.str101']}{$tmp1}{$lang['tpl.str102']}\" / > ";
		}
	}
	#Wap-手机发帖
	if( intval($result['isupload']) == 2 || intval($result['isupload']) == 3 ){
		$postinfo = "<a href=\"wap.php?Action=readme\" target=\"_blank\" ><img src=\"{$imgurl}wap00.gif\" border=\"0\" alt=\"{$lang['tpl.str103']}\"/></a> ";
	}
	#查看使用道具详细信息
	if( $TopicInfo['usetools'] != '' || $TopicInfo['getmoneytype'] != 0 ){
		$postinfo = "<img src=\"{$imgurl}mini_query.gif\" border=\"0\" alt=\"{$lang['tpl.str104']}\" onclick=\"openScript('viewinfo.php?t=2&action=View&posttable={$TopicInfo['posttable']}&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}&replyid={$result['announceid']}',600,450)\" class=\"imgonclick\" /> ";
	}
	#金币帖
	if( $result['parentid'] == 0 ){//call template TopicSendMoneyStr
		$tmp = intval($TopicInfo['getmoneytype']);
		if( $tmp == 1 ){#赠送金币帖，要送出
			$postinfo = "{$lang['tpl.str105']}<font color=\"red\">{$result['getmoney']}</font> {$lang['tpl.str106']}";
		}
		if( $tmp == 2 ){#获赠金币帖，共获得
			$postinfo = "{$lang['tpl.str107']}<font color=\"red\">{$TopicInfo['getmoney']}</font> {$lang['tpl.str106']}";
		}
		if( $tmp == 3 ){#查看本帖需支付
			$postinfo = "{$lang['tpl.str108']}<font color=\"red\">{$TopicInfo['getmoney']}</font>{$lang['tpl.str106']}";
		}
		if( $tmp == 5 ){#个金币[已结帖]
			$postinfo = "{$lang['tpl.str105']}<font color=\"red\">{$result['getmoney']}</font>{$lang['tpl.str109']}";
		}
	} else{//call template SendMoneyStr
		$tmp = intval($TopicInfo['getmoneytype']);
		#获得 个金币
		if( ($tmp == 1 || $tmp == 5 ) && ( $TopicInfo['postuserid'] != $result['postuserid']) ){
			$postinfo = "{$lang['tpl.str110']}<font color=\"red\">{$result['getmoney']}</font>{$lang['tpl.str106']}";
		}
		#赠送金币
		if ($TopicInfo['postuserid'] == $userinfo['userid'] AND $result['postuserid'] != $userinfo['userid'] AND $tmp != 5 && $tmp == 1) {
			$postinfo = "<a href=\"buypost.php?action=send&posttable={$TopicInfo['posttable']}&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}&replyid={$result['announceid']}&UserName={$result['username']}\" title=\"{$lang['tpl.str111']}{$result['username']}\" target=\"_blank\">{$lang['tpl.str112']}</a>";
		}
		#赠送楼主
		if( $tmp == 2 ){
			$postinfo = "{$lang['tpl.str113']}<font color=\"red\">{$result['getmoney']}</font>{$lang['tpl.str106']}";
		}
	}
	$ShowPostInfo = '';
	if( $postinfo != '' ){
		$ShowPostInfo= "<div class=\"info\">{$postinfo}</div>";
	}
	#帖子管理菜单
	if( $userid != 0 ){
		$strNoteActionMenu = '<div class="submenu" style="width:65px;" id="NoteActionMenu_'.$position.'" onmouseout="hidemenu(1);hidemenu(0);"><ul>';
		$strNoteActionMenu .= "<li><a href=\"topicother.php?t=6&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}&replyid={$result['announceid']}\" title=\"{$lang['tpl.str116']}\">{$lang['tpl.str117']}</a></li>";
		if( $position != 1 || $TopicInfo['star'] != 1 ){
			if( $userid == $currUserID && $boardmaster == false ){
				if( $userinfo['candelmypost'] == 1 ){
					$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_delete_single_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&userid={$result['postuserid']}\">{$lang['tpl.str118']}</a></li>";
				}
			} else{
				if( $boardmaster === true ){
					$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_delete_single_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&userid={$result['postuserid']}\">{$lang['tpl.str118']}</a></li>";
				}
			}
		}
		if( $boardmaster === true ){
			$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_copy_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star=star={$TopicInfo['star']}&userid=userid={$result['postuserid']}\">{$lang['tpl.str119']}</a></li>";
			if( intval($result['isbest']) == 0 ) {
				$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_set_best_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&userid={$result['postuserid']}\">{$lang['tpl.str120']}</a></li>";
			} else{
				$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_unset_best_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&userid={$result['postuserid']}\">{$lang['tpl.str121']}</a></li>";
			}
			if( $result['locktopic'] != 2 ){
				if( $result['locktopic'] == 3 ){
					$strNoteActionMenu .= "<li><a href=\"accesstopic.php?action=unlock_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}\">{$lang['tpl.str122']}</a></li>";
				} else{
					$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_shield_single_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&userid={$result['postuserid']}\">{$lang['tpl.str123']}</a></li>";
				}
			} else{
				$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_unshield_single_topic&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&userid={$result['postuserid']}\">{$lang['tpl.str124']}</a></li>";
			}
			$strNoteActionMenu .= "<li><a href=\"admin_postings.php?action=p_reward_money&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}\" title=\"{$lang['tpl.str125']}\">{$lang['tpl.str126']}</a></li>";
		}
		if (1 == $GLOBALS['fsetting']['plus_tools']) {
			$strNoteActionMenu .= "<li><a title=\"{$lang['tpl.str127']}\" href=\"javascript:openScript('plus_tools_infosetting.php?action=0&amp;boardid={$TopicInfo['boardid']}&amp;topicid={$TopicInfo['topicid']}&amp;replyid={$result['announceid']}',500,400)\">{$lang['tpl.str128']}</a></li>";
		}
		$strNoteActionMenu .= '</ul></div>';
		$ShowUserAdmin = '';
		$ShowUserAdmin = "<li class=\"m_li_n\" onmouseover=\"showmenu('NoteActionMenu_{$position}',0);\" style=\"display:inline;\"><span alt=\"{$lang['tpl.str132']}\" style=\"cursor: pointer;\">{$forumuserinfo_spaceline}<font color=\"#2779a5\">{$lang['disp.user.fun.info11']}</font></span>{$strNoteActionMenu}</li>&nbsp;| ";
	}
	#引用 回复
	$ShowContentRe = '';
	if( $boardmaster === true || ($TopicInfo['locktopic'] != 1 && $userinfo['canreply'] == 1) ){
		if( $result['postuserid'] == 0 )
		{
			$ShowContentRe = <<<EOT
			<a href="post.php?action=re&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&pagecount={$PageCount}&reply=true&guest=true" title="{$lang['tpl.str129']}">{$lang['disp.user.fun.info8']}</a> | 
			{$forumuserinfo_spaceline}<a href="post.php?action=re&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&pagecount={$PageCount}&guest=true" title="{$lang['tpl.str130']}">{$lang['disp.user.fun.info9']}</a> | 
EOT;
		} else {
			$ShowContentRe = <<<EOT
			<a href="post.php?action=re&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&pagecount={$PageCount}&reply=true"    title="{$lang['tpl.str129']}">{$lang['disp.user.fun.info8']}</a> | 
			{$forumuserinfo_spaceline}<a href="post.php?action=re&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$TopicInfo['star']}&page={$GLOBALS['page']}&pagecount={$PageCount}"   title="{$lang['tpl.str130']}">{$lang['disp.user.fun.info9']}</a> |  
EOT;
		}
	}
	#编辑帖子链接
	$ShowUserEdit = '';
	if( $userid != 0 ){
		if( $userid == $currUserID && $boardmaster == false ){
			if( $groupsetting[10] == 1 ){
				$ShowUserEdit = "{$forumuserinfo_spaceline}<a href=\"post.php?action=edit&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$_GET['star']}&page={$GLOBALS['page']}\"  title=\"{$lang['tpl.str131']}\">{$lang['disp.user.fun.info10']}</a> | ";
			}
		} else{
			if( $boardmaster === true ){
				$ShowUserEdit = "{$forumuserinfo_spaceline}<a href=\"post.php?action=edit&boardid={$TopicInfo['boardid']}&replyid={$result['announceid']}&id={$TopicInfo['topicid']}&star={$_GET['star']}&page={$GLOBALS['page']}\"  title=\"{$lang['tpl.str131']}\">{$lang['disp.user.fun.info10']}</a> | ";
			}
		}
	}
#-----------内容/签名和管理菜单显示-----------------
print <<<EOT
  <tr>
	<td class="inforight" valign="top">{$ShowContentCheckInfo}{$ShowContent}{$ShowPostInfo}{$ShowAds}</td>
  </tr>
EOT;
	if(!empty($ShowUserSign)){
		print <<<EOT
  <tr>
	<td class="signed" >{$ShowUserSign}</td>
  </tr>
EOT;
	}
	print <<<EOT
  <tr>
	<td class="usermenu2">
		{$ShowContentRe}{$ShowUserEdit}{$ShowUserAdmin}<a href="#top">TOP</a>
	</td>
  </tr>
</table>
EOT;
	}#end while
}#End ShowDispbbs
ShowDispbbs();

print <<<EOT
<div id="showReplyCon" ></div>
<div class="mainbox notice">
	<h1>
	{$ShowPage}
	</h1>
	<span>
	<base target="_self" />
	<select name="BoardJumpList" id="BoardJumpList" onchange="if(this.options[this.selectedIndex].value!='')location='index.php?boardid='+this.options[this.selectedIndex].value;" >
EOT;
print boardjumplist($boardid);
print <<<EOT
	</select>	
	</span>&nbsp;
</div>
 <div class="mainbox border searchbox" style=" margin-bottom:10px;">
 <span>
	<a href="dispbbs_next.php?bid={$boardid}&id={$_GET['id']}&mode=1">{$lang['disp.user.fun.info21']}</a>
	&nbsp;&nbsp;
	<a href="dispbbs_next.php?bid={$boardid}&id={$_GET['id']}&mode=0">{$lang['disp.user.fun.info22']}</a></span>
EOT;
//管理选项 begin;
	$postuserid = intval($TopicInfo['postuserid']);
	global $boardmaster;
	if( $boardmaster === true ){
		print <<<EOT
			<div class="user_self_nav" style=" margin:0px;">
				<ul>	
					<li class="user2" onMouseOver="this.className='user1'" onMouseOut="this.className='user2'">{$lang['tpl.str188']}<img src="{$imgurl}down.gif" style="margin:5px;vertical-align:middle; ">
						<div class="user_list" style="width:190px;">
EOT;
								if( $TopicInfo['getmoneytype'] == 1 ){
									print '<a href="buypost.php?action=close&boardid='.$TopicInfo['boardid'].'&posttable='.$TopicInfo['posttable'].'&id='.$TopicInfo['topicid'].'&replyid='.$TopicInfo['replyid'].'" title="'.$lang['tpl.str189'].'">'.$lang['tpl.str190'].'</a>&nbsp;&nbsp;';
								}
								print "<a href=\"admin_postings.php?action=p_special_topic_manage&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str191']}\">{$lang['tpl.str191']}</a>";
								if( $TopicInfo['locktopic'] == 1 ){
									print "<a href=\"admin_postings.php?action=p_unlock_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str193']}\">{$lang['tpl.str192']}</a>";
								} else{
									print "<a href=\"admin_postings.php?action=p_lock_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str195']}\">{$lang['tpl.str194']}</a>";
								}
								print "<a href=\"admin_postings.php?action=p_exalt_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str197']}\">{$lang['tpl.str196']}</a><a href=\"admin_postings.php?action=p_sink_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str199']}\">{$lang['tpl.str198']}</a> <a href=\"admin_postings.php?action=p_follow_topic_manage&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str201']}\">{$lang['tpl.str200']}</a><a href=\"admin_postings.php?action=p_delete_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str203']}\">{$lang['tpl.str204']}</a><a href=\"admin_postings.php?action=p_move_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}&replyID={$TopicInfo['replyid']}\" title=\"{$lang['tpl.str206']}\">{$lang['tpl.str205']}</a><a href=\"admin_postings.php?action=p_placed_top_topic&boardid={$TopicInfo['boardid']}&id={$TopicInfo['topicid']}\" title=\"{$lang['tpl.str208']}\">{$lang['tpl.str207']}</a><a href=\"announcements.php?boardid={$TopicInfo['boardid']}&action=AddAnn\">{$lang['tpl.str209']}</a>";
						print"</div>";
					print"</li>";
				print"</ul>";
			print"</div>";
	} else{
		if( $userid == $TopicInfo['postuserid'] ){	//	个人贴子管理
			print <<<EOT
				<div class="user_self_nav" style=" margin:0px;">
					<ul>	
						<li class="user2" onMouseOver="this.className='user1'" onMouseOut="this.className='user2'">{$lang['tpl.str210']}<img src="{$imgurl}down.gif" style="margin:5px;vertical-align:middle">
							<div class="user_list" style="width:190px;">
EOT;
							if (1 == $TopicInfo['getmoneytype']) {
								print <<<EOT
									 <a href="buypost.php?action=close&amp;boardid={$TopicInfo['boardid']}&amp;posttable={$TopicInfo['posttable']}&amp;id={$TopicInfo['topicid']}&amp;replyid={$TopicInfo['replyid']}" title="{$lang['tpl.str189']}">{$lang['tpl.str190']}</a>
EOT;
							}
							if (1 == $userinfo['canlockmypost']) {	//	是否可以锁定自己发表的帖子
								if (1 == $TopicInfo['locktopic']) {
									print <<<EOT
										 <a href="admin_postings.php?action=p_unlock_topic&amp;boardid={$TopicInfo['boardid']}&amp;id={$TopicInfo['topicid']}" title="{$lang['tpl.str193']}">{$lang['tpl.str192']}</a>
EOT;
								}
								else {
									print <<<EOT
										 <a href="admin_postings.php?action=p_lock_topic&amp;boardid={$TopicInfo['boardid']}&amp;id={$TopicInfo['topicid']}" title="{$lang['tpl.str195']}">{$lang['tpl.str194']}</a>
EOT;
								}
							}
							if (1 == $TopicInfo['candelmypost']) {	//	是否可以删除自己发表的帖子
								print <<<EOT
								<a href="admin_postings.php?action=p_follow_topic_manage&amp;boardid={$TopicInfo['boardid']}&amp;id={$TopicInfo['topicid']}" title="{$lang['tpl.str201']}">{$lang['tpl.str200']}</a>
										 | <a href="admin_postings.php?action=p_delete_topic&amp;boardid={$TopicInfo['boardid']}&amp;id={$TopicInfo['topicid']}" title="{$lang['tpl.str203']}">{$lang['tpl.str204']}</a>
EOT;
							}
							if (1 == $TopicInfo['canmovemypost']) {	//	是否可以移动自己发表的帖子
								print <<<EOT
								<a href="admin_postings.php?action=p_move_topic&amp;boardid={$TopicInfo['boardid']}&amp;id={$TopicInfo['topicid']}&amp;replyid={$TopicInfo['replyid']}" title="{$lang['tpl.str206']}">{$lang['tpl.str205']}</a> 
EOT;
							}
			print <<<EOT
							</div>
						</li>
					</ul>
				</div>
EOT;
		}
	}
print <<<EOT
	</TD>
	</div>
EOT;
//管理选项 end;

#树形显示
if( $TopicInfo['skin'] == 1 ){print <<<EOT
<iframe style="border:0px;width:0px;height:0px;" src="loadtree.php?boardid={$boardid}&star={$istar}&page={$GLOBALS['page']}&replyid={$replyid}&id={$AnnounceID}&openid={$lastpostid}" name="hiddenframe"></iframe>
<div id="postlist" style="margin-top : 10px; margin-bottom : 10px; "></div>
EOT;
}
#相关主题
if( !empty($arrRelatedTopic) && is_array($arrRelatedTopic) ){
	$urlTopic = htmlspecialchars(urlencode($TopicInfo['title']));
	print <<<EOT
<table class="mainbox tableborder" cellspacing="0" cellpadding="0"><tr><th colspan="4"><span><a href="query.php?stype=-1&amp;keyword={$urlTopic}" target="_blank">{$lang['tpl.str134']}</a></span> {$lang['tpl.str133']}</th></tr>
EOT;
		foreach( $arrRelatedTopic as $currRelatedTopic ){
			$currRelatedTopic['lastposttime'] = gmdate('Y-m-d H:i:s', $currRelatedTopic['lastposttime']+getUserTimeZoneOffset());
			print <<<EOT
<tr>
	<td class="list2"><a href="dispbbs.php?boardid={$currRelatedTopic['boardid']}&id={$currRelatedTopic['topicid']}&page={$page}" target="_blank">{$currRelatedTopic['title']}</a></td>
	<td class="list2"><a href="index.php?boardid={$currRelatedTopic['boardid']}&page={$page}">{$_DCACHE['all_forums']["{$currRelatedTopic['boardid']}"]['boardtype']}</a></td>
	<td class="list4 font10"><span>{$currRelatedTopic['child']}</span>| {$currRelatedTopic['hits']}</td>
	<td class="list5"><a href="dispuser.php?id={$currRelatedTopic['postuserid']}" target="_blank">{$currRelatedTopic['postusername']}</a><br /><a href="#" class="font10">{$currRelatedTopic['lastposttime']}</a></td>
</tr>

EOT;
		}
		print <<<EOT
</table>
<BR>
EOT;
}# 相关主题 end

#快速回复 start
if( $userinfo['canreply'] == 1 ){
$membername_str= ($useindexstatic)? '<?=$membername?>' : $membername;
print <<<EOT

<div id="showReplyErr"></div>
<base target="_self" />
<link rel="stylesheet" type="text/css" href="images/post/edit.css" />
<script src="templates/lang/{$GLOBALS['fsetting']['lang']}/js/post/reply.js" type="text/javascript"></script>
<script src="templates/lang/{$GLOBALS['fsetting']['lang']}/js/post/post.js" type="text/javascript"></script>
<table class="tablebox border" cellspacing="0" cellpadding="0">
<form id="Dvform" name="Dvform" action="savepost.php?action=sre&method=fastreply&boardid={$TopicInfo['boardid']}&star={$GLOBALS['star']}&pagecount={$PageCount}&page={$GLOBALS['page']}{$fragment}" onkeydown="ctlent();" method="post">
<!-- <input type="hidden" name="action" value="1" /> -->
<input type="hidden" id="body" name="body" value="{$userinfo['postdata']}" />
<input type="hidden" id="followup" name="followup" value="{$_PostResults[0]['announceid']}" />
<input type="hidden" id="RootID" name="rootid" value="{$TopicInfo['topicid']}" />
<input type="hidden" id="star" name="star" value="{$TopicInfo['star']}" />
<input type="hidden" id="TotalUseTable" name="totalusetable" value="{$TopicInfo['posttable']}" />
<input type="hidden" id="UserName" name="username" value="{$membername_str}" />
<input type="hidden" value="face1.gif" name="expression"/>
<input type="hidden" value="{$position}" name="position"/>
<input type="hidden" value="{$bodystyle}" name="bodystyle"/>
  <tr>
	<th colspan="5">{$lang['tpl.str182']}{$gettitle}</th>
  </tr>
  <tr>
    <td>
	<div class="quickpost_left">
EOT;
	echo '<div id="dv_ShowEmot"></div>
	<SCRIPT src="./js/dvShowEmot.js" type="text/JavaScript"></SCRIPT>
	<SCRIPT LANGUAGE="JavaScript">
	dv_ShowEmot("16","0","0","100%","190px","'.$lang['tpl.str.meot1'].'|||'.$lang['tpl.str.meot2'].'|||'.$lang['tpl.str.meot3'].'|||'.$lang['tpl.str.meot4'].'","'.$empath.'","'.str_replace('\n\t','',implode("|||", $_DCACHE['forum_emot'])).'");	
	</SCRIPT>
	';
print <<<EOT
	</div>
	<div class="quickpost_right">
	   <h1>
	     <img src="images/post/fgcolor.gif" alt="{$lang['tpl.str143']}" class="icoover" onmouseover="this.className='icoovermouseover';" onmouseout="this.className='icoover';" onclick="Dvbbs_foreColor();this.className='icoonclick';"/>
		<img src="images/post/fbcolor.gif" alt="{$lang['tpl.str144']}" class="icoover" onmouseover="this.className='icoovermouseover';" onmouseout="this.className='icoover';" onclick="Dvbbs_backColor();this.className='icoonclick';"/>
		<img src="images/post/bold.gif" alt="{$lang['tpl.str145']}" class="icoover" onmouseover="this.className='icoovermouseover';" onmouseout="this.className='icoover';" onclick="FormatText('bold', '');this.className='icoonclick';"/>
		<img src="images/post/italic.gif" alt="{$lang['tpl.str146']}" class="icoover" onmouseover="this.className='icoovermouseover';" onmouseout="this.className='icoover';" onclick="FormatText('italic', '');this.className='icoonclick';"/>
		<img src="images/post/underline.gif" alt="{$lang['tpl.str147']}" class="icoover" onmouseover="this.className='icoovermouseover';" onmouseout="this.className='icoover';" onclick="FormatText('underline', '');this.className='icoonclick';"/>
		<img src="images/post/separator.gif" style="margin-top:4px;margin-right:4px;float:left;" alt=""/>
		<select class="Dvbbs_TBGen" id="FontSize" onchange="FormatText('fontsize',this[this.selectedIndex].value);">
		<option class="heading" selected="selected">{$lang['tpl.str176']}</option>
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="3">3</option>
		<option value="4">4</option>
		<option value="5">5</option>
		<option value="6">6</option>
		<option value="7">7</option>
		</select>
EOT;
	#验证码
	if( $board_settings[46] == 1 ){
	$getcodehtml=get_cercode(100,24);print <<<EOT
		<b>{$lang['tpl.str141']}</b>
		  {$getcodehtml}
		<span id="getcodeinfo"></span>

	
EOT;
	}elseif($boardsettings46>1){
print <<<EOT
		<span id="ajax_getcodeinfo"></span>
EOT;

	}
print <<<EOT
	   </h1>
	   <p>
	      <iframe class="Dvbbs" id="Dvbbs_Composition" marginheight="5" marginwidth="5" width="99%" height="227" onblur="CheckCount('Body','total');"></iframe><span id="constr"></span>
	   </p>
	   <h1>
	      <button onMousemove="button_move(this)" onMouseout="button_out(this)" onclick="Reply_Submit(this.form,'Body')" name="Submit"> {$lang['tpl.str181']} </button>&nbsp;&nbsp;
		<button onMousemove="button_move(this)" onMouseout="button_out(this)" onclick="Gopreview()" name="Button"> {$lang['tpl.str184']} </button>&nbsp;&nbsp;
		<button onMousemove="button_move(this)" onMouseout="button_out(this)" onclick="ClearReset()" name="Clear"> {$lang['tpl.str185']} </button>
		{$lang['tpl.str186']}<input class="Dvbbs" disabled="disabled" maxLength="6" size="8" value="{$board_settings[49]}" name="total" /> {$lang['tpl.str187']}.&nbsp;&nbsp;
EOT;
	#签名 菜单部分
	if( $userid == 0 )
	{
		print '<input type="hidden" value="0" name="signflag" />';
	} 
	else
	{
		print '<b>'.$lang['tpl.str177'].'</b>&nbsp;&nbsp;<input type="radio" value="0" name="signflag"  class="radio"/>&nbsp;&nbsp;'.$lang['tpl.str178'].'&nbsp;&nbsp;<input type="radio" checked="checked" value="1" name="signflag" class="radio" />&nbsp;&nbsp;'.$lang['tpl.str179'];
		if( $userinfo['cananony'] == 1 )
		{
			print '&nbsp;&nbsp;<input type="radio" value="2" name="signflag" class="radio" />&nbsp;&nbsp;'.$lang['tpl.str180'];
		}
	}print <<<EOT
	   </h1>
	</div>
    </td>
  </tr>
</form>
<form name="preview" action="preview.php?boardid={$TopicInfo['boardid']}" method="post" target="preview_page">
	<input type="hidden" name="Dvtitle" value="" />
	<input type="hidden" name="theBody" value="" />
</form>
</table>
<script language="Javascript" type="text/javascript">
	var Dvbbs_bIsIE5=document.all;
	var Dvbbs_Mode = 3;
	if (Dvbbs_bIsIE5)
	{
		var IframeID=frames["Dvbbs_Composition"];}
	else
	{
		var IframeID=document.getElementById("Dvbbs_Composition").contentWindow;
	}
	function Gopreview()
	{
		document.preview.theBody.value=IframeID.document.body.innerHTML; 
		var popupWin = window.open('', 'preview_page', 'scrollbars=yes,width=750,height=450');
		document.preview.submit()
	}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
	Dvbbs_InitDocument('Body','gb2312');	
//-->
</SCRIPT>
EOT;
	}#快速回复 end


}#is_array($_PostResults)

if($forum_ads[2] == 1 || $forum_ads[7] == 1) {
	print <<<EOT
		<script language="javascript" src="templates/lang/{$GLOBALS['fsetting']['lang']}/js/dv_adv.js" type="text/javascript"></script>
EOT;
}
if($forum_ads[2] == 1) {
	print <<<EOT
		<SCRIPT LANGUAGE="JavaScript">
		<!--
		move_ad('{$forum_ads[3]}','{$forum_ads[4]}','{$forum_ads[5]}','{$forum_ads[6]}');
		//-->
		</SCRIPT>
EOT;
}
if($forum_ads[7] == 1) {
	print <<<EOT
		<SCRIPT LANGUAGE="JavaScript">
		<!--
		fix_up_ad('{$forum_ads[8]}','{$forum_ads[10]}','{$forum_ads[11]}','{$forum_ads[9]}');
		//-->
		</SCRIPT>
EOT;
}
?>
<?php
print <<<EOT
<script type="text/JavaScript">
<!--
window.document.body.onload = function(){
	if (window.top!=window.self) {
		document.getElementById('main').focus();
	}
};
//-->
</script>
EOT;

?>

