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


PHP HtmlPage::IndentText方法代码示例

本文整理汇总了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;
}
开发者ID:mhutti1,项目名称:wikimedia-bot,代码行数:31,代码来源:menu.php

示例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 -->";
开发者ID:mhutti1,项目名称:wikimedia-bot,代码行数:31,代码来源:index.php


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