Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         pages
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id: settings.php 1529 2011-11-25 05:03:32Z Luisehahne $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/pages/settings.php $
15
 * @lastmodified    $Date: 2011-11-25 06:03:32 +0100 (Fri, 25 Nov 2011) $
16
 *
17
 */
18

    
19
/*
20
*/
21
// Create new admin object
22
require('../../config.php');
23
require_once(WB_PATH.'/framework/class.admin.php');
24
$admin = new admin('Pages', 'pages_settings');
25
// Include the WB functions file
26
require_once(WB_PATH.'/framework/functions-utf8.php');
27

    
28
// Get page id
29
if(!isset($_GET['page_id']) || !is_numeric($_GET['page_id']))
30
{
31
	header("Location: index.php");
32
	exit(0);
33
} else {
34
	$page_id = $_GET['page_id'];
35
}
36

    
37
/*
38
if( (!($page_id = $admin->checkIDKEY('page_id', 0, $_SERVER['REQUEST_METHOD']))) )
39
{
40
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
41
	exit();
42
}
43
*/
44
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$page_id;
45
$results = $database->query($sql);
46
$results_array = $results->fetchRow();
47

    
48
$old_admin_groups = explode(',', $results_array['admin_groups']);
49
$old_admin_users = explode(',', $results_array['admin_users']);
50

    
51
// Work-out if we should check for existing page_code
52
$field_set = $database->field_exists(TABLE_PREFIX.'pages', 'page_code');
53

    
54
$in_old_group = FALSE;
55
foreach($admin->get_groups_id() as $cur_gid)
56
{
57
	if (in_array($cur_gid, $old_admin_groups))
58
    {
59
		$in_old_group = TRUE;
60
	}
61
}
62
if((!$in_old_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
63
{
64
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
65
}
66

    
67
// Get page details
68
/* $database = new database();  */
69
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
70
$results = $database->query($sql);
71
if($database->is_error()) {
72
	$admin->print_header();
73
	$admin->print_error($database->get_error());
74
}
75
if($results->numRows() == 0) {
76
	$admin->print_header();
77
	$admin->print_error($MESSAGE['PAGES']['NOT_FOUND']);
78
}
79
$results_array = $results->fetchRow();
80

    
81
// Get display name of person who last modified the page
82
$user=$admin->get_user_details($results_array['modified_by']);
83

    
84
// Convert the unix ts for modified_when to human a readable form
85
if($results_array['modified_when'] != 0)
86
{
87
	$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $results_array['modified_when']+TIMEZONE);
88
} else {
89
	$modified_ts = 'Unknown';
90
}
91

    
92
// Setup template object, parse vars to it, then parse it
93
$ThemePath = realpath(WB_PATH.$admin->correct_theme_source('pages_settings.htt'));
94
// Create new template object
95
$template = new Template($ThemePath);
96
// $template->debug = true;
97
$template->set_file('page', 'pages_settings.htt');
98
$template->set_block('page', 'main_block', 'main');
99
$template->set_var('FTAN', $admin->getFTAN());
100

    
101
$template->set_var(array(
102
				'PAGE_ID' => $results_array['page_id'],
103
				// 'PAGE_IDKEY' => $admin->getIDKEY($results_array['page_id']),
104
				'PAGE_IDKEY' => $results_array['page_id'],
105
				'PAGE_TITLE' => ($results_array['page_title']),
106
				'MENU_TITLE' => ($results_array['menu_title']),
107
				'DESCRIPTION' => ($results_array['description']),
108
				'KEYWORDS' => ($results_array['keywords']),
109
				'MODIFIED_BY' => $user['display_name'],
110
				'MODIFIED_BY_USERNAME' => $user['username'],
111
				'MODIFIED_WHEN' => $modified_ts,
112
				'ADMIN_URL' => ADMIN_URL,
113
				'WB_URL' => WB_URL,
114
				'THEME_URL' => THEME_URL
115
				)
116
		);
117

    
118
// Work-out if we should show the "manage sections" link
119
$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` WHERE `page_id`='.$page_id.' AND `module`="menu_link"';
120
$sections_available = (intval($database->get_one($sql)) != 0);
121
if ($sections_available)
122
{
123
    $template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
124
} elseif(MANAGE_SECTIONS == 'enabled')
125
{
126
	$template->set_var('TEXT_MANAGE_SECTIONS', $HEADING['MANAGE_SECTIONS']);
127
} else {
128
	$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
129
}
130

    
131
// Visibility
132
if($results_array['visibility'] == 'public') {
133
	$template->set_var('PUBLIC_SELECTED', ' selected="selected"');
134
} elseif($results_array['visibility'] == 'private') {
135
	$template->set_var('PRIVATE_SELECTED', ' selected="selected"');
136
} elseif($results_array['visibility'] == 'registered') {
137
	$template->set_var('REGISTERED_SELECTED', ' selected="selected"');
138
} elseif($results_array['visibility'] == 'hidden') {
139
	$template->set_var('HIDDEN_SELECTED', ' selected="selected"');
140
} elseif($results_array['visibility'] == 'none') {
141
	$template->set_var('NO_VIS_SELECTED', ' selected="selected"');
142
}
143
// Group list 1 (admin_groups)
144
	$admin_groups = explode(',', str_replace('_', '', $results_array['admin_groups']));
145

    
146
	$sql = 'SELECT * FROM `'.TABLE_PREFIX.'groups`';
147
    $get_groups = $database->query($sql);
148

    
149
	$template->set_block('main_block', 'group_list_block', 'group_list');
150
	// Insert admin group and current group first
151
	$admin_group_name = $get_groups->fetchRow();
152
	$template->set_var(array(
153
									'ID' => 1,
154
									'TOGGLE' => '',
155
									'DISABLED' => ' disabled="disabled"',
156
									'LINK_COLOR' => '000000',
157
									'CURSOR' => 'default',
158
									'NAME' => $admin_group_name['name'],
159
									'CHECKED' => ' checked="checked"'
160
									)
161
							);
162
	$template->parse('group_list', 'group_list_block', true);
163
	while($group = $get_groups->fetchRow()) {
164
		// check if the user is a member of this group
165
		$flag_disabled = '';
166
		$flag_checked =  '';
167
		$flag_cursor =   'pointer';
168
		$flag_color =    '';
169
		if (in_array($group["group_id"], $admin->get_groups_id())) {
170
			$flag_disabled = ''; //' disabled';
171
			$flag_checked =  ''; //' checked';
172
			$flag_cursor =   'default';
173
			$flag_color =    '000000';
174
		}
175

    
176
		// Check if the group is allowed to edit pages
177
		$system_permissions = explode(',', $group['system_permissions']);
178
		if(is_numeric(array_search('pages_modify', $system_permissions))) {
179
			$template->set_var(array(
180
											'ID' => $group['group_id'],
181
											'TOGGLE' => $group['group_id'],
182
											'DISABLED' => $flag_disabled,
183
											'LINK_COLOR' => $flag_color,
184
											'CURSOR' => $flag_cursor,
185
											'NAME' => $group['name'],
186
											'CHECKED' => $flag_checked
187
											)
188
									);
189
			if(is_numeric(array_search($group['group_id'], $admin_groups))) {
190
				$template->set_var('CHECKED', ' checked="checked"');
191
			} else {
192
				if (!$flag_checked) $template->set_var('CHECKED', '');
193
			}
194
			$template->parse('group_list', 'group_list_block', true);
195
		}
196
	}
197

    
198
// Group list 2 (viewing_groups)
199
	$viewing_groups = explode(',', str_replace('_', '', $results_array['viewing_groups']));
200

    
201
    $sql = 'SELECT * FROM `'.TABLE_PREFIX.'groups`';
202
    $get_groups = $database->query($sql);
203

    
204
	$template->set_block('main_block', 'group_list_block2', 'group_list2');
205
	// Insert admin group and current group first
206
	$admin_group_name = $get_groups->fetchRow();
207
	$template->set_var(array(
208
									'ID' => 1,
209
									'TOGGLE' => '',
210
									'DISABLED' => ' disabled="disabled"',
211
									'LINK_COLOR' => '000000',
212
									'CURSOR' => 'default',
213
									'NAME' => $admin_group_name['name'],
214
									'CHECKED' => ' checked="checked"'
215
									)
216
							);
217
	$template->parse('group_list2', 'group_list_block2', true);
218

    
219
	while($group = $get_groups->fetchRow())
220
    {
221
		// check if the user is a member of this group
222
		$flag_disabled = '';
223
		$flag_checked =  '';
224
		$flag_cursor =   'pointer';
225
		$flag_color =    '';
226
		if (in_array($group["group_id"], $admin->get_groups_id()))
227
        {
228
			$flag_disabled = ''; //' disabled';
229
			$flag_checked =  ''; //' checked';
230
			$flag_cursor =   'default';
231
			$flag_color =    '000000';
232
		}
233

    
234
		$template->set_var(array(
235
										'ID' => $group['group_id'],
236
										'TOGGLE' => $group['group_id'],
237
										'DISABLED' => $flag_disabled,
238
										'LINK_COLOR' => $flag_color,
239
										'CURSOR' => $flag_cursor,
240
										'NAME' => $group['name'],
241
										'CHECKED' => $flag_checked
242
										)
243
								);
244
		if(is_numeric(array_search($group['group_id'], $viewing_groups)))
245
        {
246
			$template->set_var('CHECKED', 'checked="checked"');
247
		} else {
248
			if (!$flag_checked) {$template->set_var('CHECKED', '');}
249
		}
250

    
251
		$template->parse('group_list2', 'group_list_block2', true);
252

    
253
	}
254

    
255
// Show private viewers
256
if($results_array['visibility'] == 'private' OR $results_array['visibility'] == 'registered')
257
{
258
	$template->set_var('DISPLAY_VIEWERS', '');
259
} else {
260
	$template->set_var('DISPLAY_VIEWERS', 'display:none;');
261
}
262

    
263
//-- insert page_code 20090904-->
264
$template->set_var('DISPLAY_CODE_PAGE_LIST', ' id="multi_lingual" style="display:none;"');
265

    
266
// Work-out if page languages feature is enabled
267
if((defined('PAGE_LANGUAGES') && PAGE_LANGUAGES) && $field_set && file_exists(WB_PATH.'/modules/mod_multilingual/update_keys.php') )
268
{
269
    // workout field is set but module missing
270
    $TEXT['PAGE_CODE'] = empty($TEXT['PAGE_CODE']) ? 'Pagecode' : $TEXT['PAGE_CODE'];
271
	$template->set_var( array(
272
            'DISPLAY_CODE_PAGE_LIST' => ' id="multi_lingual"',
273
            'TEXT_PAGE_CODE' => '<a href="'.WB_URL.'/modules/mod_multilingual/update_keys.php?page_id='.$page_id.'">'.$TEXT['PAGE_CODE'].'</a>'
274
        )
275
    );
276

    
277
	// Page_code list
278
   /* 	$database = new database();  */
279
	function page_code_list($parent)
280
    {
281
		global $admin, $database, $template, $results_array, $pageCode;
282
		$default_language = DEFAULT_LANGUAGE;
283

    
284
        $sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent.' AND `language` = "'.$default_language.'" ORDER BY `position` ASC';
285
        $get_pages = $database->query($sql);
286

    
287
		while($page = $get_pages->fetchRow())
288
        {
289
			if(($admin->page_is_visible($page)==false) && ($page['visibility'] <> 'none') ) { continue; }
290

    
291
			$template->set_var('FLAG_CODE_ICON',' none ');
292
			if( $page['parent'] == 0 )
293
            {
294
				$template->set_var('FLAG_CODE_ICON','url('.THEME_URL.'/images/flags/'.strtolower($page['language']).'.png)');
295
			}
296

    
297
			// If the current page cannot be parent, then its children neither
298
			$list_next_level = true;
299
			// Stop users from adding pages with a level of more than the set page level limit
300
			if($page['level']+1 < PAGE_LEVEL_LIMIT)
301
            {
302
				// Get user perms
303
				$admin_groups = explode(',', str_replace('_', '', $page['admin_groups']));
304
				$admin_users = explode(',', str_replace('_', '', $page['admin_users']));
305

    
306
				$in_group = FALSE;
307
				foreach($admin->get_groups_id() as $cur_gid)
308
                {
309
					if (in_array($cur_gid, $admin_groups))
310
					{
311
						$in_group = TRUE;
312
					}
313
				}
314

    
315
				if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users)))
316
                {
317
					$can_modify = true;
318
				} else {
319
					$can_modify = false;
320
				}
321

    
322
				$title_prefix = '';
323
				for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - - &nbsp;'; }
324
                // $space = str_repeat('&nbsp;', 3);  $space.'&lt;'..'&gt;'
325
				$template->set_var(array(
326
										'VALUE' => $page['page_code'],
327
                                        'PAGE_VALUE' => $title_prefix.$page['menu_title'],
328
										'PAGE_CODE' => $title_prefix.$page['page_id']
329
										)
330
								);
331
				if($results_array['page_code'] == $page['page_code'])
332
                {
333
					$template->set_var('SELECTED', ' selected="selected"');
334
				} elseif($results_array['page_code'] == $page['page_code'])
335
                {
336
					$template->set_var('SELECTED', ' disabled="disabled" class="disabled"');
337
					$list_next_level=false;
338
				} elseif($can_modify != true)
339
                {
340
					$template->set_var('SELECTED', ' disabled="disabled" class="disabled"');
341
				} else {
342
					$template->set_var('SELECTED', '');
343
				}
344
				$template->parse('page_code_list', 'page_code_list_block', true);
345
			}
346
			if ($list_next_level)
347
				page_code_list($page['page_id']);
348
		}
349
	}
350

    
351
	// Insert code_page values from page to modify
352
	$template->set_block('main_block', 'page_code_list_block', 'page_code_list');
353
	if($admin->get_permission('pages_add_l0') == true OR $results_array['level'] == 0) {
354
		if($results_array['parent'] == 0) { $selected = ' selected'; } else { $selected = ''; }
355
		$template->set_var(array(
356
									'VALUE' => '',
357
									'PAGE_CODE' => $TEXT['NONE'],
358
                                    'PAGE_VALUE' => '',
359
									'SELECTED' => $selected
360
								)
361
							);
362
		$template->parse('page_code_list', 'page_code_list_block', true);
363
	}
364
	// get pagecode form this page_id
365
   	page_code_list(0);
366
}
367
//-- page code -->
368

    
369
// Parent page list
370
/* $database = new database();  */
371
function parent_list($parent)
372
{
373
	global $admin, $database, $template, $results_array,$field_set;
374

    
375
    $sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent.' ORDER BY `position` ASC';
376
    $get_pages = $database->query($sql);
377

    
378
	while($page = $get_pages->fetchRow())
379
    {
380
		if($admin->page_is_visible($page)==false)
381
        {
382
          continue;
383
        }
384

    
385
		// if parent = 0 set flag_icon
386
		$template->set_var('FLAG_ROOT_ICON',' none ');
387
		if( $page['parent'] == 0  && $field_set)
388
        {
389
			$template->set_var('FLAG_ROOT_ICON','url('.THEME_URL.'/images/flags/'.strtolower($page['language']).'.png)');
390
		}
391
		// If the current page cannot be parent, then its children neither
392
		$list_next_level = true;
393
		// Stop users from adding pages with a level of more than the set page level limit
394
		if($page['level']+1 < PAGE_LEVEL_LIMIT)
395
        {
396
			// Get user perms
397
			$admin_groups = explode(',', str_replace('_', '', $page['admin_groups']));
398
			$admin_users = explode(',', str_replace('_', '', $page['admin_users']));
399
			$in_group = FALSE;
400
			foreach($admin->get_groups_id() as $cur_gid)
401
            {
402
				if (in_array($cur_gid, $admin_groups))
403
                {
404
					$in_group = TRUE;
405
				}
406
			}
407
			if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users)))
408
            {
409
				$can_modify = true;
410
			} else {
411
				$can_modify = false;
412
			}
413
			// Title -'s prefix
414
			$title_prefix = '';
415
			for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - - &nbsp;'; }
416
			$template->set_var(array(
417
								'ID' => $page['page_id'],
418
								'TITLE' => ($title_prefix.$page['menu_title']),
419
								'MENU-TITLE' => ($title_prefix.$page['menu_title']),
420
								'PAGE-TITLE' => ($title_prefix.$page['page_title']),
421
								'FLAG_ICON' => ' none ',
422
								));
423

    
424
			if($results_array['parent'] == $page['page_id'])
425
            {
426
				$template->set_var('SELECTED', ' selected="selected"');
427
			} elseif($results_array['page_id'] == $page['page_id'])
428
            {
429
				$template->set_var('SELECTED', ' disabled="disabled" class="disabled"');
430
				$list_next_level=false;
431
			} elseif($can_modify != true)
432
            {
433
				$template->set_var('SELECTED', ' disabled="disabled" class="disabled"');
434
			} else {
435
				$template->set_var('SELECTED', '');
436
			}
437
			$template->parse('page_list2', 'page_list_block2', true);
438
		}
439
		if ($list_next_level)
440
        {
441
          parent_list($page['page_id']);
442
        }
443

    
444
	}
445
}
446

    
447
$template->set_block('main_block', 'page_list_block2', 'page_list2');
448
if($admin->get_permission('pages_add_l0') == true OR $results_array['level'] == 0) {
449
	if($results_array['parent'] == 0)
450
    {
451
		$selected = ' selected="selected"';
452
	} else { 
453
		$selected = '';
454
	}
455
	$template->set_var(array(
456
						'ID' => '0',
457
						'TITLE' => $TEXT['NONE'],
458
						'SELECTED' => $selected
459
						) );
460
	$template->parse('page_list2', 'page_list_block2', true);
461
}
462
parent_list(0);
463

    
464
if($modified_ts == 'Unknown')
465
{
466
	$template->set_var('DISPLAY_MODIFIED', 'hide');
467
} else {
468
	$template->set_var('DISPLAY_MODIFIED', '');
469
}
470

    
471
// Templates list
472
$template->set_block('main_block', 'template_list_block', 'template_list');
473

    
474
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "template" AND `function` = "template" order by `name`';
475
if( ($res_templates = $database->query($sql)) )
476
{
477
	while($rec_template = $res_templates->fetchRow())
478
    {
479
		// Check if the user has perms to use this template
480
		if($rec_template['directory'] == $results_array['template'] OR $admin->get_permission($rec_template['directory'], 'template') == true)
481
        {
482
			$template->set_var('VALUE', $rec_template['directory']);
483
			$template->set_var('NAME', $rec_template['name']);
484
			if($rec_template['directory'] == $results_array['template'])
485
            {
486
				$template->set_var('SELECTED', ' selected="selected"');
487
			} else {
488
				$template->set_var('SELECTED', '');
489
			}
490
			$template->parse('template_list', 'template_list_block', true);
491
		}
492
	}
493
}
494

    
495
// Menu list
496
if(MULTIPLE_MENUS == false)
497
{
498
	$template->set_var('DISPLAY_MENU_LIST', 'display:none;');
499
}
500
// Include template info file (if it exists)
501
if($results_array['template'] != '')
502
{
503
	$template_location = WB_PATH.'/templates/'.$results_array['template'].'/info.php';
504
} else {
505
	$template_location = WB_PATH.'/templates/'.DEFAULT_TEMPLATE.'/info.php';
506
}
507
if(file_exists($template_location))
508
{
509
	require($template_location);
510
}
511
// Check if $menu is set
512
if(!isset($menu[1]) OR $menu[1] == '')
513
{
514
	// Make our own menu list
515
	$menu[1] = $TEXT['MAIN'];
516
}
517
// Add menu options to the list
518
$template->set_block('main_block', 'menu_list_block', 'menu_list');
519
foreach($menu AS $number => $name)
520
{
521
	$template->set_var('NAME', $name);
522
	$template->set_var('VALUE', $number);
523
	if($results_array['menu'] == $number)
524
    {
525
		$template->set_var('SELECTED', ' selected="selected"');
526
	} else {
527
		$template->set_var('SELECTED', '');
528
	}
529
	$template->parse('menu_list', 'menu_list_block', true);
530
}
531

    
532
// Insert language values
533
$template->set_block('main_block', 'language_list_block', 'language_list');
534

    
535
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "language" ORDER BY `name`';
536
if( ($res_languages = $database->query($sql)) )
537
{
538
	while($rec_language = $res_languages->fetchRow())
539
    {
540
		$l_codes[$rec_language['name']] = $rec_language['directory'];
541
		$l_names[$rec_language['name']] = entities_to_7bit($rec_language['name']); // sorting-problem workaround
542
	}
543
	asort($l_names);
544

    
545
	foreach($l_names as $l_name=>$v)
546
    {
547
        $langIcons = (empty($l_codes[$l_name])) ? 'none' : strtolower($l_codes[$l_name]);
548
		// Insert code and name
549
		$template->set_var(array(
550
								'VALUE' => $l_codes[$l_name],
551
								'NAME' => $l_name,
552
								'FLAG_LANG_ICONS' => 'url('.THEME_URL.'/images/flags/'.$langIcons.'.png)',
553
								));
554
		// Check if it is selected
555
		if($results_array['language'] == $l_codes[$l_name])
556
        {
557
			$template->set_var('SELECTED', ' selected="selected"');
558
		} else {
559
			$template->set_var('SELECTED', '');
560
		}
561
		$template->parse('language_list', 'language_list_block', true);
562
	}
563
}
564

    
565
// Select disabled if searching is disabled
566
if($results_array['searching'] == 0)
567
{
568
	$template->set_var('SEARCHING_DISABLED', ' selected="selected"');
569
}
570
// Select what the page target is
571
switch ($results_array['target'])
572
{
573
	case '_top':
574
		$template->set_var('TOP_SELECTED', ' selected="selected"');
575
		break;
576
	case '_self':
577
		$template->set_var('SELF_SELECTED', ' selected="selected"');
578
		break;
579
	case '_blank':
580
		$template->set_var('BLANK_SELECTED', ' selected="selected"');
581
		break;
582
}
583

    
584
// Insert language text
585
$template->set_var(array(
586
				'HEADING_MODIFY_PAGE_SETTINGS' => $HEADING['MODIFY_PAGE_SETTINGS'],
587
				'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'],
588
				'TEXT_MODIFY' => $TEXT['MODIFY'],
589
				'TEXT_MODIFY_PAGE' => $HEADING['MODIFY_PAGE'],
590
				'LAST_MODIFIED' => $MESSAGE['PAGES']['LAST_MODIFIED'],
591
				'TEXT_PAGE_TITLE' => $TEXT['PAGE_TITLE'],
592
				'TEXT_MENU_TITLE' => $TEXT['MENU_TITLE'],
593
				'TEXT_TYPE' => $TEXT['TYPE'],
594
				'TEXT_MENU' => $TEXT['MENU'],
595
				'TEXT_PARENT' => $TEXT['PARENT'],
596
				'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
597
				'TEXT_PUBLIC' => $TEXT['PUBLIC'],
598
				'TEXT_PRIVATE' => $TEXT['PRIVATE'],
599
				'TEXT_REGISTERED' => $TEXT['REGISTERED'],
600
				'TEXT_NONE' => $TEXT['NONE'],
601
				'TEXT_HIDDEN' => $TEXT['HIDDEN'],
602
				'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
603
				'TEXT_TARGET' => $TEXT['TARGET'],
604
				'TEXT_SYSTEM_DEFAULT' => $TEXT['SYSTEM_DEFAULT'],
605
				'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
606
				'TEXT_NEW_WINDOW' => $TEXT['NEW_WINDOW'],
607
				'TEXT_SAME_WINDOW' => $TEXT['SAME_WINDOW'],
608
				'TEXT_TOP_FRAME' => $TEXT['TOP_FRAME'],
609
				'TEXT_ADMINISTRATORS' => $TEXT['ADMINISTRATORS'],
610
				'TEXT_ALLOWED_VIEWERS' => $TEXT['ALLOWED_VIEWERS'],
611
				'TEXT_DESCRIPTION' => $TEXT['DESCRIPTION'],
612
				'TEXT_KEYWORDS' => $TEXT['KEYWORDS'],
613
				'TEXT_SEARCHING' => $TEXT['SEARCHING'],
614
				'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
615
				'TEXT_ENABLED' => $TEXT['ENABLED'],
616
				'TEXT_DISABLED' => $TEXT['DISABLED'],
617
				'TEXT_SAVE' => $TEXT['SAVE'],
618
				'TEXT_RESET' => $TEXT['RESET'],
619
				'LAST_MODIFIED' => $MESSAGE['PAGES']['LAST_MODIFIED'],
620
				'HEADING_MODIFY_PAGE' => $HEADING['MODIFY_PAGE']
621
			) );
622

    
623
$template->parse('main', 'main_block', false);
624
$template->pparse('output', 'page');
625

    
626
// Print admin footer
627
$admin->print_footer();
628

    
629
?>
(20-20/22)