Dotclear

source: themes/customCSS/_config.php @ 1179:a43a29427ef3

Revision 1179:a43a29427ef3, 1.1 KB checked in by franck <carnet.franck.paul@…>, 11 years ago (diff)

Update copyright notice

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12if (!defined('DC_CONTEXT_ADMIN')) { return; }
13
14l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');
15$css_file = path::real($core->blog->public_path).'/custom_style.css';
16
17if (!is_file($css_file) && !is_writable(dirname($css_file))) {
18     throw new Exception(
19          sprintf(__('File %s does not exist and directory %s is not writable.'),
20          $css_file,dirname($css_file))
21     );
22}
23
24if (isset($_POST['css']))
25{
26     @$fp = fopen($css_file,'wb');
27     fwrite($fp,$_POST['css']);
28     fclose($fp);
29     
30     dcPage::message(__('Style sheet upgraded.'),true,true);
31}
32
33$css_content = is_file($css_file) ? file_get_contents($css_file) : '';
34
35echo
36'<p class="area"><label>'.__('Style sheet:').' '.
37form::textarea('css',60,20,html::escapeHTML($css_content)).'</label></p>';
38?>
Note: See TracBrowser for help on using the repository browser.

Sites map