本文整理汇总了PHP中CTemplate::Render方法的典型用法代码示例。如果您正苦于以下问题:PHP CTemplate::Render方法的具体用法?PHP CTemplate::Render怎么用?PHP CTemplate::Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTemplate
的用法示例。
在下文中一共展示了CTemplate::Render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LogLangSettings
LogLangSettings();
}
} else {
// If no phrase was submitted, show
// usage information, news, etc. .
$page = new CTemplate(GetLocalizedFname('tpl/intro.html'));
}
// If we don't have data from the form or a
// previous phrase stored in the sessions,
// load the example data.
if (!isset($_SESSION['data'])) {
$_SESSION['data'] = file_get_contents(GetLocalizedFname("var/sample.phrase"));
$_SESSION['color'] = TRUE;
$_SESSION['antialias'] = TRUE;
$_SESSION['autosub'] = TRUE;
$_SESSION['triangles'] = TRUE;
$_SESSION['fontsel'] = "vera_sans";
$_SESSION['font'] = "Vera.ttf";
$_SESSION['fontsize'] = 8;
}
// Render the page
$phrase = htmlentities($_SESSION['data']);
$img = sprintf("<img src=\"stgraph.png.php?%s\" alt=\"\" title=\"%s\"/>", SID, $phrase);
$graph = sprintf("<a href=\"dnlgraph.php?%s\">%s</a>", SID, $img);
$icon = "<img src=\"img/vectorgfx.png\" alt=\"SVG\" />";
$svg = sprintf("<div id=\"svg\"><a href=\"stgraph.svg.php?%s\">%s</a></div>", SID, $icon);
$fontoption = sprintf("SELECT_%s", $_SESSION['fontsel']);
$sizeoption = sprintf("SELECT_size_%d", $_SESSION['fontsize']);
$page->SetValues(array('VERSION' => VERSION, 'FORM_ACTION' => sprintf("?%s", strip_tags(SID)), 'GRAPH' => $graph, 'SVG' => $svg, 'PHRASE' => $phrase, 'DATA_VAL' => $phrase, 'COLOR_VAL' => $_SESSION['color'] ? HTML_CHECKED : HTML_UNCHECKED, 'ANTIALIAS_VAL' => $_SESSION['antialias'] ? HTML_CHECKED : HTML_UNCHECKED, 'AUTOSUB_VAL' => $_SESSION['autosub'] ? HTML_CHECKED : HTML_UNCHECKED, 'TRIANGLES_VAL' => $_SESSION['triangles'] ? HTML_CHECKED : HTML_UNCHECKED, 'COUNTER' => GetCounter(), $fontoption => HTML_SELECTED, $sizeoption => HTML_SELECTED));
$page->Render();