<!--<?php
require_once PrintEot('m_header');print <<<EOT
-->
<div class="g_navB mb10">
<span class="fr">
	<form action="apps.php?q=group&a=thread&cyid=$cyid" method="post">
		<input name="type" type="hidden" value="thread" />
		<input name="cyid" type="hidden" value="$cyid" />
		<input name="range" type="hidden" value="1" />
		<input name="keyword" type="text" value='$keyword' class="input" />
        <span class="bt2"><span><button type="submit">搜 索</button></span></span>
	</form>
</span>
{$lang_action[$action]}
</div>

<!-- 菜單導航 end -->

<form name="form1" method="post" action="apps.php?q=topicadmin&">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="cyid"    value="$cyid" />
<input type="hidden" name="step"   value="2" />
<!--
EOT;
if($threaddb){print <<<EOT
-->
<script type="text/javascript" src="js/pcdate.js"></script>
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="tA mb10">
	<tr class="tr">
	  <td width="15">&nbsp;</td>
      <td class="td">標題</td>
      <td width="100">發布者</td>
      <td width="55" class="tac">回復</td>
      <td width="105">發表時間</td>
    </tr>
<!--
EOT;
$id=0;
foreach($threaddb as $key=>$val){
if($key%2==0){
	$style = '';
}else{
	$style = 'class="g_bgA"';
}
$id++;
print <<<EOT
-->
	<tr $style>
		<td><input type="checkbox" name="tidarray[]" value="$val[tid]" checked /></td>
		<td>
			<a href="apps.php?q=group&a=read&cyid=$cyid&tid=$val[tid]" target="_blank">$val[subject]</a>
		</td>
		<td>
<!--
EOT;
if($val['anonymous'] && !$ifTopicAdmin){ print <<<EOT
-->
			$db_anonymousname
<!--
EOT;
}else{ print <<<EOT
-->
			<a href="u.php?username=$val[author]" target="_blank">$val[author]</a>
<!--
EOT;
} print <<<EOT
-->
		</td>
		<td>$val[replies]</td>
		<td>$val[date]</td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
}print <<<EOT
-->
<div class="setpd">
<div class="g_hD mb15">管理選項</div>
<table width="100%" cellspacing="0" cellpadding="0" class="setTable">
<!--
EOT;
if($action=='toptopic'){print <<<EOT
-->
	<tr>
		<th class="th">管理選項:</th>
		<td class="td">
			<label for="topped0" class="mr20"><input type="radio" id="topped0" name="topped" value="0" $topped_0 /> 取消置頂</label>
			<label for="topped1"><input type="radio" id="topped1" name="topped" value="1" $topped_1 /> 置頂</label>
		</td>
	</tr>
    <tr>
    	<td class="th">有效期至</td>
    	<td class="td"><input class="input input_wa" type="text" name="timelimit" readonly="readonly" id="timelimit" onclick="ShowCalendar(this.id,1);" /></td></tr>
<!--
EOT;
}elseif($action=='digest'){print <<<EOT
-->
	<tr>
	<th class="th">管理選項:</th>
	<td class="td">
		<label for="digest0" class="mr20"><input type="radio" id="digest0" name="digest" value="0" $digest_0 />取消精華</label>
		<label for="digest1" class="mr20"><input type="radio" id="digest1" name="digest" value="1" $digest_1 />精華</label>
	</td>
	</td>
<!--
EOT;
}elseif($action=='lock'){print <<<EOT
-->
	<tr>
	<th class="th">管理選項:</th>
	<td class="td">
		<label for="locked0" class="mr20"><input type="radio" id="locked0" name="locked" value="0" $lock_0 />解除鎖定/解除關閉</label>
		<label for="locked1" class="mr20"><input type="radio" id="locked1" name="locked" value="1" $lock_1 />鎖定</label>
		<label for="locked2" class="mr20"><input type="radio" id="locked2" name="locked" value="2" $lock_2 />關閉</label>
	</td>
	</tr>
<!--
EOT;
}elseif($action=='pushtopic'){print <<<EOT
-->
	<tr>
    	<th class="th">提前時間:</th>
		<td class="td"><input type="text" class="input input_wc" name="pushtime" value="0" /> (時)</td>
	</tr>
	<tr>
		<th class="th">管理選項:</th>
		<td class="td">提前帖子</td>
	</tr>
<!--
EOT;
}elseif($action=='downtopic'){print <<<EOT
-->
	<tr>
    	<th class="th">壓後時間:</th>
		<td class="td"><input type="text" class="input input_wc" name="timelimit" value="24" /> (時)</td>
	</tr>
	<tr>
    	<th class="th">允許上浮:</th>
		<td class="td">
        	<label for="ifpush0" class="mr20"><input type="radio" id="ifpush0" name="ifpush" value="0" $lock_0 />是</label>
			<label for="ifpush1" class="mr20"><input type="radio" id="ifpush1" name="ifpush" value="1" $lock_1 />否</label>
        </td>
	</tr>
<!--
EOT;
}elseif($action=='highlight'){print <<<EOT
-->
<script type="text/javascript" src="js/color_picker.js"></script>
<script>
function pickReback(color){
	getObj('color_show').style.backgroundColor = color;
}
function styleOnclick(e,obj){
	var objclass = e.className;
	var temp = objclass.split(' ');
	var newclass = '';
	for (var n=0; n<temp.length; n++){
		if (temp[n]=='one') {
			continue;
		}
		newclass += ' ' + temp[n];
	}
	if (objclass.match(/one/)) {
		e.className = newclass;
		getObj(obj).value = '';
	} else {
		e.className = newclass + ' one';
		getObj(obj).value = 1;
	}
}
function colorCancel(){
	getObj('color_show').style.backgroundColor='#FFFFFF';
	getObj('title1').value='';
}
</script>
	<tr>
        <th class="th">管理選項:</th>
		<td class="td">
        	<div class="pwnew tac fl">
					<span><a onclick="styleOnclick(this,'title2')" class="$stylename[1]">加粗</a></span>
					<span><a onclick="styleOnclick(this,'title3')" class="$stylename[2]">斜體</a></span>
					<span><a onclick="styleOnclick(this,'title4')" class="$stylename[3]">下劃線</a></span>
					<span id="color_show" style="background:$titlecolor;cursor:pointer;" title="點擊取消顏色" onclick="colorCancel()"></span>
					<span title="顏色選擇"><a class="two tal" onclick="showColorPicker(this,document.form1.title1,function(){pickReback(color_picker)})"><img src="$imgpath/pickcolor.gif"  /></a></span>
					<input id="title1" name="title1" type="hidden" value="$titlecolor" />
					<input id="title2" name="title2" type="hidden" value="{$titledetail[1]}" />
					<input id="title3" name="title3" type="hidden" value="{$titledetail[2]}" />
					<input id="title4" name="title4" type="hidden" value="{$titledetail[3]}" />
				</div>
		</td>
	</tr>
	<tr><th class="th">有效時間:</th><td class="td"><input class="input" type="text" name="timelimit" size="4" /> 天</td></tr>
<!--
EOT;
}elseif($action=='del'){print <<<EOT
-->
	<tr>
        <th class="th">扣除積分:</th>
		<td class="td">
			<label for="ifdel1" class="mr20"><input type="radio" id="ifdel1" name="ifdel" value="1" />是</label>
			<label for="ifdel0" class="mr20"><input type="radio" id="ifdel0" name="ifdel" value="0" checked />否</label>
		</td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
	<tr>
        <th class="th">短消息通知:</th>
		<td class="td">
			<label for="ifmsg1" class="mr20"><input type="radio" id="ifmsg1" name="ifmsg" value="1" checked />是</label>
			<label for="ifmsg0" class="mr20"><input type="radio" id="ifmsg0" name="ifmsg" value="0" />否</label>
		</td>
	</tr>
	<tr>
        <th class="th">操作原因:</th>
		<td class="td">
			<input type="text" class="input" style="width:312px;" name="atc_content" />
<!--
EOT;
if($db_adminreason){print <<<EOT
-->
			<p><select onchange="this.form.atc_content.value=this.value" size="6" style="width:320px;">
				$reason_sel
			</select></p>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
	<tr><td class="td"></td><td class="td">
	<span class="btn"><span><button type="submit" name="Submit">提 交</button></span></span>&nbsp;&nbsp;&nbsp;<a class="cp" type="button" onclick="javascript:history.go(-1)" />返 回</a>
	</td></tr>
</table></div>
</form>
<!--
EOT;
?>-->