1 |
1223
|
Luisehahne
|
<?php
|
2 |
1271
|
Luisehahne
|
/*
|
3 |
1223
|
Luisehahne
|
*
|
4 |
1271
|
Luisehahne
|
* About WebsiteBaker
|
5 |
1223
|
Luisehahne
|
*
|
6 |
|
|
* Website Baker is a PHP-based Content Management System (CMS)
|
7 |
|
|
* designed with one goal in mind: to enable its users to produce websites
|
8 |
|
|
* with ease.
|
9 |
|
|
*
|
10 |
1271
|
Luisehahne
|
* LICENSE INFORMATION
|
11 |
1223
|
Luisehahne
|
*
|
12 |
|
|
* WebsiteBaker is free software; you can redistribute it and/or
|
13 |
|
|
* modify it under the terms of the GNU General Public License
|
14 |
|
|
* as published by the Free Software Foundation; either version 2
|
15 |
|
|
* of the License, or (at your option) any later version.
|
16 |
|
|
*
|
17 |
|
|
* WebsiteBaker is distributed in the hope that it will be useful,
|
18 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20 |
|
|
* See the GNU General Public License for more details.
|
21 |
|
|
*
|
22 |
|
|
* You should have received a copy of the GNU General Public License
|
23 |
|
|
* along with this program; if not, write to the Free Software
|
24 |
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
25 |
1271
|
Luisehahne
|
*
|
26 |
1223
|
Luisehahne
|
* WebsiteBaker Extra Information
|
27 |
|
|
*
|
28 |
|
|
*
|
29 |
1271
|
Luisehahne
|
*/
|
30 |
1223
|
Luisehahne
|
/**
|
31 |
|
|
*
|
32 |
1271
|
Luisehahne
|
* @category modules
|
33 |
|
|
* @package code
|
34 |
|
|
* @author WebsiteBaker Project
|
35 |
|
|
* @copyright 2004-2009, Ryan Djurovich
|
36 |
|
|
* @copyright 2009-2010, Website Baker Org. e.V.
|
37 |
|
|
* @link http://www.websitebaker2.org/
|
38 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
39 |
|
|
* @platform WebsiteBaker 2.8.x
|
40 |
|
|
* @requirements PHP 4.3.4 and higher
|
41 |
|
|
* @version $Id$
|
42 |
|
|
* @filesource $HeadURL$
|
43 |
|
|
* @lastmodified $Date$
|
44 |
1223
|
Luisehahne
|
*
|
45 |
1271
|
Luisehahne
|
*/
|
46 |
1223
|
Luisehahne
|
|
47 |
|
|
// Setup template object
|
48 |
|
|
$template = new Template(WB_PATH.'/modules/code');
|
49 |
|
|
$template->set_file('page', 'htt/modify.htt');
|
50 |
|
|
$template->set_block('page', 'main_block', 'main');
|
51 |
|
|
|
52 |
|
|
// Get page content
|
53 |
|
|
$query = "SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'";
|
54 |
|
|
$get_content = $database->query($query);
|
55 |
|
|
$content = $get_content->fetchRow();
|
56 |
|
|
$content = htmlspecialchars($content['content']);
|
57 |
|
|
|
58 |
|
|
// Insert vars
|
59 |
|
|
$template->set_var(
|
60 |
|
|
array(
|
61 |
|
|
'PAGE_ID' => $page_id,
|
62 |
|
|
'SECTION_ID' => $section_id,
|
63 |
|
|
'REGISTER_EDIT_AREA' => function_exists('registerEditArea') ? registerEditArea('content'.$section_id, 'php', false) : '',
|
64 |
|
|
'WB_URL' => WB_URL,
|
65 |
|
|
'CONTENT' => $content,
|
66 |
|
|
'TEXT_SAVE' => $TEXT['SAVE'],
|
67 |
|
|
'TEXT_CANCEL' => $TEXT['CANCEL'],
|
68 |
|
|
'SECTION' => $section_id
|
69 |
|
|
)
|
70 |
|
|
);
|
71 |
|
|
|
72 |
|
|
// Parse template object
|
73 |
|
|
$template->set_unknowns('keep');
|
74 |
|
|
$template->parse('main', 'main_block', false);
|
75 |
|
|
$template->pparse('output', 'page', false);
|
76 |
|
|
|
77 |
4
|
ryan
|
?>
|