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


PHP SmartyWrap::displayPageWithSkin方法代码示例

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


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

示例1: preg_split

$wordCount = Definition::getWordCount();
$wordCountRough = $wordCount - $wordCount % 10000;
SmartyWrap::assign('page_title', 'Dicționar explicativ al limbii române');
SmartyWrap::assign('onHomePage', '1');
SmartyWrap::assign('letters', preg_split('//u', 'aăâbcdefghiîjklmnopqrsștțuvwxyz'));
SmartyWrap::assign('words_total', util_formatNumber($wordCount, 0));
SmartyWrap::assign('words_rough', util_formatNumber($wordCountRough, 0));
SmartyWrap::assign('words_last_month', util_formatNumber(Definition::getWordCountLastMonth(), 0));
SmartyWrap::assign('widgets', $widgets);
SmartyWrap::assign('numEnabledWidgets', $numEnabledWidgets);
/* WotD part */
$wotd = WordOfTheDay::getTodaysWord();
if (!$wotd) {
    WordOfTheDay::updateTodaysWord();
    $wotd = WordOfTheDay::getTodaysWord();
}
$defId = WordOfTheDayRel::getRefId($wotd->id);
$def = Model::factory('Definition')->where('id', $defId)->where('status', ST_ACTIVE)->find_one();
SmartyWrap::assign('thumbUrl', $wotd->getThumbUrl());
SmartyWrap::assign('title', $def->lexicon);
SmartyWrap::assign('today', date('Y/m/d'));
/* WotM part */
$wotm = WordOfTheMonth::getCurrentWotM();
$def = Model::factory('Definition')->where('id', $wotm->definitionId)->where('status', ST_ACTIVE)->find_one();
SmartyWrap::assign('thumbUrlM', $wotm->getThumbUrl());
SmartyWrap::assign('articol', $wotm->article);
SmartyWrap::assign('titleM', $def->lexicon);
SmartyWrap::assign('todayM', date('Y/m'));
$page = Config::get('global.aprilFoolsDay') ? 'index-afd.ihtml' : 'index.ihtml';
SmartyWrap::displayPageWithSkin($page);
开发者ID:Jobava,项目名称:mirror-dexonline,代码行数:30,代码来源:index.php

示例2: array

            if ($_POST['hiddenText'] == '') {
                return '';
            } else {
                $search = array();
                $replace = array();
                $buffer = $_POST['hiddenText'];
                foreach ($_POST as $key => $value) {
                    if (is_numeric($key)) {
                        $search[] = '/@@' . $key . '@@/i';
                        $replace[] = $value;
                    }
                }
                return preg_replace($search, $replace, $buffer);
            }
        } else {
            return '';
        }
    }
}
if (strstr($_SERVER['SCRIPT_NAME'], 'diacritice.php')) {
    SmartyWrap::assign('page_title', 'Corector diacritice');
    $obj = new DiacriticsFixer();
    if (isset($_POST['text']) && $_POST['text'] != '') {
        SmartyWrap::assign('textarea', '<div id="textInput">' . $obj->fix($_POST['text']) . '</div>');
        SmartyWrap::assign('hiddenText', '<input type="hidden" name="hiddenText" value="' . $obj->getHiddenText() . '">');
    } else {
        SmartyWrap::assign('textarea', '<textarea name="text" id="textInput" placeholder="introduceți textul aici">' . $obj->replaceDiacritics() . '</textarea>');
        SmartyWrap::assign('hiddenText', '<input type="hidden" name="hiddenText" value="">');
    }
    SmartyWrap::displayPageWithSkin('../diacritics_fix/diacritics_fix.ihtml');
}
开发者ID:Jobava,项目名称:mirror-dexonline,代码行数:31,代码来源:diacritice.php


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