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


PHP Output::send方法代码示例

本文整理汇总了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());
}
开发者ID:BackupTheBerlios,项目名称:ubook-svn,代码行数:31,代码来源:edit.php

示例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());
开发者ID:BackupTheBerlios,项目名称:ubook-svn,代码行数:30,代码来源:admin_servers.php

示例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?: ');
开发者ID:jiminald,项目名称:PHP-Multimedia-Sorter,代码行数:10,代码来源:Output.php

示例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());
开发者ID:BackupTheBerlios,项目名称:ubook-svn,代码行数:26,代码来源:help.php

示例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());
开发者ID:BackupTheBerlios,项目名称:ubook-svn,代码行数:30,代码来源:statistics.php


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