当前位置: 首页>>代码示例>>PHP>>正文


PHP Network::get_networks_by_user方法代码示例

本文整理汇总了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;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:47,代码来源:NetworksDirectoryModule.php

示例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;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:48,代码来源:NetworksDirectoryModule.php


注:本文中的Network::get_networks_by_user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。