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


PHP BxTemplSearchResult类代码示例

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


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

示例1: PageCodeSubscribers

function PageCodeSubscribers($oSubscription)
{
    $iStart = bx_get('start') !== false ? (int) bx_get('start') : 0;
    $iPerPage = 20;
    $oPaginate = new BxDolPaginate(array('start' => $iStart, 'per_page' => $iPerPage, 'count' => $oSubscription->getSubscribersCount(), 'page_url' => $GLOBALS['site']['url_admin'] . 'manage_subscribers.php?start={start}'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array('adm-ms-delete' => _t('_adm_btn_ms_delete')), 'members');
    $aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage);
    return $GLOBALS['oAdmTemplate']->parseHtmlByName('manage_subscribers.html', array('bx_repeat:items' => is_array($aSubscribers) && !empty($aSubscribers) ? $aSubscribers : MsgBox(_t('_Empty')), 'paginate' => $oPaginate->getPaginate(), 'controls' => $sControls));
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:9,代码来源:manage_subscribers.php

示例2: PageCodeManageSubscribers

function PageCodeManageSubscribers($oSubscription)
{
    $iStart = bx_get('start') !== false ? (int) bx_get('start') : 0;
    $iPerPage = 20;
    $oPaginate = new BxDolPaginate(array('start' => $iStart, 'per_page' => $iPerPage, 'count' => $oSubscription->getSubscribersCount(), 'page_url' => BX_DOL_URL_ADMIN . 'notifies.php?mode=manage_subscribers&start={start}'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array('adm-ms-delete' => _t('_adm_btn_ms_delete')), 'members');
    $aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage);
    $s = $GLOBALS['oAdmTemplate']->parseHtmlByName('manage_subscribers.html', array('bx_repeat:items' => is_array($aSubscribers) && !empty($aSubscribers) ? $aSubscribers : MsgBox(_t('_Empty')), 'paginate' => $oPaginate->getPaginate(), 'controls' => $sControls));
    return array('page_main_code' => DesignBoxAdmin(_t('_adm_page_cpt_manage_subscribers'), $s, $GLOBALS['aTopItems'], '', 1));
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:10,代码来源:notifies.php

示例3: BxFilesSearch

 function BxFilesSearch($sParamName = '', $sParamValue = '', $sParamValue1 = '', $sParamValue2 = '')
 {
     parent::BxTemplSearchResult();
     // main settings
     $this->aCurrent = array('name' => 'bx_files', 'title' => '_bx_files', 'table' => 'bx_files_main', 'ownFields' => array('ID', 'Title', 'Uri', 'Desc', 'Date', 'Size', 'Ext', 'Views', 'Rate', 'RateCount', 'Type'), 'searchFields' => array('Title', 'Tags', 'Desc', 'Categories'), 'join' => array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'Owner', 'onField' => 'ID', 'joinFields' => array('NickName')), 'icon' => array('type' => 'left', 'table' => 'bx_files_types', 'mainField' => 'Type', 'onField' => 'Type', 'joinFields' => array('Icon')), 'albumsObjects' => array('type' => 'left', 'table' => 'sys_albums_objects', 'mainField' => 'ID', 'onField' => 'id_object', 'joinFields' => ''), 'albums' => array('type' => 'left', 'table' => 'sys_albums', 'mainField' => 'id_album', 'onField' => 'ID', 'joinFields' => array('AllowAlbumView'), 'mainTable' => 'sys_albums_objects')), 'restriction' => array('activeStatus' => array('value' => 'approved', 'field' => 'Status', 'operator' => '=', 'paramName' => 'status'), 'owner' => array('value' => '', 'field' => 'NickName', 'operator' => '=', 'paramName' => 'ownerName', 'table' => 'Profiles'), 'ownerStatus' => array('value' => array('Rejected', 'Suspended'), 'operator' => 'not in', 'paramName' => 'ownerStatus', 'table' => 'Profiles', 'field' => 'Status'), 'tag' => array('value' => '', 'field' => 'Tags', 'operator' => 'against', 'paramName' => 'tag'), 'category' => array('value' => '', 'field' => 'Categories', 'operator' => 'against', 'paramName' => 'categoryUri'), 'id' => array('value' => '', 'field' => 'ID', 'operator' => 'in'), 'allow_view' => array('value' => '', 'field' => 'AllowAlbumView', 'operator' => 'in', 'table' => 'sys_albums'), 'album_status' => array('value' => 'active', 'field' => 'Status', 'operator' => '=', 'table' => 'sys_albums'), 'albumType' => array('value' => '', 'field' => 'Type', 'operator' => '=', 'paramName' => 'albumType', 'table' => 'sys_albums')), 'paginate' => array('perPage' => 10, 'page' => 1, 'totalNum' => 10, 'totalPages' => 1), 'sorting' => 'last', 'view' => 'full', 'ident' => 'ID', 'rss' => array('title' => _t('_bx_files'), 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array('Link' => '', 'Title' => 'title', 'DateTimeUTS' => 'date', 'Desc' => 'desc', 'Photo' => '')));
     // redeclaration some unique fav fields
     $this->aAddPartsConfig['favorite'] = array('type' => 'inner', 'table' => 'bx_files_favorites', 'mainField' => 'ID', 'onField' => 'ID', 'userField' => 'Profile', 'joinFields' => '');
     $this->oModule = BxDolModule::getInstance('BxFilesModule');
     $this->oTemplate = $this->oModule->_oTemplate;
     $this->oModule->_oTemplate->addCss('search.css');
     $this->aConstants['filesUrl'] = $this->oModule->_oConfig->getFilesUrl();
     $this->aConstants['filesDir'] = $this->oModule->_oConfig->getFilesPath();
     //permalinks generation
     $this->aConstants['linksTempl'] = array('home' => 'home', 'file' => 'view/{uri}', 'category' => 'browse/category/{uri}', 'browseAll' => 'browse/', 'browseUserAll' => 'albums/browse/owner/{uri}', 'browseAllTop' => 'browse/top', 'tag' => 'browse/tag/{uri}', 'album' => 'browse/album/{uri}', 'add' => 'browse/my/add');
     $this->aCurrent['restriction']['albumType']['value'] = $this->aCurrent['name'];
     //additional modes for browse
     switch ($sParamName) {
         case 'calendar':
             $this->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$sParamValue}-{$sParamValue1}-{$sParamValue2} 00:00:00')", 'field' => 'Date', 'operator' => '>=', 'no_quote_value' => true);
             $this->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$sParamValue}-{$sParamValue1}-{$sParamValue2} 23:59:59')", 'field' => 'Date', 'operator' => '<=', 'no_quote_value' => true);
             break;
         case 'top':
             $this->aCurrent['sorting'] = 'top';
             break;
         case 'popular':
             $this->aCurrent['sorting'] = 'popular';
             break;
         case 'featured':
             $this->aCurrent['restriction']['featured'] = array('value' => '1', 'field' => 'Featured', 'operator' => '=', 'paramName' => 'bx_files_mode');
             break;
         case 'favorited':
             if (isset($this->aAddPartsConfig['favorite']) && !empty($this->aAddPartsConfig['favorite']) && getLoggedId() != 0) {
                 $this->aCurrent['join']['favorite'] = $this->aAddPartsConfig['favorite'];
                 $this->aCurrent['restriction']['fav'] = array('value' => getLoggedId(), 'field' => $this->aAddPartsConfig['favorite']['userField'], 'operator' => '=', 'table' => $this->aAddPartsConfig['favorite']['table']);
             }
             break;
         case 'album':
             $this->aCurrent['sorting'] = 'album_order';
             $this->aCurrent['restriction']['album'] = array('value' => '', 'field' => 'Uri', 'operator' => '=', 'paramName' => 'albumUri', 'table' => 'sys_albums');
             if ($sParamValue1 == 'owner' && strlen($sParamValue2) > 0) {
                 $this->aCurrent['restriction']['owner']['value'] = $sParamValue2;
             }
             break;
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:45,代码来源:BxFilesSearch.php

示例4: _actionManageFansPopup

 function _actionManageFansPopup($iEntryId, $sTitle, $sFuncGetFans = 'getFans', $sFuncIsAllowedManageFans = 'isAllowedManageFans', $sFuncIsAllowedManageAdmins = 'isAllowedManageAdmins', $iMaxFans = 1000)
 {
     header('Content-type:text/html;charset=utf-8');
     $iEntryId = (int) $iEntryId;
     if (!($aDataEntry = $this->_oDb->getEntryByIdAndOwner($iEntryId, 0, true))) {
         echo $GLOBALS['oFunctions']->transBox(MsgBox(_t('_Empty')));
         exit;
     }
     if (!$this->{$sFuncIsAllowedManageFans}($aDataEntry)) {
         echo $GLOBALS['oFunctions']->transBox(MsgBox(_t('_Access denied')));
         exit;
     }
     $aProfiles = array();
     $iNum = $this->_oDb->{$sFuncGetFans}($aProfiles, $iEntryId, true, 0, $iMaxFans);
     if (!$iNum) {
         echo $GLOBALS['oFunctions']->transBox(MsgBox(_t('_Empty')));
         exit;
     }
     $sActionsUrl = bx_append_url_params(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "view/" . $aDataEntry[$this->_oDb->_sFieldUri], 'ajax_action=');
     $aButtons = array(array('type' => 'submit', 'name' => 'fans_remove', 'value' => _t('_sys_btn_fans_remove'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_manage_fans_content', '{$sActionsUrl}remove&ids=' + sys_manage_items_get_manage_fans_ids(), false, 'post'); return false;\""));
     if ($this->{$sFuncIsAllowedManageAdmins}($aDataEntry)) {
         $aButtons = array_merge($aButtons, array(array('type' => 'submit', 'name' => 'fans_add_to_admins', 'value' => _t('_sys_btn_fans_add_to_admins'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_manage_fans_content', '{$sActionsUrl}add_to_admins&ids=' + sys_manage_items_get_manage_fans_ids(), false, 'post'); return false;\""), array('type' => 'submit', 'name' => 'fans_move_admins_to_fans', 'value' => _t('_sys_btn_fans_move_admins_to_fans'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_manage_fans_content', '{$sActionsUrl}admins_to_fans&ids=' + sys_manage_items_get_manage_fans_ids(), false, 'post'); return false;\"")));
     }
     bx_import('BxTemplSearchResult');
     $sControl = BxTemplSearchResult::showAdminActionsPanel('sys_manage_items_manage_fans', $aButtons, 'sys_fan_unit');
     $aVarsContent = array('suffix' => 'manage_fans', 'content' => $this->_profilesEdit($aProfiles, false, $aDataEntry), 'control' => $sControl);
     $aVarsPopup = array('title' => $sTitle, 'content' => $this->_oTemplate->parseHtmlByName('manage_items_form', $aVarsContent));
     echo $GLOBALS['oFunctions']->transBox($this->_oTemplate->parseHtmlByName('popup', $aVarsPopup), true);
     exit;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:30,代码来源:BxDolTwigModule.php

示例5: getMembers

function getMembers($aParams)
{
    if (!isset($aParams['view_start']) || empty($aParams['view_start'])) {
        $aParams['view_start'] = 0;
    }
    if (!isset($aParams['view_per_page']) || empty($aParams['view_per_page'])) {
        $aParams['view_per_page'] = BX_DOL_ADM_MP_PER_PAGE;
    }
    $aParams['view_order_way'] = 'ASC';
    if (!isset($aParams['view_order']) || empty($aParams['view_order'])) {
        $aParams['view_order'] = 'ID';
    } else {
        $aOrder = explode(' ', $aParams['view_order']);
        if (count($aOrder) > 1) {
            $aParams['view_order'] = $aOrder[0];
            $aParams['view_order_way'] = $aOrder[1];
        }
    }
    $sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB);
    $sSelectClause = $sJoinClause = $sWhereClause = $sGroupClause = '';
    if (isset($aParams['ctl_type'])) {
        switch ($aParams['ctl_type']) {
            case 'qlinks':
                switch ($aParams['ctl_params']['by']) {
                    case 'status':
                        $sWhereClause .= " AND `tp`.`Status`='" . ucfirst($aParams['ctl_params']['value']) . "'";
                        break;
                    case 'featured':
                        $sWhereClause .= " AND `tp`.`Featured`='1'";
                        break;
                    case 'banned':
                        $sWhereClause .= " AND (`tbl`.`Time`='0' OR (`tbl`.`Time`<>'0' AND DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW()))";
                        break;
                    case 'type':
                        $sWhereClause .= $aParams['ctl_params']['value'] == 'single' ? " AND `tp`.`Couple`='0'" : " AND `tp`.`Couple`<>'0' AND `tp`.`Couple`>`tp`.`ID`";
                        break;
                    case 'role':
                        $iRole = BX_DOL_ROLE_MEMBER;
                        if ($aParams['ctl_params']['value'] == 'admins') {
                            $iRole = BX_DOL_ROLE_ADMIN;
                        }
                        $sWhereClause .= " AND `tp`.`Role` & " . $iRole . "";
                        break;
                    case 'sex':
                        $sWhereClause .= " AND LOWER(`tp`.`Sex`)='" . strtolower($aParams['ctl_params']['value']) . "' AND `tp`.`Couple` = 0 ";
                        break;
                    case 'membership':
                        $sWhereClause .= " AND LOWER(`tl`.`Name`)='" . strtolower($aParams['ctl_params']['value']) . "'";
                        break;
                }
                break;
            case 'tags':
                $sWhereClause .= " AND `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%'";
                break;
            case 'search':
                $sWhereClause .= " AND (\n                `tp`.`ID` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n                `tp`.`NickName` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n                `tp`.`Email` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n                `tp`.`DescriptionMe` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n                `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n                `tp`.`DateReg` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n                `tp`.`DateLastLogin` LIKE '%" . $aParams['ctl_params']['value'] . "%'\n            )";
                break;
        }
    }
    //--- Get Paginate ---//
    $oPaginate = new BxDolPaginate(array('start' => $aParams['view_start'], 'count' => (int) db_value("SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`)) LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID` " . $sJoinClause . " WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause), 'per_page' => $aParams['view_per_page'], 'page_url' => $GLOBALS['site']['url_admin'] . 'profiles.php?start={start}', 'on_change_page' => BX_DOL_ADM_MP_JS_NAME . '.changePage({start})'));
    $sPaginate = $oPaginate->getPaginate();
    //--- Get Controls ---//
    $GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_btn_mp_ban_duration'));
    $aButtons = array('adm-mp-activate' => _t('_adm_btn_mp_activate'), 'adm-mp-deactivate' => _t('_adm_btn_mp_deactivate'), 'adm-mp-ban' => array('type' => 'submit', 'name' => 'adm-mp-ban', 'value' => _t('_adm_btn_mp_ban'), 'onclick' => 'onclick="javascript: return ' . BX_DOL_ADM_MP_JS_NAME . '.actionBan(this);"'), 'adm-mp-unban' => _t('_adm_btn_mp_unban'), 'adm-mp-confirm' => _t('_adm_btn_mp_confirm'), 'adm-mp-delete' => _t('_adm_btn_mp_delete'), 'adm-mp-delete-spammer' => _t('_adm_btn_mp_delete_spammer'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mp-members-' . $aParams['view_type'], $aButtons, 'members');
    //--- Get Items ---//
    $sQuery = "\n        SELECT\n            `tp`.`ID` as `id`,\n            `tp`.`NickName` AS `username`,\n            `tp`.`Sex` AS `sex`,\n            `tp`.`DateOfBirth` AS `date_of_birth`,\n            `tp`.`Country` AS `country`,\n            `tp`.`City` AS `city`,\n            `tp`.`DescriptionMe` AS `description`,\n            `tp`.`Email` AS `email`,\n            DATE_FORMAT(`tp`.`DateReg`,  '" . $sDateFormat . "' ) AS `registration`,\n            DATE_FORMAT(`tp`.`DateLastLogin`,  '" . $sDateFormat . "' ) AS `last_login`,\n            DATE_FORMAT(`tp`.`DateLastNav`,  '" . $sDateFormat . "' ) AS `last_activity`,\n            `tp`.`Status` AS `status`,\n            IF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`,\n            `tl`.`ID` AS `ml_id`,\n            IF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name`\n            " . $sSelectClause . "\n        FROM `Profiles` AS `tp`\n        LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID`\n        LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`))\n        LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID`\n        " . $sJoinClause . "\n        WHERE\n            1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . "\n        " . $sGroupClause . "\n        ORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . "\n        LIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page'];
    $aProfiles = $GLOBALS['MySQL']->getAll($sQuery);
    //--- Display ---//
    $sFunction = 'getMembers' . ucfirst($aParams['view_type']);
    return $sFunction($aProfiles, $sPaginate, $sControls);
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:73,代码来源:profiles.php

示例6: PageCodeKeys

function PageCodeKeys($mixedResult)
{
    $sFilter = '';
    $aItems = array();
    if (isset($_GET['filter'])) {
        $sFilter = process_db_input($_GET['filter'], 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` LEFT JOIN `sys_localization_strings` AS `ts` ON `tk`.`ID`=`ts`.`IDKey` LEFT JOIN `sys_localization_categories` AS `tc` ON `tk`.`IDCategory`=`tc`.`ID` WHERE `tk`.`Key` LIKE '%" . $sFilter . "%' OR `ts`.`String` LIKE '%" . $sFilter . "%' GROUP BY `tk`.`ID`");
        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');
    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_keys.html', array('filter_value' => $sFilter, 'filter_checked' => !empty($sFilter) ? 'checked="checked"' : '', 'bx_repeat:items' => !empty($aItems) ? $aItems : MsgBox(_t('_Empty')), 'control' => $sControls, 'url_admin' => $GLOBALS['site']['url_admin']));
    if ($mixedResult !== true && !empty($mixedResult)) {
        $sResult = MsgBox(_t($mixedResult), 3) . $sResult;
    }
    return DesignBoxAdmin(_t('_adm_box_cpt_lang_keys'), $sResult);
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:20,代码来源:lang_file.php

示例7: displayCartContent

 function displayCartContent($aCartInfo, $iVendorId = BX_PMT_EMPTY_ID)
 {
     $iAdminId = $this->_oConfig->getAdminId();
     $sJsObject = $this->_oConfig->getJsObject('cart');
     if ($iVendorId != BX_PMT_EMPTY_ID) {
         $aCartInfo = array($aCartInfo);
     }
     $aVendors = array();
     foreach ($aCartInfo as $aVendor) {
         //--- Get Providers ---//
         $aProviders = array();
         $aVendorProviders = $this->_oDb->getVendorInfoProviders($aVendor['vendor_id']);
         foreach ($aVendorProviders as $aProvider) {
             $aProviders[] = array('name' => $aProvider['name'], 'caption' => _t($this->_sLangsPrefix . 'txt_cart_' . $aProvider['name']), 'checked' => empty($aProviders) ? 'checked="checked"' : '');
         }
         //--- Get Items ---//
         $aItems = array();
         foreach ($aVendor['items'] as $aItem) {
             $aItems[] = array('vendor_id' => $aVendor['vendor_id'], 'vendor_currency_code' => $aVendor['vendor_currency_code'], 'module_id' => $aItem['module_id'], 'item_id' => $aItem['id'], 'item_title' => $aItem['title'], 'item_url' => $aItem['url'], 'item_quantity' => $aItem['quantity'], 'bx_if:show_price_paid' => array('condition' => (double) $aItem['price'] != 0, 'content' => array('item_price' => $aItem['quantity'] * $aItem['price'], 'vendor_currency_code' => $aVendor['vendor_currency_code'])), 'bx_if:show_price_free' => array('condition' => (int) $aItem['price'] == 0, 'content' => array()), 'js_object' => $sJsObject);
         }
         //--- Get Control Panel ---//
         $aButtons = array('pmt-checkout' => _t($this->_sLangsPrefix . 'btn_checkout'), 'pmt-delete' => _t($this->_sLangsPrefix . 'btn_delete'));
         $sControlPanel = BxTemplSearchResult::showAdminActionsPanel('items_from_' . $aVendor['vendor_id'], $aButtons, 'items', true, true);
         //--- Get General ---//
         $aVendors[] = array('vendor_id' => $aVendor['vendor_id'], 'bx_if:show_link' => array('condition' => !empty($aVendor['vendor_profile_url']), 'content' => array('txt_shopping_cart' => _t($this->_sLangsPrefix . 'txt_shopping_cart', $this->parseHtmlByName('vendor_link.html', array('vendor_username' => $aVendor['vendor_profile_name'], 'vendor_url' => $aVendor['vendor_profile_url']))), 'vendor_currency_code' => $aVendor['vendor_currency_code'], 'items_count' => $aVendor['items_count'], 'items_price' => $aVendor['items_price'])), 'bx_if:show_text' => array('condition' => empty($aVendor['vendor_profile_url']), 'content' => array('txt_shopping_cart' => _t($this->_sLangsPrefix . 'txt_shopping_cart', $aVendor['vendor_profile_name']), 'vendor_currency_code' => $aVendor['vendor_currency_code'], 'items_count' => $aVendor['items_count'], 'items_price' => $aVendor['items_price'])), 'vendor_icon' => $aVendor['vendor_profile_icon'], 'bx_repeat:providers' => $aProviders, 'bx_repeat:items' => $aItems, 'js_object' => $sJsObject, 'process_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'act_cart_submit/', 'control_panel' => $sControlPanel);
     }
     $this->addCss('cart.css');
     $this->addJs('cart.js');
     return $this->parseHtmlByName('cart.html', array_merge($this->_getJsContentCart(), array('bx_repeat:vendors' => $aVendors)));
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:30,代码来源:BxPmtTemplate.php

示例8: getUpdates

 function getUpdates($sResult)
 {
     $aUpdates = array();
     $sPath = BX_DIRECTORY_PATH_ROOT . 'modules/';
     if ($rHandleVendor = opendir($sPath)) {
         while (($sVendor = readdir($rHandleVendor)) !== false) {
             if (substr($sVendor, 0, 1) == '.' || !is_dir($sPath . $sVendor)) {
                 continue;
             }
             if ($rHandleModule = opendir($sPath . $sVendor . '/')) {
                 while (($sModule = readdir($rHandleModule)) !== false) {
                     if (!is_dir($sPath . $sVendor . '/' . $sModule) || substr($sModule, 0, 1) == '.') {
                         continue;
                     }
                     if ($rHandleUpdate = @opendir($sPath . $sVendor . '/' . $sModule . '/updates/')) {
                         while (($sUpdate = readdir($rHandleUpdate)) !== false) {
                             if (!is_dir($sPath . $sVendor . '/' . $sModule . '/updates/' . $sUpdate) || substr($sUpdate, 0, 1) == '.') {
                                 continue;
                             }
                             $sConfigPath = $sPath . $sVendor . '/' . $sModule . '/updates/' . $sUpdate . '/install/config.php';
                             if (!file_exists($sConfigPath)) {
                                 continue;
                             }
                             include $sConfigPath;
                             $sName = $aConfig['title'] . $aConfig['module_uri'] . $aConfig['version_from'] . $aConfig['version_to'];
                             $aUpdates[$sName] = array('name' => md5($sName), 'value' => $aConfig['home_dir'], 'title' => _t('_adm_txt_modules_title_update', $aConfig['title'], $aConfig['version_from'], $aConfig['version_to']), 'can_update' => '0', 'update' => '');
                         }
                         closedir($rHandleUpdate);
                     }
                 }
                 closedir($rHandleModule);
             }
         }
         closedir($rHandleVendor);
     }
     ksort($aUpdates);
     //--- Get Controls ---//
     $aButtons = array('updates-install' => _t('_adm_btn_modules_install'), 'updates-delete' => _t('_adm_btn_modules_delete'));
     $sControls = BxTemplSearchResult::showAdminActionsPanel('modules-updates-form', $aButtons, 'pathes');
     if (!empty($sResult)) {
         $sResult = MsgBox(_t($sResult), 10);
     }
     return $sResult . $GLOBALS['oAdmTemplate']->parseHtmlByName('modules_list.html', array('type' => 'updates', 'bx_repeat:items' => !empty($aUpdates) ? array_values($aUpdates) : MsgBox(_t('_Empty')), 'controls' => $sControls));
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:44,代码来源:BxDolInstallerUi.php

示例9: bx_html_attribute

        {$sRssUrl}
    </div>
    <div>
        <span style="color:{$sStatusColor};">{$sRssStatus}</span> <span class="sys-bullet"></span> {$sRssDesc}
    </div>
</div>
EOF;
    }
    $sRequest = bx_html_attribute($_SERVER['PHP_SELF']) . '?page={page}&per_page={per_page}';
    ///////////////pagination/////////////////////
    // gen pagination block ;
    $oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'page' => $iCurPage));
    $sPagination = $oPaginate->getPaginate();
    ///////////////eof pagination/////////////////////
    bx_import('BxTemplSearchResult');
    $oSearchResult = new BxTemplSearchResult();
    $sAdmPanel = $oSearchResult->showAdminActionsPanel('crss_box', array('action_approve' => '_Approve', 'action_disapprove' => '_Disapprove', 'action_delete' => '_Delete'), 'crsss');
    $sUrl = bx_html_attribute($_SERVER['PHP_SELF']);
    $sCode .= <<<EOF
<form action="{$sUrl}" method="post" name="ads_moderation">
    <div id="crss_box" class="bx-def-bc-padding">
        {$sRSSs}
    </div>
    {$sPagination}
    {$sAdmPanel}
</form>
EOF;
}
$sHeaderValue = _t('_crss_Manager');
$sCode = $sCode == '' ? MsgBox(_t('_Empty')) : $sCode;
$sResult = DesignBoxAdmin($sHeaderValue, $sCode);
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:31,代码来源:post_mod_crss.php

示例10: _getLanguagesList

function _getLanguagesList($mixedResult, $bActive = false)
{
    $sResult = '';
    if ($mixedResult !== true && !empty($mixedResult)) {
        $bActive = true;
        $sResult = MsgBox(_t($mixedResult), 3);
    }
    //--- Get Items ---//
    $aItems = array();
    $sNameDefault = getParam('lang_default');
    $aLangs = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `name`, `Title` AS `title`, `Flag` AS `flag` FROM `sys_localization_languages` ORDER BY `Name`");
    foreach ($aLangs as $aLang) {
        $aItems[] = array('name' => $aLang['name'], 'value' => $aLang['id'], 'title' => $aLang['title'], 'icon' => $GLOBALS['site']['flags'] . $aLang['flag'] . '.gif', 'default' => $aLang['name'] == $sNameDefault ? '(' . _t('_adm_txt_langs_default') . ')' : '', 'edit_link' => $GLOBALS['site']['url_admin'] . 'lang_file.php?action=edit&id=' . $aLang['id'], 'export_link' => $GLOBALS['site']['url_admin'] . 'lang_file.php?action=export&id=' . $aLang['id']);
    }
    //--- Get Controls ---//
    $aButtons = array('adm-lang-compile' => _t('_adm_txt_langs_compile'), 'adm-lang-delete' => _t('_adm_txt_langs_delete'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-langs-form', $aButtons, 'langs');
    return $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_files.html', array('display' => $bActive ? 'block' : 'none', 'results' => $sResult, 'bx_repeat:items' => $aItems, 'controls' => $sControls));
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:19,代码来源:lang_file.php

示例11: _blockFansUnconfirmed

 function _blockFansUnconfirmed($iFansLimit = 1000)
 {
     if (!$this->_oMain->isEntryAdmin($this->aDataEntry)) {
         return '';
     }
     $aProfiles = array();
     $iNum = $this->_oDb->getFans($aProfiles, $this->aDataEntry[$this->_oDb->_sFieldId], false, 0, $iFansLimit);
     if (!$iNum) {
         return MsgBox(_t('_Empty'));
     }
     $sActionsUrl = BX_DOL_URL_ROOT . $this->_oMain->_oConfig->getBaseUri() . "view/" . $this->aDataEntry[$this->_oDb->_sFieldUri] . '?ajax_action=';
     $aButtons = array(array('type' => 'submit', 'name' => 'fans_reject', 'value' => _t('_sys_btn_fans_reject'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_unconfirmed_fans_content', '{$sActionsUrl}reject&ids=' + sys_manage_items_get_unconfirmed_fans_ids(), false, 'post'); return false;\""), array('type' => 'submit', 'name' => 'fans_confirm', 'value' => _t('_sys_btn_fans_confirm'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_unconfirmed_fans_content', '{$sActionsUrl}confirm&ids=' + sys_manage_items_get_unconfirmed_fans_ids(), false, 'post'); return false;\""));
     bx_import('BxTemplSearchResult');
     $sControl = BxTemplSearchResult::showAdminActionsPanel('sys_manage_items_unconfirmed_fans', $aButtons, 'sys_fan_unit');
     $aVars = array('suffix' => 'unconfirmed_fans', 'content' => $this->_oMain->_profilesEdit($aProfiles), 'control' => $sControl);
     return $this->_oMain->_oTemplate->parseHtmlByName('manage_items_form', $aVars);
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:17,代码来源:BxDolTwigPageView.php

示例12: getAdminForm

 function getAdminForm()
 {
     bx_import('BxTemplSearchResult');
     $oNewSearchresult = new BxTemplSearchResult();
     $aPolls = array();
     $aPollsList = array();
     $iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1;
     $iPerPage = isset($_GET['per_page']) ? (int) $_GET['per_page'] : 6;
     if ($iPerPage > 100) {
         $iPerPage = 100;
     }
     if ($iPerPage <= 0) {
         $iPerPage = 6;
     }
     if (!$iPage) {
         $iPage = 1;
     }
     // proccessed all post datas ;
     if (isset($_POST['poll_id']) and is_array($_POST['poll_id'])) {
         foreach ($_POST['poll_id'] as $iKey => $iValue) {
             $iValue = (int) $iValue;
             // set as approved;
             if (isset($_POST['approve'])) {
                 $this->_oDb->setStatus($iValue, 1);
             } else {
                 if (isset($_POST['disapprove'])) {
                     $this->_oDb->setStatus($iValue, 0);
                 } else {
                     if (isset($_POST['delete'])) {
                         $this->deletePoll($iValue);
                     } else {
                         if (isset($_POST['featured'])) {
                             $this->_oDb->setFeatured($iValue, 1);
                         } else {
                             if (isset($_POST['unfeatured'])) {
                                 $this->_oDb->setFeatured($iValue, 0);
                             }
                         }
                     }
                 }
             }
             $oTag = new BxDolTags();
             $oTag->reparseObjTags('bx_poll', $iValue);
             $oCateg = new BxDolCategories();
             $oCateg->reparseObjTags('bx_poll', $iValue);
         }
     }
     $aLanguageKeys = array('premoderation' => _t('_bx_poll_moderation'), 'select_all' => _t('_bx_poll_select_all'), 'approve' => _t('_bx_poll_approve'), 'disapprove' => _t('_bx_poll_disapprove'), 'delete' => _t('_bx_poll_delete'), 'sure' => _t('_Are_you_sure'), 'featured' => _t('_bx_poll_featured'), 'unfeatured' => _t('_bx_poll_unfeatured'));
     // get only the member's polls ;
     $iTotalNum = $this->_oDb->getPollsCount(0, true);
     if (!$iTotalNum) {
         $sOutputHtml = MsgBox(_t('_Empty'));
     }
     $sLimitFrom = ($iPage - 1) * $iPerPage;
     $sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
     $aPolls = $this->_oDb->getAllPolls($sqlLimit, 0, true);
     foreach ($aPolls as $iKey => $aItems) {
         $aPollsList[] = array('poll' => $this->getPollBlock($aItems, false, false, true));
     }
     // generate init page ;
     $sInitPart = $this->getInitPollPage();
     // generate page pagination ;
     $sRequest = $this->sPathToModule . 'administration&amp;page={page}&amp;per_page={per_page}';
     $oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'sorting' => null, 'page' => $iPage));
     $sPagination = $oPaginate->getPaginate();
     // generate needed buttons;
     $aButtons = array('approve' => $aLanguageKeys['approve'], 'disapprove' => $aLanguageKeys['disapprove'], 'featured' => $aLanguageKeys['featured'], 'unfeatured' => $aLanguageKeys['unfeatured'], 'delete' => array('type' => 'submit', 'name' => 'delete', 'value' => $aLanguageKeys['delete'], 'onclick' => 'onclick="return confirm(\'' . $aLanguageKeys['sure'] . '\')"'));
     $sButtons = $oNewSearchresult->showAdminActionsPanel('poll_form', $aButtons, 'poll_id');
     if (isset($GLOBALS['oAdmTemplate'])) {
         $GLOBALS['oAdmTemplate']->addDynamicLocation($this->_oConfig->getHomePath(), $this->_oConfig->getHomeUrl());
         $GLOBALS['oAdmTemplate']->addCss('main.css');
     }
     // generate template ;
     $aTemplateKeys = array('action' => $this->sPathToModule . 'administration&amp;page=' . $iPage . '&amp;per_page=' . $iPerPage, 'init_js' => $sInitPart, 'js_file' => $this->_oTemplate->addJs('profile_poll.js', true), 'bx_repeat:polls' => $aPollsList, 'pagination' => $sPagination, 'admin_panel' => $sButtons);
     $sOutputHtml .= $this->_oTemplate->parseHtmlByName($this->aUsedTemplates['poll_premoderation'], $aTemplateKeys);
     $sOutputHtml = '<div id="pol_container">' . $sOutputHtml . '</div>';
     return $sOutputHtml;
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:78,代码来源:BxPollModule.php

示例13: PageCodeMembers

function PageCodeMembers($sDefaultCtl = BX_DOL_ADM_MP_CTL, $sDefaultView = BX_DOL_ADM_MP_VIEW)
{
    //--- Get Controls ---//
    $aButtons = array('adm-mp-activate' => _t('_adm_btn_mp_activate'), 'adm-mp-deactivate' => _t('_adm_btn_mp_deactivate'), 'adm-mp-ban' => _t('_adm_btn_mp_ban'), 'adm-mp-unban' => _t('_adm_btn_mp_unban'), 'adm-mp-confirm' => _t('_adm_btn_mp_confirm'), 'adm-mp-delete' => _t('_adm_btn_mp_delete'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mp-members-form', $aButtons, 'members');
    $aTopMenu = array('view-type-simple' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_simple'), 'active' => $sDefaultView == 'simple' ? 1 : 0), 'view-type-extended' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_extended'), 'active' => $sDefaultView == 'extended' ? 1 : 0), 'view-type-geeky' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_geeky'), 'active' => $sDefaultView == 'geeky' ? 1 : 0));
    $oPaginate = new BxDolPaginate(array('per_page' => BX_DOL_ADM_MP_PER_PAGE, 'per_page_step' => BX_DOL_ADM_MP_PER_PAGE_STEP, 'on_change_per_page' => BX_DOL_ADM_MP_JS_NAME . '.changePerPage(this);'));
    $aResult = array('action_url' => $GLOBALS['site']['url_admin'] . 'profiles.php', 'ctl_type' => $sDefaultCtl, 'view_type' => $sDefaultView, 'change_order' => BX_DOL_ADM_MP_JS_NAME . '.changeOrder(this);', 'per_page' => $oPaginate->getPages(), 'control' => $sControls, 'loading' => LoadingBox('adm-mp-members-loading'));
    foreach (array('simple', 'extended', 'geeky') as $sType) {
        if ($sType == $sDefaultView) {
            $aResult = array_merge($aResult, array('style_' . $sType => '', 'content_' . $sType => getMembers(array('view_type' => $sType))));
        } else {
            $aResult = array_merge($aResult, array('style_' . $sType => 'display: none;', 'content_' . $sType => ''));
        }
    }
    return DesignBoxAdmin(_t('_adm_box_cpt_mp_members'), $GLOBALS['oAdmTemplate']->parseHtmlByName('mp_members.html', $aResult), $aTopMenu);
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:17,代码来源:profiles.php

示例14: getAdminPageThemes

 function getAdminPageThemes($sType)
 {
     $sPageThemes = $this->_customPageThemes();
     if ($sPageThemes) {
         $sFormName = 'custom_themes_form';
         $aButtons = array('action_theme_export' => '_bx_profile_customize_btn_export', 'action_theme_delete' => '_bx_profile_customize_btn_delete');
         $sContent = $this->parseHtmlByName('admin_form_units.html', array('form_name' => $sFormName, 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/' . $sType, 'units' => $sPageThemes, 'actions_panel' => BxTemplSearchResult::showAdminActionsPanel($sFormName, $aButtons, 'entry', false)));
     } else {
         $sContent = MsgBox(_t('_Empty'));
     }
     return $sContent;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:12,代码来源:BxProfileCustomizeTemplate.php

示例15: PageCodePrices

function PageCodePrices($iId, $mixedResult)
{
    //--- Get Items ---//
    $oModuleDb = new BxDolModuleDb();
    if (!$oModuleDb->isModule('payment')) {
        return '';
    }
    $aInfo = BxDolService::call('payment', 'get_currency_info');
    $sCurrencySign = $aInfo['sign'];
    $aItems = array();
    $aPrices = $GLOBALS['MySQL']->getAll("SELECT `id` AS `id`, `Days` AS `days`, `Price` AS `price` FROM `sys_acl_level_prices` WHERE `IDLevel`='" . $iId . "' ORDER BY `id`");
    foreach ($aPrices as $aPrice) {
        $aItems[] = array('id' => $aPrice['id'], 'title' => (int) $aPrice['days'] == 0 ? _t('_adm_txt_mlevels_price_info_lifetime', $sCurrencySign, $aPrice['price']) : _t('_adm_txt_mlevels_price_info', $aPrice['days'], $sCurrencySign, $aPrice['price']));
    }
    //--- Get Controls ---//
    $sTopControls = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices_top_controls.html', array());
    $aButtons = array('adm-mlevels-prices-delete' => _t('_adm_btn_mlevels_delete'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mlevels-prices-form', $aButtons, 'prices');
    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices.html', array('id' => $iId, 'top_controls' => $sTopControls, 'bx_repeat:items' => $aItems, 'controls' => $sControls));
    if ($mixedResult !== true && !empty($mixedResult)) {
        $sResult = MsgBox(_t($mixedResult), 3) . $sResult;
    }
    $sTitle = $GLOBALS['MySQL']->getOne("SELECT `Name` FROM `sys_acl_levels` WHERE `ID`='" . $iId . "' LIMIT 1");
    return DesignBoxAdmin(_t('_adm_box_cpt_mlevel_prices', $sTitle), $sResult);
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:25,代码来源:memb_levels.php


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