Dotclear

source: plugins/blocNotes/index.php @ 377

Revision 377, 1.9 KB checked in by Moe, 16 years ago (diff)

blocNotes : now with personal and blog-specific notebook

Line 
1<?php 
2# ***** BEGIN LICENSE BLOCK *****
3#
4# This file is part of Bloc-Notes.
5# Copyright 2008 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# Icon (icon.png) is from Silk Icons : http://www.famfamfam.com/lab/icons/silk/
21#
22# ***** END LICENSE BLOCK *****
23
24     if (!defined('DC_CONTEXT_ADMIN')) { exit; }
25
26     try
27     {
28          if (!empty($_POST['saveconfig']))
29          {
30               blocNotes::putSettings();
31               http::redirect($p_url.'&saveconfig=1');
32          }
33     }
34     catch (Exception $e)
35     {
36          $core->error->add($e->getMessage());
37     }
38
39     if (isset($_GET['saveconfig']))
40     {
41          $msg = __('Configuration successfully updated.');
42     }
43
44?>
45<html>
46<head>
47     <title><?php echo __('Bloc-notes'); ?></title>
48     <?php echo dcPage::jsPageTabs($default_tab); ?>
49     <style type="text/css">
50          textarea {width:100%;}
51     </style>
52</head>
53<body>
54
55     <h2><?php echo html::escapeHTML($core->blog->name).' &gt '.__('Bloc-notes'); ?></h2>
56
57     <?php 
58          if (!empty($msg)) {echo '<div class="message">'.$msg.'</div><p></p>';}
59     ?>
60
61     <div id="settings" title="<?php echo __('settings'); ?>">
62          <form method="post" action="<?php echo http::getSelfURI(); ?>">
63               <?php blocNotes::form(); ?>
64               
65
66               <p><?php echo $core->formNonce(); ?></p>
67               <p><input type="submit" name="saveconfig" value="<?php echo __('Save configuration'); ?>" /></p>
68          </form>
69     </div>
70
71</body>
72</html>
Note: See TracBrowser for help on using the repository browser.

Sites map