• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP erLhcoreClassModelChatConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setupSMTP

 public static function setupSMTP(PHPMailer &$phpMailer)
 {
     // Allow extension override mail settings
     $response = erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chatmail.setup_smtp', array('phpmailer' => &$phpMailer));
     if ($response !== false && isset($response['status']) && $response['status'] == erLhcoreClassChatEventDispatcher::STOP_WORKFLOW) {
         return;
     }
     $smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
     $data = (array) $smtpData->data;
     if (isset($data['sender']) && $data['sender'] != '') {
         $phpMailer->Sender = $data['sender'];
     }
     if ($phpMailer->From == 'root@localhost') {
         $phpMailer->From = $data['default_from'];
     }
     if ($phpMailer->FromName == 'Root User') {
         $phpMailer->FromName = $data['default_from_name'];
     }
     if (isset($data['use_smtp']) && $data['use_smtp'] == 1) {
         $phpMailer->IsSMTP();
         $phpMailer->Host = $data['host'];
         $phpMailer->Port = $data['port'];
         if ($data['username'] != '' && $data['password'] != '') {
             $phpMailer->Username = $data['username'];
             $phpMailer->Password = $data['password'];
             $phpMailer->SMTPAuth = true;
             $phpMailer->From = isset($data['default_from']) ? $data['default_from'] : $data['username'];
         } else {
             $phpMailer->From = '';
         }
     }
 }
开发者ID:sirromas,项目名称:medical,代码行数:32,代码来源:lhchatmail.php


示例2: __get

 public function __get($var)
 {
     switch ($var) {
         case 'settings':
             $this->settings = erLhcoreClassModelChatConfig::fetch('sugarcrm_data')->data;
             return $this->settings;
             break;
         default:
             break;
     }
 }
开发者ID:noikiy,项目名称:sugarcrm,代码行数:11,代码来源:bootstrap.php


示例3: openChatWidget

 /**
  * Opening chat widget
  * */
 public static function openChatWidget($params)
 {
     try {
         $chatPaid = erLhcoreClassModelChatPaid::fetch($params['pchat']);
         $paidchatData = erLhcoreClassModelChatConfig::fetch('paidchat_data');
         $data = (array) $paidchatData->data;
         if ((!isset($data['paidchat_read_denied']) || $data['paidchat_read_denied'] == 0) && $chatPaid->chat_id == $params['chat']->id) {
             $params['tpl']->set('paid_chat_params', array('allow_read' => true));
         }
     } catch (Exception $e) {
     }
 }
开发者ID:detain,项目名称:livehelperchat,代码行数:15,代码来源:lhchatpaid.php


示例4: setupSMTP

 public static function setupSMTP(PHPMailer &$phpMailer)
 {
     $smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
     $data = (array) $smtpData->data;
     if (isset($data['use_smtp']) && $data['use_smtp'] == 1) {
         $phpMailer->IsSMTP();
         $phpMailer->Host = $data['host'];
         $phpMailer->Port = $data['port'];
         if ($data['username'] != '' && $data['password'] != '') {
             $phpMailer->Username = $data['username'];
             $phpMailer->Password = $data['password'];
             $phpMailer->SMTPAuth = true;
         }
     }
 }
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:15,代码来源:lhchatmail.php


示例5: getSpeechInstance

 public static function getSpeechInstance(erLhcoreClassModelChat $chat)
 {
     $chatLanguageSession = null;
     $chatSpeech = erLhcoreClassModelSpeechChatLanguage::getList(array('filter' => array('chat_id' => $chat->id)));
     if (empty($chatSpeech)) {
         $chatLanguageSession = new erLhcoreClassModelSpeechChatLanguage();
         $chatLanguageSession->chat_id = $chat->id;
         $speechUserLanguage = erLhcoreClassModelUserSetting::getSetting('speech_language', '');
         $speechUserDialect = erLhcoreClassModelUserSetting::getSetting('speech_dialect', '');
         if ($speechUserLanguage != '' && $speechUserDialect != '') {
             $chatLanguageSession->dialect = $speechUserDialect;
             $chatLanguageSession->language_id = $speechUserLanguage;
         } else {
             $speechData = erLhcoreClassModelChatConfig::fetch('speech_data');
             $data = (array) $speechData->data;
             $chatLanguageSession->language_id = $data['language'];
             $chatLanguageSession->dialect = $data['dialect'];
         }
     } else {
         $chatLanguageSession = array_pop($chatSpeech);
     }
     return $chatLanguageSession;
 }
开发者ID:sirromas,项目名称:medical,代码行数:23,代码来源:lhspeech.php


示例6: setupSMTP

 public static function setupSMTP(PHPMailer &$phpMailer)
 {
     $smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
     $data = (array) $smtpData->data;
     if (isset($data['use_smtp']) && $data['use_smtp'] == 1) {
         $phpMailer->IsSMTP();
         $phpMailer->Host = $data['host'];
         $phpMailer->Port = $data['port'];
         if ($data['username'] != '' && $data['password'] != '') {
             $phpMailer->Username = $data['username'];
             $phpMailer->Password = $data['password'];
             $phpMailer->SMTPAuth = true;
         }
     }
     if (isset($data['sender']) && $data['sender'] != '') {
         $phpMailer->Sender = $data['sender'];
     }
     if ($phpMailer->From == 'root@localhost') {
         $phpMailer->From = $data['default_from'];
     }
     if ($phpMailer->FromName == 'Root User') {
         $phpMailer->FromName = $data['default_from_name'];
     }
 }
开发者ID:nagyistoce,项目名称:livehelperchat,代码行数:24,代码来源:lhchatmail.php


示例7: array

<?php

$currentUser = erLhcoreClassUser::instance();
$onlineTimeout = (int) erLhcoreClassModelChatConfig::fetchCache('sync_sound_settings')->data['online_timeout'];
$canListOnlineUsers = false;
$canListOnlineUsersAll = false;
if (erLhcoreClassModelChatConfig::fetchCache('list_online_operators')->current_value == 1) {
    $canListOnlineUsers = $currentUser->hasAccessTo('lhuser', 'userlistonline');
    $canListOnlineUsersAll = $currentUser->hasAccessTo('lhuser', 'userlistonlineall');
}
// We do not need a session anymore
session_write_close();
$ReturnMessages = array();
$pendingTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_pending_list', 1);
$activeTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_active_list', 1);
$closedTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_close_list', 0);
$unreadTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_unread_list', 1);
$showAllPending = erLhcoreClassModelUserSetting::getSetting('show_all_pending', 1);
$showDepartmentsStats = $currentUser->hasAccessTo('lhuser', 'canseedepartmentstats');
if ($showDepartmentsStats == true) {
    /**
     * Departments stats
     * */
    $limitList = is_numeric($Params['user_parameters_unordered']['limitd']) ? (int) $Params['user_parameters_unordered']['limitd'] : 10;
    $filter = array('ignore_fields' => erLhcoreClassChat::$chatListIgnoreField);
    $filter['limit'] = $limitList;
    if (is_array($Params['user_parameters_unordered']['departmentd']) && !empty($Params['user_parameters_unordered']['departmentd'])) {
        erLhcoreClassChat::validateFilterIn($Params['user_parameters_unordered']['departmentd']);
        $filter['filterin']['id'] = $Params['user_parameters_unordered']['departmentd'];
    }
    $filter['sort'] = 'pending_chats_counter DESC';
开发者ID:kenjiro7,项目名称:livehelperchat,代码行数:31,代码来源:syncadmininterface.php


示例8: trim

<?php

$cfgSite = erConfigClassLhConfig::getInstance();
$secretHash = $cfgSite->getSetting('site', 'secrethash');
if ($Params['user_parameters']['validation_hash'] == sha1(sha1($Params['user_parameters']['email'] . $secretHash) . $secretHash)) {
    $accept = erLhcoreClassModelChatAccept::fetchByHash($Params['user_parameters']['hash']);
    if ($accept !== false) {
        $chat_id = $accept->chat_id;
        if ($accept->wused == 0) {
            $userID = erLhcoreClassModelUser::fetchUserByEmail($Params['user_parameters']['email'], trim($Params['user_parameters']['email']) != '' ? trim($Params['user_parameters']['email']) : false);
            if ($userID !== false && $accept->ctime > time() - erLhcoreClassModelChatConfig::fetch('accept_chat_link_timeout')->current_value) {
                $accept->wused = 1;
                $accept->saveThis();
                erLhcoreClassUser::instance()->setLoggedUser($userID);
                erLhcoreClassModule::redirect('chat/single', '/' . $chat_id);
                exit;
            } else {
                erLhcoreClassModule::redirect('user/login', '/(r)/' . rawurlencode(base64_encode('chat/single/' . $chat_id)));
                exit;
            }
        } else {
            erLhcoreClassModule::redirect('user/login', '/(r)/' . rawurlencode(base64_encode('chat/single/' . $chat_id)));
            exit;
        }
        erLhcoreClassModelChatAccept::cleanup();
    }
}
erLhcoreClassModule::redirect('user/login');
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:29,代码来源:accept.php


示例9: isset

isset($dynamic_url_append) ? print $dynamic_url_append : '';
?>
" method="post" onsubmit="return lhinst.addCaptcha('<?php 
echo time();
?>
',$(this))">
			  <h4><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('faq/faqwidget', 'Type your question');
?>
</h4>
              <div class="form-group">
			     <label><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('faq/faqwidget', 'E-mail');
?>
:<?php 
if (erLhcoreClassModelChatConfig::fetch('faq_email_required')->current_value == 1) {
    ?>
*<?php 
}
?>
</label>
			     <input type="text" class="form-control" name="email" value="<?php 
echo htmlspecialchars($item_new->email);
?>
" />
              </div>

			  <div class="form-group">
			     <label><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('faq/faqwidget', 'Question');
?>
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:31,代码来源:faqwidget.tpl.php


示例10: json_encode

    echo json_encode(array('third' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'User has not seen a message from the operator, or the message window is still open.'), 'msg_seen' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Seen'), 'msg_not_seen' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Unseen'), 'second' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'User has seen the message from the operator.'), 'first' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'User does not have any messages from the operator')), JSON_HEX_APOS);
    ?>
'>
<thead>
<tr>
    <th width="5%" nowrap><a class="icon-clock" ng-click="online.predicate = 'last_visit'; online.reverse=!online.reverse" title="<?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Last activity');
    ?>
" ></a><a class="icon-clock" ng-click="online.predicate = 'time_on_site'; online.reverse=!online.reverse" title="<?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Time on site');
    ?>
"></a><a class="icon-clock" ng-click="online.predicate = 'visitor_tz_time'; online.reverse=!online.reverse" title="<?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Visitor local time');
    ?>
"></a><?php 
    if (erLhcoreClassModelChatConfig::fetch('track_is_online')->current_value == 1) {
        ?>
<a class="icon-clock" ng-click="online.predicate = 'last_check_time'; online.reverse=!online.reverse" title="<?php 
        echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'By user status on site');
        ?>
"></a><?php 
    }
    ?>
</th>
    <th width="50%"><a href="" ng-click="online.predicate = 'current_page'; online.reverse=!online.reverse" /><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Page');
    ?>
</a></th>
    <th width="30%"><a href="" ng-click="online.predicate = 'referrer'; online.reverse=!online.reverse" /><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Came from');
    ?>
开发者ID:p4prawin,项目名称:livechat,代码行数:31,代码来源:section_online_users.tpl.php


示例11: isset

<?php

$is_root = !isset($_GET['nomenu']) || isset($_GET['nomenu']) && empty($_GET['nomenu']);
?>
<div class="row footer-row<?php 
echo $is_root ? "" : " hidden";
?>
">
    <div class="columns col-xs-12">
        <p class="pull-right"><a target="_blank" href="http://livehelperchat.com">Live Helper Chat &copy; <?php 
echo date('Y');
?>
</a></p>
        <p><a href="<?php 
echo erLhcoreClassModelChatConfig::fetch('customer_site_url')->current_value;
?>
"><?php 
echo htmlspecialchars(erLhcoreClassModelChatConfig::fetch('customer_company_name')->current_value);
?>
</a></p>
    </div>
</div>

<?php 
include_once erLhcoreClassDesign::designtpl('pagelayouts/parts/page_footer_js.tpl.php');
include_once erLhcoreClassDesign::designtpl('pagelayouts/parts/page_footer_js_extension_multiinclude.tpl.php');
开发者ID:homeonline,项目名称:lhchat,代码行数:26,代码来源:page_footer.tpl.php


示例12: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhuser/autologinconfig.tpl.php');
$autologinData = erLhcoreClassModelChatConfig::fetch('autologin_data');
$data = (array) $autologinData->data;
if (isset($_POST['StoreAutologinSettings'])) {
    $definition = array('secret_hash' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'enabled' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean'));
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('user/autologinconfig');
        exit;
    }
    $Errors = array();
    $form = new ezcInputForm(INPUT_POST, $definition);
    $Errors = array();
    try {
        if ($form->hasValidData('secret_hash') && strlen($form->secret_hash) >= 10) {
            $data['secret_hash'] = $form->secret_hash;
        } else {
            throw new Exception('Please enter secret hash');
        }
        if ($form->hasValidData('enabled') && $form->enabled == true) {
            $data['enabled'] = 1;
        } else {
            $data['enabled'] = 0;
        }
        $autologinData->value = serialize($data);
        $autologinData->saveThis();
        $CacheManager = erConfigClassLhCacheConfig::getInstance();
        $CacheManager->expireCache();
        $tpl->set('updated', 'done');
    } catch (Exception $e) {
开发者ID:sirromas,项目名称:medical,代码行数:31,代码来源:autologinconfig.php


示例13: header

 if ($chat->hash == $Params['user_parameters']['hash'] && erLhcoreClassChat::canReopen($chat, true)) {
     // Is IP blocked directly?
     if (erLhcoreClassModelChatBlockedUser::getCount(array('filter' => array('ip' => erLhcoreClassIPDetect::getIP()))) > 0) {
         header('Location: ' . $_SERVER['HTTP_REFERER']);
         exit;
     }
     /**
      * is IP range blocked
      * */
     $ignorable_ip = erLhcoreClassModelChatConfig::fetch('banned_ip_range')->current_value;
     if ($ignorable_ip != '' && erLhcoreClassIPDetect::isIgnored(erLhcoreClassIPDetect::getIP(), explode(',', $ignorable_ip))) {
         header('Location: ' . $_SERVER['HTTP_REFERER']);
         exit;
     }
     if ($chat->status != erLhcoreClassModelChat::STATUS_ACTIVE_CHAT && $chat->status != erLhcoreClassModelChat::STATUS_PENDING_CHAT) {
         if (erLhcoreClassModelChatConfig::fetch('reopen_as_new')->current_value == 1 || $chat->user_id == 0) {
             // Reset to fresh state to workflow triggers to work
             $chat->status = erLhcoreClassModelChat::STATUS_PENDING_CHAT;
             $chat->nc_cb_executed = 0;
             $chat->na_cb_executed = 0;
             $chat->time = time();
             // Set time to new
         } else {
             $chat->status = erLhcoreClassModelChat::STATUS_ACTIVE_CHAT;
         }
         $chat->updateThis();
     }
     erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.user_reopened', array('chat' => &$chat));
     if ($Params['user_parameters_unordered']['mode'] == 'widget') {
         // Redirect user
         erLhcoreClassModule::redirect('chat/chatwidgetchat', '/' . $chat->id . '/' . $chat->hash . $modeAppend . $modeAppendTheme);
开发者ID:detain,项目名称:livehelperchat,代码行数:31,代码来源:reopen.php


示例14: onlineUserPageViewLogged

 /**
  * get's callend then online user does a pageview
  *
  * @param array $params            
  */
 public function onlineUserPageViewLogged($params)
 {
     if ($this->settings['enabled'] == true && $this->settings['online_visitors_tracking'] == true) {
         $onlineOptions = erLhcoreClassModelChatConfig::fetch('xmppservice_options')->data;
         if (isset($onlineOptions['track_online']) && $onlineOptions['track_online'] == true) {
             if (($xmppAccount = erLhcoreClassModelXMPPAccount::findOne(array('filter' => array('type' => erLhcoreClassModelXMPPAccount::USER_TYPE_VISITOR, 'user_id' => $params['ou']->id)))) !== false) {
                 if ($this->settings['handler'] == 'rpc' && is_object($params['tpl']) && $this->settings['online_visitors_tracking'] == true) {
                     /**
                      * In the future then websockets will support attatch method this could be used
                      * */
                     /* $xmppAccount->attach_data = erLhcoreClassExtensionXmppserviceHandler::prebindSession(array(
                            'username' => $xmppAccount->username,
                            'password' => $xmppAccount->password,
                            'host' => $this->settings['prebind_host'] . $xmppAccount->username_plain,
                        )); */
                     $params['tpl']->set('xmppAccount', $xmppAccount);
                 }
                 // Forward this information to NodeJS server
                 erLhcoreClassExtensionXmppserviceHandler::onlineUserPageViewLogged(array('xmpp_account' => $xmppAccount, 'ou' => $params['ou'], 'host_login' => $this->settings['host_login'], 'node_api_server' => $this->settings['node_api_server'], 'handler' => $this->settings['handler'], 'xmpp_host' => $this->settings['xmpp_host'], 'rpc_server' => $this->settings['rpc_server'], 'rpc_username' => $this->settings['rpc_username'], 'rpc_password' => $this->settings['rpc_password'], 'rpc_account_host' => $this->settings['rpc_account_host']));
             }
         }
     }
 }
开发者ID:noikiy,项目名称:xmpp-chat,代码行数:28,代码来源:bootstrap.php


示例15: isset

$timeout = isset($Params['user_parameters_unordered']['timeout']) && is_numeric($Params['user_parameters_unordered']['timeout']) ? (int) $Params['user_parameters_unordered']['timeout'] : 30;
$maxrows = isset($Params['user_parameters_unordered']['maxrows']) && is_numeric($Params['user_parameters_unordered']['maxrows']) ? (int) $Params['user_parameters_unordered']['maxrows'] : 50;
$filter = array('offset' => 0, 'limit' => $maxrows, 'sort' => 'last_visit DESC', 'filtergt' => array('last_visit' => time() - $timeout));
$department = isset($Params['user_parameters_unordered']['department']) && is_numeric($Params['user_parameters_unordered']['department']) ? (int) $Params['user_parameters_unordered']['department'] : false;
if ($department !== false) {
    $filter['filter']['dep_id'] = $department;
}
/**
 * Append user departments filter
 * */
$departmentParams = array();
$userDepartments = erLhcoreClassUserDep::parseUserDepartmetnsForFilter($currentUser->getUserID());
if ($userDepartments !== true) {
    $departmentParams['filterin']['id'] = $userDepartments;
    if (!$currentUser->hasAccessTo('lhchat', 'sees_all_online_visitors')) {
        $filter['filterin']['dep_id'] = $userDepartments;
    }
}
if ($is_ajax == true) {
    $items = erLhcoreClassModelChatOnlineUser::getList($filter);
    erLhcoreClassChat::prefillGetAttributes($items, array('online_attr_system_array', 'notes_intro', 'last_check_time_ago', 'visitor_tz_time', 'last_visit_seconds_ago', 'lastactivity_ago', 'time_on_site_front', 'can_view_chat', 'operator_user_send', 'operator_user_string', 'first_visit_front', 'last_visit_front'), array('notes', 'online_attr_system'), array('do_not_clean' => true));
    echo json_encode(array_values($items));
    exit;
}
$tpl->set('departmentParams', $departmentParams);
$tpl->set('tracking_enabled', erLhcoreClassModelChatConfig::fetch('track_online_visitors')->current_value == 1);
$tpl->set('geo_location_data', erLhcoreClassModelChatConfig::fetch('geo_location_data')->data);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Online visitors')));
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.onlineusers_path', array('result' => &$Result));
$Result['additional_footer_js'] = '<script src="' . erLhcoreClassDesign::designJS('js/angular.lhc.online.min.js') . '"></script>';
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:31,代码来源:onlineusers.php


示例16: fetch


//.........这里部分代码省略.........
         }
         // Compile override config settings
         $Matches = array();
         preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getOverrideValue\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getOverrideValue($Matches[2][$key], $Matches[5][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = '\'' . $valueConfig . '\'';
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         $Matches = array();
         preg_match_all('/<\\?php echo erConfigClassLhConfig::getInstance\\(\\)->getDirLanguage\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getDirLanguage($Matches[2][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = $valueConfig;
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         // Compile config settings
         $Matches = array();
         preg_match_all('/erConfigClassLhConfig::getInstance\\(\\)->getDirLanguage\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $var) {
             $valueConfig = erConfigClassLhConfig::getInstance()->getDirLanguage($Matches[2][$key]);
             $valueReplace = '';
             if (is_bool($valueConfig)) {
                 $valueReplace = $valueConfig == false ? 'false' : 'true';
             } elseif (is_integer($valueConfig)) {
                 $valueReplace = $valueConfig;
             } elseif (is_array($valueConfig)) {
                 $valueReplace = var_export($valueConfig, true);
             } else {
                 $valueReplace = '\'' . $valueConfig . '\'';
             }
             $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
         }
         if ($this->cacheDbVariables == true) {
             // Compile config completely
             $Matches = array();
             preg_match_all('/<\\?php echo erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
                 $contentFile = str_replace($Matches[0][$key], $valueConfig, $contentFile);
             }
             // Compile config settings in php scripts
             $Matches = array();
             preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->current_value/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->current_value;
                 $valueReplace = '';
                 $valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
                 $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
             }
             // Compile config settings in php scripts
             $Matches = array();
             preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data_value/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data_value;
                 $valueReplace = var_export($valueConfig, true);
                 $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
             }
             // Compile config settings array
             $Matches = array();
             preg_match_all('/erLhcoreClassModelChatConfig::fetch\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)->data\\[\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\]/i', $contentFile, $Matches);
             foreach ($Matches[1] as $key => $UrlAddress) {
                 $valueConfig = erLhcoreClassModelChatConfig::fetch($Matches[2][$key])->data[$Matches[4][$key]];
                 $valueReplace = '';
                 $valueReplace = '\'' . str_replace("'", "\\'", $valueConfig) . '\'';
                 $contentFile = str_replace($Matches[0][$key], $valueReplace, $contentFile);
             }
         }
         // Compile content language
         $contentFile = str_replace('<?php echo erLhcoreClassSystem::instance()->ContentLanguage?>', erLhcoreClassSystem::instance()->ContentLanguage, $contentFile);
         // Compile siteaccess
         $contentFile = str_replace('erLhcoreClassSystem::instance()->SiteAccess', '\'' . erLhcoreClassSystem::instance()->SiteAccess . '\'', $contentFile);
         // Atomoc template compilation to avoid concurent request compiling and writing to the same file
         $fileName = 'cache/compiledtemplates/' . md5(time() . rand(0, 1000) . microtime() . $file . $instance->WWWDirLang . $instance->Language . $port) . '.php';
         file_put_contents($fileName, erLhcoreClassTemplate::strip_html($contentFile));
         $file = 'cache/compiledtemplates/' . md5($file . $instance->WWWDirLang . $instance->Language . $port) . '.php';
         rename($fileName, $file);
         $this->cacheTemplates[md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port)] = $file;
         $this->storeCache();
     }
     return $this->fetchExecute($file);
 }
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:101,代码来源:tpl.php


示例17: date

<?php

$online_user = erLhcoreClassModelChatOnlineUser::fetchByVid($Params['user_parameters']['vid']);
if ($online_user !== false && isset($online_user->online_attr_system_array['ishare_enabled']) && $online_user->online_attr_system_array['ishare_enabled'] == 1) {
    $fileData = erLhcoreClassModelChatConfig::fetch('file_configuration');
    $data = (array) $fileData->data;
    $path = 'var/storage/' . date('Y') . 'y/' . date('m') . '/' . date('d') . '/ou' . $online_user->id . '/';
    erLhcoreClassChatEventDispatcher::getInstance()->dispatch('file.uploadfile.file_path', array('path' => &$path, 'storage_id' => $online_user->id));
    $upload_handler = new erLhcoreClassFileUpload(array('user_id' => 0, 'max_file_size' => $data['fs_max'] * 1024, 'accept_file_types_lhc' => '/\\.(' . $data['ft_us'] . ')$/i', 'online_user' => $online_user, 'download_via_php' => true, 'upload_dir' => $path));
    if ($upload_handler->uploadedFile instanceof erLhcoreClassModelChatFile) {
        erLhcoreClassChatEventDispatcher::getInstance()->dispatch('file.uploadfile.file_store', array('chat_file' => $upload_handler->uploadedFile));
    }
    echo json_encode(array('error' => 'false'));
}
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:15,代码来源:uploadfileonline.php


示例18: explode

    ?>

<?php 
    $canListOnlineUsers = false;
    $canListOnlineUsersAll = false;
    $currentUser = erLhcoreClassUser::instance();
    if (erLhcoreClassModelChatConfig::fetch('list_online_operators')->current_value == 1) {
        $canListOnlineUsers = $currentUser->hasAccessTo('lhuser', 'userlistonline');
        $canListOnlineUsersAll = $currentUser->hasAccessTo('lhuser', 'userlistonlineall');
    }
    $canseedepartmentstats = $currentUser->hasAccessTo('lhuser', 'canseedepartmentstats');
    $pendingTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_pending_list', 1);
    $activeTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_active_list', 1);
    $closedTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_close_list', 0);
    $unreadTabEnabled = erLhcoreClassModelUserSetting::getSetting('enable_unread_list', 1);
    $frontTabsOrder = explode(',', erLhcoreClassModelChatConfig::fetch('front_tabs')->current_value);
    ?>
 
<?php 
    include erLhcoreClassDesign::designtpl('lhchat/onlineusers/online_settings_general.tpl.php');
    ?>

<div ng-controller="OnlineCtrl as online" ng-init='groupByField = <?php 
    echo json_encode($ogroupBy);
    ?>
;online.maxRows=<?php 
    echo (int) $omaxRows;
    ?>
;online.updateTimeout=<?php 
    echo (int) $oupdTimeout;
    ?>
开发者ID:haithamsaadoon,项目名称:el,代码行数:31,代码来源:default.tpl.php


示例19: htmlspecialchars

        $tosVariable = 'offline_tos_visible_in_page_widget';
        $tosCheckedVariable = 'tos_checked_offline';
        ?>
	<?php 
        include_once erLhcoreClassDesign::designtpl('lhchat/part/accept_tos.tpl.php');
        ?>

	<div class="btn-group" role="group" aria-label="...">
  		<?php 
        include erLhcoreClassDesign::designtpl('lhchat/part/buttons/leave_a_message_button_widget.tpl.php');
        ?>
  		<?php 
        include erLhcoreClassDesign::designtpl('lhchat/part/offline_button_multiinclude.tpl.php');
        ?>
		<?php 
        if (erLhcoreClassModelChatConfig::fetch('reopen_chat_enabled')->current_value == 1 && ($reopenData = erLhcoreClassChat::canReopenDirectly(array('reopen_closed' => erLhcoreClassModelChatConfig::fetch('allow_reopen_closed')->current_value))) !== false) {
            ?>
		    <?php 
            include erLhcoreClassDesign::designtpl('lhchat/part/buttons/reopen_offline_button_widget.tpl.php');
            ?>
	  	<?php 
        }
        ?>
	</div>
	
	<input type="hidden" value="<?php 
        echo htmlspecialchars($referer);
        ?>
" name="URLRefer"/>
	<input type="hidden" value="1" name="StartChat"/>
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:30,代码来源:offline_form.tpl.php


示例20: foreach

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhchat/listchatconfig.tpl.php');
if ($currentUser->hasAccessTo('lhchat', 'administrateconfig')) {
    if (isset($_POST['UpdateConfig'])) {
        foreach (erLhcoreClassModelChatConfig::getItems() as $item) {
            $ConfigData = erLhcoreClassModelChatConfig::fetch($item->identifier);
            switch ($ConfigData->type) {
                case erLhcoreClassModelChatConfig::SITE_ACCESS_PARAM_ON:
                    $data = array();
                    foreach (erConfigClassLhConfig::getInstance()->getSetting('site', 'available_site_access') as $siteaccess) {
                        $data[$siteaccess] = $_POST[$item->identifier . 'Value' . $siteaccess];
                    }
                    $ConfigData->value = serialize($data);
                    break;
                case erLhcoreClassModelChatConfig::SITE_ACCESS_PARAM_OFF:
                    $ConfigData->value = isset($_POST[$item->identifier . 'ValueParam']) ? $_POST[$item->identifier . 'ValueParam'] : 0;
                    break;
                default:
                    break;
            }
            $ConfigData->saveThis();
        }
        // Cleanup cache to recompile templates etc.
        $CacheManager = erConfigClassLhCacheConfig::getInstance();
        $CacheManager->expireCache();
        $tpl->set('updated', 'done');
    }
}
$tpl->set('currentUser', $currentUser);
$Result['content'] = $tpl->fetch();
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:listchatconfig.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP erLhcoreClassModelChatOnlineUser类代码示例发布时间:2022-05-23
下一篇:
PHP erLhcoreClassModelChat类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap