Revision 199
Added by ryan about 19 years ago
trunk/wb/admin/groups/groups.php | ||
---|---|---|
85 | 85 |
|
86 | 86 |
// Insert values into module list |
87 | 87 |
$template->set_block('main_block', 'module_list_block', 'module_list'); |
88 |
if ($handle = opendir(WB_PATH.'/modules/')) { |
|
89 |
while (false !== ($file = readdir($handle))) { |
|
90 |
if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) { |
|
91 |
// Include the modules info file |
|
92 |
require(WB_PATH.'/modules/'.$file.'/info.php'); |
|
93 |
if ($module_type=='page') { |
|
94 |
$template->set_var('VALUE', $file); |
|
95 |
$template->set_var('NAME', $module_name); |
|
96 |
if(!is_numeric(array_search($file, $module_permissions))) { |
|
97 |
$template->set_var('CHECKED', 'checked'); |
|
98 |
} else { |
|
99 |
$template->set_var('CHECKED', ''); |
|
100 |
} |
|
101 |
$template->parse('module_list', 'module_list_block', true); |
|
102 |
} |
|
88 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page'"); |
|
89 |
if($result->numRows() > 0) { |
|
90 |
while($addon = $result->fetchRow()) { |
|
91 |
$template->set_var('VALUE', $addon['directory']); |
|
92 |
$template->set_var('NAME', $addon['name']); |
|
93 |
if(!is_numeric(array_search($addon['directory'], $module_permissions))) { |
|
94 |
$template->set_var('CHECKED', 'checked'); |
|
95 |
} else { |
|
96 |
$template->set_var('CHECKED', ''); |
|
103 | 97 |
} |
98 |
$template->parse('module_list', 'module_list_block', true); |
|
104 | 99 |
} |
105 | 100 |
} |
106 | 101 |
|
107 | 102 |
// Insert values into template list |
108 | 103 |
$template->set_block('main_block', 'template_list_block', 'template_list'); |
109 |
if ($handle = opendir(WB_PATH.'/templates/')) { |
|
110 |
while (false !== ($file = readdir($handle))) { |
|
111 |
if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) { |
|
112 |
// Include the modules info file |
|
113 |
require(WB_PATH.'/templates/'.$file.'/info.php'); |
|
114 |
$template->set_var('VALUE', $file); |
|
115 |
$template->set_var('NAME', $template_name); |
|
116 |
if(!is_numeric(array_search($file, $template_permissions))) { |
|
117 |
$template->set_var('CHECKED', 'checked'); |
|
118 |
} else { |
|
119 |
$template->set_var('CHECKED', ''); |
|
120 |
} |
|
121 |
$template->parse('template_list', 'template_list_block', true); |
|
104 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'"); |
|
105 |
if($result->numRows() > 0) { |
|
106 |
while($addon = $result->fetchRow()) { |
|
107 |
$template->set_var('VALUE', $addon['directory']); |
|
108 |
$template->set_var('NAME', $addon['name']); |
|
109 |
if(!is_numeric(array_search($addon['directory'], $template_permissions))) { |
|
110 |
$template->set_var('CHECKED', 'checked'); |
|
111 |
} else { |
|
112 |
$template->set_var('CHECKED', ''); |
|
122 | 113 |
} |
114 |
$template->parse('template_list', 'template_list_block', true); |
|
123 | 115 |
} |
124 | 116 |
} |
125 |
|
|
117 |
|
|
126 | 118 |
// Insert language text and messages |
127 | 119 |
$template->set_var(array( |
128 | 120 |
'TEXT_RESET' => $TEXT['RESET'], |
trunk/wb/admin/groups/index.php | ||
---|---|---|
120 | 120 |
|
121 | 121 |
// Insert values into module list |
122 | 122 |
$template->set_block('main_block', 'module_list_block', 'module_list'); |
123 |
if($handle = opendir(WB_PATH.'/modules/')) { |
|
124 |
while (false !== ($file = readdir($handle))) { |
|
125 |
if($file != '.' AND $file != '..' AND $file != '.svn' AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) { |
|
126 |
// Include the modules info file |
|
127 |
require(WB_PATH.'/modules/'.$file.'/info.php'); |
|
128 |
if ($module_type=='page') { |
|
129 |
$template->set_var('VALUE', $file); |
|
130 |
$template->set_var('NAME', $module_name); |
|
131 |
$template->parse('module_list', 'module_list_block', true); |
|
132 |
} |
|
133 |
} |
|
123 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page'"); |
|
124 |
if($result->numRows() > 0) { |
|
125 |
while($addon = $result->fetchRow()) { |
|
126 |
$template->set_var('VALUE', $addon['directory']); |
|
127 |
$template->set_var('NAME', $addon['name']); |
|
128 |
$template->parse('module_list', 'module_list_block', true); |
|
134 | 129 |
} |
135 | 130 |
} |
136 | 131 |
|
137 | 132 |
// Insert values into template list |
138 | 133 |
$template->set_block('main_block', 'template_list_block', 'template_list'); |
139 |
if($handle = opendir(WB_PATH.'/templates/')) { |
|
140 |
while (false !== ($file = readdir($handle))) { |
|
141 |
if($file != '.' AND $file != '..' AND $file != '.svn' AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) { |
|
142 |
// Include the modules info file |
|
143 |
require(WB_PATH.'/templates/'.$file.'/info.php'); |
|
144 |
$template->set_var('VALUE', $file); |
|
145 |
$template->set_var('NAME', $template_name); |
|
146 |
$template->parse('template_list', 'template_list_block', true); |
|
147 |
} |
|
134 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'"); |
|
135 |
if($result->numRows() > 0) { |
|
136 |
while($addon = $result->fetchRow()) { |
|
137 |
$template->set_var('VALUE', $addon['directory']); |
|
138 |
$template->set_var('NAME', $addon['name']); |
|
139 |
$template->parse('template_list', 'template_list_block', true); |
|
148 | 140 |
} |
149 | 141 |
} |
150 | 142 |
|
Also available in: Unified diff
Fixed minor bugs with template and module permissions on groups