<!--<?php
include_once PrintEot('left');
if (!$job) {print <<<EOT
-->
<ul class="nav3">
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter" class="two">參數設置</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo">道具資料</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=add">添加道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool">用戶道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=tradelog">交易信息</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toollog">道具日志</a></li>
</ul>
<div class="c"></div>

<form action="$basename" method="post">
<input type="hidden" name="step" value="2">
<h2>參數設置</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="30%">是否開啟會員道具功能</td><td>
<input type="radio" value="1" name="toolifopen" $toolifopen_Y> 開啟 
<input type="radio" value="0" name="toolifopen" $toolifopen_N>關閉 ( 需要到插件中心 管理中同時啟用該插件方為有效)</td></tr>

<tr class="tr3"><td>是否允許用戶進行道具買賣交易</td><td>
<input type="radio" value="1" name="allowtrade" $allowtrade_Y> 開啟 
<input type="radio" value="0" name="allowtrade" $allowtrade_N>關閉</td></tr>
</td></tr>
</table>
<br><center><input type="submit" class="btn" value='提 交'></center></form>
<!--
EOT;
} elseif ($job == 'toolinfo') {
if (!$action) {print <<<EOT
-->
<ul class="nav3">
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter">參數設置</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo" class="two">道具資料</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=add">添加道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool">用戶道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=tradelog">交易信息</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toollog">道具日志</a></li>
</ul>
<div class="c"></div>

<h3>道具說明</h3>
<div class="tr5">1、管理員可以根據道具需求情況，定期添加庫存。 <br>2、管理員可設置是否啟用道具，用戶只能購買已經啟用的道具。</div>
<form action="$basename" method="post">
<input type="hidden" name="action" value="submit">
<h2><a href="$basename&job=$job&action=add" class="fr w">[新增道具]</a>道具資料</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3">
<td>ID</td>
<td>名稱</td>
<td>描述</td>
<td>類型</td>
<td>順序</td>
<td>價格</td>
<td>價格單位</td>
<td>庫存</td>
<td class="tal">編輯</td>
<td>啟用</td>
</tr>
<!--
EOT;
foreach ($tooldb as $key => $value) {
$id = $value['id'];
$ifchecked = $value['state'] ? 'checked' : '';
print <<<EOT
-->
<tr class="tr3 tac">
<td>$id</td>
<td align="left"><a href="$basename&action=edit&id=$id">$value[name]</a></td>
<td align="left">$value[descrip]</td>
<td>
<!--
EOT;
if ($value['type'] == 1) {print <<<EOT
-->
帖子類
<!--
EOT;
} elseif ($value['type'] == 2) {print <<<EOT
-->
會員類
<!--
EOT;
} else {print <<<EOT
-->
其他類
<!--
EOT;
}print <<<EOT
-->
</td>
<td>$value[vieworder]</td>
<td>$value[price]</td>
<td>{$credit->cType[$value[creditype]]}</td>
<td>$value[stock]</td>
<td><a class="fourm-two" title="編輯" href="$basename&action=edit&id=$id"><span class="edit"></span></a></td>
<td><input type="checkbox" name="tools[$id]" value="1" $ifchecked></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br><center><input type="button" class="btn" name="chkall" value="全 選" onclick="CheckAll(this.form)">
<input type="submit" class="btn" value='提 交'></center></form>
<!--
EOT;
} elseif ($action == 'edit' || $action == 'add') {print <<<EOT
-->
<ul class="nav3">
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter">參數設置</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo">道具資料</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=add" class="two">添加道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool">用戶道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=tradelog">交易信息</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toollog">道具日志</a></li>
</ul>
<div class="c"></div>
<h3>道具說明</h3>
<div class="tr5">1. 管理員可以設置使用道具基本信息和使用條件<br>2. 用戶可以購買所有已經啟用的道具，<br>3. 用戶積分需要達到道具的積分要求才能使用道具，用戶可通過發表文章等途徑提高積分，已達到道具使用要求。<br>4. 如果設置了“允許使用道具的用戶組”，那麼只有指定的用戶組才能使用該道具。（留空不限制）<br>5. 如果設置了“允許使用道具的版塊”，那麼只有在指定的版塊才能使用該道具。（留空不限制）</div>
<form action="$basename" method="post">
<input type="hidden" name="action" value="$action">
<input type="hidden" name="step" value="2">
<input type="hidden" name="id" value="$id">
<h2>道具資料填寫</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="20%">名稱</td>
<td><input type="text" class="input" name="name" value="$rt[name]"></td></tr>

<tr class="tr3"><td>順序</td>
<td><input type="text" class="input" name="vieworder" value="$rt[vieworder]"></td></tr>

<tr class="tr3"><td>文件名</td>
<td><input type="text" class="input" name="filename" value="$rt[filename]"></td></tr>

<tr class="tr3"><td>描述</td>
<td><input type="text" class="input" name="descrip" value="$rt[descrip]" size="90"></td></tr>

<tr class="tr3"><td>圖標</td>
<td><input type="text" class="input" name="logo" value="$rt[logo]"></td></tr>

<tr class="tr3"><td width="20%">類型</td>
<td><input type="radio" name="type" value="1" $type_1>帖子類
<input type="radio" name="type" value="2" $type_2>會員類
<input type="radio" name="type" value="0" $type_0>其他類</td></tr>

<tr class="tr3"><td>狀態</td>
<td><input type="radio" name="state" value="1" $state_Y>開啟<input type="radio" name="state" value="0" $state_N>關閉</td></tr>

<tr class="tr3"><td>積分價格</td>
<td><input type="text" class="input" name="price" value="$rt[price]"> <select name="creditype">$CreditList</select></td></tr>

<tr class="tr3"><td>現金價格</td>
<td><input type="text" class="input" name="rmb" value="$rt[rmb]"> 設置此價格，用戶可以直接通過網上支付現金購買道具</td></tr>

<tr class="tr3"><td>庫存</td>
<td><input type="text" class="input" name="stock" value="$rt[stock]"></td></tr>

<tr><td class="tr4" colspan=2><b>使用積分限制</b></td></tr>

<tr class="tr3"><td>發帖</td>
<td><input type="text" class="input" name="condition[credit][postnum]" value="{$condition[credit][postnum]}"></td></tr>

<tr class="tr3"><td>精華</td>
<td><input type="text" class="input" name="condition[credit][digests]" value="{$condition[credit][digests]}"></td></tr>

<tr class="tr3"><td>{$db_rvrcname}</td>
<td><input type="text" class="input" name="condition[credit][rvrc]"    value="{$condition[credit][rvrc]}"></td></tr>

<tr class="tr3"><td>{$db_moneyname}</td>
<td><input type="text" class="input" name="condition[credit][money]"   value="{$condition[credit][money]}"></td></tr>

<tr class="tr3"><td>{$db_creditname}</td>
<td><input type="text" class="input" name="condition[credit][credit]"  value="{$condition[credit][credit]}"></td></tr>

<!--
EOT;
foreach ($_CREDITDB as $key => $value) {print <<<EOT
-->
<tr class="tr3"><td>$value[0]</td>
<td><input type="text" class="input" name="condition[credit][$key]" value="{$condition[credit][$key]}"></td></tr>
<!--
EOT;
}print <<<EOT
-->
<tr><td class="tr4" colspan="2"><b>用戶組與版塊限制</b></td></tr>

<tr class="tr3"><td>允許使用道具的用戶組</td>
<td>$usergroup</td></tr>

<tr class="tr3"><td>允許使用道具的版塊</td>
<td>$forumcheck</td></tr>

</table>
<br><center><input type="submit" class="btn" value='提 交'></center></form>
<!--
EOT;
}} elseif ($job == 'usertool') {print <<<EOT
-->
<ul class="nav3">
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter">參數設置</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo">道具資料</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=add">添加道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool" class="two">用戶道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=tradelog">交易信息</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toollog">道具日志</a></li>
</ul>
<div class="c"></div>
<h3>用戶道具說明</h3>
<div class="tr5">1.管理員可以編輯或刪除用戶道具資料。<br/>2.點擊用戶名可進行編輯.</div>
<!--
EOT;
if (!$action || $action == 'search') {print <<<EOT
-->
<form action="$basename" method="post">
<input type="hidden" name="action" value="search">
<h2>用戶擁有道具搜索</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="20%">用戶名</td>
<td><input type="text" class="input" class="input" name="username"> <input class="btn" type="submit" value="提 交"></td></tr>
</table></form>

<form action="$basename" method="post">
<input type="hidden" name="action" value="submit">
$pages
<h2>用戶道具</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3">
<td>ID</td>
<td>用戶名</td>
<td>名稱</td>
<td>道具數量</td>
<td>轉讓數量</td>
<td>轉讓價格</td>
<td>庫存</td>
<td>價格</td>
<td>價格單位</td>
<td class="tal">刪除</td>
</tr>
<!--
EOT;
$id = ($page-1) * $db_perpage;
foreach ($tooldb as $key => $value) {
$id++;
print <<<EOT
-->
<tr class="tr3 tac">
<td>$id</td>
<td><a href="$basename&action=edit&uid=$value[uid]&id=$value[toolid]">$value[username]</a></td>
<td><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=edit&id=$value[toolid]">$value[name]</a></td>
<td>$value[nums]</td>
<td>$value[sellnums]</td>
<td>$value[sellprice]</td>
<td>$value[stock]</td>
<td>$value[price]</td>
<td>{$credit->cType[$value[creditype]]}</td>
<td><a class="fourm-two" href="$basename&action=del&uid=$value[uid]&id=$value[toolid]" title="刪除"><span class="del"></span></a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br><center><input type="submit" class="btn" value='提 交'></center></form><br/>
<!--
EOT;
} elseif ($action == 'edit') {print <<<EOT
-->
<form action="$basename" method="post">
<input type="hidden" name="action" value="edit">
<input type="hidden" name="step" value="2">
<input type="hidden" name="uid" value="$uid">
<input type="hidden" name="id" value="$id">
<h2>道具資料</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="20%">名稱</td>
<td>$rt[name]</td></tr>
<tr class="tr3"><td width="20%">用戶名</td>
<td>$rt[username]</td></tr>
<tr class="tr3"><td>道具數量</td>
<td><input type="text" class="input" name="nums" value="$rt[nums]"></td></tr>
<tr class="tr3"><td>轉讓數量</td>
<td><input type="text" class="input" name="sellnums" value="$rt[sellnums]"></td></tr>
<tr class="tr3"><td>轉讓價格</td>
<td><input type="text" class="input" name="sellprice" value="$rt[sellprice]"> [{$credit->cType[$rt[creditype]]}]</td></tr>
</table>
<br><center><input type="submit" class="btn" value='提 交'></center></form>
<!--
EOT;
}} elseif ($job == 'tradelog') {print <<<EOT
-->
<ul class="nav3">
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter">參數設置</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo">道具資料</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=add">添加道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool">用戶道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=tradelog" class="two">交易信息</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toollog">道具日志</a></li>
</ul>
<div class="c"></div>
<form action="$basename" method="post">
<input type="hidden" name="action" value="search">
<h2>{$db_currencyname}日志管理</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="20%">用戶名</td>
<td><input type="text" class="input" name="username"> <input class="btn" type="submit" value="提 交"></td></tr>
</table></form><br>
$pages
<h2>交易信息</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3">
<td>ID</td>
<td>出售者</td>
<td>名稱</td>
<td>描述</td>
<td>道具數量</td>
<td>轉讓數量</td>
<td>轉讓價格</td>
<td>價格單位</td>
</tr>
<!--
EOT;
$id = ($page-1)*$db_perpage;
foreach ($tooldb as $key => $value) {
$id++;
print <<<EOT
-->
<tr class="tr3 tac">
<td>$id</td>
<td><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool&action=edit&uid=$value[uid]&id=$value[toolid]">$value[username]</a></td>
<td><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=edit&id=$value[toolid]">$value[name]</a></td>
<td align="left">$value[descrip]</td>
<td>$value[nums]</td>
<td>$value[sellnums]</td>
<td>$value[sellprice]</td>
<td>{$credit->cType[$value[creditype]]}</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
} elseif ($job == 'toollog') {print <<<EOT
-->
<ul class="nav3">
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter">參數設置</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo">道具資料</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toolinfo&action=add">添加道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=usertool">用戶道具</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=tradelog">交易信息</a></li>
	<li><a href="$admin_file?adminjob=hack&hackset=toolcenter&job=toollog" class="two">道具日志</a></li>
</ul>
<div class="c"></div>
<form action="$basename&" method="post">
<h2>道具日志管理</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="20%">關鍵詞:</td>
<td><input type="text" class="input" name="keyword"> <input class="btn" type="submit" value="提 交"></td></tr>
</table></form><br>

<form action="$basename" method="post">
<input type="hidden" name="action" value="del">
$pages
<h2><a href="$basename">道具日志管理</a></h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac s3">
<td>ID</td>
<td width="6%">操作</td>
<td>描述</td>
<td width="5%">價格</td>
<td width="5%">數量</td>
<td width="10%">IP</td>
<td>時間</td>
<td width="5%">刪除</td>
</tr>
<!--
EOT;
$id = ($page-1)*$db_perpage;
foreach ($logdb as $key => $value) {
$id++;
print <<<EOT
-->
<tr class="tr3 tac">
<td>$id</td>
<td>$value[type]</td>
<td align="left">$value[descrip]</td>
<td>$value[money]</td>
<td>$value[nums]</td>
<td>$value[ip]</td>
<td>$value[time]</td>
<td><input type="checkbox" name="selid[]" value="$value[id]"></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br><center><input type="button" class="btn" name="chkall" value="全 選" onclick="CheckAll(this.form)"><input type="submit" class="btn" value='提 交'></center></form>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
