diff options
| author | Justin J. Novack <jnovack@gmail.com> | 2012-09-14 13:13:36 -0400 |
|---|---|---|
| committer | Justin J. Novack <jnovack@gmail.com> | 2012-09-14 13:29:26 -0400 |
| commit | 0c2d838a9b2f0c81d460b49ccd74775440ced828 (patch) | |
| tree | e40f248e19d7f661b5099fb7c3844aa8f862d053 /www/new.php | |
| parent | 2b6643574b2a0e527aea359a240018577d861275 (diff) | |
| download | phorkie-0c2d838a9b2f0c81d460b49ccd74775440ced828.tar.gz phorkie-0c2d838a9b2f0c81d460b49ccd74775440ced828.zip | |
Configurable index page
Diffstat (limited to 'www/new.php')
| -rw-r--r-- | www/new.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/www/new.php b/www/new.php new file mode 100644 index 0000000..ef9daec --- /dev/null +++ b/www/new.php @@ -0,0 +1,34 @@ +<?php +namespace phorkie; +/** + * Show paste creation form + * + * Elements: + * - description + * - file name (default: default.php) + * - content + * + * Creates and redirects to display page + */ +require_once 'www-header.php'; + +$repopo = new Repository_Post(); +if ($repopo->process($_POST)) { + redirect($repopo->repo->getLink('display')); +} + +$phork = array( + '1' => new File(null, null) +); +$db = new Database(); +render( + 'new', + array( + 'files' => $phork, + 'description' => '', + 'htmlhelper' => new HtmlHelper(), + 'recents' => $db->getSearch()->listAll(0, 5, 'crdate', 'desc'), + 'dh' => new \Date_HumanDiff(), + ) +); +?> |
