<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
global $imgurl;
?><!--<?php
global $_topicInfo,$groupsetting;
$boardid = $GLOBALS['boardid'];
$id = $GLOBALS['id'];
$replyid = $GLOBALS['replyid'];
$title =& $GLOBALS['title'];
$msgcontent = htmlspecialchars($GLOBALS['content']);
$doWealth = $GLOBALS['dowealth'];
$dousercp = $GLOBALS['dousercp'];
$douserep = $GLOBALS['douserep'];
$msg =& $GLOBALS['msg'];
$ismsg = $GLOBALS['ismsg'];
$topic = htmlspecialchars($GLOBALS['_topicInfo']['title']);
$strAction = $lang['Action.title'][$GLOBALS['action']];
$fileconfirm = $GLOBALS['delupfile'];
print <<<EOT
-->
<!--跟帖管理-->
<FORM METHOD=POST ACTION="admin_postings.php?action=p_do_follow_topic_manage" name="frmAnnounce">
<table  cellspacing="0" cellpadding="0" align="center" class="mainbox tableborder">
<tr>
<th height=24>{$lang['tpl.gtgl.str1']}<b>{$strAction}</b></th>
</tr>
<tr>
<td class=tablebody5 height=24><b>
{$lang['tpl.gtgl.str2']}</b>
<select name="title" size=1>
<option value="">{$lang['tpl.gtgl.str3']}</option>
<option value="{$lang['tpl.gtgl.str4']}">{$lang['tpl.gtgl.str4']}</option>
<option value="{$lang['tpl.gtgl.str5']}">{$lang['tpl.gtgl.str5']}</option>
<option value="{$lang['tpl.gtgl.str6']}">{$lang['tpl.gtgl.str6']}</option>
<option value="{$lang['tpl.gtgl.str7']}">{$lang['tpl.gtgl.str7']}</option>
<option value="{$lang['tpl.gtgl.str8']}">{$lang['tpl.gtgl.str8']}</option>
<option value="{$lang['tpl.gtgl.str9']}">{$lang['tpl.gtgl.str9']}</option>
</select>
<input type="text" name="content" size=60>  *</td>
</tr>
<tr>
<td class=tablebody5 height=24>
<SCRIPT LANGUAGE="JavaScript">
<!--
var seldisable='{$seldisable}';
var doWealth='{$doWealth}';
var dousercp='{$dousercp}';
var douserep='{$douserep}';
document.write ('<B>{$lang['tpl.gtgl.str10']}</B>  {$lang['tpl.gtgl.str11']}');
document.write ('	<select name="doWealth" size=1 '+seldisable+'>');
for (i=-50;i<51 ;i++ )
{
	document.write ('<option value="'+i+'" ');
	if (doWealth==i)
	{
		document.write ('selected');
	}
	document.write ('>'+i+'</option>');
}
document.write ('	</select>&nbsp;{$lang['tpl.gtgl.str12']}');
document.write ('	<select name="douserCP" size=1 '+seldisable+'>');
for (i=-50;i<51 ;i++ )
{
	document.write ('<option value="'+i+'" ');
	if (dousercp==i)
	{
		document.write ('selected');
	}
	document.write ('>'+i+'</option>');
}
document.write ('	</select>&nbsp;{$lang['tpl.gtgl.str13']}');
document.write ('	<select name="douserEP" size=1 '+seldisable+'>');
for (i=-50;i<51 ;i++ )
{
	document.write ('<option value="'+i+'" ');
	if (douserep==i)
	{
		document.write ('selected');
	}
	document.write ('>'+i+'</option>');
}
document.write ('</select>&nbsp;<input type="checkbox" class="chkbox" name="checkbox" value="checkbox" onclick="nocent();" '+seldisable+'>{$lang['tpl.gtgl.str14']}');
function nocent()
{
	if(document.frmAnnounce.doWealth.disabled==true)
	{
		document.frmAnnounce.doWealth.disabled=false;
		document.frmAnnounce.douserCP.disabled=false;
		document.frmAnnounce.douserEP.disabled=false;
	}
	else
	{
		document.frmAnnounce.doWealth.disabled=true;
		document.frmAnnounce.douserCP.disabled=true;
		document.frmAnnounce.douserEP.disabled=true;
	}

}
//-->
</SCRIPT>
</td>
</tr>
<SCRIPT LANGUAGE="JavaScript">
<!--
var fileconfirm='{$fileconfirm}';
if (fileconfirm=='1'){
document.write ('<tr>');
document.write ('<td height=24 class=tablebody1>');
document.write ('<B>{$lang['tpl.gtgl.str15']}</B><INPUT TYPE="radio" NAME="delupfile" value="0" checked class="radio">{$lang['tpl.gtgl.str16']}{$lang['tpl.gtgl.str27']}{$lang['tpl.gtgl.str27']}<INPUT TYPE="radio" NAME="delupfile" value="1" class="radio">{$lang['tpl.gtgl.str17']}');
document.write ('{$lang['tpl.gtgl.str28']}{$lang['tpl.gtgl.str18']}{$lang['tpl.gtgl.str29']}</td>');
document.write ('</tr>');
}
//-->
</SCRIPT>
<tr>
<td height=24 class=tablebody5>
<B>{$lang['tpl.gtgl.str19']}</B><input type=text size=70 name="msg">&nbsp;<input type="checkbox" name="ismsg" value="1" class="chkbox">{$lang['tpl.gtgl.str20']}</td>
</tr>
<tr>
<td height=24 class=tablebody5>
{$lang['tpl.gtgl.str21']}
</td>
</tr>
</table>
<br>
<input type="hidden" name="boardid" value="{$boardid}">
<input type="hidden" value="{$id}" name="id">
<table cellspacing="0" cellpadding="0" align="center" class="mainbox tableborder">
  <tr> 
    <th align="left" id=tabletitlelink colspan="3" >
      &nbsp;{$lang['tpl.gtgl.str22']}</th>
    <th align="right" width="20%"id=tabletitlelink valign="middle" height="24" >&nbsp;<img src="{$imgurl}gotop.gif" width="15" height="15"></th>
  </tr>
<!--
EOT;
if( !empty($arrTopicInfo) && is_array($arrTopicInfo) ){
	global $lang,$page;
	$index = 0;
	foreach( $arrTopicInfo as $index => $currTopicInfo ){
		$blank = str_repeat('&nbsp;',intval($currTopicInfo['layer']));
		if( $currTopicInfo['topic'].'' === '' ){
			$topic = cutStr(str_replace(chr(10),'',reUBBCode(ChkBadWords($currTopicInfo['body']))),35);
		} else{
			$topic = cutStr(ChkBadWords($currTopicInfo['body']),35);
		}
		$currAnnounceID = $currTopicInfo['announceid'];
		if( $index === 0 ){
			if( $page == 1 ){
				$alertcolor = $lang['Dvbbs.mainsetting1'];
				$del = '';
			} else{
				$alertcolor = '';
				$del = '<input type="checkbox" name="delid[]" value="'.$currAnnounceID.'" class="chkbox">';
			}
		} else{
			$alertcolor = '';
			$del = '<input type="checkbox" name="delid[]" value="'.$currAnnounceID.'" class="chkbox">';
		}
		$currBoardID = $currTopicInfo['boardid'];
		$username = $currTopicInfo['username'];
		$DateAndTime = gmdate("Y-m-d H:i:s",$currTopicInfo['dateandtime']+getUserTimeZoneOffset());
		if( $currTopicInfo['length'] == 0 ){
			$length = $lang['template.strings17'];
		} else{
			$length = $currTopicInfo['length'];
		}
		$currRootID = $currTopicInfo['rootid'];
		$Expression = $currTopicInfo['expression'];
		print <<<EOT
-->
<!--{$treeloop}-->
<!--帖子信息-->
<tr> 
	<td align="left" class=tablebody6 width="51%" height=22 >{$del}&nbsp;{$blank}<img src="images/topicface/{$Expression}">&nbsp;<a href="dispbbs.php?boardid={$currBoardID}&id={$currRootID}&replyid={$currAnnounceID}&skin=1 "target="_blank"><font color="{$alertcolor}">{$topic}</font></a></td>
	<td align="center" class=tablebody6 width="14%" height=22 >{$length}</td>
	<td align="center" class=tablebody6 width="15%" height=22 ><a href=dispuser.php?name={$username} target=_blank title="{$lang['tpl.gtgl.str23']}">{$username}</a></td>
	<td align="center" class=tablebody5 width="20%" height=22 >{$DateAndTime}</td>
</tr>
<!--
EOT;
	}
}
print <<<EOT
-->
<TD height=27 width="100%" class=tablebody5 colspan=4>
  <input type=checkbox name="chkall" value="on" onclick="CheckAll(this.form)" class="chkbox" value="{$lang['tpl.gtgl.str24']}">&nbsp;<input type="button"  onMousemove="button_move(this)" onMouseout="button_out(this)" onclick="if(confirm('{$lang['tpl.gtgl.str25']}')){this.form.submit()}" value="{$lang['tpl.gtgl.str26']}"></TD></TR>
</table>
</form>
<!--
EOT;
?>-->
<?php
if( $RecordCount > $pageSize ){
	echo '<br>';
	echo '<div align="right">';
	echo pagelist($RecordCount,$pageSize,$page,"?action=p_follow_topic_manage&boardid={$boardid}&id={$id}&star={$page}",$index+1);
	echo '</div>';
}
?>
<SCRIPT LANGUAGE="JavaScript">
<!--
function CheckAll(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if (e.name != 'chkall')  e.checked = form.chkall.checked;
	}
}
//-->
</SCRIPT>