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


PHP Quote::output方法代码示例

本文整理汇总了PHP中Quote::output方法的典型用法代码示例。如果您正苦于以下问题:PHP Quote::output方法的具体用法?PHP Quote::output怎么用?PHP Quote::output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Quote的用法示例。


在下文中一共展示了Quote::output方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: redir

}
if (!isset($params[1])) {
    redir();
}
$page_number = isset($params[2]) ? (int) $params[2] < 1 ? 1 : (int) $params[2] : 1;
$string = urldecode($params[1]);
$search = new Search();
$search->criteria = $string;
$search->page = $page_number;
$search->show_hidden = $session->level != 'anonymous';
$search->read();
$session->search = htmlspecialchars($string);
if (!$search->results) {
    if ($search->page_size * ($search->page - 1) < $search->count) {
        $html->do_sysmsg(_('Page not found'), null, 404);
    } else {
        $html->do_sysmsg(_('No quotes found'), _('There are no quotes matching your criteria.'), 404);
    }
} else {
    $html->do_header(sprintf(_('Search results for "%s"'), htmlspecialchars($string)));
    $pager = $html->do_pages($search->page + 1, ceil($search->count / $search->page_size), sprintf('%ssearch/%s/%%d', $settings->base_url, str_replace('%', '%%', urlencode($string))), 4);
    $quote = new Quote();
    $odd = true;
    foreach ($search->results as $this_quote) {
        $quote->read($this_quote);
        $quote->output($odd);
        $odd = !$odd;
    }
    $html->output .= $pager;
    $html->do_footer();
}
开发者ID:RDash21,项目名称:fearqdb,代码行数:31,代码来源:search.php

示例2: or

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU Affero General Public License as
	published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.

	You should have received a copy of the GNU Affero General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require classes_dir . 'quote.php';
if (isset($params[0]) && strlen($params[0]) == 4) {
    $quote = new Quote();
    $quote->permaid = $params[0];
} else {
    $html->do_sysmsg(_('Page not found'), null, 404);
}
if (!$quote->read() || $session->level == 'anonymous' && $quote->status != 'approved' || $quote->status == 'deleted') {
    $html->do_sysmsg(_('Page not found'), null, 404);
}
if (isset($params[1]) && $params[1] == $quote->password) {
    $quote->forceshow = true;
} elseif (isset($params[1]) && $params[1] != $quote->password) {
    redir(sprintf('%s%s', $settings->base_url, $quote->permaid));
}
$html->do_header(sprintf(_('Quote #%s'), $quote->permaid));
$quote->output();
$html->do_footer();
开发者ID:RDash21,项目名称:fearqdb,代码行数:31,代码来源:quote.php


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