<!--<?php
include_once PrintEot('left');
if ($adminitem == 'edit') {
print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li class="current"><a href="$basename">編輯用戶</a></li>
		<li><a href="$jobUrl&adminitem=delete">刪除用戶</a></li>
		<li><a href="$jobUrl&adminitem=add">添加用戶</a></li>
		<li><a href="$jobUrl&adminitem=usertitle">用戶組頭餃</a></li>
		<li><a href="$jobUrl&adminitem=unituser">合並用戶</a></li>
		<li><a href="$jobUrl&adminitem=customcredit">自定義積分</a></li>
	</ul>
</div>
<!--
EOT;
	if(empty($action)){print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">主要功能:用戶組管理，未驗證會員審核，禁言組設置，會員編輯，(<font color=blue>版主設置</font>請到版塊管理處)<ol><li>用戶組管理:<br /><font color=blue><b>搜索會員並可設置會員為管理員.總版主.和其他特殊組.</b></font><br />在"用戶組"處選擇要進行操作的用戶組，按搜索進入該用戶組的管理，要去除該用戶組的某個會員只需將他的系統頭餃設為普通會員或其他用戶組頭餃</li><li>未驗證會員審核:<br />當開啟新注冊會員需要管理員驗證功能時可以對需要驗證的新會員進行管理，在"用戶組"處選擇"驗證會員"選項，按搜索進入驗證會員的管理，要通過某個會員驗證只需將此會員的系統頭餃設為普通會員或其他用戶組頭餃</li><li>單個會員管理:<br />在"用戶名包含"處填寫會員ID（可以使用通配符進行模糊查找），按搜索進入對會員資料編輯<br />注:只有超管才能編輯管理員的資料</li></ol></div>
</div>
<form action="$basename&" method=post>
<h2 class="h1"><b>編輯用戶</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">用戶組</td>
		<td class="td2">
			<select class="select_wa" name=groupid>
				<option value=''>不限制</option>
				$groupselect
			</select>
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">用戶名包含</td>
		<td class="td2"><input type="text" class="input input_wa mr20" maxlength=15 name="schname" />可使用通配符 "*"<!-- <input type="checkbox" value="1" name="vaguename" /> 模糊搜索 --></td>
		</tr>
	<tr class="tr1 vt">	
		<td class="td1">UID</td>
		<td class="td2"><input type="text" class="input input_wa mr20" maxlength=14 name="schuid" /><!-- <input type="checkbox" value="1" name="vaguename" /> 模糊搜索 --></td>
		</tr>
	<tr class="tr1 vt">
		<td class="td1">電子郵箱</td>
		<td class="td2"><input type="text" class="input input_wa mr20" name="schemail" />可使用通配符 "*"<!-- <input type="checkbox" value="1" name="vagueemail" /> 模糊搜索 --></td>

	</tr>
	<tr class="tr1 vt">
		<td class="td1">最後登錄IP</td>
		<td class="td2"><input type="text" class="input input_wa mr20" name="userip" />可使用通配符 "*"</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">注冊時間大于</td>
		<td class="td2">
			<select class="select_wa" name=regdate>
				<option value="all">不限制</option>
				<option value="86400">一天</option>
				<option value="172800">二天</option>
				<option value="604800">一星期</option>
				<option value="2592000">一個月</option>
				<option value="7776000">三個月</option>
				<option value="15552000">六個月</option>
				<option value="31536000">一年</option>
			</select>
		</td>
	</tr>
	<tr class="tr1 vt">
	<td class="td1">多久未登錄</td>
	<td class="td2">
		<select class="select_wa" name=schlastvisit>
			<option value="all">不限制</option>
			<option value="86400">一天</option>
			<option value="172800">二天</option>
			<option value="604800">一星期</option>
			<option value="2592000">一個月</option>
			<option value="7776000">三個月</option>
			<option value="15552000">六個月</option>
			<option value="31536000">一年</option>
		</select>
	</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">排序</td>
		<td class="td2">
			<select class="select_wa fl mr20" name=orderway>
				<option value="username">用戶名</option>
				<option value="regdate">注冊時間</option>
				<option value="lastpost">最後發表</option>
				<option value="lastvisit">最後登錄</option>
				<option value="postnum">發帖</option>
			</select>
			<ul class="list_A list_80 fl">
				<li><input type="radio" size="5" name="asc" value='' checked="checked" />正序</li>
				<li><input type="radio" size="5" name="asc" value='DESC' />倒序</li>
			</ul>
	</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">每頁顯示行數</td>
		<td class="td2"><input type="text" class="input input_wa" name="lines" value=100 /></td>

	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
<input type="hidden" name=action value="search">
</form>
<!--
EOT;
	}elseif($action == 'search'){print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>編輯用戶</b></h3>
	<div class="legend"><ol><li>此功能可以批量修改會員頭餃 </li><li>此功能設置為禁言組的用戶將被<font color=blue>永久禁言</font></li></ol></div>
</div>
<div class="mb10 cc">$pages</div>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="editgroup">
<h2 class="h1"><b>用戶列表</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 td_bgB">
		<td width="30">ID</td>
		<td width="70">用戶名</td>
		<td width="110">電子郵箱</td>
		<td width="150"><p class="lh_18" title="所屬用戶組">所屬用戶組</p></td>
		<td width="110">注冊時間</td>
		<td width="110">最後登錄</td>
		<td width="30">發帖</td>
		<td width="100">IP</td>
		<td width="">操作</td>
	</tr>
<!--
EOT;
foreach($schdb as $key=>$sch){
if(!$sch[username])continue;
$key+=($page-1)*$lines+1;
$uid=$sch[uid];
print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2">$key</td>
		<td class="td2"><a href="{$db_userurl}$sch[uid]" target=_blank>$sch[username]</a></td>
		<td class="td2"><p class="lh_18" title="$sch[email]">$sch[email]</p></td>
		<td class="td2"><select name='gid[$uid]' class="select">$sch[groupselect]</select></td>
		<td class="td2">$sch[regdate]</td>
		<td class="td2">$sch[lastvisit]</td>
		<td class="td2">$sch[postnum]</td>
		<td class="td2">$sch[onlineip]</td>
		<td class="td2"><a title="編輯" href="$basename&action=edit&uid=$sch[uid]">[編輯]</a></td>
	</tr>
<!--
EOT;
}
print <<<EOT
-->
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<!--
EOT;
	}elseif($action=='edit'){print <<<EOT
-->
<form action="$basename&" method="post" onsubmit="return setFaceLen()">
<h2 class="h1"><b>編輯用戶</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">系統頭餃</td>
		<td class="td2"><select class="select_wa" name=groupid>$groupselect</select></td>
		 <td class="td2"><div class="help_a">所屬用戶組</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">附加用戶組頭餃</td>
		<td class="td2">$usergroup</td>
		<td class="td2"><div class="help_a">勾選會員的附加用戶組頭餃。不選則表示該會員無附加頭餃</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">用戶名</td>
		<td class="td2"><input type="text" class="input input_wa" name="username" value="$username" /></td>
		<td class="td2"><div class="help_a">當前會員的用戶名。<font color=blue>如無特殊需要請不要修改</font></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">新密碼</td>
		<td class="td2"><input type="text" class="input input_wa" name="password" value='' /></td>
	<td class="td2"><div class="help_a">輸入想要替換的密碼。<font color=blue>如不更改請留空</font></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">確認密碼</td>
		<td class="td2"><input type="text" class="input input_wa" name="check_pwd" /></td>
		<td class="td2"><div class="help_a">再次輸入密碼。<font color=blue>如不更改請留空</font></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">安全問題</td>
		<td class="td2">
			<select name="question" class="select_wa" onchange="showcustomquest(this.value)">
				<option value="-2">不修改安全問題和答案</option><option value="0">無安全問題</option>
<option value="1">我爸爸的出生地</option>
<option value="2">我媽媽的出生地</option>
<option value="3">我的小學校名</option>
<option value="4">我的中學校名</option>
<option value="5">我最喜歡的運動</option>
<option value="6">我最喜歡的歌曲</option>
<option value="7">我最喜歡的電影</option>
<option value="8">我最喜歡的顏色</option>
<option value="-1">自定義問題</option>
			</select>
			<input id="customquest" style="display:none" type="text" class="input input_wa" name="customquest" />
		</td><td class="td2"><div class="help_a">可修改會員的安全問題。不修改時，請將答案留空</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">您的答案</td>
		<td class="td2"><input type="text" name="answer" class="input input_wa" /></td>
		<td class="td2"><div class="help_a">安全問題不修改時，請留空</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">電子郵箱</td>
		<td class="td2">
			<input type="text" class="input input_wa mr10" name="email"value='$email'>
			<input type=checkbox name=publicmail value=1 $ifpublicmail />公開電子郵箱
		</td><td class="td2"><div class="help_a">填寫您常用的電子郵件地址</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">接收郵件</td>
		<td class="td2">
			<ul class="list_A list_80 cc">
				<li><input type=radio name='receivemail' value='1' $email_open />開啟</li>
				<li><input type=radio name='receivemail' value='0' $email_close />關閉</li>
			</ul>
		</td><td class="td2"><div class="help_a">開啟後，前台會員信息欄處將直接顯示郵件發送入口</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">注冊日期</td>
		<td class="td2"><input type="text" class="input input_wa" name=regdate value='$regdate' /></td>
		<td class="td2"><div class="help_a">格式:(YYYY-MM-DD HH:II，如:1983-12-20 00:00)</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">最後登錄</td>
		<td class="td2">$lastvisit</td>
		<td class="td2">&nbsp;</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">郵件激活</td>
		<td class="td2"><input type="text" class="input input_wa" name=yz value='$yz' /></td>
		<td class="td2"><div class="help_a">1表示此會員已被激活。如果站點沒有開啟郵件激活，那麼此處默認為1</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">IP</td>
		<td class="td2"><input type="text" class="input input_wa" name=userip value='$onlineip' /></td>
		<td class="td2"><div class="help_a">此會員最後登錄的IP</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">頭像</td>
		<td class="td2">
        	<ul class="list_A mb5">
            	<li><input type="radio" name="facetype" value="1" onclick="CkFaceType(this.value)">系統頭像</li>
                <li><input type="radio" name="facetype" value="2" onclick="CkFaceType(this.value)">頭像鏈接</li>
                <li><input type="radio" name="facetype" value="3" onclick="CkFaceType(this.value)" $disabled>頭像上傳</li>
            </ul>
            <div id="face1" style="display:none;">
            	<select name="proicon" class="select_wa">{$faces}</select>
            </div>
            <div id="face2" style="display:none;">
            	<table>
                	<tr>
                		<td>&nbsp;</td>
                    </tr>
                    <tr>
                		<td><input type="text" class="input input_wa mr10" id="httpurl_url" name="httpurl[0]" value='$httpurl'></td>
                    </tr>
                </table>
                <input type="hidden" id="httpurl_w" name="httpurl[3]" />
                <input type="hidden" id="httpurl_h" name="httpurl[4]" />
            </div>
            <div id="face3" style="display:none;">
                <img src="{$iconurl}">
                <input type="checkbox" name="delupload" value="$iconfile" />刪
            </div>
		</td><td class="td2"><div class="help_a">系統頭餃:填寫系統頭像文件名<br />頭像鏈接:必須以 http開頭並設置該頭像寬.高<br />頭像上傳:請到前台操作<br />不使用請留空</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">發帖數</td>
		<td class="td2"><input type="text" class="input input_wa" name="postnum" value="$postnum" /></td>
	<td class="td2"><div class="help_a">會員歷史發帖數量</div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">{$db_rvrcname}</td>
		<td class="td2"><input type="text" class="input input_wa" name="rvrc" value="$rvrc" /></td>
	<td class="td2"><div class="help_a">會員擁有的{$db_rvrcname}數量</div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">{$db_moneyname}</td>
		<td class="td2"><input type="text" class="input input_wa" name="money" value="$money" /></td>
	<td class="td2"><div class="help_a">會員擁有的{$db_moneyname}數量</div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">活期存款</td>
		<td class="td2"><input type="text" class="input input_wa" name="deposit" value="$deposit" /></td>
	<td class="td2"><div class="help_a">會員擁有的活期存款數量</div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">定期存款</td>
		<td class="td2"><input type="text" class="input input_wa" name="ddeposit" value="$ddeposit" /></td>
	<td class="td2"><div class="help_a">會員擁有的定期存款數量</div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">$db_currencyname</td>
		<td class="td2"><input type="text" class="input input_wa" name="currency" value="$currency" /></td><td class="td2"><div class="help_a">會員擁有的{$db_currencyname}數量</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">{$db_creditname}</td>
		<td class="td2"><input type="text" class="input input_wa" name="credit" value="$mdcredit" /></td>
	<td class="td2"><div class="help_a">會員擁有的{$db_creditname}數量</div></td></tr>
<!--
EOT;
foreach($_CREDITDB as $key => $value){print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td1">$value[0]</td>
		<td class="td2"><input type="text" class="input input_wa" name="creditdb[$key]" value="$custom_credits[$key]" /></td>
		<td class="td2"><div class="help_a">會員擁有的{$value[0]}數量</div></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td1">在線時間[小時]</td>
		<td class="td2"><input type="text" class="input input_wa" name="onlinetime" value="$onlinetime" /></td><td class="td2"><div class="help_a">會員的歷史在線時間</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">個人主頁</td>
		<td class="td2"><input type="text" class="input input_wa" name="site" value="$site" /></td>
	<td class="td2"><div class="help_a"></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">來自</td>
		<td class="td2"><input type="text" class="input input_wa" name="location" value="$location" /></td><td class="td2"><div class="help_a"></div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">ICQ</td>
		<td class="td2"><input type="text" class="input input_wa" name="icq" value="$icq" /></td>
	<td class="td2"><div class="help_a"></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">MSN</td>
		<td class="td2"><input type="text" class="input input_wa" name="msn" value="$msn" /></td>
	<td class="td2"><div class="help_a"></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">阿里旺旺</td>
		<td class="td2"><input type="text" class="input input_wa" name="aliww" value="$aliww" /></td>
	<td class="td2"><div class="help_a"></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">Yahoo</td>
		<td class="td2"><input type="text" class="input input_wa" name="yahoo" value="$yahoo" /></td>
	<td class="td2"><div class="help_a"></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">個性簽名</td>
		<td class="td2"><input type="text" class="input input_wa" maxlength="75" name="honor" value="$honor" /></td>
	<td class="td2"><div class="help_a"></div></td></tr>
	<tr class="tr1 vt">
		<td class="td1">帖子簽名</td>
		<td class="td2"><textarea class="textarea" name="signature">$signature</textarea></td>
	<td class="td2"><div class="help_a"> </div></td></tr>
		<tr class="tr1 vt"><td class="td1">自我簡介</td>
		<td class="td2"><textarea name="introduce" class="textarea">$introduce</textarea></td>
	<td class="td2"><div class="help_a"> </div></td></tr>
		<tr class="tr1 vt"><td class="td1">消息拒絕列表</td>
		<td class="td2"><textarea name="banpm" class="textarea">$banpm</textarea></td>
	<td class="td2"><div class="help_a"> </div></td></tr>
</table>
</div>
<!--
EOT;
if($customfield){print <<<EOT
-->
<h2 class="h1"></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
<!--
EOT;
echo $customerTemplate;
print <<<EOT
-->
</table>
</div>
<!--
EOT;
}
print <<<EOT
-->
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="uid" value="$temUid" />
<input type="hidden" name="step" value="2" />
</form>
<script type="text/javascript">
function showcustomquest(qid){
  getObj("customquest").style.display = qid==-1 ? '' : 'none';
}
function CkFaceType(value){
	var facetype = document.getElementsByName('facetype');
	for (i=0;i<facetype.length;i++) {
		if (facetype[i].value == value) {
			facetype[i].checked = true;
			document.getElementById('face' + value).style.display = '';
		} else {
			document.getElementById('face' + facetype[i].value).style.display = 'none';
		}
	}
}
function setFaceLen() {
	var v = 0;
	var facetype = document.getElementsByName('facetype');
	for (i = 0; i < facetype.length; i++) {
		if (facetype[i].checked === true) {
			v = facetype[i].value;break
		}
	}
	if (v == 2) {
		var img = new Image();
		img.src = getObj('httpurl_url').value;
		getObj('httpurl_w').value = img.width;
		getObj('httpurl_h').value = img.height;
	}
	return true;
}
CkFaceType('$icontype');
</script>
<!--
EOT;
	}
}elseif($adminitem == 'add'){
	print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li><a href="$jobUrl&adminitem=edit">編輯用戶</a></li>
		<li><a href="$jobUrl&adminitem=delete">刪除用戶</a></li>
		<li class="current"><a href="$basename">添加用戶</a></li>
		<li><a href="$jobUrl&adminitem=usertitle">用戶組頭餃</a></li>
		<li><a href="$jobUrl&adminitem=unituser">合並用戶</a></li>
		<li><a href="$jobUrl&adminitem=customcredit">自定義積分</a></li>
	</ul>
</div>
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">使用此功能可以在開啟<font color=blue>禁止注冊新用戶</font>功能時,由管理員添加特定用戶   <br />超管(<font color=blue>站點創始人</font>)可以使用此功能<font color=blue>添加站點管理員</font>(普通管理員無此權限)</div>
</div>
<form action="$basename&" method=post>
<h2 class="h1"><b>添加用戶</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">用戶名</td>
		<td class="td2"><input type="text" class="input input_wa" maxlength="15" name="username"></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">密&#160;&#160;碼</td>
		<td class="td2"><input type="password" class="input input_wa" name="password"></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">電子郵箱</td>
		<td class="td2"><input type="text" class="input input_wa" name="email"></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">用戶組</td>
		<td class="td2"><select class="select_wa" name="groupid">$groupselect_add</select></td>
	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
<input type="hidden" name="action" value="addnew" />
</form>

<!--
EOT;
}elseif($adminitem == 'usertitle'){print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li><a href="$jobUrl&adminitem=edit">編輯用戶</a></li>
		<li><a href="$jobUrl&adminitem=delete">刪除用戶</a></li>
		<li><a href="$jobUrl&adminitem=add">添加用戶</a></li>
		<li class="current"><a href="$basename">用戶組頭餃</a></li>
		<li><a href="$jobUrl&adminitem=unituser">合並用戶</a></li>
		<li><a href="$jobUrl&adminitem=customcredit">自定義積分</a></li>
	</ul>
</div>
<!--
EOT;
	if(empty($action)){print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">用戶組頭餃管理<br />此功能可查看用戶的附加用戶組頭餃</div>
</div>
<form action="$basename&" method=post>
<input type="hidden" name="action" value="groups">
<h2 class="h1"><b>用戶組頭餃管理</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">附加用戶組頭餃</td>
		<td class="td2">
			<select class="select_wa" name="groupid">
				<option value=''>不限制</option>
				$g_sel
			</select>
		</td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">用戶名包含</td>
		<td class="td2"><input type="text" class="input input_wa" maxlength=15 name="schname"></td>
	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<!--
EOT;
	}elseif($action == 'groups'){
print <<<EOT
-->
<h2 class="h1"><b>用戶列表</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 td_bgB">
		<td width="24">ID</td>
		<td width="80">用戶名</td>
		<td width="220">所屬用戶組</td>
		<td>勾選會員的附加用戶組頭餃。不選則表示該會員無附加頭餃</td>
		<td width="50">操作</td>
	</tr>
<!--
EOT;
$id=0;
foreach($schdb as $key => $value){
$id++;
print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2">$id</td>
		<td class="td2"><a href="{$db_userurl}$value[uid]" target=_blank>$value[username]</a></td>
		<td class="td2">$value[system]</td>
		<td class="td2">$value[gtitle]</td>
		<td class="td2"><a href="$jobUrl&adminitem=edit&action=edit&uid=$value[uid]">編輯</a></td>
	</tr>
<!--
EOT;
}
print <<<EOT
-->
</table>
</div>
<!--
EOT;
	}
}elseif($adminitem == 'unituser'){
print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li><a href="$jobUrl&adminitem=edit">編輯用戶</a></li>
		<li><a href="$jobUrl&adminitem=delete">刪除用戶</a></li>
		<li><a href="$jobUrl&adminitem=add">添加用戶</a></li>
		<li><a href="$jobUrl&adminitem=usertitle">用戶組頭餃</a></li>
		<li class="current"><a href="$basename">合並用戶</a></li>
		<li><a href="$jobUrl&adminitem=customcredit">自定義積分</a></li>
	</ul>
</div>
<h2 class="h1">合並用戶</h2>
<form action="$basename&" method="post">
<input type="hidden" name="action" value="unit">
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2 td_bgB">
		<td colspan="2">將原用戶的積分、帖子數據合並到目標用戶中，同時刪除原用戶的記錄</td>
		<td class="td2"><div class="help_a"> </div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">原用戶數字ID</td>
		<td class="td2"><input class="input input_wb" type="text" name="uids" /></td>
			<td class="td2"><div class="help_a">原用戶數字ID(多個ID用英文半角逗號“,”分隔)</div></td>
	</tr>
	<tr class="tr1 vt">
		<td class="td1">目標用戶數字ID</td>
		<td class="td2"><input class="input input_wa" type="text" name="newuid" /></td>
			<td class="td2"><div class="help_a"> </div></td>
	</tr>
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<!--
EOT;
}elseif($adminitem == 'delete'){
print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li><a href="$jobUrl&adminitem=edit">編輯用戶</a></li>
		<li class="current"><a href="$basename">刪除用戶</a></li>
		<li><a href="$jobUrl&adminitem=add">添加用戶</a></li>
		<li><a href="$jobUrl&adminitem=usertitle">用戶組頭餃</a></li>
		<li><a href="$jobUrl&adminitem=unituser">合並用戶</a></li>
		<li><a href="$jobUrl&adminitem=customcredit">自定義積分</a></li>
	</ul>
</div>
<!--
EOT;
if(empty($action)){print <<<EOT
-->
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend">刪除符合條件的用戶,用于清理站點冗余數據,此操作不可恢復,請謹慎使用！<br />刪除項目中的“其他”，包括評分、收藏、朋友等其他行為記錄。</div>
</div>
<form action="$basename&" method="post">
  <h3 class="h1"><b>刪除用戶</b></h3>
  <div class="admin_table mb10">
  <table width=100% cellspacing="0" cellpadding="0">
    <tr class="tr1 vt">
      <td class="td1">用戶組</td>
      <td class="td2"><select name="groupid" class="select_wa">
      	<option value=''>不限制</option>
          $groupselect
        </select></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">用戶名包含</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=16 name="schname">  可使用通配符 "*"</td>
    </tr>
     <tr class="tr1 vt">
      <td class="td1">UID</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=16 name="schuid"> </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">電子郵箱</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=64 name="schemail">
        可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">發帖數小于[帖]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=10 name="postnum">
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">在線時間小于[時]</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=10 name="onlinetime">
      </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">根據用戶IP查找</td>
      <td class="td2"><input type="text" class="input input_wa mr20" maxlength=15 name="userip">
        可使用通配符 "*"</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">注冊時間大于</td>
      <td class="td2"><select name="regdate" class="select_wa">
          <option value="all">不限制</option>
          <option value="86400">一天</option>
          <option value="172800">二天</option>
          <option value="604800">一星期</option>
          <option value="2592000">一個月</option>
          <option value="7776000">三個月</option>
          <option value="15552000">六個月</option>
          <option value="31536000">一年</option>
        </select></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">多久未登錄</td>
      <td class="td2"><select name="schlastvisit" class="select_wa">
          <option value="all">不限制</option>
          <option value="86400">一天</option>
          <option value="172800">二天</option>
          <option value="604800">一星期</option>
          <option value="2592000">一個月</option>
          <option value="7776000">三個月</option>
          <option value="15552000">六個月</option>
          <option value="31536000">一年</option>
        </select></td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">排序方式</td>
      <td class="td2"><select name="orderway" class="select_wa mr20 fl">
          <option value='lastvisit' checked>最後登錄</option>
          <option value='regdate'> 注冊時間</option>
          <option value='postnum'> 發帖</option>
        </select>
       			<ul class="list_80 fl list_A">
                	<li><input type="radio" size="5" name="asc" value="ASC" checked="checked">正序</li>
                    <li><input type="radio" size="5" name="asc" value="DESC">倒序</li>
                </ul>
        </td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">每頁顯示行數</td>
      <td class="td2"><input type="text" class="input input_wa mr20" name="lines" value="30"><input type="checkbox" name="direct" value="1" onclick="deldirect(this.form,'info3','每頁顯示行數');">
        直接刪除(直接刪除符合條件的項目)</td>
    </tr>
    <tr class="tr1 vt">
      <td class="td1">刪除項目</td>
      <td class="td2">
      	<ul class="list_A list_120">
            <li><input type="checkbox" name="item[]" value="1">用戶信息</li>
            <li><input type="checkbox" name="item[]" value="2">用戶主題</li>
            <li><input type="checkbox" name="item[]" value="4">用戶回復</li>
            <li><input type="checkbox" name="item[]" value="8">用戶消息</li>
            <li><input type="checkbox" name="item[]" value="16">用戶相冊</li>
           	<li><input type="checkbox" name="item[]" value="32">用戶日志</li>
            <li><input type="checkbox" name="item[]" value="64">用戶新鮮事</li>
						<li><input type="checkbox" name="item[]" value="128">用戶評論</li>
            <li><input type="checkbox" name="item[]" value="256">其他</li>
        </ul>
		</td>
    </tr>
  </table>
  </div>
  	<div class="mb10 tac">
    <span class="btn"><span><button type="submit">提 交</button></span></span>
    </div>
  <input type="hidden" class="btn" name="action" value="del">
</form>
<!--
EOT;
} if($action=='del' && empty($step)){print <<<EOT
-->
<form action="$basename&" method="post" name="FORM" id="superdel_member">
  <input type="hidden" name="action" value="$action">
  <input type="hidden" name="step" value="2">
  <input type="hidden" name="groupid" value="$groupid">
  <input type="hidden" name="schname" value="$schname">
  <input type="hidden" name="schemail" value="$schemail">
  <input type="hidden" name="postnum" value="$postnum">
  <input type="hidden" name="onlinetime" value="$onlinetime">
  <input type="hidden" name="regdate" value="$regdate">
  <input type="hidden" name="schlastvisit" value="$schlastvisit">
  <input type="hidden" name="orderway" value="$orderway">
  <input type="hidden" name="asc" value="$asc">
  <input type="hidden" name="lines" value="$lines">
  <input type="hidden" name="page" value="$page">
  <input type="hidden" name="sphinx" value="$sphinx">
  <input type="hidden" name="sphinxRange" value="$sphinxRange">
  <h2 class="h1"><b>用戶列表</b></h2>
  <div class="admin_table mb10">
	<table cellpadding="0" cellspacing="0" width="100%">
    <tr class="tr2 vt td_bgB">
	  <td width="50"><span class="cp" onclick="CheckAll(document.FORM)">全選</span></td>
      <td width="85">用戶名</td>
      <td width="85">電子郵箱</td>
      <td>系統頭餃</td>
      <td width="85">IP</td>
      <td>注冊時間</td>
      <td>最後登錄</td>
      <td>發帖</td>
    </tr>
<!--
EOT;
if (!empty($schdb)) {
foreach($schdb as $key=>$sch){
if(!$sch[username])continue;
print <<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2"><input type="checkbox" name="delid[]" value="$sch[uid]" checked>
      <td class="td2"><a href="{$db_userurl}$sch[uid]" target="_blank">$sch[username]</a></td>
      <td class="td2">$sch[email]</td>
      <td class="td2">$sch[group]</td>
      <td class="td2">$sch[onlineip]</td>
      <td class="td2">$sch[regdate]</td>
      <td class="td2">$sch[lastvisit]</td>
      <td class="td2">$sch[postnum]</td>
      </td>
    </tr>
<!--
EOT;
}}else{print <<<EOT
-->
<tr><td class="p10" colspan="8"><div class="admin_tips">啊哦，沒有你要的信息！</div></td></tr>
<!--
EOT;
}
print <<<EOT
-->
    <tr class="tr1 vt">
       <td class="td2" colspan="9">
			 	<p class="mb20 fl mr5" style="line-height:25px;">刪除項目</p>
					<ul class="list_A list_120" style="width:600px;">
						<li><label><input type="checkbox" name="item[]" value="1" $check_0>用戶信息</label></li>
						<li><label><input type="checkbox" name="item[]" value="2" $check_1>用戶主題</label></li>
						<li><label><input type="checkbox" name="item[]" value="4" $check_2>用戶回復</label></li>
						<li><label><input type="checkbox" name="item[]" value="8" $check_3>用戶消息</label></li>
						<li><label><input type="checkbox" name="item[]" value="16">用戶相冊</label></li>
						<li><label><input type="checkbox" name="item[]" value="32">用戶日志</label></li>
						<li><label><input type="checkbox" name="item[]" value="64">用戶新鮮事</label></li>
						<li><label><input type="checkbox" name="item[]" value="128">用戶評論</label></li>
						<li><label><input type="checkbox" name="item[]" value="256">其他</label></li>
					</ul>
					<div style="padding-top:5px;"><span class="bt2"><span><button type="button" onclick="CheckAll2(document.FORM, 1, 'item')">全選</button></span></span></div>
        </td>
    </tr>
  </table>
  </div>
  <div class="cc mb10">$pages</div>
  <div class="mt5 mb10 tac">
		<span class="bt"><span><button type="button" onclick="CheckAll2(document.FORM, 0, 'delid')">全 選</button></span></span>
        <span class="btn"><span><button type="submit">提 交</button></span></span>
  </div>
</form>
<script type="text/javascript">
var whetherCheck = [true, true];
function CheckAll2(form, n, match) {
	for (var i = 0; i < form.elements.length; i++) {
		var e = form.elements[i];
		if (e.type == 'checkbox' && (typeof match == 'undefined' || e.name.match(match))) {
			e.checked = whetherCheck[n];
		}
	}
	whetherCheck[n] = whetherCheck[n] == true ? false : true;
}
</script>
<!--
EOT;
}
}elseif($adminitem == 'customcredit'){
print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li><a href="$jobUrl&adminitem=edit">編輯用戶</a></li>
		<li><a href="$jobUrl&adminitem=delete">刪除用戶</a></li>
		<li><a href="$jobUrl&adminitem=add">添加用戶</a></li>
		<li><a href="$jobUrl&adminitem=usertitle">用戶組頭餃</a></li>
		<li><a href="$jobUrl&adminitem=unituser">合並用戶</a></li>
		<li class="current"><a href="$basename">自定義積分</a></li>
	</ul>
</div>
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend"><br />可以查看和管理用戶自定義積分</div>
</div>
<!--
EOT;
if (!$action){print <<<EOT
-->
<form action="$basename&" method="post">
<input type="hidden" name="action" value="edit" />
<h2 class="h1"><b>自定義積分管理</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
<tr class="tr1 vt">
	<td class="td1">用戶名</td>
	<td class="td2"><input class="input input_wa" type="text" name="username" /></td>
	</tr>
</table>
</div>
<div class="mb10 tac">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<div class="cc mb10">$pages</div>
<h2 class="h1"><b>自定義積分管理</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr2 td_bgB">
		<td width="24">ID</td>
		<td width="80">用戶名</td>
		<td width="120">自定義積分名稱</td>
		<td width="100">自定義積分值</td>
		<td>操作</td>
	</tr>
<!--
EOT;
$id=($page-1)*$db_perpage;
foreach($creditdb as $key => $value){
if($value[username] && $value[name]){
$id++;
print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td2">$id</td>
		<td class="td2">$value[username]</td>
		<td class="td2">$value[name]</td>
		<td class="td2">$value[value]</td>
		<td class="td2"><a title="編輯" href="$basename&action=edit&uid=$value[uid]">編輯</a></td>
	</tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
</div>
<div class="mb10 cc">$pages</div>
<!--
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="$rt[uid]">
<h2 class="h1"><b>自定義積分管理</b></h2>
<div class="admin_table mb10">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr class="tr1 vt">
		<td class="td1">用戶名</td>
		<td class="td2">$rt[username]</td>
	</tr>
<!--
EOT;
foreach($_CREDITDB as $key => $value){print <<<EOT
-->
	<tr class="tr1 vt">
		<td class="td1">$value[0]</td>
		<td class="td2"><input class="input" type="text" name="creditdb[$key]" value="{$u_credit[$key]}"></td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="tac mb10">
	<span class="btn"><span><button type="submit">提 交</button></span></span>
</div>
</form>
<!--
EOT;
}
}

include_once PrintEot('adminbottom');
?>-->