diff options
author | neoraider <devnull@localhost> | 2006-12-04 01:11:05 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-12-04 01:11:05 +0100 |
commit | 3b7d2cb2fd40d744a2415a470b4e323d13dd1b63 (patch) | |
tree | 45dc49f5501c13d0e967e41bafb54e9f0dfad0a9 /templates | |
parent | a55cccfbc9ba53fb4b4b28586cfeb9e5e035a6a7 (diff) | |
download | neon-3b7d2cb2fd40d744a2415a470b4e323d13dd1b63.tar neon-3b7d2cb2fd40d744a2415a470b4e323d13dd1b63.zip |
Nav-Seiten durch Inserts ersetzt; Editor-Seiten jetzt in Templates.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/default.inc.php | 23 | ||||
-rw-r--r-- | templates/phpexec.inc.php | 19 |
2 files changed, 39 insertions, 3 deletions
diff --git a/templates/default.inc.php b/templates/default.inc.php index 12609c6..c416f44 100644 --- a/templates/default.inc.php +++ b/templates/default.inc.php @@ -1,8 +1,8 @@ <?PHP - Uses('message'); + Uses('message', 'links'); class default_template { - function Get($data) { + function GetPage($data) { if($data['title']) $title = htmlspecialchars($data['title']); else @@ -12,6 +12,25 @@ 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; diff --git a/templates/phpexec.inc.php b/templates/phpexec.inc.php index 3e542df..18c33be 100644 --- a/templates/phpexec.inc.php +++ b/templates/phpexec.inc.php @@ -2,7 +2,7 @@ Uses('message', 'links'); class phpexec_template { - function Get($data) { + function GetPage($data) { $title = strtr($data['_page'], array(':' => ' - ')); ob_start(); @@ -14,6 +14,23 @@ 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 .= '<textarea name="data_code" class="pageedit spaced-bottom" rows="25" cols="70">'; + $content .= htmlspecialchars($data['code']) . '</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']['phpexec'] = new phpexec_template; |