controller

    public function record()
{
$r = ;
$m = M();
$query = $m->query('select count(1) as count from winner');
$total = $query[]['count'];
$page = new \Think\Page($total,$r);// 实例化分页类 传入总记录数和每页显示的记录数(25)
$show = $page->show();// 分页显示输出
$list = $m->query("select w.id, w.uid, w.create_time, u.username, i.name from winner as w, user as u, item as i where u.id=w.uid and i.id=w.prize_id order by w.create_time limit $page->firstRow, $page->listRows");
$this->assign('list',$list);// 赋值数据集
$this->assign('page',$show);// 赋值分页输出
$this->display(T('Winner@Admin/record'));
}

view

<extend name="Public/base"/>

<block name="body">
<div class="main-title">
<h2>中奖纪录</h2>
</div> <div class="with-padding">
<form id="export-form" method="post" action="{:U('export')}">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>序号</th>
<th>ID</th>
<th>用户名</th>
<th>奖品</th>
<th>时间</th>
</tr>
</thead>
<tbody>
<volist name="list" id="table">
<tr>
<td>{$i}</td>
<td>{$table.id}</td>
<td><a href='/xxx/index.php?s=/admin/user/expandinfo_details/uid/{$table.uid}.html'> {$table.username}</a></td>
<td>{$table.name}</td>
<td><?php echo date('Y-m-d H:i:s', $table['create_time']);?></td>
</tr>
</volist>
</tbody>
</table>
</form>
</div>
{$page}
</block>

page show的更多相关文章

  1. 我这么玩Web Api(一):帮助页面或用户手册(Microsoft and Swashbuckle Help Page)

    前言 你需要为客户编写Api调用手册?你需要测试你的Api接口?你需要和前端进行接口对接?那么这篇文章应该可以帮到你.本文将介绍创建Web Api 帮助文档页面的两种方式,Microsoft Help ...

  2. HTML5 Page Visibility

    什么是 Page Visibility ? Page Visibility 即页面可见性,通过 visibilityState 的值检测页面当前是否可见.当一个网站是可见或点击选中的状态时 Page ...

  3. angularjs 1 开发简单案例(包含common.js,service.js,controller.js,page)

    common.js var app = angular.module('app', ['ngFileUpload']) .factory('SV_Common', function ($http) { ...

  4. Selenium的PO模式(Page Object Model)[python版]

     Page Object Model 简称POM  普通的测试用例代码: .... #测试用例 def test_login_mail(self): driver = self.driver driv ...

  5. SharePoint2013 Set a custom application page as site welcome page

    本文主要介绍如何添加一个custom application page as site welcome page 1.首先创建一个sharepoint 2013 empty solution, add ...

  6. 使用page object模式抓取几个主要城市的pm2.5并从小到大排序后写入txt文档

    #coding=utf-8from time import sleepimport unittestfrom selenium import webdriverfrom selenium.webdri ...

  7. github page+jekyll搭博客初体验

    div.oembedall-githubrepos { border: 1px solid #DDD; list-style-type: none; margin: 0 0 10px; padding ...

  8. selenium page object & Page Factory

    package demo; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa ...

  9. <%@ page trimDirectiveWhitespaces="true" %>

    我们经常会在JSP页面上使用: <%@ page trimDirectiveWhitespaces="true" %> 这个命令可以使jsp输出的html时去除多余的空 ...

  10. MIT 6.828 JOS学习笔记18. Lab 3.2 Part B: Page Faults, Breakpoints Exceptions, and System Calls

    现在你的操作系统内核已经具备一定的异常处理能力了,在这部分实验中,我们将会进一步完善它,使它能够处理不同类型的中断/异常. Handling Page Fault 缺页中断是一个非常重要的中断,因为我 ...

随机推荐

  1. hrbustoj 1179:下山(DFS+剪枝)

    下山Time Limit: 1000 MS Memory Limit: 65536 KTotal Submit: 271(111 users) Total Accepted: 129(101 user ...

  2. Android VLC播放器二次开发1——程序结构分析

    最近因为一个新项目需要一个多媒体播放器,所以需要做个视频.音频.图片方面的播放器.也查阅了不少这方面的资料,如果要从头做一个播放器工作量太大了,而且难度也很大.所以最后选择了VLC作为基础,进行二次开 ...

  3. SQLServer2008默认服务配置

    SQLServer2008默认服务配置

  4. loj 1004(dp)

    题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=25830‘ 思路:类似与数塔问题,自底向上处理,输入的时候稍微注意一 ...

  5. jmeter断言

    响应断言:检查的内容,如果是变量,设置为变量 断言结果:断言的结果 断言持续时间:请求事件不能超过设置的断言持续时间 Size Assertion:断言字节大小

  6. PHP 输出表格单元格的数据之用表单的方式;

    echo "<table border=1 class="imagetable" >"; //使用表格格式化数据echo "<for ...

  7. HDU2167 Pebbles(状压DP)

    题目给一张n×n的格子,每个格子都有数字,要从格子中取若干个数字,八个方向相邻的数字不能一起取,问取的数字最大和是多少. 从第一行一行一行看下去,可以发现第1行取哪几列只会影响到第2行,第3行后面的一 ...

  8. HDU2841 Visible Trees(容斥原理)

    题目..大概就是有个m*n个点的矩形从(1,1)到(m,n),问从(0,0)出发直线看过去最多能看到几个点. 如果(0,0)->(x,y)和(0,0)->(x',y')两个向量平行,那后面 ...

  9. 【LINUX/UNIX网络编程】之使用SOCKET进行UDP编程

    先看任务需求: 实验二 UDP数据发送与接收 [实验目的] 1.熟练掌握套接字函数的使用方法. 2.应用套接字函数完成基本UDP通讯,实现服务器与客户端的文件传送 [实验学时] 4学时 [实验内容] ...

  10. Complete the Sequence[HDU1121]

    Complete the Sequence Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Ot ...