} $ids = RMHttpRequest::post('ids', 'array', array()); if (!is_array($ids) || empty($ids)) { RMUris::redirect_with_message(__('No position id has been provided', 'rmcommon'), 'blocks.php', RMMSG_WARN); } $sql = "UPDATE " . $xoopsDB->prefix("mod_rmcommon_blocks_positions") . " SET active = " . ($status == 'active' ? 1 : 0) . "\n WHERE id_position IN (" . implode(',', $ids) . ")"; if ($xoopsDB->queryF($sql)) { RMUris::redirect_with_message(__('Database updated successully!', 'rmcommon'), 'blocks.php', RMMSG_SUCCESS); } else { RMUris::redirect_with_message(__('Errors ocurrs while trying to update data:', 'rmcommon') . $xoopsDB->error(), 'blocks.php', RMMSG_ERROR); } } $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; switch ($action) { case 'save_position': save_position(); break; case 'hidden': toggle_visibility(0); break; case 'visible': toggle_visibility(1); break; case 'delete': delete_blocks(); break; case 'deletepos': delete_positions(); break; case 'upload-widget': upload_widget();
$menu = $menus[$id]; $menu->set_block_position($position + 1); MenuService::move($menu, $block_position, $menu->get_block_position()); } } } if ($action == 'save') { save_position(Menu::BLOCK_POSITION__HEADER); save_position(Menu::BLOCK_POSITION__SUB_HEADER); save_position(Menu::BLOCK_POSITION__TOP_CENTRAL); save_position(Menu::BLOCK_POSITION__BOTTOM_CENTRAL); save_position(Menu::BLOCK_POSITION__TOP_FOOTER); save_position(Menu::BLOCK_POSITION__FOOTER); save_position(Menu::BLOCK_POSITION__LEFT); save_position(Menu::BLOCK_POSITION__RIGHT); save_position(Menu::BLOCK_POSITION__NOT_ENABLED); $columns_disabled = new ColumnsDisabled(); $columns_disabled->set_disable_header(!AppContext::get_request()->get_bool('header_enabled', false)); $columns_disabled->set_disable_sub_header(!AppContext::get_request()->get_bool('sub_header_enabled', false)); $columns_disabled->set_disable_top_central(!AppContext::get_request()->get_bool('top_central_enabled', false)); $columns_disabled->set_disable_bottom_central(!AppContext::get_request()->get_bool('bottom_central_enabled', false)); $columns_disabled->set_disable_top_footer(!AppContext::get_request()->get_bool('top_footer_enabled', false)); $columns_disabled->set_disable_footer(!AppContext::get_request()->get_bool('footer_enabled', false)); $columns_disabled->set_disable_left_columns(!AppContext::get_request()->get_bool('left_column_enabled', false)); $columns_disabled->set_disable_right_columns(!AppContext::get_request()->get_bool('right_column_enabled', false)); ThemesManager::change_columns_disabled($theme_post, $columns_disabled); MenuService::generate_cache(); AppContext::get_response()->redirect('menus.php'); } $tpl = new FileTemplate('admin/menus/menus.tpl'); $menu_template = new FileTemplate('admin/menus/menu.tpl');