本文整理汇总了PHP中Network::get_networks_by_user方法的典型用法代码示例。如果您正苦于以下问题:PHP Network::get_networks_by_user方法的具体用法?PHP Network::get_networks_by_user怎么用?PHP Network::get_networks_by_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network::get_networks_by_user方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: User
function generate_inner_html($links)
{
global $login_uid, $page_uid;
$usr = new User();
$network = new Network();
if ($links) {
foreach ($links as $link_var) {
if ($link_var->owner_id) {
$usr->load((int) $link_var->owner_id);
$owner_info[$link_var->network_id]['name'] = $usr->login_name;
} else {
$owner_info[$link_var->network_id]['name'] = "None";
}
}
// End of foreach
}
$users_network = NULL;
if (@$_SESSION['user']['id']) {
if ($login_uid == $page_uid) {
$users_network = $network->get_networks_by_user($_SESSION['user']['id'], FALSE, 'ALL', 1, 'created', 'DESC', ALL_NETWORKS);
} else {
$users_network = $network->get_networks_by_user($_SESSION['user']['id']);
}
$users_network = $this->get_user_network_id($users_network);
}
$Pagination = new Pagination();
$Pagination->setPaging($this->Paging);
$this->page_first = $Pagination->getFirstPage();
$this->page_last = $Pagination->getLastPage();
$this->page_links = $Pagination->getPageLinks();
switch ($this->mode) {
default:
$inner_template = dirname(__FILE__) . '/center_inner_public.tpl';
}
$this->Paging["count"] = @$this->uid ? count($links) : $this->Paging["count"];
$inner_html_gen =& new Template($inner_template);
$inner_html_gen->set('links', @$links);
$inner_html_gen->set('owner_info', @$owner_info);
$inner_html_gen->set('users_network', @$users_network);
$inner_html_gen->set('total', $this->Paging["count"]);
$inner_html_gen->set('search_str', get_network_search_options());
$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: generate_inner_html
public function generate_inner_html($links)
{
$usr = new User();
$network = new Network();
if (!empty($links)) {
foreach ($links as $link_var) {
if ($link_var->owner_id) {
$usr->load((int) $link_var->owner_id);
$owner_info[$link_var->network_id]['name'] = $usr->login_name;
} else {
$owner_info[$link_var->network_id]['name'] = "None";
}
}
// End of foreach
}
$users_network = NULL;
if (!is_null(PA::$login_uid) && PA::$login_uid == PA::$page_uid) {
$users_network = $network->get_networks_by_user(PA::$login_uid, FALSE, 'ALL', 1, 'created', 'DESC', ALL_NETWORKS);
} else {
if (!is_null(PA::$login_uid)) {
$users_network = $network->get_networks_by_user(PA::$login_uid);
$users_network = $this->get_user_network_id($users_network);
}
}
$Pagination = new Pagination();
$Pagination->setPaging($this->Paging);
$this->page_first = $Pagination->getFirstPage();
$this->page_last = $Pagination->getLastPage();
$this->page_links = $Pagination->getPageLinks();
switch ($this->mode) {
default:
$inner_template = PA::$blockmodule_path . '/' . get_class($this) . '/center_inner_public.tpl';
}
$this->Paging["count"] = @$this->uid ? count($links) : $this->Paging["count"];
$inner_html_gen = new Template($inner_template);
$inner_html_gen->set('links', $links);
if (!empty($owner_info)) {
$inner_html_gen->set('owner_info', $owner_info);
}
$inner_html_gen->set('users_network', $users_network);
$inner_html_gen->set('total', $this->Paging["count"]);
$inner_html_gen->set('search_str', get_network_search_options());
$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;
}