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

PHP get_templates_array函数代码示例

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

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



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

示例1: serviceGetTemplates

 public function serviceGetTemplates($bEnabledOnly = true, $bShortInfo = true)
 {
     $aValues = get_templates_array($bEnabledOnly, $bShortInfo);
     $aResult = array();
     foreach ($aValues as $sKey => $sValue) {
         $aResult[] = array('key' => $sKey, 'value' => $sValue);
     }
     return $aResult;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxBaseTemplateServices.php


示例2: getListTemplate

 function getListTemplate($sCurrent)
 {
     $sOutputCode = "";
     $aTemplates = get_templates_array();
     if (count($aTemplates) < 2) {
         return $sOutputCode;
     }
     $sGetTransfer = bx_encode_url_params($_GET, array('skin'));
     $aTmplVars = array();
     foreach ($aTemplates as $sName => $sTitle) {
         $aTmplVars[] = array('bx_if:show_icon' => array('condition' => false, 'content' => array()), 'class' => $sName == $sCurrent ? 'sys-bm-sub-item-selected' : '', 'link' => bx_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'skin=' . $sName, 'onclick' => '', 'title' => $sTitle);
     }
     $sOutputCode .= $GLOBALS['oSysTemplate']->parseHtmlByName('extra_bottom_menu_sub_items.html', array('name_method' => 'Template', 'name_block' => 'template', 'bx_repeat:items' => $aTmplVars));
     return PopupBox('sys-bm-switcher-template', _t('_sys_bm_popup_cpt_design'), $sOutputCode);
 }
开发者ID:newton27,项目名称:dolphin.pro,代码行数:15,代码来源:BxBaseMenuBottom.php


示例3: loadData

 protected function loadData()
 {
     $this->setSelected('', $this->_oTemplate->getCode());
     $aPage = explode('?', $_SERVER['HTTP_REFERER']);
     $aPageParams = array();
     if (!empty($aPage[1])) {
         parse_str($aPage[1], $aPageParams);
     }
     $aTemplates = get_templates_array(true, true);
     $aItems = array();
     foreach ($aTemplates as $sName => $sTemplate) {
         $aPageParams['skin'] = $sName;
         $aItems[] = array('id' => $sName, 'name' => $sName, 'class' => '', 'title' => $sTemplate, 'target' => '_self', 'icon' => '', 'link' => bx_html_attribute(bx_append_url_params($aPage[0], $aPageParams)), 'onclick' => '');
     }
     $this->_aObject['menu_items'] = $aItems;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:16,代码来源:BxBaseMenuSwitchTemplate.php


示例4: PageCodeTemplates

function PageCodeTemplates($sResult)
{
    $a = get_templates_array(true);
    $aTemplates = array();
    foreach ($a as $k => $r) {
        $aTemplates[] = array('key' => $k, 'name' => htmlspecialchars_adv($r['name']), 'ver' => htmlspecialchars_adv($r['ver']), 'vendor' => htmlspecialchars_adv($r['vendor']), 'desc' => $r['desc'], 'bx_if:preview' => array('condition' => (bool) $r['preview'], 'content' => array('img' => $r['preview'])), 'bx_if:no_preview' => array('condition' => !$r['preview'], 'content' => array()), 'bx_if:default' => array('condition' => $k == getParam('template'), 'content' => array()), 'bx_if:make_default' => array('condition' => $k != getParam('template'), 'content' => array('key' => $k)), 'bx_if:delete' => array('condition' => $k != getParam('template') && $k != 'uni' && $k != 'alt', 'content' => array('key' => $k)));
    }
    $s = $sResult ? MsgBox($sResult, 10) : '';
    $s .= $GLOBALS['oAdmTemplate']->parseHtmlByName('templates.html', array('bx_repeat:templates' => $aTemplates));
    $sCode = DesignBoxAdmin($GLOBALS['sPageTitle'], $s, $GLOBALS['aTopItems'], '', 11);
    if ('on' == getParam('feeds_enable')) {
        $sCode = $sCode . DesignBoxAdmin(_t('_adm_box_cpt_design_templates'), '<div class="RSSAggrCont" rssid="boonex_unity_market_templates" rssnum="5" member="0">' . $GLOBALS['oFunctions']->loadingBoxInline() . '</div>');
    }
    $GLOBALS['oAdmTemplate']->addJsTranslation(array('_Are_you_sure'));
    return $sCode;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:16,代码来源:templates.php


示例5: getSwitcherTemplate

 function getSwitcherTemplate()
 {
     $sContent = '';
     if (getParam('enable_template') != 'on') {
         return $sContent;
     }
     $iTmplsCount = count(get_templates_array());
     if ($iTmplsCount <= 1) {
         return $sContent;
     }
     $sTemplName = $GLOBALS['oSysTemplate']->getCode();
     $aTmplVars = array();
     $aTmplVars[] = array('caption' => _t('_sys_bm_design', $sTemplName), 'link' => 'javascript:void(0)', 'script' => 'onclick="javascript:showPopupTemplate()"', 'target' => '');
     $sContent .= $GLOBALS['oSysTemplate']->parseHtmlByName('extra_' . $this->sName . '_menu.html', array('bx_repeat:items' => $aTmplVars));
     $sContent .= $GLOBALS['oFunctions']->getTemplateSwitcher($sTemplName);
     return $sContent;
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:17,代码来源:BxBaseMenuBottom.php


示例6: getGeneral

 protected function getGeneral()
 {
     $sJsObject = $this->getPageJsObject();
     $oTemplate = BxDolStudioTemplate::getInstance();
     $sResult = '';
     $sTemplate = getParam('template');
     $aTemplates = get_templates_array(true, false);
     $aTmplVarsTemplates = array();
     foreach ($aTemplates as $sUri => $aTemplate) {
         $sIcon = $this->getModuleIcon($aTemplate, 'store');
         $bIcon = strpos($sIcon, '.') === false;
         $aTmplVarsTemplates[] = array('uri' => $sUri, 'title' => htmlspecialchars_adv($aTemplate['title']), 'version' => htmlspecialchars_adv($aTemplate['version']), 'vendor' => htmlspecialchars_adv($aTemplate['vendor']), 'bx_if:icon' => array('condition' => $bIcon, 'content' => array('icon' => $sIcon)), 'bx_if:image' => array('condition' => !$bIcon, 'content' => array('icon_url' => $sIcon)), 'bx_if:default' => array('condition' => $sUri == $sTemplate, 'content' => array()), 'bx_if:make_default' => array('condition' => $sUri != $sTemplate, 'content' => array('js_object' => $sJsObject, 'uri' => $sUri)));
     }
     $sContent = $sResult ? MsgBox($sResult, 10) : '';
     $sContent .= $oTemplate->parseHtmlByName('templates.html', array('bx_repeat:templates' => $aTmplVarsTemplates));
     return $oTemplate->parseHtmlByName('designer.html', array('js_object' => $this->getPageJsObject(), 'content' => $sContent));
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:17,代码来源:BxBaseStudioDesigner.php


示例7: _isVisible

 protected function _isVisible($a)
 {
     if (!parent::_isVisible($a)) {
         return false;
     }
     $bResult = true;
     switch ($a['name']) {
         case 'switch_language':
             $aLanguages = BxDolLanguagesQuery::getInstance()->getLanguages(false, true);
             if (count($aLanguages) <= 1) {
                 $bResult = false;
             }
             break;
         case 'switch_template':
             $aTemplates = get_templates_array(true, true);
             if (count($aTemplates) <= 1) {
                 $bResult = false;
             }
             break;
     }
     return $bResult;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:22,代码来源:BxBaseMenuFooter.php


示例8: templates_select_txt

function templates_select_txt()
{
    $templ_choices = get_templates_array();
    $current_template = strlen($_GET['skin']) ? $_GET['skin'] : $_COOKIE['skin'];
    foreach ($templ_choices as $tmpl_key => $tmpl_value) {
        if ($current_template == $tmpl_key) {
            $ReturnResult .= $tmpl_value . ' | ';
        } else {
            $sGetTransfer = bx_encode_url_params($_GET, array('skin'));
            $ReturnResult .= '<a href="' . bx_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'skin=' . $tmpl_key . '">' . $tmpl_value . '</a> | ';
        }
    }
    return $ReturnResult;
}
开发者ID:blas-dmx,项目名称:dolphin.pro,代码行数:14,代码来源:utils.inc.php


示例9: templates_select_txt

function templates_select_txt()
{
    global $dir;
    $templ_choices = get_templates_array();
    $current_template = strlen($_GET['skin']) ? $_GET['skin'] : $_COOKIE['skin'];
    foreach ($templ_choices as $tmpl_key => $tmpl_value) {
        if ($current_template == $tmpl_key) {
            $ReturnResult .= $tmpl_value;
            $ReturnResult .= ' | ';
        } else {
            foreach ($_GET as $param_key => $param_value) {
                if ('skin' != $param_key) {
                    $sGetTransfer .= "&{$param_key}={$param_value}";
                }
            }
            $ReturnResult .= '<a href="' . $_SERVER['PHP_SELF'] . '?skin=' . $tmpl_key . $sGetTransfer . '">' . $tmpl_value . '</a>';
            $ReturnResult .= ' | ';
        }
    }
    return $ReturnResult;
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:21,代码来源:utils.inc.php


示例10: display_category_settings


//.........这里部分代码省略.........
                $class = 'table_odd';
            }
        }
        $i++;
        echo "<tr class=\"{$class}\"><td align=\"left\" class=\"small1\"";
        // Display item caption.
        if ('text' == $param_type) {
            echo ' valign="top"';
        }
        echo ">{$param_desc}</td><td align=\"right\" width=\"200\">";
        // Display item control.
        if ('text' == $param_type) {
            if (EMAIL_TEMPLATE_CATEGORY == $cat) {
                // Get email subject.
                $subject_name = $param_name . '_subject';
                $q_str = "SELECT `VALUE` FROM `GlParams` WHERE `Name` = '{$subject_name}'";
                $res = db_res($q_str);
                if ($row = mysql_fetch_array($res)) {
                    $subject_value = $row['VALUE'];
                } else {
                    $subject_value = '';
                }
                echo "<b>HTML version</b>&nbsp;(";
                echo "<a href=\"javascript:void(0);\" onClick=\"javascript:docOpen('" . rawurlencode($param_value) . "');\">";
                echo _t("_Preview");
                echo "</a>)<br>";
                echo 'Subject:<br />';
                echo "<input type=\"text\" class=\"no\" size=\"50\" name=\"{$param_name}_subject\" value=\"{$subject_value}\"/><br /><br />";
                echo 'Body:<br />';
                echo "<textarea cols=\"50\" rows=\"10\" class=\"no\" name=\"{$param_name}\">" . htmlspecialchars($param_value) . "</textarea>";
                $tags = '<RealName> <SiteName> <ConfCode> <ConfirmationLink> <StrID> <Email> <Password>    <YourRealName> <NickName>
                        <Domain> <ID> <TEXT> <VKissLink> <ContactInfo> <DomainName> <FromName> <Link> <NickSpamer> <IDspamer>
                        <LinkSpamer> <MatchProfileLink>    <Requester> <Profile> <site> <PrivPhotosMember> <LoginLink> <Title>
                        <Message_Text> <MessageText> <LinkSDatingEvent> <NameSDating> <PlaceSDating> <WhenStarSDating> <PersonalUID>
                        <MatchLink>';
                echo '<br><br><br><b>Text version</b><br>';
                echo 'Subject:<br />';
                echo "<input readonly type=\"text\" class=\"no\" size=\"50\" name=\"{$param_name}_subject_ro\" value=\"{$subject_value}\"/><br /><br />";
                echo 'Body:<br />';
                echo "<textarea readonly cols=\"50\" rows=\"10\" class=\"no\" name=\"{$param_name}_ro\">" . htmlspecialchars(html2txt($param_value, $tags)) . "</textarea>";
            } else {
                echo "<textarea cols=\"50\" rows=\"10\" class=\"no\" name=\"{$param_name}\">{$param_value}</textarea>";
            }
        } elseif ('digit' == $param_type) {
            echo "<input type=\"text\" class=\"no\" name=\"{$param_name}\" size=\"15\" value=\"{$param_value}\" />";
        } elseif ('checkbox' == $param_type) {
            echo "<input type=\"checkbox\" name=\"{$param_name}\" " . ('on' == $param_value ? 'checked' : '') . '>';
        } elseif ('select' == $param_type) {
            if ('chicks_for_free' == $param_name) {
                $vals = getParam('chicks_for_free', false);
                $query = "SELECT `extra` FROM `ProfilesDesc` WHERE name='Sex'";
                $result = db_arr($query);
                $result['extra'] = str_replace('\'', '', $result['extra']);
                $sex = split(',', $result['extra']);
                echo "<select name=\"{$param_name}[]\" multiple>";
                foreach ($sex as $sex_key) {
                    if (strstr($vals, '\'' . $sex_key . '\'')) {
                        $selected = 'selected';
                    } else {
                        $selected = '';
                    }
                    echo "<option value=\"{$sex_key}\" {$selected} >{$sex_key}</option>";
                }
                echo "</select>";
            } else {
                echo "&nbsp;";
            }
        } elseif ('combobox' == $param_type) {
            if ('chicks_for_free_membership' == $param_name) {
                $memberships_arr = getMemberships();
                $vals = getParam('chicks_for_free_membership', false);
                echo "<select name=\"{$param_name}\">";
                foreach ($memberships_arr as $membershipID => $membershipName) {
                    if ($membershipID == MEMBERSHIP_ID_NON_MEMBER) {
                        continue;
                    }
                    $selected = (int) $vals == $membershipID ? ' selected ' : '';
                    echo "<option value=\"{$membershipID}\" {$selected} >{$membershipName}</option>";
                }
                echo "</select>";
            } elseif ('template' == $param_name) {
                $old_val = getParam('template');
                $templ_choices = get_templates_array();
                echo "<select name=\"{$param_name}\">";
                foreach ($templ_choices as $key => $value) {
                    echo "<option value=\"{$key}\" " . ($old_val == $key ? 'selected="selected"' : '') . ">{$value}</option>\n";
                }
                echo "</select>";
            }
        } else {
            echo "<input type=\"text\" name=\"{$param_name}\" value=\"{$param_value}\" size=\"30\" />";
        }
        echo "</td></tr>";
    }
    ?>
    </table>
    </center><br />
    <?php 
    return ' ';
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:101,代码来源:global_settings.php


示例11: genMoreTemplatesElement

 function genMoreTemplatesElement()
 {
     if (!getParam("enable_template")) {
         return;
     }
     $aExistedTemplates = get_templates_array();
     if (count($aExistedTemplates) <= 1) {
         return;
     }
     $sCurTemplate = strlen($_GET['skin']) ? $_GET['skin'] : $_COOKIE['skin'];
     $sTemplateElement = '';
     foreach ($aExistedTemplates as $sTemplateID => $sTemplateVal) {
         $sIActiveClass = $sCurTemplate == $sTemplateID ? ' active' : '';
         $sTemplateUrl = '';
         if ($sCurTemplate == $sTemplateID) {
             $sTemplateUrl = 'javascript: void(0)';
         } else {
             if (defined('BX_PROFILE_PAGE')) {
                 global $profileID;
                 $sTemplateUrl = getProfileLink($profileID) . '&skin=' . $sTemplateID;
             } else {
                 $sGetTransfer = bx_encode_url_params($_GET, array('skin'));
                 $sTemplateUrl = bx_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'skin=' . $sTemplateID;
             }
         }
         //$sIOnclick = "window.open('{$sTemplateUrl}','_self');"; // old version
         $sTemplateElement .= '<li><a href="' . $sTemplateUrl . '" class="button more_ntop_element' . $sIActiveClass . '">' . $sTemplateVal . '</a>';
     }
     if ($sTemplateElement == '') {
         return;
     }
     return array('icon_url' => getTemplateIcon('tm_item_templates.png'), 'element_content' => $sTemplateElement);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:33,代码来源:BxBaseMenu.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_term函数代码示例发布时间:2022-05-15
下一篇:
PHP get_template_path函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap