75 |
75 |
$admin->print_footer();
|
76 |
76 |
exit();
|
77 |
77 |
}
|
78 |
|
} elseif(isset($_POST['module']) AND $_POST['module'] != '')
|
|
78 |
} elseif(isset($_POST['module']) && $_POST['module'] != '')
|
79 |
79 |
{
|
80 |
80 |
// Get section info
|
81 |
81 |
$module = $admin->add_slashes($_POST['module']);
|
... | ... | |
117 |
117 |
$in_old_group = TRUE;
|
118 |
118 |
}
|
119 |
119 |
}
|
120 |
|
if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
|
|
120 |
if((!$in_old_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
|
121 |
121 |
{
|
122 |
122 |
$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
|
123 |
123 |
}
|
... | ... | |
130 |
130 |
|
131 |
131 |
if($database->is_error())
|
132 |
132 |
{
|
133 |
|
$admin->print_header();
|
|
133 |
// $admin->print_header();
|
134 |
134 |
$admin->print_error($database->get_error());
|
135 |
135 |
}
|
136 |
136 |
if($results->numRows() == 0)
|
137 |
137 |
{
|
138 |
|
$admin->print_header();
|
|
138 |
// $admin->print_header();
|
139 |
139 |
$admin->print_error($MESSAGE['PAGES']['NOT_FOUND']);
|
140 |
140 |
}
|
141 |
141 |
$results_array = $results->fetchRow();
|
... | ... | |
227 |
227 |
$sql .= 'WHERE `directory` = "'.$section['module'].'"';
|
228 |
228 |
$module_name = $database->get_one($sql);
|
229 |
229 |
// if(DEBUG && $database->is_error()) { $admin->print_error($database->get_error()); }
|
|
230 |
$module_tmp = ( trim($module_name) == '' ) ? $section['module'] : $module_name;
|
230 |
231 |
|
231 |
|
$template->set_var(array(
|
232 |
|
) );
|
233 |
232 |
|
234 |
233 |
if(SECTION_BLOCKS)
|
235 |
234 |
{
|
236 |
|
if(defined('EDIT_ONE_SECTION') and EDIT_ONE_SECTION)
|
|
235 |
if(defined('EDIT_ONE_SECTION') && EDIT_ONE_SECTION)
|
237 |
236 |
{
|
238 |
|
$edit_page ='<a name="'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'&wysiwyg='.$section['section_id'] .'">'.$module_name.'</a>';
|
|
237 |
$edit_page ='<a name="'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'&wysiwyg='.$section['section_id'] .'">'.$module_tmp.'</a>';
|
239 |
238 |
} else {
|
240 |
|
$edit_page ='<a name="'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'#wb'.$section['section_id'].'">'.$module_name.'</a>';
|
|
239 |
$edit_page ='<a name="'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'#wb'.$section['section_id'].'">'.$module_tmp.'</a>';
|
241 |
240 |
}
|
242 |
|
|
|
241 |
$edit_page = ( trim($module_name) == '' ) ? '<span class="module_disabled">'.$section['module'].'</span>' : $edit_page;
|
243 |
242 |
$input_attribute = 'input_normal';
|
244 |
243 |
$template->set_var(array(
|
245 |
244 |
'STYLE_DISPLAY_SECTION_BLOCK' => ' style="visibility:visible;"',
|
... | ... | |
250 |
249 |
'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
|
251 |
250 |
'SELECT' => '',
|
252 |
251 |
'SET_NONE_DISPLAY_OPTION' => ''
|
253 |
|
)
|
|
252 |
)
|
254 |
253 |
);
|
255 |
254 |
// Add block options to the section_list
|
256 |
255 |
$template->clear_var('block_list');
|
... | ... | |
268 |
267 |
$template->parse('block_list', 'block_block', true);
|
269 |
268 |
}
|
270 |
269 |
} else {
|
271 |
|
$edit_page ='<a name="'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'#'.$section['section_id'].'">'.$module_name.'</a>';
|
|
270 |
$edit_page ='<a name="'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'#'.$section['section_id'].'">'.$module_tmp.'</a>';
|
|
271 |
$edit_page = ( trim($module_name) == '' ) ? '<span class="module_disabled">'.$section['module'].'</span>' : $edit_page;
|
272 |
272 |
$input_attribute = 'input_small';
|
273 |
273 |
$template->set_var(array(
|
274 |
274 |
'STYLE_DISPLAY_SECTION_BLOCK' => ' style="display:none;"',
|
... | ... | |
280 |
280 |
'NAME' => htmlentities(strip_tags($block[1])),
|
281 |
281 |
'VALUE' => 1,
|
282 |
282 |
'SET_NONE_DISPLAY_OPTION' => ''
|
283 |
|
)
|
|
283 |
)
|
284 |
284 |
);
|
285 |
285 |
}
|
286 |
286 |
// Insert icon and images
|
insert modulename in sections, even for missing module, you can style it with class selector: module_disabled