Project

General

Profile

« Previous | Next » 

Revision 119

Added by stefan over 18 years ago

Implemented new module type 'tool'. Added setting section 'Tools' (advanced). Removed possibility to set permissions for all module types other than 'page'.

View differences:

index.php
124 124
						 );
125 125

  
126 126
// Insert groups into signup list
127
$template->set_block('main_block', 'group_list_block', 'group_list');
128
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
127
$template->set_block('main_block', 'tool_list_block', 'tool_list');
128
$results = $database->query("SELECT * FROM ".TABLE_PREFIX."modules WHERE type = 'tool'");
129
$tool_list_empty=true;
129 130
if($results->numRows() > 0) {
130
	while($group = $results->fetchRow()) {
131
		$template->set_var('ID', $group['group_id']);
132
		$template->set_var('NAME', $group['name']);
133
		if(FRONTEND_SIGNUP == $group['group_id']) {
134
			$template->set_var('SELECTED', 'selected');
135
		} else {
136
			$template->set_var('SELECTED', '');
137
		}
138
		$template->parse('group_list', 'group_list_block', true);
131
	while($tool = $results->fetchRow()) {
132
		$template->set_var('LINK', '<a href="'.ADMIN_URL.'/settings/tool.php?tool='.$tool['directory'].'">'.$tool['name'].'</a>');
139 133
	}
140 134
} else {
141
	$template->set_var('ID', 'disabled');
142
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
143
	$template->parse('group_list', 'group_list_block', true);
135
	$template->set_var('LINK', $TEXT['NONE_FOUND']);
144 136
}
137
$template->parse('tool_list', 'tool_list_block', true);
145 138

  
139

  
146 140
// Insert language values
147 141
$template->set_block('main_block', 'language_list_block', 'language_list');
148 142
if($handle = opendir(WB_PATH.'/languages/')) {
......
466 460
// Insert Server Email value into template
467 461
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
468 462

  
463
// Insert groups into signup list
464
$template->set_block('main_block', 'tool_list_block', 'tool_list');
465
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
466
if($results->numRows() > 0) {
467
	while($group = $results->fetchRow()) {
468
		$template->set_var('ID', $group['group_id']);
469
		$template->set_var('NAME', $group['name']);
470
		if(FRONTEND_SIGNUP == $group['group_id']) {
471
			$template->set_var('SELECTED', 'selected');
472
		} else {
473
			$template->set_var('SELECTED', '');
474
		}
475
		$template->parse('group_list', 'group_list_block', true);
476
	}
477
} else {
478
	$template->set_var('ID', 'disabled');
479
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
480
	$template->parse('group_list', 'group_list_block', true);
481
}
482

  
469 483
// Insert language headings
470 484
$template->set_var(array(
471 485
								'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
472 486
								'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
473 487
								'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
474
								'HEADING_FILESYSTEM_SETTINGS' => $HEADING['FILESYSTEM_SETTINGS']
488
								'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'],
489
								'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS']
475 490
								)
476 491
						);
477 492
// Insert language text and messages

Also available in: Unified diff