txdetails.inc.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. global $_GPC, $_W;
  3. // $action = 'ad';
  4. // $title = $this->actions_titles[$action];
  5. $GLOBALS['frames'] = $this->getMainMenu2();
  6. $pageindex = max(1, intval($_GPC['page']));
  7. $pagesize=10;
  8. $operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
  9. $type=empty($_GPC['type']) ? 'wait' :$_GPC['type'];
  10. $status=empty($_GPC['status']) ? '1' :$_GPC['status'];
  11. $data=array(':account_id'=>$_COOKIE['account_id'],':uniacid'=>$_W['uniacid']);
  12. if($type=='all'){
  13. $sql="SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid ORDER BY cerated_time DESC";
  14. $total=pdo_fetchcolumn("SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid ORDER BY cerated_time DESC",$data);
  15. }else{
  16. $sql="SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid and status=$status ORDER BY cerated_time DESC";
  17. $total=pdo_fetchcolumn("SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid and status=$status ORDER BY cerated_time DESC",$data);
  18. }
  19. $list=pdo_fetch( $sql,$data);
  20. $select_sql =$sql." LIMIT " .($pageindex - 1) * $pagesize.",".$pagesize;
  21. $list=pdo_fetchall($select_sql,$data);
  22. $pager = pagination($total, $pageindex, $pagesize);
  23. include $this->template('web/txdetails');