wxapplist.inc.php 1016 B

123456789101112131415161718
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu();
  4. if ($_GPC['keywords']) {
  5. $op = $_GPC['keywords'];
  6. $where = "%$op%";
  7. } else {
  8. $where = '%%';
  9. }
  10. $pageindex = max(1, intval($_GPC['page']));
  11. $pagesize = 10;
  12. $sql = "select a.* from " . tablename("account_wxapp") . " a" . " left join " . tablename("wxapp_versions") . " b on b.uniacid=a.uniacid WHERE b.modules LIKE '%{$_GPC['m']}%' and a.name LIKE :name group by a.uniacid";
  13. $select_sql = $sql . " LIMIT " . ($pageindex - 1) * $pagesize . "," . $pagesize;
  14. $list = pdo_fetchall($select_sql, array(':name' => $where));
  15. $list2 = pdo_fetchall($sql, array(':name' => $where));
  16. //$total = pdo_fetchcolumn("select count(a.*) from " . tablename("account_wxapp") . " a" . " left join " . tablename("wxapp_versions") . " b on b.uniacid=a.uniacid WHERE b.modules LIKE '%{$_GPC['m']}%' and a.name LIKE :name group by a.uniacid", array(':name' => $where));
  17. $pager = pagination(count($list2), $pageindex, $pagesize);
  18. include $this->template('web/wxapplist');