Пример #1
0
<?php

$tpl = erLhcoreClassTemplate::getInstance('lhfile/list.tpl.php');
if (isset($_GET['doSearch'])) {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'filelist', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = true;
} else {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'filelist', 'format_filter' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = false;
}
$append = erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form']);
$pages = new lhPaginator();
$pages->serverURL = erLhcoreClassDesign::baseurl('file/list') . $append;
$pages->items_total = erLhcoreClassChat::getCount($filterParams['filter'], 'lh_chat_file');
$pages->setItemsPerPage(20);
$pages->paginate();
$items = array();
if ($pages->items_total > 0) {
    $items = erLhcoreClassChat::getList(array_merge(array('offset' => $pages->low, 'limit' => $pages->items_per_page, 'sort' => 'id DESC'), $filterParams['filter']), 'erLhcoreClassModelChatFile', 'lh_chat_file');
}
$tpl->set('items', $items);
$tpl->set('pages', $pages);
$filterParams['input_form']->form_action = erLhcoreClassDesign::baseurl('file/list');
$tpl->set('input', $filterParams['input_form']);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('system/configuration'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/configuration', 'System configuration')), array('url' => erLhcoreClassDesign::baseurl('file/list'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/configuration', 'List of files')));
Пример #2
0
<?php

if (erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionXmppservice')->settings['enabled'] == false) {
    erLhcoreClassModule::redirect('/');
    exit;
}
$tpl = erLhcoreClassTemplate::getInstance('lhxmppservice/operators.tpl.php');
if (isset($_GET['doSearch'])) {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('customfilterfile' => 'extension/xmppservice/classes/filter.php', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = true;
} else {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('customfilterfile' => 'extension/xmppservice/classes/filter.php', 'format_filter' => true, 'uparams' => $Params['user_parameters_unordered']));
    $filterParams['is_search'] = false;
}
$append = erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form']);
$pages = new lhPaginator();
$pages->items_total = erLhcoreClassModelXMPPAccount::getCount($filterParams['filter']);
$pages->translationContext = 'chat/activechats';
$pages->serverURL = erLhcoreClassDesign::baseurl('xmppservice/operators') . $append;
$pages->paginate();
$tpl->set('pages', $pages);
if ($pages->items_total > 0) {
    $items = erLhcoreClassModelXMPPAccount::getList(array_merge(array('limit' => $pages->items_per_page, 'offset' => $pages->low), $filterParams['filter']));
    $tpl->set('items', $items);
}
$filterParams['input_form']->form_action = erLhcoreClassDesign::baseurl('xmppservice/operators');
$tpl->set('input', $filterParams['input_form']);
$tpl->set('inputAppend', $append);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('xmppservice/index'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('xmppservice/module', 'XMPP Service')), array('url' => erLhcoreClassDesign::baseurl('xmppservice/operators'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('xmppservice/module', 'XMPP Accounts')));
Пример #3
0
        $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) {
        $tpl->setArray(array('numberOfChatsPerMonth' => erLhcoreClassChatStatistic::getNumberOfChatsPerDay($filterParams['filter']), 'numberOfChatsPerWaitTimeMonth' => erLhcoreClassChatStatistic::getNumberOfChatsWaitTimePerDay($filterParams['filter']), 'urlappend' => erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form'])));
    } else {
        $tpl->setArray(array('numberOfChatsPerMonth' => erLhcoreClassChatStatistic::getNumberOfChatsPerMonth($filterParams['filter']), 'numberOfChatsPerWaitTimeMonth' => erLhcoreClassChatStatistic::getNumberOfChatsWaitTime($filterParams['filter']), 'urlappend' => erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form'])));
    }
} else {
    if ($tab == 'last24') {
        if (isset($_GET['doSearch'])) {
            $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'last24statistic', 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
        } else {
            $filterParams = erLhcoreClassSearchHandler::getParams(array('module' => 'chat', 'module_file' => 'last24statistic', 'format_filter' => true, 'uparams' => array()));
        }
        if (empty($filterParams['filter'])) {
            $filter24 = array('filtergte' => array('time' => time() - 24 * 3600));
        } else {
            $filter24 = $filterParams['filter'];
        }
        $tpl->set('input', $filterParams['input_form']);
        $tpl->set('filter24', $filter24);
    }
}
$tpl->set('tab', $tab);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/statistic', 'Statistic')));
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.statistic_path', array('result' => &$Result));
Пример #4
0
<?php

$tpl = erLhcoreClassTemplate::getInstance('lhabstract/list.tpl.php');
$objectClass = 'erLhAbstractModel' . $Params['user_parameters']['identifier'];
$objectData = new $objectClass();
$object_trans = $objectData->getModuleTranslations();
if (isset($object_trans['permission']) && !$currentUser->hasAccessTo($object_trans['permission']['module'], $object_trans['permission']['function'])) {
    erLhcoreClassModule::redirect();
    exit;
}
$append = '';
$filterParams['filter'] = array();
if (isset($objectData->has_filter) && $objectData->has_filter === true) {
    $filterParams = erLhcoreClassSearchHandler::getParams(array('module_file' => erLhAbstractModelNewspaper::FILTER_NAME, 'format_filter' => true, 'use_override' => true, 'uparams' => $Params['user_parameters_unordered']));
    $append = erLhcoreClassSearchHandler::getURLAppendFromInput($filterParams['input_form']);
    $tpl->set('filter', erLhAbstractModelNewspaper::FILTER_NAME);
}
$filterObject = array();
if (method_exists($objectData, 'getFilter')) {
    $filterObject = $objectData->getFilter();
}
$tpl->set('filterObject', $filterObject);
$pages = new lhPaginator();
$pages->items_total = call_user_func('erLhAbstractModel' . $Params['user_parameters']['identifier'] . '::getCount', array_merge($filterParams['filter'], $filterObject));
$pages->translationContext = 'abstract/list';
$pages->serverURL = erLhcoreClassDesign::baseurl('abstract/list') . '/' . $Params['user_parameters']['identifier'] . $append;
$pages->setItemsPerPage(20);
$pages->paginate();
$tpl->set('pages', $pages);
$tpl->set('identifier', $Params['user_parameters']['identifier']);
$tpl->set('object_trans', $object_trans);