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; } }
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; } } }
<?php $chat_translation_enabled = erLhcoreClassInstance::getInstance()->atranslations_supported == 1;
<?php $information_tab_user_files_tab_enabled = erLhcoreClassInstance::getInstance()->files_supported == 1;
<?php $operator_screenshot_enabled = erLhcoreClassInstance::getInstance()->screenshot_supported == 1;
<?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;
<?php $user_menu_tabs_personal_canned_messages_tab = erLhcoreClassInstance::getInstance()->cannedmsg_supported == 1;
<?php $operator_remarks_enabled = erLhcoreClassInstance::getInstance()->chatremarks_supported == 1;
<?php $chat_chat_tabs_footprint_tab_tab_enabled = erLhcoreClassInstance::getInstance()->footprint_supported == 1;
<?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')) {
<?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 }
<?php $chat_chat_tabs_actions_transfer_enabled = erLhcoreClassInstance::getInstance()->transfer_supported == 1;
<?php $system_configuration_links_files_enabled = erLhcoreClassInstance::getInstance()->files_supported == 1;
<?php $department_xmpp_enabled = erLhcoreClassInstance::getInstance()->xmpp_supported == 1;
public function userEditPhotoPath($params) { $params['dir'] = 'var/userphoto/' . date('Y') . 'y/' . date('m') . '/' . date('d') . '/' . erLhcoreClassInstance::getInstance()->id . '/' . $params['storage_id'] . '/'; }
<?php $chat_lists_online_operators_enabled = erLhcoreClassInstance::getInstance()->operatorschat_supported == 1;
var lhcbrowserOpeator = new LHCCoBrowserOperator(window,document,{'formsenabled':<?php erLhcoreClassInstance::getInstance()->cobrowse_forms_supported == 1 ? print 'true' : (print 'false'); ?> ,'lhcbase':'<?php echo (erLhcoreClassSystem::$httpsMode == true ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']; echo erLhcoreClassDesign::baseurl('cobrowse/proxycss'); ?> ','httpsmode':<?php echo erLhcoreClassSystem::$httpsMode == true ? 'true' : 'false'; ?> ,'disablejs':<?php echo erLhcoreClassModelChatConfig::fetch('disable_js_execution')->current_value == 1 ? 'true' : 'false'; ?> ,options:{opcontrol:$('#status-icon-control'),opscroll:$('#sync-user-scroll'),opmouse:$('#show-operator-mouse'),scroll:$('#scroll-user-window')},'cpos':{w:<?php echo $browse->w; ?> ,wh:<?php echo $browse->wh; ?> },'cursor':'<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value; ?> //<?php echo $_SERVER['HTTP_HOST']; echo erLhcoreClassDesign::design('images/icons/cursor.png'); ?> ','nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value); ?> ,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value);
/** * Adjust inform workflow attributes based on expire data * */ public function setExpireInformStatus() { $expireOptions = erLhcoreClassInstance::getExpireOptions(); $informStatusSet = false; foreach ($expireOptions as $expireOption) { $expireOption['filter']['filter']['id'] = $this->id; // We ignore status at this stage unset($expireOption['filter']['filter']['expire_inform_status']); foreach (erLhcoreClassModelInstance::getList($expireOption['filter']) as $item) { foreach ($expireOption['set'] as $attr => $attrValue) { $this->{$attr} = $attrValue; $this->saveThis(); $informStatusSet = true; } } } // None of above filters matched, so we can set default value if ($informStatusSet == false) { $this->expire_inform_status = 0; $this->saveThis(); } }
<?php $system_configuration_links_chatbox_embed_enabled = erLhcoreClassInstance::getInstance()->chatbox_supported == 1;
<?php $system_configuration_tabs_speech_enabled = erLhcoreClassInstance::getInstance()->speech_supported == 1;
public function __get($var) { switch ($var) { case 'settings': $this->settings = (include 'extension/xmppservice/settings/settings.ini.php'); if ($this->settings['ahosting'] == true) { $this->settings['subdomain'] = str_replace('.', '-', erLhcoreClassInstance::getInstance()->address); $this->settings['enabled'] = erLhcoreClassInstance::getInstance()->full_xmpp_chat_supported == 1; $this->settings['online_visitors_tracking'] = erLhcoreClassInstance::getInstance()->full_xmpp_visitors_tracking == 1; } return $this->settings; break; default: break; } }
<?php $chat_chat_tabs_actions_blockuser_enabled = erLhcoreClassInstance::getInstance()->blocked_supported;
<?php $information_tab_map_tab_enabled = erLhcoreClassInstance::getInstance()->onlinevisitortrck_supported == 1;
<?php $parts_top_menu_chat_actions_enabled = erLhcoreClassInstance::getInstance()->chat_supported == 1;
<?php $speech_action_enabled = erLhcoreClassInstance::getInstance()->speech_supported == 1;
<?php $chat_onlineusers_section_map_online_tab_enabled = erLhcoreClassInstance::getInstance()->onlinevisitortrck_supported == 1;
if (isset($_POST['UpdateUsers'])) { $definition = array('max_operators' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int'), 'one_per_account' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean')); $form = new ezcInputForm(INPUT_POST, $definition); $Errors = array(); if ($form->hasValidData('one_per_account') && $form->one_per_account == true) { $Instance->one_per_account = 1; } else { $Instance->one_per_account = 0; } if ($form->hasValidData('max_operators')) { $Instance->max_operators = $form->max_operators; } else { $Instance->max_operators = 0; } $Instance->saveThis(); erLhcoreClassInstance::performOperatorsLimit($Instance); $tpl->set('updated', true); } if (isset($_POST['UpdateAttributes'])) { $definition = array('DateFormat' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'DateHourFormat' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'DateAndHourFormat' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'UserTimeZone' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'FrontSiteaccess' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'Language' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'UserTimeZone' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string')); $form = new ezcInputForm(INPUT_POST, $definition); $Errors = array(); if ($form->hasValidData('Language')) { $Instance->locale = $form->Language; } if ($form->hasValidData('DateFormat')) { $Instance->date_format = $form->DateFormat; } if ($form->hasValidData('DateHourFormat')) { $Instance->date_hour_format = $form->DateHourFormat; }
if ($form->hasValidData('DateFormat')) { $Instance->date_format = $form->DateFormat; } if ($form->hasValidData('DateHourFormat')) { $Instance->date_hour_format = $form->DateHourFormat; } if ($form->hasValidData('DateAndHourFormat')) { $Instance->date_date_hour_format = $form->DateAndHourFormat; } if ($form->hasValidData('UserTimeZone')) { $Instance->time_zone = $form->UserTimeZone; } if ($form->hasValidData('FrontSiteaccess')) { $Instance->siteaccess = $form->FrontSiteaccess; } if ($form->hasValidData('Address') && erLhcoreClassInstance::instanceExists($form->Address) == false) { $Instance->address = $form->Address; } else { $Errors[] = 'Instance exists'; } if ($form->hasValidData('Email')) { $Instance->email = $form->Email; } else { $Errors[] = 'Please enter valid e-mail'; } if ($form->hasValidData('Request')) { $Instance->request = $form->Request; } if ($form->hasValidData('RequestUsed')) { $Instance->request_used = $form->RequestUsed; }
<?php $system_configuration_links_cannedmsg_enabled = erLhcoreClassInstance::getInstance()->cannedmsg_supported == 1;
<?php $pagelayouts_parts_modules_menu_chatbox_enabled = erLhcoreClassInstance::getInstance()->chatbox_supported == 1;