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

PHP erLhcoreClassModule类代码示例

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

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



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

示例1: publishXMPPAccount

 /**
  * At the moment it just stores an account. In the future there will be a call to create an account in xmpp server using NodeJS extension
  * @param erLhcoreClassModelXMPPAccount $xmppAccount
  */
 public static function publishXMPPAccount(erLhcoreClassModelXMPPAccount &$xmppAccount)
 {
     if ($xmppAccount->id == 0) {
         erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionXmppservice')->registerOperator($xmppAccount);
     } elseif ($xmppAccount->password != '') {
         erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionXmppservice')->changeOperatorPassword($xmppAccount);
     }
     // We do not store operators passwords because we do not need them
     if ($xmppAccount->type == erLhcoreClassModelXMPPAccount::USER_TYPE_OPERATOR) {
         $xmppAccount->password = '';
     }
     $xmppAccount->saveThis();
 }
开发者ID:noikiy,项目名称:xmpp-chat,代码行数:17,代码来源:erlhcoreclassxmppaccountvalidator.php


示例2: __get

 public function __get($var)
 {
     switch ($var) {
         case 'ctime_front':
             $this->ctime_front = date('Ymd') == date('Ymd', $this->ctime) ? date(erLhcoreClassModule::$dateHourFormat, $this->ctime) : date(erLhcoreClassModule::$dateDateHourFormat, $this->ctime);
             return $this->ctime_front;
             break;
         case 'lactivity_front':
             $this->lactivity_front = date('Ymd') == date('Ymd', $this->lactivity) ? date(erLhcoreClassModule::$dateHourFormat, $this->lactivity) : date(erLhcoreClassModule::$dateDateHourFormat, $this->lactivity);
             return $this->lactivity_front;
             break;
         case 'user':
             $this->user = false;
             if ($this->user_id > 0) {
                 try {
                     $this->user = erLhcoreClassModelUser::fetch($this->user_id, true);
                 } catch (Exception $e) {
                     $this->user = false;
                 }
             }
             return $this->user;
             break;
         case 'username_plain':
             list($this->username_plain) = explode('@', $this->username);
             return $this->username_plain;
             break;
         case 'username_plain_edit':
             list($this->username_plain_edit) = explode('@', $this->username);
             $subdomain = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionXmppservice')->settings['subdomain'];
             if ($subdomain != '') {
                 $this->username_plain_edit = $this->str_lreplace('.' . $subdomain, '', $this->username_plain_edit);
             }
             return $this->username_plain_edit;
             break;
         default:
             break;
     }
 }
开发者ID:noikiy,项目名称:xmpp-chat,代码行数:38,代码来源:erlhcoreclassmodelxmppaccount.php


示例3: paidChatWorkflow

 /**
  * Executes paid chat workflow
  * */
 public static function paidChatWorkflow($params)
 {
     $paidchatData = erLhcoreClassModelChatConfig::fetch('paidchat_data');
     $data = (array) $paidchatData->data;
     $mode = isset($params['mode']) ? $params['mode'] : 'chatwidgetchat';
     if (isset($data['paidchat_enabled']) && $data['paidchat_enabled'] == 1) {
         $secretHash = $data['paidchat_secret_hash'];
         $hashVerify = sha1($secretHash . sha1($secretHash . $params['uparams']['phash']));
         if ($hashVerify == $params['uparams']['pvhash']) {
             $chatExisting = erLhcoreClassModelChatPaid::findOne(array('filter' => array('hash' => $params['uparams']['phash'])));
             if ($chatExisting instanceof erLhcoreClassModelChatPaid) {
                 if ($chatExisting->chat_id > 0 && $chatExisting->chat instanceof erLhcoreClassModelChat) {
                     if ($chatExisting->chat->status == erLhcoreClassModelChat::STATUS_CLOSED_CHAT) {
                         if (isset($data['paidchat_read_denied']) && $data['paidchat_read_denied'] == 1) {
                             erLhcoreClassModule::redirect('paidchat/expiredchat', '/' . $chatExisting->id . '/(mode)/widget' . $params['append_mode'] . '/(pchat)/' . $chatExisting->id);
                         } else {
                             erLhcoreClassModule::redirect('chat/' . $mode, '/' . $chatExisting->chat->id . '/' . $chatExisting->chat->hash . '/(mode)/widget' . $params['append_mode'] . '/(pchat)/' . $chatExisting->id);
                         }
                         exit;
                     } else {
                         erLhcoreClassModule::redirect('chat/' . $mode, '/' . $chatExisting->chat->id . '/' . $chatExisting->chat->hash . '/(mode)/widget' . $params['append_mode'] . '/(pchat)/' . $chatExisting->id);
                         exit;
                     }
                 } elseif ($chatExisting->chat_id > 0) {
                     erLhcoreClassModule::redirect('paidchat/removedpaidchat');
                     exit;
                 }
             } else {
                 return array('need_store' => true, 'hash' => $params['uparams']['phash']);
             }
         } else {
             erLhcoreClassModule::redirect('paidchat/invalidhash', '/' . $chatExisting->chat->id . '/' . $chatExisting->chat->hash);
             exit;
         }
     }
     return array('need_store' => false);
 }
开发者ID:detain,项目名称:livehelperchat,代码行数:40,代码来源:lhchatpaid.php


示例4: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhchat/geoadjustment.tpl.php');
$geoData = erLhcoreClassModelChatConfig::fetch('geoadjustment_data');
$data = (array) $geoData->data;
if (isset($_POST['SaveGeoAdjustment'])) {
    $definition = array('use_geo_adjustment' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean'), 'AvailableFor' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'OtherCountries' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'HideFor' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'OtherStatus' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'RestStatus' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'ApplyWidget' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean'));
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('xmp/configuration');
        exit;
    }
    $Errors = array();
    $form = new ezcInputForm(INPUT_POST, $definition);
    $Errors = array();
    if ($form->hasValidData('use_geo_adjustment')) {
        $data['use_geo_adjustment'] = true;
    } else {
        $data['use_geo_adjustment'] = false;
    }
    if ($data['use_geo_adjustment']) {
        if ($form->hasValidData('AvailableFor')) {
            $data['available_for'] = $form->AvailableFor;
        } else {
            $data['available_for'] = '';
        }
        if ($form->hasValidData('OtherCountries')) {
            $data['other_countries'] = $form->OtherCountries;
        } else {
            $data['other_countries'] = '';
        }
        if ($form->hasValidData('HideFor')) {
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:geoadjustment.php


示例5: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhtheme/import.tpl.php');
if (ezcInputForm::hasPostData()) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('theme/import');
        exit;
    }
    if (erLhcoreClassSearchHandler::isFile('themefile', array('json'))) {
        $dir = 'var/tmpfiles/';
        erLhcoreClassChatEventDispatcher::getInstance()->dispatch('theme.temppath', array('dir' => &$dir));
        erLhcoreClassFileUpload::mkdirRecursive($dir);
        $filename = erLhcoreClassSearchHandler::moveUploadedFile('themefile', $dir);
        $content = file_get_contents($dir . $filename);
        unlink($dir . $filename);
        $data = json_decode($content);
        if ($data !== null) {
            $widgetTheme = new erLhAbstractModelWidgetTheme();
            $data = (array) $data;
            $imgData = array();
            if (isset($data['logo_image_data'])) {
                $imgData['logo_image'] = $data['logo_image_data'];
                unset($data['logo_image_data']);
            }
            if (isset($data['need_help_image_data'])) {
                $imgData['need_help_image'] = $data['need_help_image_data'];
                unset($data['need_help_image_data']);
            }
            if (isset($data['online_image_data'])) {
                $imgData['online_image'] = $data['online_image_data'];
                unset($data['online_image_data']);
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:31,代码来源:import.php


示例6: array

        $Errors[] = 'Please enter valid date';
    }
    if ($form->hasValidData('AttrInt1')) {
        $Instance->attr_int_1 = $form->AttrInt1;
    }
    if ($form->hasValidData('AttrInt2')) {
        $Instance->attr_int_2 = $form->AttrInt2;
    }
    if ($form->hasValidData('AttrInt3')) {
        $Instance->attr_int_3 = $form->AttrInt3;
    }
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('instance/list');
        exit;
    }
    if (count($Errors) == 0) {
        $Instance->saveThis();
        if (isset($_POST['Save_departament'])) {
            erLhcoreClassModule::redirect('instance/list');
            exit;
        } else {
            $tpl->set('updated', true);
        }
    } else {
        $tpl->set('errors', $Errors);
    }
}
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('instance.editinstance', array('instance' => &$Instance));
$tpl->set('instance', $Instance);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('system/configuration'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit', 'System configuration')), array('url' => erLhcoreClassDesign::baseurl('instance/list'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('instance/edit', 'Instances')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('instance/edit', 'Edit instance') . ' - ' . $Instance->address));
开发者ID:jabaxalapa,项目名称:automated-hosting,代码行数:31,代码来源:edit.php


示例7: rawurlencode

    $redirectFull = $redirect != '' ? '/(r)/' . rawurlencode($redirect) : '';
    header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin/user/login') . $redirectFull);
    exit;
}
$tpl = erLhcoreClassTemplate::getInstance('lhuser/login.tpl.php');
$redirect = '';
if (isset($_POST['redirect'])) {
    $redirect = $_POST['redirect'];
    $tpl->set('redirect_url', $redirect);
} else {
    $redirect = rawurldecode($Params['user_parameters_unordered']['r']);
    $tpl->set('redirect_url', $redirect);
}
if (isset($_POST['Login'])) {
    if (!$currentUser->authenticate($_POST['Username'], $_POST['Password'], isset($_POST['rememberMe']) && $_POST['rememberMe'] == 1 ? true : false)) {
        $Error = erTranslationClassLhTranslation::getInstance()->getTranslation('user/login', 'Incorrect username or password');
        $tpl->set('errors', array($Error));
    } else {
        if ($redirect != '') {
            erLhcoreClassModule::redirect(base64_decode($redirect));
        } else {
            erLhcoreClassModule::redirect();
            exit;
        }
    }
}
$pagelayout = erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'login_pagelayout');
if ($pagelayout != null) {
    $Result['pagelayout'] = 'login';
}
$Result['content'] = $tpl->fetch();
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:login.php


示例8: time

                    erLhcoreClassChat::getSession()->save($msg);
                }
            }
        }
        // Set chat attributes for transfer workflow logic
        if ($chat->department !== false && $chat->department->department_transfer_id > 0) {
            $chat->transfer_if_na = 1;
            $chat->transfer_timeout_ts = time();
            $chat->transfer_timeout_ac = $chat->department->transfer_timeout;
        }
        $chat->last_msg_id = $msg->id;
        $chat->last_user_msg_time = time();
        $chat->saveThis();
        erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.chat_started', array('chat' => &$chat));
        // Redirect user
        erLhcoreClassModule::redirect('chat/chatwidgetchat/' . $chat->id . '/' . $chat->hash . $modeAppendTheme . '/(cstarted)/chat_started_by_invitation_cb');
        exit;
    } else {
        $tpl->set('errors', $Errors);
    }
}
// User this only if not post
if (!ezcInputForm::hasPostData()) {
    $definition = array('name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'value' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'type' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'size' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'req' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'sh' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'hattr' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY));
    $form = new ezcInputForm(INPUT_GET, $definition);
    if ($form->hasValidData('name') && !empty($form->name)) {
        $inputData->name_items = $form->name;
    }
    if ($form->hasValidData('sh') && !empty($form->sh)) {
        $inputData->value_show = $form->sh;
    }
开发者ID:p4prawin,项目名称:livechat,代码行数:31,代码来源:readoperatormessage.php


示例9: die

$tpl = erLhcoreClassTemplate::getInstance('lhform/collected.tpl.php');
$form = erLhAbstractModelForm::fetch((int) $Params['user_parameters']['form_id']);
if (is_numeric($Params['user_parameters_unordered']['id']) && $Params['user_parameters_unordered']['action'] == 'delete') {
    // Delete selected canned message
    try {
        if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'])) {
            die('Invalid CSRF Token');
            exit;
        }
        $collected = erLhAbstractModelFormCollected::fetch((int) $Params['user_parameters_unordered']['id']);
        $collected->removeThis();
    } catch (Exception $e) {
        // Do nothing
    }
    erLhcoreClassModule::redirect('form/collected', '/' . $form->id);
    exit;
}
$pages = new lhPaginator();
$pages->serverURL = erLhcoreClassDesign::baseurl('form/collected') . '/' . $form->id;
$pages->items_total = erLhAbstractModelFormCollected::getCount(array('filter' => array('form_id' => $form->id)));
$pages->setItemsPerPage(20);
$pages->paginate();
$items = array();
if ($pages->items_total > 0) {
    $items = erLhAbstractModelFormCollected::getList(array('filter' => array('form_id' => $form->id), 'offset' => $pages->low, 'limit' => $pages->items_per_page, 'sort' => 'id DESC'));
}
$tpl->set('items', $items);
$tpl->set('pages', $pages);
$tpl->set('form', $form);
$Result['content'] = $tpl->fetch();
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:30,代码来源:collected.php


示例10: die

        }
        if (count($Errors) == 0) {
            $cannedMessage->msg = $form->Message;
            $cannedMessage->user_id = $UserData->id;
            $cannedMessage->saveThis();
            $tpl->set('updated_canned', true);
        } else {
            $tpl->set('errors_canned', $Errors);
        }
    }
    /**
     * Delete canned message
     * */
    if (is_numeric($Params['user_parameters_unordered']['msg']) && $Params['user_parameters_unordered']['action'] == 'delete') {
        if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'])) {
            die('Invalid CSRF Token');
            exit;
        }
        try {
            $cannedToDelete = erLhcoreClassModelCannedMsg::fetch($Params['user_parameters_unordered']['msg']);
            if ($cannedToDelete->user_id == $UserData->id) {
                $cannedToDelete->removeThis();
            }
        } catch (Exception $e) {
        }
        erLhcoreClassModule::redirect('user/account', '#canned');
        exit;
    }
    $tpl->set('canned_msg', $cannedMessage);
}
$Result['content'] = $tpl->fetch();
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:account.php


示例11: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhdocshare/edit.tpl.php');
$docShare = erLhcoreClassModelDocShare::fetch($Params['user_parameters']['id']);
if (isset($_POST['Update'])) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect();
        exit;
    }
    $Errors = erLhcoreClassDocShare::validateDocShare($docShare);
    if (count($Errors) == 0) {
        $docShare->saveThis();
        erLhcoreClassDocShare::makeConversion($docShare);
        $tpl->set('updated', true);
    } else {
        $tpl->set('errors', $Errors);
    }
}
if (isset($_POST['Cancel'])) {
    erLhcoreClassModule::redirect('docshare/list');
    exit;
}
$tpl->set('docshare', $docShare);
$docSharer = erLhcoreClassModelChatConfig::fetch('doc_sharer');
$data = (array) $docSharer->data;
$tpl->set('share_data', $data);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('docshare/index'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('docshare/index', 'Documents sharer')), array('url' => erLhcoreClassDesign::baseurl('docshare/list'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('docshare/list', 'Documents list')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('docshare/edit', 'Document edit')));
开发者ID:Topspot,项目名称:livehelperchat,代码行数:28,代码来源:edit.php


示例12: time

            }
        } else {
            $chat->status_sub = erLhcoreClassModelChat::STATUS_SUB_START_ON_KEY_UP;
        }
        // Set chat attributes for transfer workflow logic
        if ($chat->department !== false && $chat->department->department_transfer_id > 0) {
            $chat->transfer_if_na = 1;
            $chat->transfer_timeout_ts = time();
            $chat->transfer_timeout_ac = $chat->department->transfer_timeout;
        }
        $chat->last_msg_id = $msg->id;
        $chat->last_user_msg_time = time();
        $chat->saveThis();
        erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.chat_started', array('chat' => &$chat, 'msg' => $messageInitial));
        erLhcoreClassChat::updateDepartmentStats($chat->department);
        $Result = erLhcoreClassModule::reRun(erLhcoreClassDesign::baseurlRerun('chat/chatwidgetchat') . '/' . $chat->id . '/' . $chat->hash . $modeAppendTheme . '/(cstarted)/chat_started_by_invitation_cb');
        return true;
    } else {
        $tpl->set('errors', $Errors);
    }
}
$tpl->set('start_data_fields', $startDataFields);
// User this only if not post
if (!ezcInputForm::hasPostData()) {
    $definition = array('name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'value' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'type' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'size' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'req' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'sh' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'hattr' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'value_items_admin' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'via_hidden' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY));
    $form = new ezcInputForm(INPUT_GET, $definition);
    if ($form->hasValidData('name') && !empty($form->name)) {
        $inputData->name_items = $form->name;
    }
    if ($form->hasValidData('sh') && !empty($form->sh)) {
        $inputData->value_show = $form->sh;
开发者ID:remdex,项目名称:livehelperchat,代码行数:31,代码来源:readoperatormessage.php


示例13: array

                    erLhcoreClassChat::getSession()->save($msg);
                    if ($chat->last_msg_id < $msg->id) {
                        $chat->last_msg_id = $msg->id;
                    }
                }
                erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.auto_responder_triggered', array('chat' => &$chat));
                $chat->saveThis();
            }
            erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.chat_started', array('chat' => &$chat, 'msg' => $messageInitial));
            erLhcoreClassChat::updateDepartmentStats($chat->department);
            // Paid chat settings
            if (isset($paidChatSettings)) {
                erLhcoreClassChatPaid::processPaidChatWorkflow(array('chat' => $chat, 'paid_chat_params' => $paidChatSettings));
            }
            // Redirect user
            erLhcoreClassModule::redirect('chat/chat/' . $chat->id . '/' . $chat->hash . $themeAppend);
            exit;
        }
    } else {
        // Show errors only if user is not switching form mode
        if ($Params['user_parameters_unordered']['switchform'] != 'true' && !isset($_POST['switchLang'])) {
            $tpl->set('errors', $Errors);
        }
    }
}
$tpl->set('start_data_fields', $startDataFields);
$definition = array('name' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'value' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'type' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'size' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'req' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'sh' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'hattr' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string', null, FILTER_REQUIRE_ARRAY), 'value_items_admin' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'via_hidden' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'encattr' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY), 'via_encrypted' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw', null, FILTER_REQUIRE_ARRAY));
$form = new ezcInputForm(INPUT_GET, $definition);
if ($form->hasValidData('name') && !empty($form->name)) {
    $inputData->name_items = $form->name;
}
开发者ID:keenick,项目名称:livehelperchat,代码行数:31,代码来源:startchat.php


示例14: die

<?php

if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'])) {
    die('Invalid CSFR Token');
    exit;
}
$question = erLhcoreClassQuestionary::getSession()->load('erLhcoreClassModelQuestion', $Params['user_parameters']['id']);
$question->removeThis();
erLhcoreClassModule::redirect('questionary/list');
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:10,代码来源:delete.php


示例15: die

<?php

if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'])) {
    die('Invalid CSFR Token');
    exit;
}
$question = erLhcoreClassModelQuestionOption::fetch((int) $Params['user_parameters']['id']);
$question->removeThis();
erLhcoreClassModule::redirect('questionary/edit', "/{$question->question_id}/(tab)/voting");
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:10,代码来源:deleteoption.php


示例16: time

            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);
            exit;
        } else {
            // Redirect user
            erLhcoreClassModule::redirect('chat/chat', '/' . $chat->id . '/' . $chat->hash . $modeAppendTheme);
            exit;
        }
    } else {
        header('Location: ' . $_SERVER['HTTP_REFERER']);
        exit;
    }
} catch (Exception $e) {
    header('Location: ' . $_SERVER['HTTP_REFERER']);
    exit;
}
exit;
开发者ID:detain,项目名称:livehelperchat,代码行数:31,代码来源:reopen.php


示例17: 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


示例18: array

    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token']) || !$currentUser->hasAccessTo('lhdepartament', 'delete') || !$Departament->can_delete) {
        erLhcoreClassModule::redirect('departament/departaments');
        exit;
    }
    $Departament->removeThis();
    erLhcoreClassModule::redirect('departament/departaments');
    exit;
}
if (isset($_POST['Update_departament']) || isset($_POST['Save_departament'])) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('departament/departaments');
        exit;
    }
    $Errors = erLhcoreClassDepartament::validateDepartment($Departament);
    if (count($Errors) == 0) {
        erLhcoreClassDepartament::getSession()->update($Departament);
        if (isset($_POST['Save_departament'])) {
            erLhcoreClassModule::redirect('departament/departaments');
            exit;
        } else {
            $tpl->set('updated', true);
        }
    } else {
        $tpl->set('errors', $Errors);
    }
}
$tpl->set('departament', $Departament);
$tpl->set('currentUser', $currentUser);
$tpl->set('limitDepartments', $userDepartments !== true ? array('filterin' => array('id' => $userDepartments)) : array());
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('system/configuration'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit', 'System configuration')), array('url' => erLhcoreClassDesign::baseurl('departament/departaments'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit', 'departments')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit', 'Edit a department') . ' - ' . $Departament->name));
开发者ID:sajawalsz,项目名称:WebDealerSolutions,代码行数:31,代码来源:edit.php


示例19: erLhcoreClassModelmsg

             if ($responder->wait_message != '') {
                 $msg = new erLhcoreClassModelmsg();
                 $msg->msg = trim($responder->wait_message);
                 $msg->chat_id = $chat->id;
                 $msg->name_support = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/startchat', 'Live Support');
                 $msg->user_id = 1;
                 $msg->time = time() + 5;
                 erLhcoreClassChat::getSession()->save($msg);
                 if ($chat->last_msg_id < $msg->id) {
                     $chat->last_msg_id = $msg->id;
                 }
             }
             $chat->saveThis();
         }
         // Redirect user
         erLhcoreClassModule::redirect('chat/chatwidgetchat', '/' . $chat->id . '/' . $chat->hash . $modeAppend . '/(cstarted)/online_chat_started_cb');
         flush();
         session_write_close();
         if (function_exists('fastcgi_finish_request')) {
             fastcgi_finish_request();
         }
         erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.chat_started', array('chat' => &$chat));
         exit;
     }
 } else {
     // Show errors only if user is not switching form mode and not swithing language
     if ($Params['user_parameters_unordered']['switchform'] != 'true' && !isset($_POST['switchLang'])) {
         $tpl->set('errors', $Errors);
     } elseif (isset($_POST['switchLang'])) {
         $Result['additional_post_message'] = 'lhc_lang:' . erLhcoreClassSystem::instance()->WWWDirLang;
     }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:31,代码来源:chatwidget.php


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP erLhcoreClassRenderHelper类代码示例发布时间:2022-05-23
下一篇:
PHP erLhcoreClassModelUserSetting类代码示例发布时间: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