blob: c416f44d2c8000d831945cb44e23beadcb11b6d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?PHP
Uses('message', 'links');
class default_template {
function GetPage($data) {
if($data['title'])
$title = htmlspecialchars($data['title']);
else
$title = strtr($data['_page'], array(':' => ' - '));
$content = '<h2>' . $title . '</h2>' . strtr($data['content'], array('<' => '<', '>' => '>', '&' => '&',
'"' => '"', "\n" => '<br />', "\r" => ''));
return array('title' => $title, 'content' => $content);
}
function GetEditor($data) {
$title = 'Edit \'' . $data['_page'] . '\'';
$content = '<h2>' . $title . '</h2>';
$content .= '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Edit') . '">';
$content .= '<input type="hidden" name="name" value="' . $data['_page'] . '" />';
$content .= '<input type="hidden" name="type" value="' . $data['_type'] . '" />';
$content .= '<input type="hidden" name="backlink" value="' . htmlspecialchars($data['_backlink']) . '" />';
$content .= 'Titel: <input type="text" name="data_title" value="';
$content .= htmlspecialchars($data['title']) . '" size="70" /><br />';
$content .= '<textarea name="data_content" class="pageedit spaced-top spaced-bottom" rows="25" cols="70">';
$content .= htmlspecialchars($data['content']) . '</textarea><br />';
$content .= '<input type="submit" value="Änderungen übernehmen" />';
$content .= '<input type="submit" name="back" value="Zurück" />';
$content .= '</form>';
return array('title' => $title, 'content' => $content);
}
}
$GLOBALS['templates']['default'] = new default_template;
?>
|