1 | <?php |
---|
2 | # ***** BEGIN LICENSE BLOCK ***** |
---|
3 | # |
---|
4 | # This file is part of Bloc-Notes. |
---|
5 | # Copyright 2008,2009,2010,2011 Moe (http://gniark.net/) |
---|
6 | # |
---|
7 | # Bloc-Notes is free software; you can redistribute it and/or modify |
---|
8 | # it under the terms of the GNU General Public License as published by |
---|
9 | # the Free Software Foundation; either version 3 of the License, or |
---|
10 | # (at your option) any later version. |
---|
11 | # |
---|
12 | # Bloc-Notes is distributed in the hope that it will be useful, |
---|
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | # GNU General Public License for more details. |
---|
16 | # |
---|
17 | # You should have received a copy of the GNU General Public License |
---|
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | # |
---|
20 | # Icons (*.png) are from Tango Icon theme : |
---|
21 | # http://tango.freedesktop.org/Tango_Icon_Gallery |
---|
22 | # |
---|
23 | # ***** END LICENSE BLOCK ***** |
---|
24 | |
---|
25 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
26 | |
---|
27 | $msg = ''; |
---|
28 | |
---|
29 | try |
---|
30 | { |
---|
31 | if (!empty($_POST['saveconfig'])) |
---|
32 | { |
---|
33 | blocNotes::putSettings(); |
---|
34 | http::redirect($p_url.'&saveconfig=1'); |
---|
35 | } |
---|
36 | } |
---|
37 | catch (Exception $e) |
---|
38 | { |
---|
39 | $core->error->add($e->getMessage()); |
---|
40 | } |
---|
41 | |
---|
42 | if (isset($_GET['saveconfig'])) |
---|
43 | { |
---|
44 | $msg = __('Configuration successfully updated.'); |
---|
45 | } |
---|
46 | |
---|
47 | ?> |
---|
48 | <html> |
---|
49 | <head> |
---|
50 | <title><?php echo __('Notebook'); ?></title> |
---|
51 | </head> |
---|
52 | <body> |
---|
53 | |
---|
54 | <h2><?php echo html::escapeHTML($core->blog->name).' > '.__('Notebook'); ?></h2> |
---|
55 | |
---|
56 | <?php |
---|
57 | if (!empty($msg)) {echo '<p class="message">'.$msg.'</p>';} |
---|
58 | ?> |
---|
59 | |
---|
60 | <div id="settings" title="<?php echo __('settings'); ?>"> |
---|
61 | <form method="post" action="<?php echo http::getSelfURI(); ?>"> |
---|
62 | <?php blocNotes::form(); ?> |
---|
63 | |
---|
64 | |
---|
65 | <p><?php echo $core->formNonce(); ?></p> |
---|
66 | <p><input type="submit" name="saveconfig" value="<?php echo __('Save configuration'); ?>" /></p> |
---|
67 | </form> |
---|
68 | </div> |
---|
69 | |
---|
70 | </body> |
---|
71 | </html> |
---|