<!--<?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=setlevel">有效期設置</a></li>
</ul>
<div class="c"></div>
<h3><b>提示信息</b></h3>
<div class="tr5">
可以給所有系統組成員指定有效期，到期自動收回頭餃!
</div>
<form action="$basename" method="post">
<h2>搜索</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac">
	<td>用戶名︰<input class="input" type="text" name="username"></td>
	<td>用戶組id︰<select name="gid">$grouplist</option></td>
	<td><input type="submit" class="btn" value="提 交"></td>
</tr>
</table></form><br/>
<form action="$basename" method="post">
<h2>系統組列表</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tac tr3 s3">
<td width="6%"></td>
<td width="8%">ID</td>
<td width="10%">用戶名</td>
<td width="15%">限期頭餃</td>
<td width="15%">到期用戶組變為</td>
<td width="*">開始日期</td>
<td width="10%">有效期限</td>
<td width="8%"></td>
</tr>
<!--
EOT;
$i=($page-1)*$db_perpage;
foreach($memberdb as $key=>$member){
$i++;
print <<<EOT
-->
<tr class="tac tr3">
<td><input type="checkbox" name="selid[$member[gid]][]" value="$member[uid]" onclick="pwJsCheck(this)" /></td>
<td>$i</td>
<td>$member[username]</td>
<td>$member[slevel]</td>
<td>$member[tolevel]</td>
<td>$member[startdate]</td>
<td>$member[days] </td>
<td><a href="$basename&action=edit&uid=$member[uid]&gid=$member[gid]"><b>編輯</b></a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>$pages
<input type="hidden" name="action" value="del"/>
<br /><center><input class="btn" type="button" name="chkall" value="全 選" onclick="CheckAll(this.form)" />&nbsp;
<input class="btn" type="submit" value="刪除所選項" /></center></form><br/>
<!--
EOT;
}elseif($action=='setlevel'){ print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">系統組列表</a></li>
<li><a href="#" class="two">有效期設置</a></li>
</ul>
<div class="c"></div>
<!--
EOT;
if(!$_POST['step']){ print <<<EOT
-->
<form action="$basename" method="post">
<h2>有效期設置</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3"><td width="30%">用戶名</td><td><input class="input" type="text" name="username"></td></tr>
</table>
<input type="hidden" name="action" value="setlevel" />
<input type="hidden" name="step" value="1" />
<br /><center><input type="submit" value="提 交" class="btn" /></center></form><br/>
<!--
EOT;
}elseif($_POST['step']==1){
print <<<EOT
-->
<form action="$basename" method="post">
<h2>有效期設置</h2>
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr3 tac">
	<td width="15%">用戶名</td>
	<td width="15%">限期用戶組</td>
	<td width="15%">到期用戶組變為</td>
	<td>有效期限</td>
</tr>
<tr class="tr3 tac">
	<td>$rt[username]</td>
	<td><select name="gid">$groupstitle</select></td>
	<td><select name="togid"><option value=""></option>$groupstitle</select></td>
	<td><input type="text" name="days" class="input" value="30"> </td>
</tr>
</table>
<input type="hidden" name="action" value="setlevel" />
<input type="hidden" name="step" value="2" />
<input type="hidden" name="uid" value="$rt[uid]" />
<br /><center><input type="submit" value="提 交" class="btn" /></center></form><br/>
</div>
<!--
EOT;
}}elseif($action=='edit'){print <<<EOT
-->
<ul class="nav3">
<li><a href="$basename">系統組列表</a></li>
<li><a href="#" class="two">有效期設置</a></li>
</ul>
<div class="c"></div>

<form action="$basename" method="post">
<h2>有效期設置</h2>
<tr class="tr3 tac">
	<td width="15%">用戶名</td>
	<td width="15%">限期用戶組</td>
	<td width="15%">到期用戶組變為</td>
	<td>有效期限</td>
</tr>
<tr class="tr3 tac">
	<td>$men[username]</td>
	<td><select name="gid">$grouplist</select></td>
	<td><select name="togid"><option value=""></option>$togrouplist</select></td>
	<td><input type="text" class="input" name="days" value="$men[days]" size="10">  <input class="input" type="checkbox" name="treset" value="1">時間重設(該用戶頭餃有效期從當前時間重新開始)</td>
</tr>
</table>
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="step" value="3" />
<input type="hidden" name="uid" value="$uid" />
<br /><center><input type="submit" class="btn" value="提 交" /></center></form><br/>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>
-->