dltxdetails.inc.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. global $_GPC, $_W;
  3. $action = 'start';
  4. $GLOBALS['frames'] = $this->getNaveMenu($_COOKIE['cityname'], $action);
  5. $pageindex = max(1, intval($_GPC['page']));
  6. $pagesize=10;
  7. $operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
  8. $type=empty($_GPC['type']) ? 'wait' :$_GPC['type'];
  9. $status=empty($_GPC['status']) ? '1' :$_GPC['status'];
  10. $data=array(':account_id'=>$_COOKIE['account_id'],':uniacid'=>$_W['uniacid']);
  11. if($type=='all'){
  12. $sql="SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid ORDER BY cerated_time DESC";
  13. $total=pdo_fetchcolumn("SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid ORDER BY cerated_time DESC",$data);
  14. }else{
  15. $sql="SELECT * FROM ".tablename('zhtc_yjtx') . "where account_id=:account_id and uniacid=:uniacid and status=$status ORDER BY cerated_time DESC";
  16. $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);
  17. }
  18. $list=pdo_fetch( $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/dltxdetails');