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


PHP erLhcoreClassChat::isOnline方法代码示例

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


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

示例1: __get

 public function __get($var)
 {
     switch ($var) {
         case 'is_online':
             $this->is_online = erLhcoreClassChat::isOnline($this->id);
             return $this->is_online;
             break;
         case 'is_online_exclipic':
             $this->is_online_exclipic = erLhcoreClassChat::isOnline($this->id, true);
             return $this->is_online_exclipic;
             break;
         case 'inform_options_array':
             $this->inform_options_array = $this->inform_options != '' ? unserialize($this->inform_options) : array();
             return $this->inform_options_array;
             break;
         case 'can_delete':
             $this->can_delete = erLhcoreClassChat::getCount(array('filter' => array('dep_id' => $this->id))) == 0;
             return $this->can_delete;
             break;
         case 'department_transfer':
             $this->department_transfer = false;
             if ($this->department_transfer_id > 0) {
                 try {
                     $this->department_transfer = self::fetch($this->department_transfer_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->department_transfer;
             break;
         case 'start_hour_front':
             return floor($this->start_hour / 100);
             break;
         case 'start_minutes_front':
             return $this->start_hour - $this->start_hour_front * 100;
             break;
         case 'end_hour_front':
             return floor($this->end_hour / 100);
             break;
         case 'end_minutes_front':
             return $this->end_hour - $this->end_hour_front * 100;
             break;
         default:
             break;
     }
 }
开发者ID:detain,项目名称:livehelperchat,代码行数:45,代码来源:erlhcoreclassmodeldepartament.php

示例2: htmlspecialchars

        include erLhcoreClassDesign::designtpl('lhchat/getstatus/widget_geo_adjustment.tpl.php');
        if ($exitTemplate == true) {
            return;
        }
        ?>

<?php 
        if (isset($errors)) {
            ?>
		<?php 
            include erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php');
        }
        ?>

<?php 
        if ($leaveamessage == false || ($forceoffline === false && erLhcoreClassChat::isOnline($department, false, array('ignore_user_status' => (int) erLhcoreClassModelChatConfig::fetch('ignore_user_status')->current_value, 'online_timeout' => (int) erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']))) === true) {
            ?>

<h4><?php 
            echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/startchat', 'Fill out this form to start a chat');
            ?>
</h4>

<form id="form-start-chat" method="post" action="<?php 
            echo erLhcoreClassDesign::baseurl('chat/startchat');
            $department !== false ? print '/(department)/' . $department : '';
            $input_data->priority !== false ? print '/(priority)/' . $input_data->priority : '';
            $input_data->vid !== false ? print '/(vid)/' . htmlspecialchars($input_data->vid) : '';
            $input_data->hash_resume !== false ? print '/(hash_resume)/' . htmlspecialchars($input_data->hash_resume) : '';
            echo $append_mode_theme;
            ?>
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:31,代码来源:startchat.tpl.php

示例3: time

             $msg->chat_id = $chat->id;
             $msg->user_id = -1;
             $msg->time = time();
             erLhcoreClassChat::getSession()->save($msg);
             // We do not store last msg time for chat here, because in any case none of opeators has opened it
             $contactRedirected = true;
             if ($chat->status_sub != erLhcoreClassModelChat::STATUS_SUB_CONTACT_FORM) {
                 $chat->status_sub = erLhcoreClassModelChat::STATUS_SUB_CONTACT_FORM;
                 $chat->updateThis();
             }
         } else {
             erLhcoreClassChatWorkflow::autoAssign($chat, $department);
         }
     }
 }
 if (erLhcoreClassChat::isOnline($chat->dep_id, false, array('online_timeout' => (int) erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']))) {
     $tpl->set('is_online', true);
 } else {
     $tpl->set('is_online', false);
 }
 if ($chat->chat_initiator == erLhcoreClassModelChat::CHAT_INITIATOR_PROACTIVE) {
     $tpl->set('is_proactive_based', true);
 } else {
     $tpl->set('is_proactive_based', false);
 }
 if ($chat->status == erLhcoreClassModelChat::STATUS_ACTIVE_CHAT) {
     $activated = 'true';
     $tpl->set('is_activated', true);
     $ott = $chat->user !== false ? $chat->user->name_support . ' ' . erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'is typing now...') : erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'Operator is typing now...');
 } else {
     $tpl->set('is_activated', false);
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:31,代码来源:checkchatstatus.php

示例4: __get

 public function __get($var)
 {
     switch ($var) {
         case 'is_online':
             $this->is_online = erLhcoreClassChat::isOnline($this->id);
             return $this->is_online;
             break;
         case 'is_online_exclipic':
             $this->is_online_exclipic = erLhcoreClassChat::isOnline($this->id, true);
             return $this->is_online_exclipic;
             break;
         case 'inform_options_array':
             $this->inform_options_array = $this->inform_options != '' ? unserialize($this->inform_options) : array();
             return $this->inform_options_array;
             break;
         case 'can_delete':
             $this->can_delete = erLhcoreClassChat::getCount(array('filter' => array('dep_id' => $this->id))) == 0;
             return $this->can_delete;
             break;
         case 'department_transfer':
             $this->department_transfer = false;
             if ($this->department_transfer_id > 0) {
                 try {
                     $this->department_transfer = self::fetch($this->department_transfer_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->department_transfer;
             break;
         case 'start_hour_front':
             return floor($this->start_hour / 100);
             break;
         case 'start_minutes_front':
             return $this->start_hour - $this->start_hour_front * 100;
             break;
         case 'end_hour_front':
             return floor($this->end_hour / 100);
             break;
         case 'end_minutes_front':
             return $this->end_hour - $this->end_hour_front * 100;
             break;
         case 'mod_start_hour_front':
         case 'tud_start_hour_front':
         case 'wed_start_hour_front':
         case 'thd_start_hour_front':
         case 'frd_start_hour_front':
         case 'sad_start_hour_front':
         case 'sud_start_hour_front':
             $startHourName = str_replace('_start_hour_front', '', $var) . '_start_hour';
             return $this->{$startHourName} != -1 ? floor($this->{$startHourName} / 100) : '';
             break;
         case 'mod_start_minutes_front':
         case 'tud_start_minutes_front':
         case 'wed_start_minutes_front':
         case 'thd_start_minutes_front':
         case 'frd_start_minutes_front':
         case 'sad_start_minutes_front':
         case 'sud_start_minutes_front':
             $startHourName = str_replace('_start_minutes_front', '', $var) . '_start_hour';
             $startHourFrontName = str_replace('_start_minutes_front', '', $var) . '_start_hour_front';
             return $this->{$startHourName} != -1 ? $this->{$startHourName} - $this->{$startHourFrontName} * 100 : '';
             break;
         case 'mod_end_hour_front':
         case 'tud_end_hour_front':
         case 'wed_end_hour_front':
         case 'thd_end_hour_front':
         case 'frd_end_hour_front':
         case 'sad_end_hour_front':
         case 'sud_end_hour_front':
             $endHourName = str_replace('_end_hour_front', '', $var) . '_end_hour';
             return $this->{$endHourName} != -1 ? floor($this->{$endHourName} / 100) : '';
             break;
         case 'mod_end_minutes_front':
         case 'tud_end_minutes_front':
         case 'wed_end_minutes_front':
         case 'thd_end_minutes_front':
         case 'frd_end_minutes_front':
         case 'sad_end_minutes_front':
         case 'sud_end_minutes_front':
             $endHourName = str_replace('_end_minutes_front', '', $var) . '_end_hour';
             $endHourFrontName = str_replace('_end_minutes_front', '', $var) . '_end_hour_front';
             return $this->{$endHourName} != -1 ? $this->{$endHourName} - $this->{$endHourFrontName} * 100 : '';
             break;
         default:
             break;
     }
 }
开发者ID:remdex,项目名称:livehelperchat,代码行数:87,代码来源:erlhcoreclassmodeldepartament.php

示例5: 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');
$json = json_encode(array('isonline' => erLhcoreClassChat::isOnline((int) $Params['user_parameters']['department_id'], true, array('online_timeout' => (int) erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']))));
if (isset($_GET['callback'])) {
    echo $_GET['callback'] . '(' . $json . ')';
} else {
    echo $json;
}
exit;
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:12,代码来源:isonlinedepartment.php

示例6: htmlspecialchars

    
    <select class="form-control" name="DepartamentID" id="id_DepartamentID">
        <?php 
    if (isset($theme) && $theme !== false && $theme->department_select != '') {
        ?>
            <option value="-1"><?php 
        echo htmlspecialchars($theme->department_select);
        ?>
</option>
        <?php 
    }
    ?>
        <?php 
    $departments = erLhcoreClassDepartament::sortByStatus($departments);
    foreach ($departments as $departament) {
        $isOnline = erLhcoreClassChat::isOnline($departament->id, false, array('ignore_user_status' => (int) erLhcoreClassModelChatConfig::fetch('ignore_user_status')->current_value, 'online_timeout' => (int) erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']));
        ?>
            <?php 
        if ($departament->visible_if_online == 1 && $isOnline === true || $departament->visible_if_online == 0) {
            ?>
            <option data-attr-online="<?php 
            if ($isOnline === false) {
                ?>
false<?php 
            } else {
                ?>
true<?php 
            }
            ?>
" <?php 
            if ($isOnline === false) {
开发者ID:AaronLuo3296,项目名称:livehelperchat,代码行数:30,代码来源:department.tpl.php

示例7: 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');
$json = json_encode(array('isonline' => erLhcoreClassChat::isOnline(false, false, array('online_timeout' => (int) erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']))));
if (isset($_GET['callback'])) {
    echo $_GET['callback'] . '(' . $json . ')';
} else {
    echo $json;
}
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:12,代码来源:isonline.php

示例8: 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');
erLhcoreClassRestAPIHandler::outputResponse(array('isonline' => erLhcoreClassChat::isOnline(false, false, array('online_timeout' => (int) erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['online_timeout']))));
exit;
开发者ID:detain,项目名称:livehelperchat,代码行数:7,代码来源:isonline.php


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