<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo SYS_CHARSET ?>">
<title>users</title>
<link href="<?php echo SYS_ADMIN_STYLE_PATH ?>style/common.css" rel="stylesheet" type="text/css">
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/validate.js"></script>
<script language="javascript" src="<?php echo SYS_ADMIN_STYLE_PATH ?>js/common.js"></script>
<script>
function openerSelect(tmpValue,tmpTxt)
{	
	if(confirm("你确认选择\""+tmpTxt+"\"吗？"))
	{    			
		if(window.opener.document.getElementById('uid') && window.opener.document.getElementById('username'))
		{
			document.getElementById('td_status').innerHTML = "成功选择["+tmpTxt+"]! <br />如果没有自动关闭当前窗口,请手动关闭.";
			window.opener.document.getElementById('uid').value=tmpValue;
			window.opener.document.getElementById('username').value = tmpTxt;
			window.close();
		}
	}	
}	

function clearSelect()
{
	window.opener.document.getElementById('uid').value='';
	window.opener.document.getElementById('username').value ='选择用户';
	window.close();
}


function closeWin()
{
	window.close();
}
</script>
<style>
BODY {
	FONT-SIZE: 9pt; FONT-FAMILY: "宋体";
	background-color: #FFFFFF;
	margin-left: 5px;
	margin-top: 5px;
	margin-right: 5px;
	margin-bottom: 5px;

}
</style>
</head>

<body>

<table width="100%" height="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td valign="top" height="20">
			<table class="search_table" cellpadding="0" cellspacing="0">	
				<form name="searchForm" method="post" action="">
				<tr>
					<td class="search_td">
						<select name="search_field" class="input_select" >
						<option value='username' >用户名</option>
						<option value='nickname' >昵称</option>
						<option value='email' >电子邮件</option>
						<option value='tel' >昵称</option>
						<option value='mobile' >手机</option>
						</select>
						<?php echo $layout['list_flag'] . $layout['list_user_class']; ?>
                        <input type="text" name="search_keyword" id="search_keyword" class="input_text_search" value=""><input type="submit" name="btn_search" class="btn_search" value="go">
					</td>
				</tr>	
			</form>
			</table>
		</td>
	</tr>	
	<tr>
		<td valign="top">
<table class="list_tb" cellpadding="0" cellspacing="0">
<tr class="list_title_tr_bg">
<td width="6%" class="list_title_td">编号</td>
<td width="20%" class="list_title_td">用户名</td>
<td width="20%" class="list_title_td">昵称</td>
<td width="20%" class="list_title_td">Email</td>
<td width="20%" class="list_title_td">所属用户组</td>
<td width="8%" class="list_title_td">状态</td>
<td width="6%" class="list_title_td">选择</td>
</tr>
<?php
require_once(EIFR_ROOT . 'admin/mod_user_class/class_user_class.php');
$num=0; 
foreach($layout['eifr_pages']['list'] as $row):
$num++;
$user_class = ComUserClass::getUserClassById($row['user_class_id']);
?>
<tr class="list_sub_tr_bg" onMouseOver="this.className='list_mouseover_tr_bg'" onMouseOut="this.className='list_sub_tr_bg'" >
<td><?php echo $num ?></td>
<td><?php echo $row['username'] ?></td>
<td><?php echo $row['nickname'] ?></td>
<td><?php echo $row['email'] ?></td>
<td><?php echo $user_class['title'] ?></td>
<td><?php echo Common::createFlagShow($row['flag']) ?></td>
<td><input type="button" name="selectid" value="选择" class="input_checkbox" onclick="openerSelect('<?php echo $row['uid'] ?>','<?php echo $row['username'] ?>')"></td>
</tr>
<?php endforeach; ?>
</table>               
<div class="pagenext_div"><?php echo $layout['eifr_pages']['page'] ?></div>
</td>
	</tr>
	<tr>
		<td valign="bottom" height="26">
			<table class="select_window_bottom" width="100%" cellpadding="0" cellspacing="0">
				<tr>
				<td width="300"  id="td_status" class="select_window_bottom_left">&nbsp;</td>
				<td align="right">
					<span id="span_clear" ><a href="javascript:clearSelect()">[---清空---]</a></span>&nbsp;&nbsp;
					<a href="javascript:closeWin()">[---关闭---]</a>&nbsp;&nbsp;
				</td>
				</tr>
			</table> 
		</td>
	</tr>
</table>
</body>
</html>