<!--<?php
print <<<EOT
-->
<div class="t5" style=" margin-left:205px;margin-top:5px;border-bottom:0px;"><table cellspacing="0">
<!--
EOT;
if ($special == '1') {print <<<EOT
-->
	<tbody><tr class="tr3 f_two"><th>投票有效天數︰</th>
		<th><input class="input" type="text" name="timelimit" value="$timelimit" size="10" $voteable />
<!--
EOT;
if (!$vote_close && $action == 'modify') {print <<<EOT
-->
		<input type="checkbox" name="vote_close" value="1" />結束投票
<!--
EOT;
}print <<<EOT
-->
		</th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two"><th>投票選項:<br>每行寫一個投票選項<br>最多可以有 $db_selcount 個選項<br>多選
		<input type="checkbox" value="1" name="multiplevote" $multi $voteable /><br />
		最多選擇個數<input class="input" maxlength="10" size="1" name="mostvotes" value="$mostvotes" $voteable /><br />
		是否允許修改投票結果<input type="checkbox" value="1" name="modifiable" $ifmodify $voteable /><br />
		強制投票才能查看結果<input type="checkbox" value="1" name="previewable" $ifpreview $voteable />
		</th>
		<th>
<!--
EOT;
if ($action == 'modify') {
foreach ($votearray as $key => $votes) {print <<<EOT
-->
			<input class="input" type="text" maxLength="60" name="vt_selarray[$key]" size="60" value="$votes[0]" $voteable /><br />
<!--
EOT;
}print <<<EOT
-->
			<input class="input" type="text" maxLength="60" name="vt_selarray[]" size="60" value="" $voteable /> 新的投票項（留空忽略）<br />
<!--
EOT;
} else {print <<<EOT
-->
			<textarea name="vt_select" rows="10" wrap="hard" cols="80">$vt_select</textarea>
<!--
EOT;
}print <<<EOT
-->
		</th>
	</tr></tbody>
<!--
EOT;
} elseif ($special == '2') { print <<<EOT
-->
	<tbody><tr class="tr3 f_two">
		<th width="20%">活動標題︰</th>
		<th><input class="input" type="text" name="act_subject" value="$act[subject]" size="60" /> <font color="red">*</font>(必填)</th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two">
		<th width="20%">活動時間︰</th>
		<th><input class="input" type="text" name="act_starttime" id="starttime" value="$act[starttime]" onClick="javascript:ShowCalendar(this.id,1)" />&nbsp;-&nbsp;<input class="input" type="text" name="act_endtime" id="endtime" value="$act[endtime]" onClick="javascript:ShowCalendar(this.id,1)" /> </th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two">
		<th width="20%">活動地點︰</th>
		<th><input class="input" type="text" name="act_location" value="$act[location]" size="15" /></th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two">
		<th width="20%">人數限制︰</th>
		<th><input class="input" type="text" name="act_num" value="$act[num]" size="5" />&nbsp;人（不限制人數，請留空）</th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two">
		<th width="20%">性別要求︰</th>
		<th>
			<input name="act_sex" type="radio" value="0" $sel_0 />不限
			<input name="act_sex" type="radio" value="1" $sel_1 />男
			<input name="act_sex" type="radio" value="2" $sel_2 />女
		</th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two">
		<th width="20%">活動費用︰</th>
		<th><input class="input" type="text" name="act_costs" size="8" value="$act[costs]" /> 元</th>
	</tr></tbody>
	<tbody><tr class="tr3 f_two">
		<th width="20%">報名截止日期︰</th>
		<th>
		<input class="input" name="act_deadline" id="deadline" value="$act[deadline]" type="text" onClick="javascript:ShowCalendar(this.id,1)" /> <font color="red">*</font>(必填)
		</th>
	</tr></tbody>
<!--
EOT;
} elseif ($special == '3' && $_G['allowreward']) {print <<<EOT
-->
	<tbody><tr class="tr3 f_two">
		<th width="20%">懸賞帖設置:
<!--
EOT;
if ($action == 'modify') {print <<<EOT
-->
			<br /><input type="checkbox" name="addreward" value="1" /> 追加懸賞 (延長時間)
<!--
EOT;
}print <<<EOT
-->
		</th>
		<th>
		最佳答案︰懸賞&nbsp;<select id="p_credit" name="ctype[best]" onchange="showreward();">$cbselect</select> <input id="r_credit" name="bonus[best]" value="$rw_b_val" size="4" class="input" onchange="showreward();" /> 點 (最少 $rw_b_val 點) <span id="reward_info" class="gray"></span><br />熱心助人︰懸賞&nbsp;<select name="ctype[active]">$caselect</select> <input name="bonus[active]" value="$rw_a_val" size="4" class="input" />點 (最少 $rw_a_val 點) <span class="gray">獎勵熱心回復者的積分點數，將扣除您相應的積分點數</span>
		</th>
	</tr></tbody>
	<script language="JavaScript">
	var old_credit = getObj('r_credit').value;
	function showreward(){
		var credit  = getObj('r_credit').value;
		var credit2 = credit*2;
		var p_credit = getObj('p_credit');
		var cname = p_credit.options[p_credit.selectedIndex].text;
		
		if (credit > 0) {
			old_credit = credit;
			getObj('reward_info').innerHTML = '將扣除<span class="s3">' + credit2 + '</span>點' + cname + '，結束懸賞時，系統自動返回<span class="s3">' + credit + '</span>點' + cname;
		} else {
			getObj('r_credit').value = old_credit;
		}
	}
	showreward();
	</script>
<!--
EOT;
} elseif ($special == '4') {print <<<EOT
-->
	<tbody>
	<tr class="tr3 f_two">
		<th width="20%">商品名稱︰</th>
		<th><input class="input" name="goodsname" value="$trade[name]" size="30" /> <select name="degree"><option value="0" $degree_0>全新</option><option value="1" $degree_1>二手</option></select></th>
	</tr>
	<tr class="tr3 f_two">
		<th>商品分類︰</th>
		<th>
			<select name="ptype">
				<option></option>
<!--
EOT;
if ($trade['tradetype']) {
foreach ($trade['tradetype'] as $key => $value) {
$selected = $key == $trade['type'] ? 'selected' : '';
print <<<EOT
-->
				<option value="$key" {$selected}>$value</option>
<!--
EOT;
}}print <<<EOT
-->
			</select>
		</th>
	</tr>
	<tr class="tr3 f_two">
		<th>商品圖片︰</th>
		<th><input class="input" type="file" name="attachment_0" size="30" /></th>
	</tr>
	<tr class="tr3 f_two">
		<th>商品數量︰</th>
		<th><input type="text" class="input" name="goodsnum" value="$trade[num]" size="8" /></th>
	</tr>
	<tr class="tr3 f_two">
		<th>商品原價︰</th>
		<th><input type="text" class="input" name="price" value="$trade[price]" size="8" /></th>
	</tr>
	<tr class="tr3 f_two">
		<th>商品現價︰</th>
		<th><input type="text" class="input" name="costprice" value="$trade[costprice]" size="8" /></th>
	</tr>
	<tr class="tr3 f_two">
		<th>所 在 地︰</th>
		<th><input type="text" class="input" name="locus" value="$trade[locus]" size="30" /></th>
	</tr>
	<tr class="tr3 f_two">
		<th>運費方式︰</th>
		<th>
			<input type="radio" name="transport" value="0" onclick="showmethod(0);" $tspt_0 />賣家承擔
			<input type="radio" name="transport" value="1" onclick="showmethod(1);" $tspt_1 />買家承擔
			<div style="display:none;margin-top:2px" id="logistics">
				平郵 <input type="text" class="input" name="mailfee" value="$trade[mailfee]" size="8" /> 元<br />
				快遞 <input type="text" class="input" name="expressfee" value="$trade[expressfee]" size="8" /> 元<br />
				EMS <input type="text" class="input" name="emsfee" value="$trade[emsfee]" size="8" /> 元<br />
			</div>
		</th>
	</tr>
	<tr class="tr3 f_two">
		<th>收款方式︰</th>
		<th>
			<input type="checkbox" name="paymethod[]" value="1" $paym_1 />線下交易
			<input type="checkbox" name="paymethod[]" value="2" $paym_2 />支付寶
		</th>
	</tr></tbody>
<script language="JavaScript">
attachnum--;
function showmethod(v) {
	getObj('logistics').style.display = v == 1 ? '' : 'none';
}
showmethod('$trade[transport]');
</script>
<!--
EOT;
} elseif ($special == '5') {
empty($debate[umpire]) && $debate[umpire] = $windid;
print <<<EOT
-->
	<tbody>
		<tr class="tr3"><th>辯論結束時間︰</th>
			<th><input class="input" type="text" name="endtime" value="$debate[endtime]" id="endtime" onClick="javascript:ShowCalendar(this.id,1)" size="20" $debateable/>
			</th>
		</tr>
		<tr class="tr3 f_two"><th>正方觀點︰</th>
		    <td><input class="input" type="text" name="obtitle" value="$debate[obtitle]" size="50" $debateable/></td>
		</tr>
		<tr class="tr3 f_two"><th>反方觀點︰</th>
		    <td><input class="input" type="text" name="retitle" value="$debate[retitle]" size="50" $debateable/></td>
		</tr>
		<tr class="tr3 f_two"><th>裁判︰</th>
		    <td><input class="input" type="text" name="umpire" value="$debate[umpire]" size="20" $debateable/></td>
		</tr>
	</tbody>
<!--
EOT;
}print <<<EOT
-->
</table></div>
<!--
EOT;
?>