|
beacon框架L方案的SQL-Debug/jobdone
1、按权限处理后台
- function index(){
- global $smarty, $user, $config;
- $this->app->getUser(true); //不强制注册
- $this->app->printAjx(); //需要用界面ajax
- if($user->debug>0){
- $smarty->assign("jobdone", "done: function (res, curr, count) { $(\"#sql\").html(res.sql) ;},");
- }
- }
复制代码 2、处理前端
- cols: [],
- {$jobdone}
- limits: [10, 15, 20, 25, 50, 100],<div><!-- syant-message --></div><div><pre id="sql" style="FONT-FAMILY: Calibri;font-size:90%"> </pre></div><div></body></div>
复制代码 |
|