本文整理汇总了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();
}
示例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();
}
示例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";
}
示例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) {
示例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
示例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]));