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


PHP erLhcoreClassTemplate::getInstance方法代码示例

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


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

示例1: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhsystem/timezone.tpl.php');
$cfgSite = erConfigClassLhConfig::getInstance();
$timezone = $cfgSite->getSetting('site', 'time_zone');
$date_format = $cfgSite->getSetting('site', 'date_format');
$date_hour_format = $cfgSite->getSetting('site', 'date_hour_format');
$date_date_hour_format = $cfgSite->getSetting('site', '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')) {
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:31,代码来源:timezone.php

示例2: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhdocshare/configuration.tpl.php');
$docSharer = erLhcoreClassModelChatConfig::fetch('doc_sharer');
$data = (array) $docSharer->data;
if (isset($_POST['StoreConfiguration'])) {
    $definition = array('LibreOfficePath' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'SupportedExtensions' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'PdftoppmPath' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'HttpUserName' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'HttpGroupName' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'BackgroundProcess' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean'), 'MaxFileSize' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 2)), 'PdftoppmLimit' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 0)));
    $Errors = array();
    $form = new ezcInputForm(INPUT_POST, $definition);
    $Errors = array();
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('docshare/configuration');
        exit;
    }
    if ($form->hasValidData('LibreOfficePath')) {
        $data['libre_office_path'] = $form->LibreOfficePath;
    } else {
        $data['libre_office_path'] = '/usr/bin/libreoffice';
    }
    if ($form->hasValidData('PdftoppmPath')) {
        $data['pdftoppm_path'] = $form->PdftoppmPath;
    } else {
        $data['pdftoppm_path'] = '/usr/bin/pdftoppm';
    }
    if ($form->hasValidData('PdftoppmLimit')) {
        $data['pdftoppm_limit'] = $form->PdftoppmLimit;
    } else {
        $data['pdftoppm_limit'] = '0';
    }
    if ($form->hasValidData('HttpUserName')) {
        $data['http_user_name'] = $form->HttpUserName;
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:configuration.php

示例3: header

<?php

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
header('Content-type: text/javascript');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time() + 60 * 60 * 8) . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
$tpl = erLhcoreClassTemplate::getInstance('lhchat/chatcheckstatus.tpl.php');
if (is_array($Params['user_parameters_unordered']['department'])) {
    erLhcoreClassChat::validateFilterIn($Params['user_parameters_unordered']['department']);
    $tpl->set('department', implode('/', $Params['user_parameters_unordered']['department']));
    $tpl->set('department_array', $Params['user_parameters_unordered']['department']);
} else {
    $tpl->set('department', false);
    $tpl->set('department_array', false);
}
$tpl->set('status', $Params['user_parameters_unordered']['status'] == 'true' ? true : false);
if (erLhcoreClassModelChatConfig::fetch('track_is_online')->current_value) {
    $ignorable_ip = erLhcoreClassModelChatConfig::fetch('ignorable_ip')->current_value;
    if ($ignorable_ip == '' || !erLhcoreClassIPDetect::isIgnored(erLhcoreClassIPDetect::getIP(), explode(',', $ignorable_ip))) {
        if ((string) $Params['user_parameters_unordered']['vid'] != '') {
            $db = ezcDbInstance::get();
            /**
             * Perhaps there is some pending operations for online visitor
             * */
            $stmt = $db->prepare('SELECT operation FROM lh_chat_online_user WHERE vid = :vid');
            $stmt->bindValue(':vid', (string) $Params['user_parameters_unordered']['vid']);
            $stmt->execute();
            $operation = $stmt->fetch(PDO::FETCH_COLUMN);
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:31,代码来源:chatcheckstatus.php

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

示例5: lhPaginator

<?php

try {
    $tpl = erLhcoreClassTemplate::getInstance('lhinstance/invoices.tpl.php');
    $pages = new lhPaginator();
    $pages->items_total = erLhcoreClassModelInstanceInvoice::getCount();
    $pages->translationContext = 'abstract/list';
    $pages->serverURL = erLhcoreClassDesign::baseurl('instance/invoices');
    $pages->setItemsPerPage(20);
    $pages->paginate();
    $tpl->set('pages', $pages);
    $items = array();
    if ($pages->items_total > 0) {
        $items = erLhcoreClassModelInstanceInvoice::getList(array('offset' => $pages->low, 'limit' => $pages->items_per_page));
    }
    $tpl->set('items', $items);
    $tpl->set('pages', $pages);
    $Result['content'] = $tpl->fetch();
    $Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('system/configuration'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode', 'System configuration')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('instance/edit', 'Invoices')));
} catch (Exception $e) {
    print_r($e);
}
开发者ID:alisadali,项目名称:automated-hosting,代码行数:22,代码来源:invoices.php

示例6: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhsystem/smtp.tpl.php');
$smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
$data = (array) $smtpData->data;
if (isset($_POST['StoreSMTPSettings']) || isset($_POST['StoreSMTPSettingsTest'])) {
    $definition = array('host' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'username' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'password' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'port' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw'), 'use_smtp' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean'));
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('system/smtp');
        exit;
    }
    $Errors = array();
    $form = new ezcInputForm(INPUT_POST, $definition);
    $Errors = array();
    if ($form->hasValidData('host')) {
        $data['host'] = $form->host;
    } else {
        $data['host'] = '';
    }
    if ($form->hasValidData('port')) {
        $data['port'] = $form->port;
    } else {
        $data['port'] = '';
    }
    if ($form->hasValidData('use_smtp') && $form->use_smtp == true) {
        $data['use_smtp'] = 1;
    } else {
        $data['use_smtp'] = 0;
    }
    if ($form->hasValidData('username')) {
        $data['username'] = $form->username;
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:smtp.php

示例7: lhPaginator

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhchatarchive/listarchivechats.tpl.php');
$archive = erLhcoreClassModelChatArchiveRange::fetch($Params['user_parameters']['id']);
if (isset($_GET['doSearch'])) {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chat_search', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = true;
} else {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chat_search', 'format_filter' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = false;
}
$append = erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form']);
// Set correct archive tables
$archive->setArchiveTables();
$pages = new lhPaginator();
$pages->serverURL = erLhcoreClassDesign::baseurl('chatarchive/listarchivechats') . '/' . $archive->id . $append;
$pages->items_total = erLhcoreClassChat::getCount($filterParams['filter'], erLhcoreClassModelChatArchiveRange::$archiveTable);
$pages->setItemsPerPage(2);
$pages->paginate();
$items = array();
if ($pages->items_total > 0) {
    try {
        $items = erLhcoreClassChat::getList(array_merge(array('offset' => $pages->low, 'limit' => $pages->items_per_page, 'sort' => 'id ASC'), $filterParams['filter']), 'erLhcoreClassModelChatArchive', erLhcoreClassModelChatArchiveRange::$archiveTable);
    } catch (Exception $e) {
        print_r($e->getMessage());
    }
}
$filterParams['input_form']->form_action = erLhcoreClassDesign::baseurl('chatarchive/listarchivechats') . '/' . $archive->id;
$tpl->set('input', $filterParams['input_form']);
$tpl->set('items', $items);
$tpl->set('archive', $archive);
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:31,代码来源:listarchivechats.php

示例8: json_encode

<?php

try {
    $chat = erLhcoreClassChat::getSession()->load('erLhcoreClassModelChat', $Params['user_parameters']['chat_id']);
    if ($chat->hash == $Params['user_parameters']['hash']) {
        $msg = erLhcoreClassModelmsg::fetch($Params['user_parameters']['msgid']);
        if ($msg->chat_id == $chat->id) {
            $tpl = erLhcoreClassTemplate::getInstance('lhchat/syncuser.tpl.php');
            $tpl->set('messages', array((array) $msg));
            $tpl->set('chat', $chat);
            $tpl->set('sync_mode', isset($Params['user_parameters_unordered']['mode']) ? $Params['user_parameters_unordered']['mode'] : '');
            echo json_encode(array('msg' => $tpl->fetch(), 'error' => 'f'));
            exit;
        }
    }
} catch (Exception $e) {
}
echo json_encode(array('error' => 't'));
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:19,代码来源:getmessage.php

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

示例10: erLhAbstractModelAdminTheme

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhtheme/adminnewtheme.tpl.php');
$form = new erLhAbstractModelAdminTheme();
if (ezcInputForm::hasPostData()) {
    $Errors = erLhcoreClassThemeValidator::validateAdminTheme($form);
    if (!empty($Errors)) {
        $tpl->set('errors', $Errors);
    } else {
        $form->saveThis();
        erLhcoreClassModule::redirect('theme/adminthemes');
        exit;
    }
}
$tpl->set('form', $form);
$Result['content'] = $tpl->fetch();
$Result['additional_footer_js'] = '<script src="' . erLhcoreClassDesign::designJS('js/admintheme.form.angular.js') . '"></script>';
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('theme/index'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('theme/index', 'Themes')), array('url' => erLhcoreClassDesign::baseurl('theme/adminthemes'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('lhtheme/admin', 'Admin themes')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('lhtheme/admin', 'New admin theme')));
开发者ID:detain,项目名称:livehelperchat,代码行数:18,代码来源:adminnewtheme.php

示例11: lhPaginator

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhchat/operatorschats.tpl.php');
if (isset($_GET['doSearch'])) {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chat_search', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = true;
} else {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chat_search', 'format_filter' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = false;
}
if ($Params['user_parameters_unordered']['print'] == 1) {
    $tpl = erLhcoreClassTemplate::getInstance('lhchat/printchats.tpl.php');
    $items = erLhcoreClassChat::getOperatorsChats(10000, 0, $filterParams['filter']);
    $tpl->set('items', $items);
    $Result['content'] = $tpl->fetch();
    $Result['pagelayout'] = 'popup';
    return;
}
if ($Params['user_parameters_unordered']['xls'] == 1) {
    erLhcoreClassChatExport::chatListExportXLS(erLhcoreClassChat::getOperatorsChats(10000, 0, $filterParams['filter']));
    exit;
}
$append = erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form']);
$pages = new lhPaginator();
$pages->items_total = erLhcoreClassChat::getOperatorsChatsCount($filterParams['filter']);
$pages->translationContext = 'chat/closedchats';
$pages->serverURL = erLhcoreClassDesign::baseurl('chat/operatorschats') . $append;
$pages->paginate();
$tpl->set('pages', $pages);
if ($pages->items_total > 0) {
    $items = erLhcoreClassChat::getOperatorsChats($pages->items_per_page, $pages->low, $filterParams['filter']);
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:operatorschats.php

示例12: json_encode

<?php

if (!isset($_SERVER['HTTP_X_CSRFTOKEN']) || !$currentUser->validateCSFRToken($_SERVER['HTTP_X_CSRFTOKEN'])) {
    echo json_encode(array('error' => 'true', 'result' => 'Invalid CSRF Token'));
    exit;
}
$definition = array('data' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::REQUIRED, 'unsafe_raw'));
$form = new ezcInputForm(INPUT_POST, $definition);
$Chat = erLhcoreClassChat::getSession()->load('erLhcoreClassModelChat', $Params['user_parameters']['chat_id']);
$errorTpl = erLhcoreClassTemplate::getInstance('lhkernel/validation_error.tpl.php');
if (erLhcoreClassChat::hasAccessToRead($Chat)) {
    if ($form->hasValidData('data')) {
        $errors = array();
        erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.before_save_remarks', array('chat' => &$Chat, 'errors' => &$errors));
        if (empty($errors)) {
            $Chat->remarks = $form->data;
            $Chat->saveThis();
            echo json_encode(array('error' => 'false'));
            exit;
        } else {
            $errorTpl->set('errors', $errors);
            echo json_encode(array('error' => 'true', 'result' => $errorTpl->fetch()));
            exit;
        }
    } else {
        $errorTpl->set('errors', array(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/adminchat', 'Form data not valid')));
        echo json_encode(array('error' => 'true', 'result' => $errorTpl->fetch()));
        exit;
    }
} else {
    $errorTpl->set('errors', array(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/adminchat', 'Has no access to this chat')));
开发者ID:detain,项目名称:livehelperchat,代码行数:31,代码来源:saveremarks.php

示例13: array

<?php

$response = erLhcoreClassChatEventDispatcher::getInstance()->dispatch('form.index', array());
$tpl = erLhcoreClassTemplate::getInstance('lhform/index.tpl.php');
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('form/index', 'Form')));
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:6,代码来源:index.php

示例14: array

<?php

/**
 * This is optional if some extension AH decides to block usage of this module function completely
 * We don't do redirect here
 * */
$response = erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.statistic', array());
$tpl = erLhcoreClassTemplate::getInstance('lhstatistic/statistic.tpl.php');
$validTabs = array('active', 'total', 'last24', 'chatsstatistic');
$tab = isset($Params['user_parameters_unordered']['tab']) && in_array($Params['user_parameters_unordered']['tab'], $validTabs) ? $Params['user_parameters_unordered']['tab'] : 'active';
if ($tab == 'active') {
    if (isset($_GET['doSearch'])) {
        $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chat_search', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    } else {
        $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chat_search', 'format_filter' => true, 'uparams' => $Params['user_parameters_unordered']));
    }
    $tpl->set('input', $filterParams['input_form']);
    if (isset($_GET['xmlavguser'])) {
        erLhcoreClassChatStatistic::exportAverageOfChatsDialogsByUser(30, $filterParams['filter']);
        exit;
    }
    $tpl->setArray(array('userStats' => erLhcoreClassChatStatistic::getRatingByUser(30, $filterParams['filter']), 'countryStats' => erLhcoreClassChatStatistic::getTopChatsByCountry(30, $filterParams['filter']), 'userChatsStats' => erLhcoreClassChatStatistic::numberOfChatsDialogsByUser(30, $filterParams['filter']), 'userChatsAverageStats' => erLhcoreClassChatStatistic::averageOfChatsDialogsByUser(30, $filterParams['filter']), 'userWaitTimeByOperator' => erLhcoreClassChatStatistic::avgWaitTimeyUser(30, $filterParams['filter']), 'numberOfChatsPerMonth' => erLhcoreClassChatStatistic::getNumberOfChatsPerMonth($filterParams['filter']), 'numberOfChatsPerWaitTimeMonth' => erLhcoreClassChatStatistic::getNumberOfChatsWaitTime($filterParams['filter']), 'numberOfChatsPerHour' => erLhcoreClassChatStatistic::getWorkLoadStatistic($filterParams['filter']), 'averageChatTime' => erLhcoreClassChatStatistic::getAverageChatduration(30, $filterParams['filter']), 'numberOfMsgByUser' => erLhcoreClassChatStatistic::numberOfMessagesByUser(30, $filterParams['filter']), 'urlappend' => erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form'])));
} elseif ($tab == 'chatsstatistic') {
    if (isset($_GET['doSearch'])) {
        $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chatsstatistic_tab', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    } else {
        $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'chatsstatistic_tab', 'format_filter' => true, 'uparams' => $Params['user_parameters_unordered']));
    }
    $tpl->set('input', $filterParams['input_form']);
    $tpl->set('groupby', $filterParams['input_form']->groupby == 1 ? 'Y.m.d' : 'Y.m');
    if ($filterParams['input_form']->groupby == 1) {
开发者ID:detain,项目名称:livehelperchat,代码行数:31,代码来源:statistic.php

示例15: header

<?php

$currentUser = erLhcoreClassUser::instance();
$instance = erLhcoreClassSystem::instance();
if ($instance->SiteAccess != 'site_admin') {
    if ($currentUser->isLogged() && !empty($Params['user_parameters_unordered']['r'])) {
        header('Location: ' . erLhcoreClassDesign::baseurldirect('site_admin') . '/' . base64_decode(rawurldecode($Params['user_parameters_unordered']['r'])));
        exit;
    }
    $redirect = rawurldecode($Params['user_parameters_unordered']['r']);
    $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 {
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:login.php


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