本文整理汇总了PHP中pieTail函数的典型用法代码示例。如果您正苦于以下问题:PHP pieTail函数的具体用法?PHP pieTail怎么用?PHP pieTail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pieTail函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printOutput
function printOutput($output)
{
if ($GLOBALS['pie']['context'] == 'edit') {
print "<div class=\"output\">\n{$output}</div>\n";
} else {
print $output;
}
pieTail();
exit;
}
示例2: pieHead
pieHead("edit");
if (@$_REQUEST['user']) {
// A user has been specified.
$_REQUEST['user'] = pieGetOption($_REQUEST['user']);
$user = new User();
if (!$user->isValidName($_REQUEST['user'])) {
pieError("BadUser");
}
if (!$user->exists($_REQUEST['user'])) {
pieError("BadUser");
}
} elseif ($_SESSION['user']) {
// No user has been specified:
// display information about myself.
$_REQUEST['user'] = $_SESSION['user'];
}
if (!@$_REQUEST['user']) {
pieError("NoUser");
}
$map = new MapFile();
$data = array('user' => htmlspecialchars($_REQUEST['user']), 'realname' => "—", 'lastlogin' => date($GLOBALS['pie']['time_format'], $map->read($GLOBALS['pie']['run_path'] . "/user/login.map", $_REQUEST['user'])));
$pref = new UserPref();
if (($val = $pref->read(@$_REQUEST['user'], 'realname')) !== false) {
$data['realname'] = $val;
}
if (($val = $pref->read(@$_REQUEST['user'], 'registered')) !== false) {
$data['registered'] = date($GLOBALS['pie']['time_format'], $val);
}
pieNotice("UserData", $data);
pieTail();
示例3: pieError
if (!($dump = file_get_contents("{$path}/{$file}"))) {
pieError("NoTemplates");
}
$meta = pieExplodePage($dump);
$list[$file] = $meta['title'];
}
closedir($dh);
asort($list);
// Present available templates.
$l = "";
foreach ($list as $file => $info) {
$l .= "<option value=\"{$file}\">" . htmlspecialchars($info) . "</option>\n";
}
pieError("TemplateList", array('templates' => $l));
} else {
// Create a new, empty page.
$_REQUEST['source'] = '';
}
// Initialize and print editing form.
if (empty($_REQUEST['source'])) {
if ($GLOBALS['pie']['page_header']) {
$_REQUEST['title'] = str_replace('_', ' ', $_REQUEST['page']);
}
$_REQUEST['comment'] = $GLOBALS['pie']['locale']->key('InitialVersion');
}
pieNotice("EditScript");
pieNotice("CharacterPanel");
pieNotice("EditPanel");
pieNotice("PageEdit");
pieTail("edit");
示例4: pieError
function pieError($message, $data = array())
{
pieNotice($message, $data);
pieTail();
exit;
}