Revision 1225
Added by Dietmar almost 15 years ago
settings.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/**************************************************************************** |
|
3 |
* SVN Version information: |
|
4 |
* |
|
5 |
* $Id$ |
|
6 |
* |
|
7 |
***************************************************************************** |
|
8 |
* WebsiteBaker |
|
9 |
* |
|
10 |
* WebsiteBaker Project <http://www.websitebaker2.org/> |
|
11 |
* Copyright (C) 2009, Website Baker Org. e.V. |
|
12 |
* http://start.websitebaker2.org/impressum-datenschutz.php |
|
13 |
* Copyright (C) 2004-2009, Ryan Djurovich |
|
14 |
* |
|
15 |
* About WebsiteBaker |
|
16 |
* |
|
17 |
* Website Baker is a PHP-based Content Management System (CMS) |
|
18 |
* designed with one goal in mind: to enable its users to produce websites |
|
19 |
* with ease. |
|
20 |
* |
|
21 |
***************************************************************************** |
|
22 |
* |
|
23 |
***************************************************************************** |
|
24 |
* LICENSE INFORMATION |
|
25 |
* |
|
26 |
* WebsiteBaker is free software; you can redistribute it and/or |
|
27 |
* modify it under the terms of the GNU General Public License |
|
28 |
* as published by the Free Software Foundation; either version 2 |
|
29 |
* of the License, or (at your option) any later version. |
|
30 |
* |
|
31 |
* WebsiteBaker is distributed in the hope that it will be useful, |
|
32 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
33 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
34 |
* See the GNU General Public License for more details. |
|
35 |
* |
|
36 |
* You should have received a copy of the GNU General Public License |
|
37 |
* along with this program; if not, write to the Free Software |
|
38 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
39 |
**************************************************************************** |
|
40 |
* |
|
41 |
***************************************************************************** |
|
42 |
* WebsiteBaker Extra Information |
|
43 |
* |
|
44 |
* |
|
45 |
* |
|
46 |
* |
|
47 |
*****************************************************************************/ |
|
48 |
/** |
|
49 |
* @category admin |
|
50 |
* @package pages |
|
51 |
* @author Ryan Djurovich |
|
52 |
* @copyright 2004-2009, Ryan Djurovich |
|
53 |
* @copyright 2009, Website Baker Org. e.V. |
|
54 |
* @version $Id$ |
|
55 |
* @platform WebsiteBaker 2.8.x |
|
56 |
* @requirements >= PHP 4.3.4 |
|
57 |
* @license http://www.gnu.org/licenses/gpl.html |
|
58 |
* |
|
59 |
*/ |
|
2 | 60 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
|
|
24 |
* @category backend |
|
25 |
* @package pages |
|
26 |
* @author(s) Dietmar W?llbrink <Luisehahne>, Dietrich Roland Pehlke <Aldus> |
|
27 |
* @platform WB 2.8.x |
|
28 |
* @require PHP 5.2.11 |
|
29 |
* @license http://www.gnu.org/licenses/gpl.html |
|
30 |
* @link http://project.websitebaker2.org/browser/branches/2.8.x/wb/pages |
|
31 |
* @changeset 2009/11/30 workout for page_code field, ex catchwords and multilangial |
|
32 |
|
|
33 |
*/ |
|
34 |
|
|
35 | 61 |
// Get page id |
36 | 62 |
if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) { |
37 | 63 |
header("Location: index.php"); |
... | ... | |
69 | 95 |
} |
70 | 96 |
|
71 | 97 |
// Get page details |
72 |
$database = new database();
|
|
98 |
/* $database = new database(); */
|
|
73 | 99 |
$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'"; |
74 | 100 |
$results = $database->query($query); |
75 | 101 |
if($database->is_error()) { |
... | ... | |
155 | 181 |
) |
156 | 182 |
); |
157 | 183 |
$template->parse('group_list', 'group_list_block', true); |
158 |
/* |
|
159 |
if(!in_array(1, $admin->get_groups_id())) { |
|
160 |
$users_groups = $admin->get_groups_name(); |
|
161 |
foreach ($admin->get_groups_id() as $users_group_id) { |
|
162 |
$template->set_var(array( |
|
163 |
'ID' => $users_group_id, |
|
164 |
'TOGGLE' => '', |
|
165 |
'DISABLED' => ' disabled', |
|
166 |
'LINK_COLOR' => '000000', |
|
167 |
'CURSOR' => 'default', |
|
168 |
'NAME' => $users_groups[$users_group_id], |
|
169 |
'CHECKED' => ' checked' |
|
170 |
) |
|
171 |
); |
|
172 |
$template->parse('group_list', 'group_list_block', true); |
|
173 |
} |
|
174 |
} |
|
175 |
*/ |
|
176 | 184 |
while($group = $get_groups->fetchRow()) { |
177 | 185 |
// check if the user is a member of this group |
178 | 186 |
$flag_disabled = ''; |
... | ... | |
228 | 236 |
); |
229 | 237 |
$template->parse('group_list2', 'group_list_block2', true); |
230 | 238 |
|
231 |
|
|
232 | 239 |
while($group = $get_groups->fetchRow()) { |
233 | 240 |
// check if the user is a member of this group |
234 | 241 |
$flag_disabled = ''; |
... | ... | |
269 | 276 |
//-- insert page_code 20090904--> |
270 | 277 |
$template->set_var('DISPLAY_CODE_PAGE_LIST', ' id="multi_lingual" style="display:none;"'); |
271 | 278 |
// Work-out if page languages feature is enabled |
272 |
if((defined('PAGE_LANGUAGES') && PAGE_LANGUAGES) && $field_set) |
|
279 |
if((defined('PAGE_LANGUAGES') && PAGE_LANGUAGES) && $field_set && file_exists(WB_URL.'/modules/mod_multilingual/update_keys.php'))
|
|
273 | 280 |
{ |
274 | 281 |
// workout field is set but module missing |
275 | 282 |
$TEXT['PAGE_CODE'] = empty($TEXT['PAGE_CODE']) ? 'Pagecode' : $TEXT['PAGE_CODE']; |
... | ... | |
279 | 286 |
) |
280 | 287 |
); |
281 | 288 |
|
282 |
|
|
283 | 289 |
// Page_code list |
284 |
$database = new database();
|
|
290 |
/* $database = new database(); */
|
|
285 | 291 |
function page_code_list($parent) { |
286 | 292 |
global $admin, $database, $template, $results_array, $pageCode; |
287 | 293 |
$default_language = DEFAULT_LANGUAGE; |
... | ... | |
315 | 321 |
} else { |
316 | 322 |
$can_modify = false; |
317 | 323 |
} |
318 |
// Title -'s prefix |
|
324 |
|
|
319 | 325 |
$title_prefix = ''; |
320 |
for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - - '; } |
|
326 |
for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - - '; } |
|
327 |
// $space = str_repeat(' ', 3); $space.'<'..'>' |
|
321 | 328 |
$template->set_var(array( |
322 | 329 |
'VALUE' => $page['page_code'], |
323 |
'PAGE_CODE' => ($title_prefix.$page['menu_title']) |
|
330 |
'PAGE_VALUE' => $title_prefix.$page['page_code'], |
|
331 |
'PAGE_CODE' => $title_prefix.$page['menu_title'] |
|
324 | 332 |
) |
325 | 333 |
); |
326 | 334 |
if($results_array['page_code'] == $page['page_code']) { |
... | ... | |
346 | 354 |
$template->set_var(array( |
347 | 355 |
'VALUE' => '', |
348 | 356 |
'PAGE_CODE' => $TEXT['NONE'], |
357 |
'PAGE_VALUE' => '', |
|
349 | 358 |
'SELECTED' => $selected |
350 | 359 |
) |
351 | 360 |
); |
... | ... | |
357 | 366 |
//-- page code --> |
358 | 367 |
|
359 | 368 |
// Parent page list |
360 |
$database = new database();
|
|
369 |
/* $database = new database(); */
|
|
361 | 370 |
function parent_list($parent) { |
362 | 371 |
global $admin, $database, $template, $results_array,$field_set; |
363 | 372 |
$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' ORDER BY position ASC"; |
Also available in: Unified diff
update header, change variable