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


PHP Website::load方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model('Questionnaire_model', 'Questionnaire_model', True);
     $this->load->model('Visistor_questionnaire_answer_model', 'Visistor_questionnaire_answer_model', True);
     $this->load->controller('Website');
     $website_object = new Website();
     $website_object->load();
 }
开发者ID:goudaelalfy,项目名称:nahda,代码行数:14,代码来源:questionnaire.php

示例2: __construct

 /**
  * Constructor
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model('Page_model', 'Page_model', True);
     $this->load->model('Writer_model', 'Writer_model', True);
     $this->load->model('Page_selected_model', 'Page_selected_model', True);
     $this->load->controller('Website');
     $website_object = new Website();
     $website_object->load();
 }
开发者ID:goudaelalfy,项目名称:nahda,代码行数:15,代码来源:page.php

示例3: getAvatarUrl

 public function getAvatarUrl()
 {
     if (!$this->_resourceUrl) {
         throw new \Exception("Can't getWebsiteUrl() because resourceUrl not set on this HistoryItem object");
     }
     $this->load($this->_resourceUrl);
     foreach ($this->_data['associatedWebsites'] as $websiteResourceUrl) {
         $website = new Website();
         $website->load($websiteResourceUrl);
         $avatarUrl = $website->getAvatarUrl();
         if ($avatarUrl) {
             return $avatarUrl;
         }
     }
     return "https://app.buzzstream.com/img/default_avatar_media.png";
 }
开发者ID:goodlinks,项目名称:buzzstream-feed,代码行数:16,代码来源:HistoryItem.php

示例4: navigate_upload_remove_temporary

$DB = new database();
if (!$DB->connect()) {
    die(APP_NAME . ' # ERROR<br /> ' . $DB->get_last_error());
}
// session checking
if (empty($_SESSION['APP_USER#' . APP_UNIQUE])) {
    $DB->disconnect();
    die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "No user logged in."}, "id" : "id"}');
} else {
    $user = new user();
    $user->load($_SESSION['APP_USER#' . APP_UNIQUE]);
}
// load the working website
$website = new Website();
if (!empty($_SESSION['website_active'])) {
    $website->load($_SESSION['website_active']);
} else {
    $website->load();
}
// load the first available
// force loading user permissions before desconnecting from the database
$foo = $user->permission("foo");
session_write_close();
$DB->disconnect();
function navigate_upload_remove_temporary($targetDir, $maxFileAge = 86400)
{
    if (is_dir($targetDir) && ($dir = opendir($targetDir))) {
        while (($file = readdir($dir)) !== false) {
            $filePath = $targetDir . DIRECTORY_SEPARATOR . $file;
            // Remove temp files if they are older than the max age
            if (preg_match('/\\.tmp$/', $file) && filemtime($filePath) < time() - $maxFileAge) {
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:31,代码来源:navigate_upload.php

示例5: Website

$id = $_REQUEST['id'];
if (!empty($_REQUEST['id'])) {
    if (is_int($id)) {
        $item->load($id);
    } else {
        $item->load($_REQUEST['id']);
    }
}
if (!$item->id) {
    echo 'Error: no item found with id ' . $_REQUEST['id'] . '.';
    session_write_close();
    $DB->disconnect();
    // we don't need the database anymore (we'll see)
    exit;
}
$website = new Website();
if (!empty($_GET['wid'])) {
    $website->load(intval($_GET['wid']));
} else {
    if ($item->website > 0) {
        $website->load($item->website);
    } else {
        $website->load();
    }
}
$path = NAVIGATE_PRIVATE . '/' . $website->id . '/files/' . $item->id;
// pass control to usual website download (ignoring enabled check)
$_REQUEST['type'] = $item->type;
$_REQUEST['force_resize'] = 'true';
nvweb_object(true, true);
// ignore all permissions
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:31,代码来源:navigate_download.php

示例6: Website

set_time_limit(0);
$menu_layout = new menu_layout();
$menu_layout->load();
// load the working website
$website = new Website();
if ((@$_GET['act'] == '0' || @$_GET['quickedit'] == 'true') && !empty($_GET['wid'])) {
    $website->load(intval($_GET['wid']));
} else {
    if (!empty($_SESSION['website_active'])) {
        $website->load($_SESSION['website_active']);
    } else {
        $url = nvweb_self_url();
        $website = nvweb_load_website_by_url($url, false);
        if (!$website) {
            $website = new Website();
            $website->load();
        }
    }
}
// if there are no websites, auto-create the first one
if (empty($website->id)) {
    $website->create_default();
}
// check allowed websites for this user
$wa = $user->websites;
if (!empty($wa)) {
    if (array_search($website->id, $wa) === false) {
        $website = new website();
        if (!empty($wa[0])) {
            // load first website allowed
            $website->load(intval($wa[0]));
开发者ID:NavigateCMS,项目名称:Navigate-CMS,代码行数:31,代码来源:navigate.php


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