php 分页1
来源:未知 责任编辑:责任编辑 发表时间:2015-09-17 09:43 点击:次
<?php
/**
* 用户列表
* kcj
* 2011/8/20
* */
include "../conn/conn.php";
$sql="select * from user";
$rst=mysql_query($sql);
$totalnum=mysql_num_rows($rst);
$pagesize=2;
$page=$_GET['page'];
if($page==''){
$page=1;
}
$pagecount=ceil($totalnum/$pagesize);
$bingage=($page-1)*$pagesize;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<meta name="Author" content="kcj" />
<meta name="Keywords" content="php,lampbrother" />
<link rel="stylesheet" type="text/css" href="style/lampcms.css">
<script src="javascript/common.js"></script>
</head>
<body>
<div id="main">
后台管理->用户列表
<form method="post" action="" >
<div class="msg-box">
<ul class="viewmess">
<li class="dark-row">
<span class="list_width width_font">用户名</span>
<span class="list_width width_font" style="width:200px">备注名</span>
<span class="list_width width_font">注册时间</span>
<span class="list_width width_font">操 作</span>
</li>
<li class="light-row" style="padding-top:2px; padding-bottom:2px">
<?php
$sql="select * from user order by id asc limit $bingage,$pagesize";
$rst=mysql_query($sql);
while ($row=mysql_fetch_array($rst)){
?>
<span class="list_width"><?php echo $row['username'];?></span>
<span class="list_width" style="width:200px"><?php echo $row['rname'];?></span>
<span class="list_width"><?php echo $row['ctime'];?></span>
<span class="list_width" style="width:160px;">
【<a href="main.php?action=addUser&edit=mod&id=<{ $users[doc].id }>">修改</a>】
<?php if($row['id']!=1){?>
【<a onclick="return confirm('确定要删除用户<{ $users[doc].userName }>吗?')" href="main.php?action=editUser&page=<{ $pageInfo.current_page }>&id=<{ $users[doc].id }>&edit=del">删除</a>】
/**
* 用户列表
* kcj
* 2011/8/20
* */
include "../conn/conn.php";
$sql="select * from user";
$rst=mysql_query($sql);
$totalnum=mysql_num_rows($rst);
$pagesize=2;
$page=$_GET['page'];
if($page==''){
$page=1;
}
$pagecount=ceil($totalnum/$pagesize);
$bingage=($page-1)*$pagesize;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<meta name="Author" content="kcj" />
<meta name="Keywords" content="php,lampbrother" />
<link rel="stylesheet" type="text/css" href="style/lampcms.css">
<script src="javascript/common.js"></script>
</head>
<body>
<div id="main">
后台管理->用户列表
<form method="post" action="" >
<div class="msg-box">
<ul class="viewmess">
<li class="dark-row">
<span class="list_width width_font">用户名</span>
<span class="list_width width_font" style="width:200px">备注名</span>
<span class="list_width width_font">注册时间</span>
<span class="list_width width_font">操 作</span>
</li>
<li class="light-row" style="padding-top:2px; padding-bottom:2px">
<?php
$sql="select * from user order by id asc limit $bingage,$pagesize";
$rst=mysql_query($sql);
while ($row=mysql_fetch_array($rst)){
?>
<span class="list_width"><?php echo $row['username'];?></span>
<span class="list_width" style="width:200px"><?php echo $row['rname'];?></span>
<span class="list_width"><?php echo $row['ctime'];?></span>
<span class="list_width" style="width:160px;">
【<a href="main.php?action=addUser&edit=mod&id=<{ $users[doc].id }>">修改</a>】
<?php if($row['id']!=1){?>
【<a onclick="return confirm('确定要删除用户<{ $users[doc].userName }>吗?')" href="main.php?action=editUser&page=<{ $pageInfo.current_page }>&id=<{ $users[doc].id }>&edit=del">删除</a>】
相关新闻>>
- 发表评论
-
- 最新评论 更多>>