當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。