<?php
$conf_basedir	= "../../";	//相对主目录的位置
$conf_where		= "admin";	//选择调用相应模块
include_once($conf_basedir."base.inc.php");
checkAuth('4');	//判断登录和权限
$title = "用户组管理";
$js = "<script src= \" ".$conf_basedir."script/js/list_common.js\"></script>";

$ordercond = "ORDER BY city asc, id asc";
//分页参数
$pagesize	= $display_rows ? intval($display_rows) : 15;
$page_now	= $page_now ? max(1, intval($page_now)) : 1 ; // 获取当前页数
$offset		= ( $page_now - 1 ) * $pagesize;

$selectcity_sql = $esfadmin_citys[$selectcity] != '' ? " AND city = '".$selectcity."' " : " AND city = 'nj' ";
//获得数据总条数
$sql = " SELECT COUNT(*) FROM admin_user_group WHERE id > 9 $selectcity_sql ";
$numrows = $dbback_sys->GetOne($sql);
//获得数据当前页面数据
$sql = " SELECT * FROM admin_user_group WHERE id > 9 $selectcity_sql ".$ordercond." LIMIT ".$offset.",".$pagesize." ";
$data_info = $dbback_sys->GetAll($sql);


$pagenum = count($data_info);//当前页面数量
$numrows = $numrows >0 ? $numrows : 0;

if( $numrows <= 0 || $pagenum <=0){
	$pages = 0 ;  //计算总页数
}else{
	$pages = ceil($numrows/$pagesize) ;  //计算总页数

	$new_pagenavi = new_pagenavi($page_now,$pages,$numrows);
}

//引用模版文件
include_once(Template("header"));
include_once(Template("manage/group_manage"));
include_once(Template("footer"));
?>