本文整理汇总了PHP中Output::send方法的典型用法代码示例。如果您正苦于以下问题:PHP Output::send方法的具体用法?PHP Output::send怎么用?PHP Output::send使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Output
的用法示例。
在下文中一共展示了Output::send方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SelectableCategories
$error = 'not found';
} else {
/* we have valid access to this book */
$selectableCategories = new SelectableCategories($id);
if (isset($_POST['author'])) {
/* update base book data */
$query = 'update books set
author = "' . $_POST['author'] . '",
title = "' . $_POST['title'] . '",
year = "' . $_POST['year'] . '",
isbn = "' . $_POST['isbn'] . '",
price = "' . str_replace(',', '.', $_POST['price']) . '",
description = "' . $_POST['desc'] . '"
where id="' . $id . '" and auth_key="' . $key . '"';
mysql_query($query);
/* update category relations */
$selectableCategories->update();
/* update expire date and look at the book */
require 'renew.php';
}
$book = Book::fromMySql($result);
require_once 'tools/Output.php';
require_once 'text/Template.php';
$tmpl = Template::fromFile('view/edit.html');
$book->assignHtmlToTemplate($tmpl);
assignSelectableCategories($selectableCategories, $tmpl);
$tmpl->assign('id', $_GET['id']);
$tmpl->assign('key', $_GET['key']);
$output = new Output();
$output->send($tmpl->result());
}
示例2: foreach
}
if ($localServer->acceptSuggestedServers()) {
$sub->addSubtemplate('acceptingSuggestedServers');
} else {
$sub->addSubtemplate('notAcceptingSuggestedServers');
}
$activeServers = ExternalServerPool::whiteServerPool();
$sub->assign('numOfActive', $activeServers->size());
foreach ($activeServers->toArray() as $server) {
$a = $sub->addSubtemplate('activeListEntry');
$a->assign('url', $server->getUrl());
$a->assign('name', $server->getName());
$a->assign('group', $server->getDistanceGroup());
}
$unknownServers = ExternalServerPool::unknownServerPool();
$sub->assign('numOfUnknown', $unknownServers->size());
foreach ($unknownServers->toArray() as $server) {
$a = $sub->addSubtemplate('unknownListEntry');
$a->assign('url', $server->getUrl());
$a->assign('name', $server->getName());
}
$blacklistServers = ExternalServerPool::blacklistServerPool();
$sub->assign('numOfBlacklisted', $blacklistServers->size());
foreach ($blacklistServers->toArray() as $server) {
$a = $sub->addSubtemplate('blackListEntry');
$a->assign('url', $server->getUrl());
$a->assign('name', $server->getName());
}
}
$output->send($template->result());
示例3: Output
<?php
require 'lib/Output.php';
$Output = new Output();
/* Send a message to the screen.
* Sample Output: [13/Jan/2011 16:48:38] Test Message */
$Output->send('Test Message');
/* Send a message to the screen and await input.
* Sample Output: [13/Jan/2011 16:48:38] What is your name?: */
$Output->askForInput('What is your name?: ');
示例4: Output
<?php
/*
* This file is part of uBook - a website to buy and sell books.
* Copyright © 2010 Maikel Linke
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once 'tools/Output.php';
require_once 'text/Template.php';
$helpTpl = Template::fromFile('view/help.html');
$output = new Output();
$output->setExpires(43200);
$output->unlinkMenuEntry('Tipps');
$output->send($helpTpl->result());
示例5: Statistics
* This file is part of uBook - a website to buy and sell books.
* Copyright © 2010 Maikel Linke
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once 'tools/Output.php';
require_once 'tools/Statistics.php';
require_once 'text/Template.php';
$stat = new Statistics();
$statTpl = Template::fromFile('view/statistics.html');
if (file_exists(Statistics::STATS_FILE)) {
$statTpl->addSubtemplate('stats');
$stat->fillTemplate($statTpl);
} else {
$statTpl->addSubtemplate('noStats');
}
$output = new Output();
$output->setExpires(43200);
$output->send($statTpl->result());