本文整理汇总了PHP中HtmlPage::IndentText方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlPage::IndentText方法的具体用法?PHP HtmlPage::IndentText怎么用?PHP HtmlPage::IndentText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlPage
的用法示例。
在下文中一共展示了HtmlPage::IndentText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Generate_Picker
function Generate_Picker($channel)
{
$html = "<div class=filter>\n";
$html .= " <b>Filter:</b><br>\n";
$html .= " <form>\n";
$StartDate = date("m/d/Y");
if (isset($_GET["start"])) {
$StartDate = $_GET["start"];
}
$FinishDate = date("m/d/Y");
if (isset($_GET["end"])) {
$FinishDate = $_GET["end"];
}
$picker = new HtmlTable();
$picker->InsertRow(array("Start date", "<input id='datepicker' value=\"{$StartDate}\" name='start'>"));
$picker->BorderSize = 0;
$picker->InsertRow(array("End date", "<input id='datepicker2' value=\"{$FinishDate}\" name='end'>"));
$show = "";
if (isset($_GET['data'])) {
$show = "checked=on ";
}
$checked = "";
if (isset($_GET['wiki'])) {
$checked = "checked=on ";
}
$picker->InsertRow(array("", "<label><input " . $checked . "type='checkbox' value='true' name='wiki'>Convert to wiki text</label>"));
$picker->InsertRow(array("", "<label><input " . $show . "type='checkbox' value='true' name='data'>Show part / join / quit / kick / nick</label>"));
$html .= HtmlPage::IndentText($picker->ToHtml(), 4);
$html .= "<input type='submit' value='Display'><input type='hidden' name='display' value=\"{$channel}\"></form>\n</div>\n";
return $html;
}
示例2: htmlspecialchars
// Header
$header = "Wikimedia IRC logs browser";
if ($selected_channel !== null) {
$header .= " - " . htmlspecialchars($selected_channel);
}
$html->AppendHtmlLine("<h1 class=header>{$header}</h1>");
// Create a layout for interface, we use just a simple html table with no border that contains all stuff
$layout = new HtmlTable();
if ($selected_channel === null) {
$page = "<p>This is a Wikimedia IRC logs browser, please pick a channel from menu on left side.</p>\n";
$page .= "<p>This page is open source, if you don't like anything on it, please fix it instead of complaining!</p>\n";
} else {
$page = Generate_Picker($selected_channel);
if ($displaying_logs) {
$page .= "<hr>\n";
$page .= FetchLogs($selected_channel);
}
}
$layout->InsertRow(array(HtmlPage::IndentText(Generate_Menu(), 6), HtmlPage::IndentText($page, 6)));
$layout->BorderSize = 0;
// We need to style the layout a bit as well
$layout->Format = "class=layout";
// load some extra javascript into page header that we need to use for picker
$html->InternalJs[] = "\$(function() {\n \$( \"#datepicker\" ).datepicker();\n});";
$html->InternalJs[] = "\$(function() {\n \$( \"#datepicker2\" ).datepicker();\n});";
$html->AppendHtml($layout->ToHtml());
$html->AppendHtml("<p>This page is generated from SQL logs, you can also download static txt files from <a href=http://wm-bot.wmflabs.org/logs>here</a></p>");
$html->UseTidy = true;
echo $html->ToHtml();
$et = microtime(true) - $exec;
echo "<!-- finished in {$et} seconds -->";