-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsave_layout.php
55 lines (43 loc) · 2.05 KB
/
save_layout.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/*
Website Baker Project <http://www.websitebaker.org/>
Copyright (C) 2004-2006, Ryan Djurovich
Website Baker is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Website Baker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Website Baker; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if (!defined('SYSTEM_RUN')) {require( (dirname(dirname((__DIR__)))).'/config.php');}
// Include WB admin wrapper script
require(WB_PATH.'/modules/admin.php');
if (!function_exists('isProcalcFuncLoaded')){require(__DIR__.'/functions.php');}
/*
$page_id = (int)$admin->get_post('page_id');
$section_id = (int)$admin->get_post('section_id');
*/
$type = $admin->get_post('type');
$sBackLink = WB_URL.'/modules/procalendar/modify_settings.php?page_id='.$page_id.'§ion_id='.$section_id.'';
$header = $admin->StripCodeFromText($admin->get_post('header'));
$footer = $admin->StripCodeFromText($admin->get_post('footer'));
$posttempl = $admin->StripCodeFromText($admin->get_post('posttempl'));
$sql = 'UPDATE `'.TABLE_PREFIX.'mod_procalendar_settings` SET '
. '`header` = \''.$database->escapeString($header).'\', '
. '`footer` = \''.$database->escapeString($footer).'\', '
. '`posttempl` = \''.$database->escapeString($posttempl).'\' '
. 'WHERE `section_id` = '.(int)$section_id.' '
. '';
if ($database->query($sql)) {
$admin->print_success($TEXT['SUCCESS'], $sBackLink);
}
if($database->is_error()) {
$admin->print_error($database->get_error(), $sBackLink);
}
$admin->print_footer();
?>