summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c4a2642)
Replaces userless calls for better fault tolerance and permission support.
public $raw, $title, $body; # file contents
public $meta = []; # head metadata properties
public $place = []; # template variables replaced in render()
public $raw, $title, $body; # file contents
public $meta = []; # head metadata properties
public $place = []; # template variables replaced in render()
+ public $api = FALSE; # requested programming interface
function __construct($path)
{
function __construct($path)
{
if (empty($this->handler)) {
return;
}
if (empty($this->handler)) {
return;
}
$Page = $this;
$res = include "./{$this->handler}/index.php";
return $res;
$Page = $this;
$res = include "./{$this->handler}/index.php";
return $res;
abort("aanpasdienst onbekend", '404 unknown');
abort("aanpasdienst onbekend", '404 unknown');
$title = array_pop($nav);
$Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title;
$title = array_pop($nav);
$Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title;
$img = "$rootdir/index.jpg";
if (file_exists($img)) {
# cover image of current album
$img = "$rootdir/index.jpg";
if (file_exists($img)) {
# cover image of current album
$Page->title .= ': '.htmlspecialchars($Issue->subject);
$Page->teaser = $Issue->body;
$Page->title .= ': '.htmlspecialchars($Issue->subject);
$Page->teaser = $Issue->body;
+ if ($Page->api) return;
$Page->body = $replies; # find image
print "<h2>{$Page->title}</h2>\n";
$Page->body = $replies; # find image
print "<h2>{$Page->title}</h2>\n";
print "</div>\n";
return;
}
print "</div>\n";
return;
}
if ($_POST) {
require_once 'upload.inc.php';
if ($_POST) {
require_once 'upload.inc.php';
$subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id";
$cols = "*, ($subsql AND message IS NOT NULL) AS replycount";
$subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id";
$cols = "*, ($subsql AND message IS NOT NULL) AS replycount";
$message = NULL;
if (isset($_POST['mail'])) {
$message = NULL;
if (isset($_POST['mail'])) {
if (!$User->login) {
$target = urlencode($_SERVER['REQUEST_URI']);
if (!$User->login) {
$target = urlencode($_SERVER['REQUEST_URI']);
return;
}
if (!$User->admin('user')) {
return;
}
if (!$User->admin('user')) {
$replyform = $Page->handler == 'melding' && $User->login;
@list ($year, $page) = explode('/', trim($Page->path, '/'));
$replyform = $Page->handler == 'melding' && $User->login;
@list ($year, $page) = explode('/', trim($Page->path, '/'));
if ($Page->path) return;
return (new PageSearch($Page->link))->files();
}
if ($Page->path) return;
return (new PageSearch($Page->link))->files();
}
header('Content-Type: application/atom+xml; charset=utf-8');
print '<?xml version="1.0" encoding="utf-8"?>';
$siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'];
header('Content-Type: application/atom+xml; charset=utf-8');
print '<?xml version="1.0" encoding="utf-8"?>';
$siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'];
$imgpath = ltrim($Page->path, '/');
if (!preg_match('{^[0-9x]+/}', $imgpath)) {
return;
$imgpath = ltrim($Page->path, '/');
if (!preg_match('{^[0-9x]+/}', $imgpath)) {
return;