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


PHP pieNotice函数代码示例

本文整理汇总了PHP中pieNotice函数的典型用法代码示例。如果您正苦于以下问题:PHP pieNotice函数的具体用法?PHP pieNotice怎么用?PHP pieNotice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: pieGetOption

        $pref->write($user, 'realname', pieGetOption(@$_REQUEST['realname']));
    }
    if ($_REQUEST['mail']) {
        $pref->write($user, 'mail', pieGetOption(@$_REQUEST['mail']));
    }
    if ($_REQUEST['cols']) {
        $pref->write($user, 'cols', intval(@$_REQUEST['cols']));
    }
    if ($_REQUEST['rows']) {
        $pref->write($user, 'rows', intval(@$_REQUEST['rows']));
    }
    pieLog("user");
    pieNotice("UpdateSuccessful");
} else {
    // Display the form.
    $data = array('user' => htmlspecialchars($user), 'admin' => "—", 'registered' => 0, 'cols' => 80, 'rows' => 20);
    $map = new MapFile();
    $data['lastlogin'] = date($GLOBALS['pie']['time_format'], $map->read($GLOBALS['pie']['run_path'] . "/user/login.map", $user));
    $data['updated'] = date($GLOBALS['pie']['time_format'], $pref->read($user, 'stamp'));
    $data['registered'] = date($GLOBALS['pie']['time_format'], $pref->read($user, 'registered'));
    if (pieIsSuperuser($user)) {
        $data['admin'] = "√";
    }
    foreach (array('realname', 'mail', 'cols', 'rows') as $i) {
        if (($val = $pref->read($user, $i)) !== false) {
            $data[$i] = $val;
        }
    }
    pieNotice("PreferencesForm", $data);
}
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:useredit.php

示例2: pieError

    if (!count($deadpages) && !count($deadfiles)) {
        pieError("NoDeadLinks");
    }
    pieNotice("ListOfDeadLinks");
    if (count($deadpages)) {
        pieNotice("PageTableHead");
        arsort($deadpages);
        $n = 0;
        foreach ($deadpages as $name => $i) {
            $n++;
            print '<tr class="' . ($n % 2 ? "oddRow" : "evenRow") . '">' . '<td>' . pieMakeLink(htmlspecialchars($name), array('action' => "edit", 'page' => $name), array('class' => "itemLink")) . '</td>' . "<td style=\"text-align: right;\">{$i}</td></tr>\n";
        }
        print "</table>\n";
    }
    if (count($deadfiles)) {
        if (count($deadpages)) {
            print "<br />\n";
        }
        pieNotice("FileTableHead");
        arsort($deadfiles);
        $n = 0;
        foreach ($deadfiles as $name => $i) {
            $n++;
            print '<tr class="' . ($n % 2 ? "oddRow" : "evenRow") . '">' . '<td>' . pieMakeLink(htmlspecialchars($name), array('action' => "upload", 'file' => $name, 'create' => "true"), array('class' => "itemLink")) . '</td>' . "<td style=\"text-align: right;\">{$i}</td></tr>\n";
        }
        print "</table>\n";
    }
} else {
    pieNotice("SelectForm");
}
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:deadlinks.php

示例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");
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:edit.php

示例4: pieError

        }
        if ($page->meta['comment']) {
            if ($n = preg_match_all($pattern, $page->meta['comment'], $m)) {
                $result[$name] += 2 * $n * $val;
            }
        }
        if ($page->meta['type'] == "alias") {
            continue;
        }
        // Examine the source (of the page).
        if ($n = preg_match_all($pattern, $page->source, $m)) {
            $result[$name] += 2 * $n * $val;
        }
    }
    if (!count($result)) {
        pieError("NoMatches");
    }
    // Present the results:
    arsort($result);
    reset($result);
    list($n, $val) = each($result);
    pieNotice("TableHead");
    $i = 0;
    foreach ($result as $p => $n) {
        $i++;
        print '<tr class="' . ($i % 2 ? "oddRow" : "evenRow") . '">' . "<td>" . pieMakeLink(htmlspecialchars($p), array('page' => $p), array('class' => "itemLink")) . "</td>" . '<td><hr class="gauge" style="width: ' . sprintf("%.2f", $n * 10 / $val) . 'em;" /></td>' . "</tr>\n";
    }
    pieNotice("TableFooter");
} else {
}
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:search.php

示例5: pieNotice

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>Pie (Edit Mode)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Content-Language" content="en">
<link rel="stylesheet" type="text/css" href="css/common.css" />
<link rel="stylesheet" type="text/css" href="css/edit.css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
</head>

<body>
<div id="control">
<ul>
<?php 
pieNotice("MenuRoot");
if (@$_REQUEST['page']) {
    pieNotice("MenuPage");
} elseif (@$_REQUEST['file']) {
    pieNotice("MenuFile");
}
pieNotice("MenuDirectory");
pieNotice("MenuUser");
?>
</ul>
</div>

<div id="content">
开发者ID:rafsoaken,项目名称:piewiki,代码行数:28,代码来源:edit_head.php

示例6: rewinddir

        }
        $total++;
    }
    // Walk directory for the second time. This time, encountered
    // files (and pages contained therein) are imported for real.
    rewinddir($dh);
    while (($file = readdir($dh)) !== false) {
        if ($file == "." || $file == "..") {
            continue;
        }
        if (!importFile($_REQUEST['path'] . "/{$file}")) {
            pieError("ImportError", array('page' => htmlspecialchars($file)));
        }
        $count++;
    }
} elseif (is_readable($_REQUEST['path'])) {
    // Just one file is to be imported.
    if (!importFile($_REQUEST['path'])) {
        pieError("ImportError", array('page' => htmlspecialchars($_REQUEST['path'])));
    }
    $total = 1;
    $count = 1;
}
// Update the cache.
$cache = new Cache();
if ($cache->exists($cache->key('latest', array()))) {
    $cache->delete($cache->key('latest', array()));
}
pieLog("alter");
pieNotice("ImportSuccess", array('total' => $total, 'count' => $count));
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:pageimport.php

示例7: pieMakeString

    $n++;
}
// Print the files:
$hint_show = $GLOBALS['pie']['locale']->key("Show");
$hint_info = $GLOBALS['pie']['locale']->key("Info");
$hint_download = $GLOBALS['pie']['locale']->key("Download");
$hint_update = $GLOBALS['pie']['locale']->key("Update");
$ip = pieMakeString('[[$^icon_link]]');
pieNotice("TableHead", array('order' => $_REQUEST['order'] == "ascend" ? "descend" : "ascend"));
while (($item = each($data)) && $n < $_REQUEST['offset'] + $_REQUEST['limit']) {
    print '<tr class="' . ($n % 2 ? "oddRow" : "evenRow") . "\">\n" . "<td>" . pieMakeLink(htmlspecialchars($item[0]), array('action' => "fileinfo", 'file' => $item[0]), array('title' => $hint_info, 'class' => "itemLink")) . "</td>\n" . "<td>" . date($GLOBALS['pie']['time_format'], $item[1]) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/information.png\" alt=\"" . $hint_info . '" />', array('file' => $item[0], 'action' => "fileinfo"), array('title' => $hint_info)) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/eye.png\" alt=\"" . $hint_show . '" />', array('file' => $item[0], 'action' => "dump"), array('title' => $hint_show, 'target' => "_blank")) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/download.png\" alt=\"" . $hint_download . '" />', array('file' => $item[0], 'action' => "download"), array('title' => $hint_download, 'target' => "_blank")) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/upload.png\" alt=\"" . $hint_update . '" />', array('file' => $item[0], 'action' => "upload"), array('title' => $hint_update)) . "</td>\n" . "</tr>\n";
    $n++;
}
print "</table>\n";
// Navigation for long lists.
$data = array('prev' => 0, 'next' => 0);
if ($_REQUEST['offset'] > 0) {
    $data['prev'] = $_REQUEST['offset'] - $_REQUEST['limit'];
    $data['prev'] = max(0, $data['prev']);
} else {
    $data['no_prev'] = 'disabled="disabled"';
}
if ($n < $max) {
    $data['next'] = $n;
} else {
    $data['no_next'] = 'disabled="disabled"';
}
if (count($data) != 4) {
    pieNotice("BackAndForth", $data);
}
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:filelist.php

示例8: pieNotice

$n = 1;
$hint_alias = $GLOBALS['pie']['locale']->key("Alias");
$hint_info = $GLOBALS['pie']['locale']->key("Details");
pieNotice("TableHead");
foreach ($data as $i) {
    list($stamp, $name) = explode("\t", $i);
    if (!$page->read($name, 0)) {
        pieError("SourceReadError");
    }
    $comment = $page->meta['comment'];
    if (strlen($comment) > 30) {
        $comment = wordwrap($comment, 30, "\n");
        list($comment) = explode("\n", $comment);
        $comment .= " ...";
    } elseif (!$comment) {
        $comment = '-';
    }
    print '<tr class="' . ($n % 2 ? "oddRow" : "evenRow") . "\">\n<td>";
    if ($page->meta['type'] == 'alias') {
        print pieMakeLink(htmlspecialchars($name) . " <span class=\"warning\">({$hint_alias})</span>", array('action' => 'alias', 'page' => $page->meta['original'], 'alias' => $name), array('class' => "itemLink", 'title' => $hint_info)) . "</td>\n";
    } else {
        print pieMakeLink(htmlspecialchars($name), array('page' => $name), array('class' => "itemLink")) . "</td>\n";
    }
    print "<td>" . date($GLOBALS['pie']['time_format'], $stamp) . "</td>\n" . "<td>" . pieMakeLink(htmlspecialchars($page->meta['author']), array('action' => 'userinfo', 'user' => $page->meta['author']), array('class' => "itemLink")) . "</td>\n" . "<td>" . htmlspecialchars($comment) . "</td>\n" . "</tr>\n";
    $n++;
    if ($n > $_REQUEST['limit']) {
        break;
    }
}
pieNotice("TableTail");
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:latest.php

示例9: pieError

    pieError("PageNotFound");
}
// Display the history.
if (@$_REQUEST['order'] == "descend") {
    krsort($history);
    $n = count($history);
} else {
    ksort($history);
    $n = 1;
}
$hint_info = $GLOBALS['pie']['locale']->key("Info");
$hint_show = $GLOBALS['pie']['locale']->key("Show");
$hint_edit = $GLOBALS['pie']['locale']->key("RevertTo");
$ip = pieMakeString('[[$^icon_link]]');
// Present results:
pieNotice("TableHead");
foreach ($history as $stamp => $info) {
    $comment = $info['comment'];
    if (strlen($comment) > 30) {
        $comment = wordwrap($comment, 30, "\n");
        list($comment) = explode("\n", $comment);
        $comment .= " ...";
    }
    print '<tr class="' . ($n % 2 ? "oddRow" : "evenRow") . '">' . "<td style=\"text-align: right;\">{$n}</td>\n" . "<td>" . date($GLOBALS['pie']['time_format'], $stamp) . "</td>\n" . "<td>" . pieMakeLink(htmlspecialchars($info['author']), array('action' => "userinfo", 'user' => $info['author'])) . "</td>\n" . "<td>" . htmlspecialchars($comment) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/information.png\" alt=\"{$hint_info}\" />", array($context => $_REQUEST[$context], 'action' => "{$context}info", 'stamp' => $info['stamp']), array('title' => $hint_info)) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/eye.png\" alt=\"{$hint_show}\" />", array($context => $_REQUEST[$context], 'action' => "revert", 'stamp' => $info['stamp']), array('title' => $hint_show)) . "</td>\n";
    if ($context == 'page') {
        print "<td>" . pieMakeLink("<img src=\"{$ip}/page_edit.png\" alt=\"{$hint_edit}\" />", array($context => $_REQUEST[$context], 'action' => "edit", 'stamp' => $info['stamp']), array('title' => $hint_edit)) . "</td>\n";
    }
    print "</tr>\n";
    if ($_REQUEST['order'] == "descend") {
        $n--;
    } else {
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:history.php

示例10: pieRequireSuperuser

<?php

/*
 *      Display the log file.
 */
include_once "{$lib}/class/session.php";
include_once "{$lib}/class/user.php";
include_once "{$lib}/share/auth.php";
include_once "{$lib}/share/stdio.php";
pieRequireSuperuser();
pieHead("edit");
if (!file_exists($GLOBALS['pie']['run_path'] . "/log/pie.log")) {
    pieError("NoLogFile");
}
if (!($f = fopen($GLOBALS['pie']['run_path'] . "/log/pie.log", "r"))) {
    pieError("NoLogFile");
}
pieNotice("LogHead");
while ($line = fgets($f, 4096)) {
    print $line;
}
pieNotice("LogTail");
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:23,代码来源:logshow.php

示例11: htmlspecialchars

    }
    return htmlspecialchars($string);
}
pieHead();
$_REQUEST['page'] = pieCleanString(@$_REQUEST['page']);
$page = new Page();
$page->name = $_REQUEST['page'];
if (!$page->isValidName($_REQUEST['page'])) {
    pieError("PageNameInvalid");
}
if (!$page->exists($_REQUEST['page'])) {
    pieError("PageNotFound");
}
if (!(($_REQUEST['stamp'] = intval($_REQUEST['stamp'])) > 0)) {
    $_REQUEST['stamp'] = 0;
}
if (!$page->read($_REQUEST['page'], $_REQUEST['stamp'])) {
    pieError("SourceReadError");
}
if ($page->meta['type'] == "alias") {
    pieError("AliasRedirect", array('page' => htmlspecialchars($page->meta['original']), 'alias' => htmlspecialchars($_REQUEST['page'])));
}
// Format and display the page source:
$source = $page->source;
$source = str_replace('\\[', chr(1), $source);
$source = str_replace('\\]', chr(2), $source);
$source = nl2br(hilightBrackets($source));
$source = str_replace(chr(1), '\\[', $source);
$source = str_replace(chr(2), '\\]', $source);
pieNotice("SourceOfPage", array('source' => $source));
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:source.php

示例12: pieTail

        if ($resource->meta['original'] != $original) {
            continue;
        }
        $aliases[] = $i;
    }
    if (!count($aliases)) {
        if (@$is_alias) {
            pieTail();
            exit;
        }
        pieError("NoAliases", array('context' => $context, 'original' => htmlspecialchars($original)));
    }
    sort($aliases);
    $hint_descend = $GLOBALS['pie']['locale']->key("Descend");
    $hint_info = $GLOBALS['pie']['locale']->key("Display");
    $hint_delete = $GLOBALS['pie']['locale']->key("Delete");
    $ip = pieMakeString('[[$^icon_link]]');
    $n = 0;
    pieNotice("TableHeader", array('original' => htmlspecialchars($original)));
    foreach ($aliases as $i) {
        $n++;
        print '<tr class="' . ($n % 2 ? "oddRow" : "evenRow") . '">' . "<td>" . pieMakeLink(htmlspecialchars($i), array('action' => "alias", $context => $i), array('title' => $hint_descend, 'class' => "itemLink")) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/information.png\" alt=\"{$hint_info}\" />", array('action' => "alias", $context => $original, 'alias' => $i), array('title' => $hint_info)) . "</td>\n" . "<td>" . pieMakeLink("<img src=\"{$ip}/delete.png\" alt=\"{$hint_delete}\" />", array('action' => "delete", $context => $i), array('title' => $hint_delete)) . "</td>\n" . "</tr>\n";
    }
    pieNotice("TableFooter", array('original' => htmlspecialchars($original), 'context' => $context));
    if (!$is_alias) {
        pieNotice("CreateAlias", array('original' => htmlspecialchars($original), 'context' => $context));
    }
} else {
    pieError("ActionInvalid");
}
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:alias.php

示例13: array

}
// Prepare meta data of the file:
$file->name = $name;
$file->meta = array('stamp' => time(), 'author' => $GLOBALS['pie']['user']);
// .. file size
if ($_FILES['upload']['size']) {
    $file->meta['size'] = $_FILES['upload']['size'];
} else {
    $file->meta['size'] = filesize(pieTempName("_upload"));
}
// .. file type
if (preg_match('/^[a-z]+\\/[a-z]+[\\w\\-\\+\\.]*\\w+$/', $_FILES['upload']['type'])) {
    $file->meta['type'] = $_FILES['upload']['type'];
} elseif (preg_match('/\\.([0-9A-Za-z]{1,5})$/', $name, $match)) {
    // File type is determined by file name suffix.
    $map = new MapFile();
    if ($type = $map->read("{$lib}/share/suffix.map", strtolower($match[1]))) {
        $file->meta['type'] = $type;
    }
} elseif (function_exists("mime_content_type")) {
    $file->meta['type'] = mime_content_type(pieTempName("_upload"));
}
if (@$_REQUEST['comment']) {
    $file->meta['comment'] = pieGetOption($_REQUEST['comment']);
}
if (!$file->write(pieTempName("_upload"))) {
    pieError("FileWriteError");
}
pieLog("edit");
pieNotice("UploadComplete");
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:31,代码来源:upload.php

示例14: Cache

<?php

/*
 *	Purge ALL cache files from the Cache database.
 */
include_once "{$lib}/class/cache.php";
include_once "{$lib}/class/locale.php";
include_once "{$lib}/share/auth.php";
include_once "{$lib}/share/log.php";
include_once "{$lib}/share/stdio.php";
include_once "{$lib}/share/string.php";
$cache = new Cache();
pieLoadLocale();
pieRequireSuperuser();
pieHead();
if (@$_REQUEST['approve']) {
    // Initialize the cache database and purge all existing caches.
    if ($cache->initialize()) {
        pieNotice('InitializationSuccess');
    } else {
        pieError('InitializationError');
    }
} else {
    // Verify action.
    pieError('AskInitialization');
}
pieLog('edit');
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:28,代码来源:wipe.php

示例15: pieLoadLocale

<?php

/*
 *      Enable system upgrade by the setup script.
 */
include_once "{$lib}/class/session.php";
include_once "{$lib}/class/user.php";
include_once "{$lib}/share/auth.php";
include_once "{$lib}/share/stdio.php";
pieLoadLocale();
pieRequireSuperuser();
pieHead();
if (@$_REQUEST['enable']) {
    if (!touch($GLOBALS['pie']['run_path'] . '/user/enable_setup')) {
        pieError('EnableError');
    }
    pieNotice('EnableSuccess');
} else {
    pieNotice('AskEnable');
}
pieTail();
开发者ID:rafsoaken,项目名称:piewiki,代码行数:21,代码来源:upgrade.php


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