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. MapReduce:详解Shuffle过程

    Shuffle过程,也称Copy阶段.reduce task从各个map task上远程拷贝一片数据,并针对某一片数据,如果其大小超过一定的阀值,则写到磁盘上,否则直接放到内存中. 官方的Shuffl ...

  2. [转载]有了 malloc/free 为什么还要 new/delete ?

      malloc 与free 是C++/C 语言的标准库函数,new/delete 是C++的运算符.他们都可以用于申请动态内存和释放内存.      对于非内部数据类型的对象(如类对象)而言,光用m ...

  3. sql 截取字符串与 截取字符串最长的字符串

    ); set @str='aa,32,22,55,7'; ) as '第一个逗号的索引值' )),),),'') as '第一个值' ),len(@str)) as '从第一逗号开始截取出后面的字符串 ...

  4. javascript优化--04高质量编码

    库和API的设计: 在参数设计中保持好的习惯:如顺序,width,height;top,right,bottom,left;如命名: 将undefined看作没有值而不要表示非特定的值: 在允许0,空 ...

  5. BZOJ3595 : [Scoi2014]方伯伯的Oj

    由于n很大,有2e8,所以不能直接用splay来维护排名 把splay修改一下 每个节点维护一个区间[l,r],表示编号在[l,r]之间的所有点都在这里 需要支持一个takeout操作: 把编号为k的 ...

  6. 中国大数据六大技术变迁记(CSDN)

    大会召开前期,特别梳理了历届大会亮点以记录中国大数据技术领域发展历程,并立足当下生态圈现状对即将召开的BDTC 2014进行展望: 追本溯源,悉大数据六大技术变迁 伴随着大数据技术大会的发展,我们亲历 ...

  7. esper 事件引擎,各种事件类型示例代码

    原创文章 转载请注明出处 package com.hp.iot.engine.esper; import java.util.ArrayList; import java.util.HashMap; ...

  8. ueditor使用总结——前端篇.md

    首先吐槽下,百度的API太坑,谁让人家都是大牛呢. 说明:本文所涉猎代码均依托于seajs,本文所用ueditor版本为1.4.3.3 JSP UTF-8版 编辑器前端部署: 1.把ueditor引入 ...

  9. HttpClient_HttpClient 对 cookie的处理

    session的保持是通过cookie来维持的,所以如果用户有勾选X天内免登录,这个session 就X天内一直有效,就是通过这个cookie来维护.如果没选X天内免登录,基本上就本次才能保持sess ...

  10. 字符串分割与存入List集合

    List<string> namelist = new List<string>(); string[] namejh = null; string name= "张 ...