<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>会员转型</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script type="text/javascript" src="admin/template/js/admin.js"></script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=yellowpages&action=manage">商家管理</a></li>
			<li><a href="javascript:void(0);" class="on">转型申请</a></li>
			<li><a href="?file=yellowpages&action=guestbook">企业留言</a></li>	
		</ul>
	</div>
	<div class="main">
		<div class="search">
			<form action="?" method="get" name="search">
			<input type="hidden" name="file" value="<?php echo $file;?>"> 
			<input type="hidden" name="action" value="<?php echo $action;?>"> 
				<fieldset>
					<legend>搜索会员</legend>
						会员名称：<input type="text" name="k" size="35" value="<?php echo $k?htmlspecialchars(stripslashes($k)):'';?>" />
						<input type="submit" class="button" value="开始查找" />
				</fieldset>
			</form>
		</div>
		<table cellspacing="0" class="datalist" id="list">
		<tr>			
			<th width="5%" class="firstcol">选中</th>
            <th width="12%" >用户名</th>
          	<th width="24%" >登录IP</th>
			<th width="8%" >资金</th> 
            <th width="7%" >积分</th>
			<th width="15%" >注册时间</th>
			<th width="14%" >上次登录</th>				
            <th width="15%" >管理操作</th>
		</tr>
		<form action="" method="post" name="myform">
		<input type="hidden" name="do_submit" value="1" />
		<?php if($result){foreach($result as $val){if($val['id']!=ADMIN_FOUNDERS || $_userid=ADMIN_FOUNDERS){?>
		<tr>
			<td align="center">
              <input type="checkbox" class="checkbox" name="id[]"  value="<?php echo $val['userid'];?>" />
			  <input type="hidden" name="modelid[<?php echo $val['userid'];?>]" value="<?php echo $val['modelid'];?>" />
			  <input type="hidden" name="nowmodelid[<?php echo $val['userid'];?>]" value="<?php echo $val['nowmodelid'];?>" />
            </td>
            <td align="center">
              <?php echo $val['username'];?>
            </td>
            <td align="center"><?php echo $val['loginip'];?></td>
			<td align="center"><?php echo $val['amount'];?></td>
            <td align="center"><?php echo $val['point'];?></td>
			<td align="center"><?php echo date('Y-m-d H:i:s',$val['regtime']);?></td>
			<td align="center"><?php echo date('Y-m-d H:i:s',$val['logintime']);?></td>
            <td align="center"><a href="?file=<?php echo $file;?>&action=passconvert&id=<?php echo $val['userid'];?>&modelid=<?php echo $val['modelid'];?>&nowmodelid=<?php echo $val['nowmodelid'];?>">通过转型</a></td>
		</tr>
		<?php }}?>
		<tr>
			<td width="5%" align="center">
			<input type="checkbox" name="chkall2" value="1" class="checkbox" onclick="check_all(this)" /></td>
			<td colspan="7" align="left">
			<input type="button" value="允许转型" class="button" onclick="if(confirm('确定操作吗?')){this.form.action='?file=<?php echo $file;?>&action=passconvert';this.form.submit();}" />
			</td>
		</tr>
		</form>
		<?php }else{?>
		<tr><td colspan="8">尚未发现任何转型申请...</td></tr>	
		<?php }?>
		<tr>
			<td colspan="8" style="text-align:right; padding-right:8px"><?php echo $pagestring;?></td>
		</tr>
		</table>
	</div>
</div>
</body>
</html>