本文整理汇总了PHP中erLhcoreClassInstance类的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassInstance类的具体用法?PHP erLhcoreClassInstance怎么用?PHP erLhcoreClassInstance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了erLhcoreClassInstance类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupInstance
public static function setupInstance($db)
{
$parts = explode('.', $_SERVER['HTTP_HOST']);
$subdomain = array_shift($parts);
$items = erLhcoreClassModelInstance::getList(array('filter' => array('address' => $subdomain)));
if (!empty($items)) {
erLhcoreClassInstance::$instanceChat = array_shift($items);
$cfg = erConfigClassLhConfig::getInstance();
$db->query('USE ' . $cfg->getSetting('db', 'database_user_prefix') . erLhcoreClassInstance::$instanceChat->id);
} else {
$cfg = erConfigClassLhConfig::getInstance();
header('Location: ' . $cfg->getSetting('site', 'seller_url'));
exit;
}
}
示例2: setupInstance
public static function setupInstance($db)
{
if (isset($_SERVER['HTTP_HOST'])) {
$cfg = erConfigClassLhConfig::getInstance();
$subdomain = str_replace('.' . $cfg->getSetting('site', 'seller_domain'), '', $_SERVER['HTTP_HOST']);
$session = erLhcoreClassInstance::getSession();
$q = $session->createFindQuery('erLhcoreClassModelInstance');
$q->where($q->expr->eq('address', $q->bindValue($subdomain)) . ' OR (full_domain = 1 AND ' . $q->expr->eq('address', $q->bindValue($_SERVER['HTTP_HOST'])) . ')');
$items = $session->find($q);
if (!empty($items)) {
erLhcoreClassInstance::$instanceChat = array_shift($items);
$db->query('USE ' . $cfg->getSetting('db', 'database_user_prefix') . erLhcoreClassInstance::$instanceChat->id);
} else {
header('Location: ' . $cfg->getSetting('site', 'seller_url'));
exit;
}
}
}
示例3:
<?php
$chat_translation_enabled = erLhcoreClassInstance::getInstance()->atranslations_supported == 1;
示例4:
<?php
$information_tab_user_files_tab_enabled = erLhcoreClassInstance::getInstance()->files_supported == 1;
示例5:
<?php
$operator_screenshot_enabled = erLhcoreClassInstance::getInstance()->screenshot_supported == 1;
示例6: header
<?php
header('content-type: application/json; charset=utf-8');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
if ((string) $Params['user_parameters']['address'] != '' && erLhcoreClassInstance::instanceExists((string) $Params['user_parameters']['address']) == false) {
if (isset($_GET['callback'])) {
echo $_GET['callback'] . '(' . json_encode(false) . ')';
} else {
echo 'true';
}
} else {
if (isset($_GET['callback'])) {
echo $_GET['callback'] . '(' . json_encode(true) . ')';
} else {
echo 'false';
}
}
exit;
示例7:
<?php
$user_menu_tabs_personal_canned_messages_tab = erLhcoreClassInstance::getInstance()->cannedmsg_supported == 1;
示例8:
<?php
$operator_remarks_enabled = erLhcoreClassInstance::getInstance()->chatremarks_supported == 1;
示例9:
<?php
$chat_chat_tabs_footprint_tab_tab_enabled = erLhcoreClassInstance::getInstance()->footprint_supported == 1;
示例10: array
<?php
$tpl = erLhcoreClassTemplate::getInstance('lhsystem/timezone.tpl.php');
$instanceChat = erLhcoreClassInstance::getInstance();
$timezone = $instanceChat->time_zone;
$date_format = $instanceChat->date_format;
$date_hour_format = $instanceChat->date_hour_format;
$date_date_hour_format = $instanceChat->date_date_hour_format;
if (isset($_POST['StoreTimeZoneSettings'])) {
$definition = array('TimeZone' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'DateFormat' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'DateFullFormat' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'DateHourFormat' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'));
if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
erLhcoreClassModule::redirect('system/timezone');
exit;
}
$form = new ezcInputForm(INPUT_POST, $definition);
if ($form->hasValidData('TimeZone')) {
$timezone = $form->TimeZone;
} else {
$timezone = '';
}
if ($form->hasValidData('DateFormat')) {
$date_format = $form->DateFormat;
} else {
$date_format = '';
}
if ($form->hasValidData('DateFullFormat')) {
$date_date_hour_format = $form->DateFullFormat;
} else {
$date_date_hour_format = '';
}
if ($form->hasValidData('DateHourFormat')) {
示例11:
<?php
if (erLhcoreClassInstance::getInstance()->is_active == false) {
?>
<div class="alert alert-danger alert-dismissible" role="alert" style="max-width:1024px;margin:7px auto;">
<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Your service plan has expired.');
?>
<?php
if (erConfigClassLhConfig::getInstance()->getSetting('site', 'hide_billing') == false) {
?>
<a class="alert-link" href="<?php
echo erLhcoreClassDesign::baseurl('instance/billing');
?>
" ><i class="material-icons">account_balance</i><?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('pagelayout/pagelayout', 'Billing');
?>
</a>
<?php
}
?>
</div>
<?php
}
示例12:
<?php
$chat_chat_tabs_actions_transfer_enabled = erLhcoreClassInstance::getInstance()->transfer_supported == 1;
示例13:
<?php
$system_configuration_links_files_enabled = erLhcoreClassInstance::getInstance()->files_supported == 1;
示例14:
<?php
$department_xmpp_enabled = erLhcoreClassInstance::getInstance()->xmpp_supported == 1;
示例15: userEditPhotoPath
public function userEditPhotoPath($params)
{
$params['dir'] = 'var/userphoto/' . date('Y') . 'y/' . date('m') . '/' . date('d') . '/' . erLhcoreClassInstance::getInstance()->id . '/' . $params['storage_id'] . '/';
}