1 | <?php |
---|
2 | # ***** BEGIN LICENSE BLOCK ***** |
---|
3 | # Copyright (c) 2008 Olivier Azeau and contributors. All rights |
---|
4 | # reserved. |
---|
5 | # |
---|
6 | # This is free software; you can redistribute it and/or modify |
---|
7 | # it under the terms of the GNU General Public License as published by |
---|
8 | # the Free Software Foundation; either version 2 of the License, or |
---|
9 | # (at your option) any later version. |
---|
10 | # |
---|
11 | # This is distributed in the hope that it will be useful, |
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | # GNU General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public License |
---|
17 | # along with DotClear; if not, write to the Free Software |
---|
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
19 | # |
---|
20 | # ***** END LICENSE BLOCK ***** |
---|
21 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
22 | |
---|
23 | dcPage::check('usage,contentadmin'); |
---|
24 | |
---|
25 | try |
---|
26 | { |
---|
27 | $postMakerSettings = new PostMakerSettings(); |
---|
28 | $postMakerUpdate = $postMakerSettings->LoadFromHTTP(); |
---|
29 | ?> |
---|
30 | <html> |
---|
31 | <head> |
---|
32 | <title>Post Maker</title> |
---|
33 | </head> |
---|
34 | <body> |
---|
35 | <?php |
---|
36 | if ($postMakerUpdate) { |
---|
37 | print '<p class="message">'.__('Settings have been successfully updated.').'</p>'; |
---|
38 | } |
---|
39 | print '<h2>'.__('Define custom entries').'</h2>'; |
---|
40 | print '<form action="'.$p_url.'" method="post">'; |
---|
41 | $postMakerSettings->Display(); |
---|
42 | print '<p><input type="submit" value="'.__('save').'" />'.$core->formNonce().'</p>'.'</form>'; |
---|
43 | ?> |
---|
44 | </body> |
---|
45 | </html> |
---|
46 | <?php |
---|
47 | } |
---|
48 | catch (Exception $e) |
---|
49 | { |
---|
50 | $core->error->add($e->getMessage()); |
---|
51 | } |
---|
52 | ?> |
---|