php's People
php's Issues
thinkphp 分页应用模板
import('ORG.Util.Page'); //引入
$m=M('Profit'); // 数据库
$count=$m->count();//查询 计算总数
$Page=new Page($count,12); //每页12条记录
$Page->setConfig('header', '条记录');//总记录数
$Page -> setConfig('theme', '<li><a>%totalRow% %header%</a></li> <li>%upPage%</li> <li>%downPage%</li> <li>%first%</li> <li>%prePage%</li> <li>%linkPage%</li> <li>%nextPage%</li> <li>%end%</li> ');//(对thinkphp自带分页的格式进行自定义)
$show = $Page->show();
$result = $m->limit ($Page->firstRow . ',' . $Page->listRows )->order('tb_rid desc')->select (); //查询,数据
$this->assign('result',$result);
$this->assign('page',$show);
javascript 打开新窗口,HTML表格
//表格显示
商品名称 | 购买奖励 | 一级分成 | 二级分成 | 三级分成 | 操作 |
{$result.tb_rname} | {$result.tb_raward}% | {$result.tb_rprofit1}% | {$result.tb_rprofit2}% | {$result.tb_rprofit3}% |
查看
|
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.