page show
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的更多相关文章
- 我这么玩Web Api(一):帮助页面或用户手册(Microsoft and Swashbuckle Help Page)
前言 你需要为客户编写Api调用手册?你需要测试你的Api接口?你需要和前端进行接口对接?那么这篇文章应该可以帮到你.本文将介绍创建Web Api 帮助文档页面的两种方式,Microsoft Help ...
- HTML5 Page Visibility
什么是 Page Visibility ? Page Visibility 即页面可见性,通过 visibilityState 的值检测页面当前是否可见.当一个网站是可见或点击选中的状态时 Page ...
- angularjs 1 开发简单案例(包含common.js,service.js,controller.js,page)
common.js var app = angular.module('app', ['ngFileUpload']) .factory('SV_Common', function ($http) { ...
- Selenium的PO模式(Page Object Model)[python版]
Page Object Model 简称POM 普通的测试用例代码: .... #测试用例 def test_login_mail(self): driver = self.driver driv ...
- SharePoint2013 Set a custom application page as site welcome page
本文主要介绍如何添加一个custom application page as site welcome page 1.首先创建一个sharepoint 2013 empty solution, add ...
- 使用page object模式抓取几个主要城市的pm2.5并从小到大排序后写入txt文档
#coding=utf-8from time import sleepimport unittestfrom selenium import webdriverfrom selenium.webdri ...
- github page+jekyll搭博客初体验
div.oembedall-githubrepos { border: 1px solid #DDD; list-style-type: none; margin: 0 0 10px; padding ...
- selenium page object & Page Factory
package demo; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa ...
- <%@ page trimDirectiveWhitespaces="true" %>
我们经常会在JSP页面上使用: <%@ page trimDirectiveWhitespaces="true" %> 这个命令可以使jsp输出的html时去除多余的空 ...
- MIT 6.828 JOS学习笔记18. Lab 3.2 Part B: Page Faults, Breakpoints Exceptions, and System Calls
现在你的操作系统内核已经具备一定的异常处理能力了,在这部分实验中,我们将会进一步完善它,使它能够处理不同类型的中断/异常. Handling Page Fault 缺页中断是一个非常重要的中断,因为我 ...
随机推荐
- SAE上传web应用(包括使用数据库)教程详解及问题解惑
转自:http://blog.csdn.net/baiyuliang2013/article/details/24725995 SAE上传web应用(包括使用数据库)教程详解及问题解惑: 最近由于工作 ...
- Hark的数据结构与算法练习之珠排序
---恢复内容开始--- 算法说明 珠排序是分布排序的一种. 说实在的,这个排序看起来特别的巧妙,同时也特别好理解,不过不太容易写成代码,哈哈. 这里其实分析的特别好了,我就不画蛇添足啦. 大家看一 ...
- Marvelous Mazes
F - Marvelous Mazes Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submi ...
- 常见的文件上传方法有哪些?Ajax文件上传原理是什么?
Ajaxfileupload,Ajaxupload,JqueryUploadify无刷新式的文件上传,在一个页面里嵌入一个Iframe,然后在Iframe使用原生的Post表单提交.
- DFS HDOJ 2181 哈密顿绕行世界问题
题目传送门 题意:中文题面 分析:直接排完序后DFS.这样的题以后不应该再写题解的. #include <bits/stdc++.h> using namespace std; vecto ...
- 【转】Profiling application LLC cache misses under Linux using Perf Events
转自:http://ariasprado.name/2011/11/30/profiling-application-llc-cache-misses-under-linux-using-perf-e ...
- 【BZOJ】1090: [SCOI2003]字符串折叠(dp)
http://www.lydsy.com/JudgeOnline/problem.php?id=1090 随便yy一下.. 设f[i,j]表示i-j的最小长度 f[i, j]=min{j-i+1, f ...
- libtiff4.04
http://www.linuxfromscratch.org/blfs/view/svn/general/libtiff.html 安装方法 : ./configure --prefix=/usr ...
- 关于Reapter多重嵌套的详细补充
<asp:Repeater ID ="rptfour" runat ="server" OnItemDataBound="two_Bind&qu ...
- MyEclipse10整合Axis2插件
1.下载axis2的eclipse插件 2.把下载好的两个插件包解压后放置myeclipse10安装目录下的dropins文件夹中 3.重启MyEclipse10后 File->New-> ...