深圳全飞鸿

标题: beacon框架L方案的SQL-Debug/jobdone [打印本页]

作者: zhgc    时间: 2023-11-5 08:25
标题: beacon框架L方案的SQL-Debug/jobdone
beacon框架L方案的SQL-Debug/jobdone

1、按权限处理后台
  1. function index(){
  2.                 global $smarty, $user, $config;
  3.                 $this->app->getUser(true); //不强制注册
  4.                 $this->app->printAjx(); //需要用界面ajax
  5.                 if($user->debug>0){
  6.                         $smarty->assign("jobdone", "done: function (res, curr, count) { $(\"#sql\").html(res.sql) ;},");
  7.                 }        
  8.         }
复制代码
2、处理前端
  1. cols: [],
  2.                         {$jobdone}        
  3.             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>
复制代码





欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2