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


PHP Members::setInfoBySpaceName方法代码示例

本文整理汇总了PHP中Members::setInfoBySpaceName方法的典型用法代码示例。如果您正苦于以下问题:PHP Members::setInfoBySpaceName方法的具体用法?PHP Members::setInfoBySpaceName怎么用?PHP Members::setInfoBySpaceName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Members的用法示例。


在下文中一共展示了Members::setInfoBySpaceName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$smarty->assign("theme_img_path", "templates/" . $theme_name . "/");
$smarty->assign('ThemeName', $theme_name);
//if caches
$space_cache_cycle = 86400;
$cache_data = $push_data = array();
$pdb->Execute("DELETE FROM {$tb_prefix}spacecaches WHERE expiration<" . $time_stamp);
if (!empty($userid)) {
    $userid = rawurldecode($userid);
    $cache_data = $pdb->GetRow("SELECT data1 AS info FROM {$tb_prefix}spacecaches WHERE cache_spacename='" . $userid . "'");
    if (!empty($cache_data)) {
        $info = @unserialize($cache_data['info']);
        $company->info = $info['company'];
        $member->info = $info['member'];
        //re else below.
        if (empty($company->info) || !is_array($company->info)) {
            $member->setInfoBySpaceName($userid);
            if (!empty($member->info['id'])) {
                $company->setInfoByMemberId($member->info['id']);
            } else {
                $company->setInfoBySpaceName($userid);
            }
            $push_data['company'] = $company->info;
            $push_data['member'] = $member->info;
            if (!empty($company->info)) {
                $pdb->Execute("REPLACE INTO {$tb_prefix}spacecaches (cache_spacename,company_id,data1,data2,expiration) VALUE ('" . $userid . "','" . $company->info['id'] . "','" . @serialize($push_data) . "',''," . ($time_stamp + $space_cache_cycle) . ")");
            }
        }
    } else {
        $member->setInfoBySpaceName($userid);
        if (!empty($member->info['id'])) {
            $company->setInfoByMemberId($member->info['id']);
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:common.inc.php

示例2: init

 public function init()
 {
     global $subdomain_support, $rewrite_able, $pdb, $time_stamp, $tb_prefix, $absolute_uri, $attachment_url, $G, $viewhelper;
     //espcial done for multi arrTemplate
     $this->loadModel("space");
     $sections = 'space';
     $this->view->configLoad('default.conf', $sections);
     if (isset($_GET['userid'])) {
         $this->userid = trim(htmlspecialchars($_GET['userid']));
     }
     if ($subdomain_support && $rewrite_able) {
         $hosts = explode($subdomain_support, pb_getenv('HTTP_HOST'));
         if ($hosts[0] != "www") {
             //				$this->userid = trim($hosts[0]);
         }
     }
     $G['membergroup'] = cache_read("membergroup");
     using("member", "company");
     $member = new Members();
     $company = new Companies();
     $space_name = '';
     if (empty($theme_name)) {
         $theme_name = "default";
         $style_name = isset($G['setting']['theme']) && !empty($G['setting']['theme']) ? $G['setting']['theme'] : "default";
         $ADODB_CACHE_DIR = DATA_PATH . 'dbcache';
     }
     $this->view->assign("theme_img_path", "templates/" . $theme_name . "/");
     $this->view->assign('ThemeName', $theme_name);
     $cache_data = $push_data = array();
     if (!empty($this->userid)) {
         $userid = $this->userid;
         $member->setInfoBySpaceName($this->userid);
         if (!empty($member->info['id'])) {
             $this->member_id = $member->info['id'];
             $company->setInfoByMemberId($member->info['id']);
         } else {
             $company->setInfoBySpaceName($this->userid);
         }
         $push_data['company'] = $company->info;
         $this->company_id = $company->info['id'];
         $push_data['member'] = $member->info;
     } elseif (!empty($_GET['id'])) {
         $id = intval($_GET['id']);
         $company->id = $this->company_id = $id;
         $company->setInfoById($id);
         if (!empty($company->info['member_id'])) {
             $member->id = $this->member_id = $company->info['member_id'];
         }
         $push_data['company'] = $company->info;
         $push_data['member'] = $member->info;
     }
     if (isset($company->info['status']) && $company->info['status'] === 0) {
         header_sent(L('company_checking'));
         exit;
     } elseif (empty($company->info) || !$company->info) {
         header_sent(L('data_not_exists'));
         exit;
     }
     $cache_data = $pdb->GetRow("SELECT data2 AS style FROM {$tb_prefix}spacecaches WHERE company_id='" . $company->info['id'] . "'");
     if (isset($cache_data['style'])) {
         $skin_extra_style = $cache_data['style'];
     }
     if (!empty($company->info['created'])) {
         $time_tmp = $time_stamp - $company->info['created'];
         $company->info['year_sep'] = $time_tmp = ceil($time_tmp / (3600 * 24 * 365));
     }
     if (empty($company->info['email'])) {
         $company->info['email'] = $G['setting']['service_email'];
     }
     if (empty($company->info['picture'])) {
         $company->info['logo'] = $absolute_uri . pb_get_attachmenturl('', '', 'big');
     } else {
         $company->info['logo'] = $absolute_uri . $attachment_url . $company->info['picture'];
     }
     $company->info = pb_lang_split_recursive($company->info);
     $company->info['description'] = nl2br(strip_tags($company->info['description']));
     $is_set_default_skins = false;
     $member_templet_id = $member->info['templet_id'];
     if (isset($_GET['force_templet_id'])) {
         $member_templet_id = intval($_GET['force_templet_id']);
     }
     if (!empty($member_templet_id)) {
         $skin_path_info = $pdb->GetRow("SELECT name,directory FROM {$tb_prefix}templets WHERE type='user' AND status='1' AND id='" . $member_templet_id . "'");
     }
     if (empty($skin_path_info)) {
         $skin_path_info = $pdb->GetRow("SELECT name,directory FROM {$tb_prefix}templets WHERE type='user' AND is_default='1'");
         if (empty($skin_path_info)) {
             $is_set_default_skins = true;
         }
     } elseif (!is_dir(PHPB2B_ROOT . $skin_path_info)) {
         $is_set_default_skins = true;
     }
     if ($is_set_default_skins) {
         $skin_path_info = array();
         $skin_path_info[] = "default";
         $skin_path_info[] = "templates/skins/default/";
     }
     list($skin_path, $skin_dir) = $skin_path_info;
     if (strpos($skin_dir, "templates") === false) {
         $skin_dir = "templates/" . $skin_dir;
//.........这里部分代码省略.........
开发者ID:reboxhost,项目名称:phpb2b,代码行数:101,代码来源:space_controller.php


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