<!--<?php
include_once PrintEot('left');
if(!$action){print <<<EOT
-->
<h2>搜索</h2>
<form action="{$basename}&action=pay" method="post">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr3">
		<td width="40%">訂單號 <input type="text" name="order" class="input" size="40" /></td>
		<td><input type="submit" value="提 交" class="btn" /></td>
	</tr>
</table>
</form>

<form action="$basename&" method="post">
<input type="hidden" name="action" value="del">
<h2>訂單管理 <span class="w"><a href="$basename">所有訂單</a> | 
<a href="$basename&state=2">已完成訂單</a> | 
<a href="$basename&state=1">未完成訂單</a></span></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 s3" align="center">
<td>ID</td>
<td>用戶名</td>
<td>訂單類型</td>
<td>付款帳號</td>
<td>支付金額</td>
<td>交易狀態</td>
<td>交易時間</td>
<td>詳情</td>
<td>刪除</td>
</tr>
<!--
EOT;
$order_lang = array('積分充值','道具購買','版塊權限購買','特殊組購買','注冊碼購買');
$id=($page-1)*$db_perpage;
foreach($orderdb as $key => $value){
if($value[state]==0){
$state='<font color="blue">未完成</font>';
}elseif($value[state]==1){
$state='已支付，等待用戶確認';
}elseif($value[state]==2){
$state='已完成';
}
$id++;
print <<<EOT
-->
<tr class="tr3" align="center">
<td>$id</td>
<td>$value[username]</td>
<td>{$order_lang[$value[type]]}</td>
<td>$value[payemail]</td>
<td>$value[fee]</td>
<td>$state</td>
<td>$value[date]</td>
<td><a href="$basename&action=pay&id=$value[id]">詳情</a></td>
<td><input type="checkbox" name="selid[]" value="$value[id]"></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br />$pages
<center><input type="button" class="btn" name="chkall" value="全 選" onclick="CheckAll(this.form)">
<input type="submit" class="btn" name="hello" value="刪除"></center></form>
<br/>
<!--
EOT;
}elseif($action=='pay'){print <<<EOT
-->
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td class="tr4">完成支付說明</td></tr>
<tr><td style="line-height:150%">
由于支付寶系統在傳輸支付狀態的過程可能會出現一些不可預料的問題，導致用戶實際已經支付成功，但交易幣沒有充值成功~</td></tr>
<tr><td style="line-height:150%">請核對訂單信息後將付款帳號填入下方對應的文本框內，再使用“完成充值”功能完成本次訂單的充值</td></tr></table>
<br/>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="pay">
<input type="hidden" name="step" value="2">
<input type="hidden" name="id" value="$rt[id]">
<h2>訂單信息</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3">
	<td>訂單號</td>
	<td>$rt[order_no]</td>
</tr>
<tr class="tr3">
	<td>用戶名</td>
	<td>$rt[username] (uid:$rt[uid])</td>
</tr>
<tr class="tr3">
	<td>支付金額</td>
	<td><font color="orange">¥$rt[fee]</font></td>
</tr>
<tr class="tr3">
	<td>付款帳號</td>
	<td>
<!--
EOT;
if ($rt['state'] == '2') {print <<<EOT
-->
		$rt[payemail]
<!--
EOT;
} else {print <<<EOT
-->
		<input type="text" size="30" name="payemail" />
<!--
EOT;
}print <<<EOT
-->
	</td>
</tr>
<tr class="tr3">
	<td>交易狀態</td>
	<td>
<!--
EOT;
$order_lang = array('積分充值','道具購買','版塊權限購買','特殊組購買','注冊碼購買');
if ($rt['state'] == '2') {print <<<EOT
-->
	已完成訂單
<!--
EOT;
} else {print <<<EOT
-->
	未支付訂單
<!--
EOT;
}print <<<EOT
-->
	</td>
</tr>
<tr class="tr3">
	<td>訂單類型</td>
	<td>{$order_lang[$rt[type]]}<div style="color:gray">$detail</div></td>
</tr>
<tr class="tr3">
	<td>交易時間</td>
	<td>$rt[date]</td>
</tr>
</table><br />
<!--
EOT;
if ($rt['state'] < 2) {print <<<EOT
-->
<center><input type="submit" class="btn" value="完成充值"></center>
<!--
EOT;
}print <<<EOT
-->
</form>
<br/>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->