<?php 

require '../Run.php'; 
require '../include/page.inc.php'; 
function userlist(){
$start = ($_GET['page']-1)*20;
if($start < 0){ $start = 0;}
$sql="SELECT id,name,nc,pass,sex,qianm,head,email,admin,vip,sid,site,xid,site_u FROM user ORDER BY id DESC LIMIT ".$start.",20;";
$result = mysql_query($sql);
if($result && mysql_num_rows($result)>0){
$num = 0;
while(list($id,$name,$nc,$pass,$sex,$qianm,$head,$email,$admin,$vip,$sid,$site,$xid,$site_u)=mysql_fetch_row($result)){
$div = $num++%2==0?'line1':'line2';
$html.='<div class="'.$div.'"><a href="userinfo.php?uid='.$id.'">'.$nc.'</a>[ID/XID:'.$id.'/'.$xid.']</div>';
 }
	}else{
	$html='暂无用户';
	}
	
	return '<div class="content">'.$html.'</div>';
  }
  echo head('全系统会员');
  if($admin != 1){
	echo '<div class="tip">您好，此页面只有超级管理员具有权限</div>';
  }else{
	$nums = mysql_num_rows("SELECT id,name,nc,pass,sex,qianm,head,email,admin,vip,sid,site,xid,site_u FROM user ORDER BY id DESC");
	$url = '?';
	echo '<div class="title">全网会员查看(总计'.$nums.'记录)</div>';
	echo  userlist();
	echo page($nums,15,$url,NULL,'view');
	echo '<div class="mylink"><a href="wap_admin_cg.php?">返回上级</a><a href="../index.php">网站首页</a></div>';
  }
  
  echo footer(1);
  ?>