<!--<?php
include_once PrintEot('left');
if(empty($action)){
print <<<EOT
-->
<ul class="nav3">
<li><a href="#" class="two">基本設置</a></li>
<li><a href="$basename&action=manager">邀請碼管理</a></li>
</ul><div class="c"></div>
<form action="$basename" method="post">
<input type="hidden" name="action" value="unsubmit">
<h2>基本設置</h2>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr3">
		<td width="35%">是否開啟邀請注冊功能</td>
		<td><input type="radio" value="1" $open_Y name="config[open]" /> 是 <input type="radio" value="0" $open_N name="config[open]" /> 否</td>
	</tr>
	<tr class="tr3">
		<td>邀請碼有效期限(單位:天)</td>
		<td><input type="text" class="input" name="config[days]" value="$inv_days" size="8"></td>
	</tr>
	<tr class="tr3">
		<td>邀請碼購買時間間隔限制(單位:天)<br>(設置0不限制)</td>
		<td><input type="text" class="input" name="config[limitdays]" value="$inv_limitdays" size="8"></td>
	</tr>
	<tr class="tr3">
		<td>購買邀請碼所消耗的積分</td>
		<td><input type="text" class="input" name="config[costs]" value="$inv_costs" size="8"></td>
	</tr>
	<tr class="tr3">
		<td>購買邀請碼所消耗的積分類型</td>
		<td><select name="config[credit]">
			<option value="rvrc" $rvrc_st>$db_rvrcname</option>
			<option value="money" $money_st>$db_moneyname</option>
			<option value="credit" $credit_st>$db_creditname</option>
			<option value="currency" $currency_st>$db_currencyname</option>
			</select>
		</td>
	</tr>
	<tr class="tr3">
		<td>允許發送邀請的用戶組</td>
		<td><table cellspacing="0" cellpadding="0" border="0" width="100%" align="center"><tr class="b">$usergroup</tr></table></td>
	</tr>
	<tr class="tr3">
		<td>是否開啟邀請碼在線支付功能<br />此功能允許注冊者通過網上支付一定費用獲得邀請碼<br />開啟此功能需︰<br />1、系統已開啟網上支付功能<br />2、系統已開啟郵件發送功能</td>
		<td><input type="radio" value="1" $onlinesell_Y name="config[onlinesell]" /> 是 <input type="radio" value="0" $onlinesell_N name="config[onlinesell]" /> 否</td>
	</tr>
	<tr class="tr3">
		<td>支付金額(單位︰RMB)</td>
		<td><input type="text" class="input" name="config[price]" value="$inv_price" /></td>
	</tr>
</table>
<br><center><input class="btn" type="submit" value="提 交" /></center></form><br />
<!--
EOT;
}elseif($action=='manager'){print <<<EOT
-->
<form action="$basename" method="post">
<input type="hidden" name="action" value="delete">
<ul class="nav3">
<li><a href="$basename">基本設置</a></li>
<li><a href="#" class="two">邀請碼管理</a></li>
</ul><div class="c"></div>
&nbsp;&nbsp;分類︰<select name="type" onchange="window.location=('$basename&action=manager&type='+this.value)">
<option value="1" $sel_1>未使用</option>
<option value="2" $sel_2>已使用</option>
<option value="3" $sel_3>已過期</option>
<option value="4" $sel_4>已邀請</option>
</select>
<h2>邀請碼管理</h2>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr3 tac s3">
		<td width="5%">序號</td>
		<td width="*">邀請碼</td>
		<td width="12%">購買用戶</td>
		<td width="20%">購買時間</td>
		<td width="8%">狀態</td>
		<td width="12%">注冊用戶</td>
<!--
EOT;
if($type!='1'){
print <<<EOT
-->
		<td width="5%"></td>
<!--
EOT;
}
print <<<EOT
-->
	</td>
<!--
EOT;
foreach($invdb as $key=>$value){
print <<<EOT
-->
	<tr class="tr3 tac">
		<td>$value[num]</td>
		<td>$value[invcode]</td>
		<td>$value[username]</td>
		<td>$value[createtime]</td>
<!--
EOT;
if($type=='1'){
print <<<EOT
-->

		<td>未使用</td>
<!--
EOT;
}elseif($type=='2'){
print <<<EOT
-->
		<td>已使用</td>
<!--
EOT;
}elseif($type==3){
print <<<EOT
-->
		<td>已過期</td>
<!--
EOT;
}else{
print <<<EOT
-->
		<td>已邀請</td>
<!--
EOT;
}
print <<<EOT
-->
		<td>$value[receiver]</td>
<!--
EOT;
if($type!='1'){
print <<<EOT
-->
		<td><input type="checkbox" name="selid[]" value="$value[id]" /></td>
<!--
EOT;
}
print <<<EOT
-->
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table><br>
&nbsp;&nbsp;$pages
<!--
EOT;
if($type!='1'){
print <<<EOT
-->
<br><center><input type="button" class="btn" name="chkall" value="全 選" onclick="CheckAll(this.form)" />
<input type="submit" value="刪除所選項" class="btn" /></center><br/>
<!--
EOT;
}
print <<<EOT
-->
</form>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->