llz.inc.php 980 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu();
  4. $pageindex = max(1, intval($_GPC['page']));
  5. $pagesize=10;
  6. $sql="select * from".tablename('zhtc_llz')." where uniacid={$_W['uniacid']}";
  7. $total=pdo_fetchcolumn("select count(*) from".tablename('zhtc_llz')." where uniacid={$_W['uniacid']} ");
  8. $select_sql =$sql." LIMIT " .($pageindex - 1) * $pagesize.",".$pagesize;
  9. $list=pdo_fetchall($select_sql);
  10. $pager = pagination($total, $pageindex, $pagesize);
  11. if($_GPC['op']=='delete'){
  12. $res=pdo_delete('zhtc_llz',array('id'=>$_GPC['id']));
  13. if($res){
  14. message('删除成功!', $this->createWebUrl('llz'), 'success');
  15. }else{
  16. message('删除失败!','','error');
  17. }
  18. }
  19. if($_GPC['status']){
  20. $data['status']=$_GPC['status'];
  21. $res=pdo_update('zhtc_llz',$data,array('id'=>$_GPC['id']));
  22. if($res){
  23. message('编辑成功!', $this->createWebUrl('llz'), 'success');
  24. }else{
  25. message('编辑失败!','','error');
  26. }
  27. }
  28. include $this->template('web/llz');