Exemplo n.º 1
0
 function displayHistoryBlock($iUserId, $iVendorId)
 {
     $sJsObject = $this->_oConfig->getJsObject('orders');
     //--- Get Filter Panel ---//
     $sFilterPanel = BxTemplSearchResult::showAdminFilterPanel('', 'pmt-filter-text-history', 'pmt-filter-enable-history', 'filter', $sJsObject . ".applyFilter('history', this)");
     return $this->parseHtmlByName('history_orders_block.html', array('txt_date' => _t($this->_sLangsPrefix . 'txt_date'), 'txt_seller' => _t($this->_sLangsPrefix . 'txt_seller'), 'txt_order' => _t($this->_sLangsPrefix . 'txt_order'), 'txt_amount' => _t($this->_sLangsPrefix . 'txt_amount'), 'txt_license' => _t($this->_sLangsPrefix . 'txt_license'), 'txt_action' => _t($this->_sLangsPrefix . 'txt_action'), 'orders' => $this->displayOrders('history', array('user_id' => $iUserId, 'seller_id' => $iVendorId, 'start' => 0)), 'filter_panel' => $sFilterPanel, 'loading' => LoadingBox('pmt-orders-history-loading')));
 }
Exemplo n.º 2
0
function _getKeysList($mixedResult, $bActive = false)
{
    $sFilterName = 'filter';
    $sFilter = '';
    $aItems = array();
    if (isset($_GET[$sFilterName])) {
        $sFilter = process_db_input($_GET[$sFilterName], BX_TAGS_STRIP);
        $aKeys = $GLOBALS['MySQL']->getAll("SELECT `tk`.`ID` AS `id`, `tk`.`Key` AS `key`, `tc`.`Name` AS `category` FROM `sys_localization_keys` AS `tk` \n                 LEFT JOIN `sys_localization_strings` AS `ts` ON `tk`.`ID`=`ts`.`IDKey` LEFT JOIN `sys_localization_categories` AS `tc` ON `tk`.`IDCategory`=`tc`.`ID` \n                 WHERE `tk`.`Key` LIKE ? COLLATE utf8_general_ci OR `ts`.`String` LIKE ? GROUP BY `tk`.`ID`", ["%{$sFilter}%", "%{$sFilter}%"]);
        foreach ($aKeys as $aKey) {
            $aItems[] = array('id' => $aKey['id'], 'key' => $aKey['key'], 'category' => $aKey['category'], 'admin_url' => $GLOBALS['site']['url_admin']);
        }
    }
    //--- Get Controls ---//
    $aButtons = array('adm-lang-key-delete' => _t('_adm_txt_langs_delete'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-keys-form', $aButtons, 'keys');
    $sFilter = BxTemplSearchResult::showAdminFilterPanel(false !== bx_get($sFilterName) ? bx_get($sFilterName) : '', 'adm-langs-look-for', 'adm-langs-apply', $sFilterName);
    if ($mixedResult !== true && !empty($mixedResult)) {
        $sFilter .= MsgBox(_t($mixedResult), 3);
    }
    return $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_keys.html', array('display' => $bActive ? 'block' : 'none', 'filter_panel' => $sFilter, 'bx_repeat:items' => !empty($aItems) ? $aItems : MsgBox(_t('_Empty')), 'control' => $sControls, 'url_admin' => $GLOBALS['site']['url_admin']));
}