日期:2014-05-17 浏览次数:20514 次
<?php
require_once '../include/config.php';
$connect = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)
or die('Could not connect to mysql server.');
mysql_select_db(DB_DATABASE, $connect)
or die('Could not select database.');
?>
<?php
echo '<form id="pagerForm" method="post" action="back/user.php">
<input name="status" value="'.$status.'" type="hidden">
<input name="keywords" value="'.$keywords.'" type="hidden">
<input name="pageNum" value="1" type="hidden">
<input name="numPerPage" value="'.$numPerPage.'" type="hidden">
<input name="CateId2" value="'.$CateId2.'" type="hidden">
<input name="orderField" value="'.$orderField.'" type="hidden">
<input name="orderDirection" value="'.$orderDirection.'" type="hidden">
</form>';
//定义条件sql
$CateId = get_CateId_by_UId( $UId );
$tiaojian = empty($_POST["tiaojian"])?'u_name':$_POST["tiaojian"];
$neirong = empty($_POST["keywords"])?"":$_POST["keywords"];
$CateId2 = empty($_POST["CateId2"])?'CateId':$_POST["CateId2"];
$orderField = empty($_POST["orderField"])?"id":$_POST["orderField"];
$query = mysql_query("select * from users");
$totalCount = mysql_num_rows($query);
$pageNumShown=10;
$_POST["pageNum"]!=""?$pageNum=$_POST["pageNum"]:$pageNum=1;
$numPerPage=empty($_POST["numPerPage"])?20:$_POST["numPerPage"];
$fup_page=($pageNum-1)*$numPerPage;
$sql= "select id,u_id,u_name,last_logintime,last_ip,last_imei,last_phone_number,last_logintype from users where $tiaojian like '%$neirong%' order by $orderField {$orderDirection} limit {$fup_page},{$numPerPage}";
$result = mysql_query($sql);
?>