本文整理汇总了PHP中Stat::title方法的典型用法代码示例。如果您正苦于以下问题:PHP Stat::title方法的具体用法?PHP Stat::title怎么用?PHP Stat::title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stat
的用法示例。
在下文中一共展示了Stat::title方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
if (isset($_GET["date2"])) {
$_POST["date2"] = $_GET["date2"];
}
if (empty($_POST["date1"]) && empty($_POST["date2"])) {
$year = date("Y") - 1;
$_POST["date1"] = date("Y-m-d", mktime(1, 0, 0, date("m"), date("d"), $year));
$_POST["date2"] = date("Y-m-d");
}
if (!empty($_POST["date1"]) && !empty($_POST["date2"]) && strcmp($_POST["date2"], $_POST["date1"]) < 0) {
$tmp = $_POST["date1"];
$_POST["date1"] = $_POST["date2"];
$_POST["date2"] = $tmp;
}
if (!isset($_GET["start"])) {
$_GET["start"] = 0;
}
Stat::title();
echo "<div class='center'><form method='post' name='form' action='stat.item.php'>";
echo "<table class='tab_cadre'><tr class='tab_bg_2'>";
echo "<td class='right'>" . __('Start date') . "</td><td>";
Html::showDateField("date1", array('value' => $_POST["date1"]));
echo "</td><td rowspan='2' class='center'>";
echo "<input type='submit' class='submit' name='submit' value='" . __s('Display report') . "'></td></tr>";
echo "<tr class='tab_bg_2'><td class='right'>" . __('End date') . "</td><td>";
Html::showDateField("date2", array('value' => $_POST["date2"]));
echo "</td></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
Stat::showItems($_SERVER['PHP_SELF'], $_POST["date1"], $_POST["date2"], $_GET['start']);
Html::footer();
示例2: displayCriteriasForm
/**
* Display a common search criterias form
* @param target the form's target
* @param params the search criterias
*/
function displayCriteriasForm()
{
global $HEADER_LOADED;
//Get criteria's values
$this->manageCriteriasValues();
//Display Html::header is output is HTML
if (isset($_POST["display_type"]) && $_POST["display_type"] != Search::HTML_OUTPUT) {
return;
}
if (!$HEADER_LOADED) {
$title = $this->title;
if ($this->subname) {
$title = sprintf(__('%1$s - %2$s'), $title, $this->subname);
}
if (isStat($this->name)) {
Html::header($title, $_SERVER['PHP_SELF'], "maintain", "stat");
Stat::title();
} else {
Html::header($title, $_SERVER['PHP_SELF'], "utils", "report");
Report::title();
}
}
plugin_reports_checkRight($this->plug, $this->name, "r");
//Display form only if there're criterias
if (!empty($this->criterias)) {
echo "<div class='center'>";
echo "<form method='post' name='form' action='" . $_SERVER['PHP_SELF'] . "'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='6'>" . __('Search criteria', 'reports');
//If form is validated, then display the bookmark button
if ($this->criteriasValidated()) {
//Add parameters to uri to be saved as bookmarks
$_SERVER["REQUEST_URI"] = $this->buildBookmarkUrl();
Bookmark::showSaveButton(Bookmark::URI, isStat($this->name) ? 'PluginReportsStat' : 'PluginReportsReport');
}
echo "</th></tr>\n";
//Display each criteria's html selection item
foreach ($this->criterias as $criteria) {
$criteria->displayCriteria();
}
$this->closeColumn();
echo "<tr class='tab_bg_2'><td colspan='4' class='center'>";
echo "<input type='submit' name='find' value='" . _sx('button', 'Search') . "' class='submit'>";
echo "</td></tr>";
echo "</table></div>";
Html::closeForm();
}
}