txdetails.inc.php 951 B

12345678910111213141516171819202122232425
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu2();
  4. $seller_id=$_COOKIE["storeid"];
  5. $cur_store = $this->getStoreById($seller_id);
  6. $type=empty($_GPC['type']) ? 'now' :$_GPC['type'];
  7. $state=empty($_GPC['state']) ? '2' :$_GPC['state'];
  8. $where=' WHERE uniacid=:uniacid and seller_id=:seller_id and is_delete=1';
  9. $data[':uniacid']=$_W['uniacid'];
  10. $data[':seller_id']=$seller_id;
  11. $pageindex = max(1, intval($_GPC['page']));
  12. $pagesize=10;
  13. if($type !='all'){
  14. $where.=" and state=$state ";
  15. }
  16. $sql="SELECT * FROM ".tablename('zh_jdgjb_withdrawal') . $where." ORDER BY time DESC";
  17. $total=pdo_fetchcolumn("SELECT count(*) FROM ".tablename('zh_jdgjb_withdrawal') . $where." ORDER BY time DESC",$data);
  18. $list=pdo_fetchall( $sql,$data);
  19. $select_sql =$sql." LIMIT " .($pageindex - 1) * $pagesize.",".$pagesize;
  20. $list=pdo_fetchall($select_sql,$data);
  21. $pager = pagination($total, $pageindex, $pagesize);
  22. include $this->template('web/txdetails');