hbdata.inc.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu();
  4. $storeid=$_COOKIE["storeid"];
  5. $gtime=date("Y-m-d");
  6. $pageindex = max(1, intval($_GPC['page']));
  7. $pagesize=30;
  8. if(!empty($_GPC['time'])){
  9. $gtime=$_GPC['time'];
  10. }
  11. $sql=" select a.* from (select id,hb_money,hb_num,hb_type,hb_random,FROM_UNIXTIME(sh_time) as time from".tablename('zhtc_information')." where uniacid={$_W['uniacid']} and state=2 and hb_money>0) a where time like '%{$gtime}%' ";
  12. //$tzinfo=pdo_fetchall($sql5);
  13. $total=pdo_fetchcolumn("SELECT count(*) from (select id,hb_money,hb_num,hb_type,hb_random,FROM_UNIXTIME(sh_time) as time from".tablename('zhtc_information')." where uniacid={$_W['uniacid']} and state=2 and hb_money>0) a where time like '%{$gtime}%'");
  14. $select_sql =$sql." LIMIT " .($pageindex - 1) * $pagesize.",".$pagesize;
  15. $tzinfo=pdo_fetchall($select_sql);
  16. $pager = pagination($total, $pageindex, $pagesize);
  17. /*$jrhb=0;
  18. if($tzinfo){
  19. foreach($tzinfo as $v){
  20. if($v['hb_random']==1){
  21. $jrhb+=$v['hb_money'];
  22. }
  23. if($v['hb_random']==2){
  24. $jrhb+=$v['hb_money']*$v['hb_num'];
  25. }
  26. }
  27. }*/
  28. include $this->template('web/hbdata');