<?php include 'header.tpl.php';?>
<style>
.me_model{float:left;width:300px;padding:10px 0px 0px 10px}
.me_model .pic{float:left;width:80px}
.me_model .tit{float:left;width:210px;text-align:left;color:#0000ff}
.me_model .intro{float:left;width:210px;text-align:left;color:#555555}
.me_model .act{float:left;width:190px;text-align:left;padding-left:20px}
</style>
<script>
function meSearchClear(){
	document.frmMain.s_regtime1.value="";
	document.frmMain.s_regtime2.value="";
	document.frmMain.s_logintime1.value="";
	document.frmMain.s_logintime2.value="";
	document.frmMain.s_type.value="";
	document.frmMain.s_state.value="";
	document.frmMain.s_name.value="";
	frmExecute('');
}
function me_change(msgval){
	obj_id_state=document.getElementById("id_state");
	switch(msgval){
		case "state":
		{
			obj_id_state.style.display="";
			break;
		}
		default:
		{
			obj_id_state.style.display="none";
		}
	}
}
</script>
<div class="pMenu">
<li class="sel"><a href="javascript:frmExecute('');">管理</a></li>
<?php if($obj_ctl_limit->chk_act("add")){?><li><a href="javascript:frmExecute('add');">添加</a></li><?php }?>
<li><span onclick="div_show_hide('objSearch');" style="cursor:hand">查找</span></li>
<li class="info"><a href="javascript:inc_show_help(194);" style="color:#ff0000">帮助</a></li>
</div>
<div class="pSearchDiv" id="objSearch" style="display:<?php if($get_issearch!="1")echo "none"?>">
<table class="sTab">
<tr><td>注册时间：<input type="text" name="s_regtime1" value="<?php echo $get_s_regtime1;?>" onfocus="setday(this);"> 到 <input type="text" name="s_regtime2" value="<?php echo $get_s_regtime2;?>" onfocus="setday(this);">　登录时间：<input type="text" name="s_logintime1" value="<?php echo $get_s_logintime1;?>" onfocus="setday(this);"> 到 <input type="text" name="s_logintime2" value="<?php echo $get_s_logintime2;?>" onfocus="setday(this);"></td></tr>
<tr><td>类　型：<select name="s_type">
	<option value="">不限</option>
	<?php foreach($arr_type as $item=>$val){
		$str_sel="";
		if($get_s_type==$val) $str_sel=" selected";
		echo "<option value='".$val."'".$str_sel.">".$item."</option>";
		}
		?>
	</select>　状　态：<select name="s_state">
	<option value="-101">不限</option>
	<?php foreach($arr_state as $item=>$val){
		$str_sel="";
		if($get_s_state==$val) $str_sel=" selected";
		echo "<option value='".$val."'".$str_sel.">".$item."</option>";
		}
		?>
	</select>　关键字：<input type="text" name="s_name" value="<?php echo $get_s_name?>">　<input type="button" name="s_btnok" value="查找" class="pBtn" onclick="frmExecute('')"> 　<input type="button" name="s_btnok" value="清空" class="pBtn" onclick="meSearchClear();frmExecute('');"></td></tr>
</table>
</div>
<div>
<table class='pTable'>
<tr class='pTabTitRow'>
	<td class='pTabTitCol'></td><td class='pTabTitCol'>类型</td><td class='pTabTitCol'>用户名</td><td class='pTabTitCol'>状态</td>
	<td class='pTabTitCol'>注册</td><td class='pTabTitCol'>登陆</td><td class='pTabTitCol'>操作</td></tr>
	<?php foreach($arr_user as $item){ ?>
	<tr class='pTabRow' id="id_row_<?php echo $item["user_id"]?>" onmouseover="admin_row_mouseover(<?php echo $item["user_id"];?>)" onmouseout="admin_row_mouseout(<?php echo $item["user_id"];?>);">
	<td class='pTabCol' width="60"><input type='checkbox' name='userid[]' value='<?php echo $item['user_id'];?>' onclick="admin_row_sel(this.checked,<?php echo $item["user_id"]?>);"></td><td class='pTabCol'><?php echo $item['type'];?></td><td class='pTabCol'><?php echo $item['user_name'];?></td><td class='pTabCol'><?php echo $item['state'];?></td>
	<td class='pTabCol'><?php echo $item['user_regtime'];?><br>(IP:<?php echo $item['user_regip'];?>)</td>
	<td class='pTabCol'><?php echo $item['user_logintime'];?><?php if($item['user_loginip']!=""){?><br>(IP:<?php echo $item['user_loginip'];?>)<?php }?></td>
	<td class='pTabCol' onmousedown="frmSet('id','<?php echo $item['user_id'];?>')">
	<?php if($obj_ctl_limit->chk_act("edit")){?><img src="../images/b_edit.png" onclick="javascript:frmExecute('edit');" class="pImgbtn" title="编辑"><?php }?>
	<?php if($obj_ctl_limit->chk_act("del")){?>　<img src="../images/b_drop.png" onclick="javascript:frmExecute('del');" class="pImgbtn" title="删除"><?php }?>
	</td></tr>
	<?php }?>
</table>
</div>
<div class="pPage">
<?php echo $page_split_page;?>
</div>
<div class="pFootAct">
<li><input type='checkbox' name='useridall' value='1' onclick="admin_row_selall(this.form,'useridall','userid');">全选　<select name="selact" onchange="me_change(this.value);">
	<option value="">--操作--</option>
	<?php if($obj_ctl_limit->chk_act("state")){?><option value="state">状态设置</option><?php }?>
	<?php if($obj_ctl_limit->chk_act("del")){?><option value="del_sel">删除</option><?php }?>
	</select>　<span id="id_state" style="display:none">状　态：<select name="state_val">
	<option value=""></option>
	<?php foreach($arr_state as $item=>$val){
		$str_sel="";
		if($get_s_state==$val) $str_sel=" selected";
		echo "<option value='".$val."'>".$item."</option>";
		}
		?>
	</select></span>
	&nbsp;<input type="button" name="btnExe" value="执行" onclick="frmExecute(document.frmMain.selact.value);" class="pBtn"></li>
</div>

<?php include 'footer.tpl.php';?>		
