本文整理匯總了PHP中group::get_user_groups方法的典型用法代碼示例。如果您正苦於以下問題:PHP group::get_user_groups方法的具體用法?PHP group::get_user_groups怎麽用?PHP group::get_user_groups使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類group
的用法示例。
在下文中一共展示了group::get_user_groups方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CNPagination
function generate_inner_html()
{
$CNPagination = new CNPagination();
$group = new group();
$user_group_ids = array();
if ($_SESSION['user']['id']) {
$user_group_ids = $group->get_user_groups($_SESSION['user']['id']);
$user_group_ids = $this->get_user_group_id($user_group_ids);
}
$CNPagination->setPaging($this->Paging);
$this->page_first = $CNPagination->getFirstPage();
$this->page_last = $CNPagination->getLastPage();
$this->page_links = $CNPagination->getPageLinks();
$inner_template = NULL;
switch ($this->mode) {
default:
$inner_template = PA::$blockmodule_path . '/' . get_class($this) . '/cnmodule_content.php';
}
$inner_html_gen = new Template($inner_template);
$this->links = objtoarray($this->links);
$inner_html_gen->set('title', NULL);
// $this->title
$inner_html_gen->set('links', $this->links);
$inner_html_gen->set('total', $this->total);
$inner_html_gen->set('search_str', get_groups_search_options());
$inner_html_gen->set('user_group_ids', $user_group_ids);
$inner_html_gen->set('current_theme_path', PA::$theme_url);
$inner_html_gen->set('page_first', $this->page_first);
$inner_html_gen->set('page_last', $this->page_last);
$inner_html_gen->set('page_links', $this->page_links);
$inner_html = $inner_html_gen->fetch();
return $inner_html;
}
示例2: Pagination
function generate_inner_html()
{
global $current_theme_path, $base_url, $current_blockmodule_path;
$Pagination = new Pagination();
$group = new group();
$user_group_ids = array();
if (@$_SESSION['user']['id']) {
$user_group_ids = $group->get_user_groups($_SESSION['user']['id']);
$user_group_ids = $this->get_user_group_id($user_group_ids);
}
$Pagination->setPaging($this->Paging);
$this->page_first = $Pagination->getFirstPage();
$this->page_last = $Pagination->getLastPage();
$this->page_links = $Pagination->getPageLinks();
$inner_template = NULL;
switch ($this->mode) {
default:
$inner_template = dirname(__FILE__) . '/center_inner_public.tpl';
}
$inner_html_gen =& new Template($inner_template);
$this->links = objtoarray($this->links);
$inner_html_gen->set('links', $this->links);
$inner_html_gen->set('total', $this->total);
$inner_html_gen->set('search_str', get_groups_search_options());
$inner_html_gen->set('user_group_ids', $user_group_ids);
$inner_html_gen->set('current_theme_path', $current_theme_path);
$inner_html_gen->set('base_url', $base_url);
$inner_html_gen->set('page_first', $this->page_first);
$inner_html_gen->set('page_last', $this->page_last);
$inner_html_gen->set('page_links', $this->page_links);
$inner_html = $inner_html_gen->fetch();
return $inner_html;
}