function SaveSettingsBlocks2() { global $adkFolder; checkSession('post'); //A custom function :D if (isset($_POST['auto_news_id_boards'])) { foreach ($_POST['auto_news_id_boards'] as $i => $v) { if (!is_numeric($_POST['auto_news_id_boards'][$i])) { unset($_POST['auto_news_id_boards'][$i]); } else { $_POST['auto_news_id_boards'][$i] = (int) $_POST['auto_news_id_boards'][$i]; } } $auto_news_id_boards = implode(',', $_POST['auto_news_id_boards']); } else { $auto_news_id_boards = 0; } $adk_news = (int) $_POST['adk_news']; $auto_news_limit_body = (int) $_POST['auto_news_limit_body']; $auto_news_limit_topics = (int) $_POST['auto_news_limit_topics']; $auto_news_size_img = (int) $_POST['auto_news_size_img']; $top_poster = (int) $_POST['top_poster']; $ultimos_mensajes = (int) $_POST['ultimos_mensajes']; $adk_vertically_who = !empty($_POST['adk_vertically_who']) ? 1 : 0; $adk_bookmarks_autonews = !empty($_POST['adk_bookmarks_autonews']) ? 1 : 0; $adk_bookmarks_news = !empty($_POST['adk_bookmarks_news']) ? 1 : 0; $adk_disable_autor = !empty($_POST['adk_disable_autor']) ? 1 : 0; $noavatar_top_poster = !empty($_POST['noavatar_top_poster']) ? 1 : 0; $adk_two_column = !empty($_POST['adk_two_column']) ? 1 : 0; if (empty($adk_news) || empty($ultimos_mensajes) || empty($auto_news_limit_topics) || empty($top_poster)) { fatal_lang_error('adkfatal_not_zero_data', false); } if (isset($_POST['shout_allowed_groups_view'])) { foreach ($_POST['shout_allowed_groups_view'] as $i => $v) { if (!is_numeric($_POST['shout_allowed_groups_view'][$i])) { unset($_POST['shout_allowed_groups_view'][$i]); } else { $_POST['shout_allowed_groups_view'][$i] = (int) $_POST['shout_allowed_groups_view'][$i]; } } $shout_allowed_groups_view = implode(',', $_POST['shout_allowed_groups_view']); } else { $shout_allowed_groups_view = 1; } if (isset($_POST['shout_allowed_groups'])) { foreach ($_POST['shout_allowed_groups'] as $i => $v) { if (!is_numeric($_POST['shout_allowed_groups'][$i])) { unset($_POST['shout_allowed_groups'][$i]); } else { $_POST['shout_allowed_groups'][$i] = (int) $_POST['shout_allowed_groups'][$i]; } } $shout_allowed_groups = implode(',', $_POST['shout_allowed_groups']); } else { $shout_allowed_groups = 1; } updateSettingsAdkPortal(array('shout_allowed_groups' => $shout_allowed_groups, 'shout_allowed_groups_view' => $shout_allowed_groups_view)); //Permissions, For some errors ;) global $boarddir; @chmod($adkFolder['main'] . '/shoutbox', 0755); @chmod($adkFolder['main'] . '/shoutbox/shoutbox.php', 0644); @chmod($adkFolder['main'] . '/shoutbox/shoutbox.js', 0644); updateSettingsAdkPortal(array('adk_news' => $adk_news, 'auto_news_limit_body' => $auto_news_limit_body, 'auto_news_limit_topics' => $auto_news_limit_topics, 'auto_news_size_img' => $auto_news_size_img, 'top_poster' => $top_poster, 'ultimos_mensajes' => $ultimos_mensajes, 'adk_vertically_who' => $adk_vertically_who, 'auto_news_id_boards' => $auto_news_id_boards, 'adk_bookmarks_news' => $adk_bookmarks_news, 'adk_bookmarks_autonews' => $adk_bookmarks_autonews, 'adk_disable_autor' => $adk_disable_autor, 'noavatar_top_poster' => $noavatar_top_poster, 'adk_two_column' => $adk_two_column)); global $context; redirectexit('action=admin;area=blocks;sa=settingsblocks;' . $context['session_var'] . '=' . $context['session_id']); }
function SaveSettingsStandAlone() { checkSession('post'); $adk_stand_alone_url = !empty($_POST['adk_stand_alone_url']) ? CleanAdkStrings($_POST['adk_stand_alone_url']) : ''; updateSettingsAdkPortal(array('adk_stand_alone_url' => $adk_stand_alone_url)); global $context; redirectexit('action=admin;area=adkadmin;sa=standalone;' . $context['session_var'] . '=' . $context['session_id']); }
function AdkSaveSettings() { global $context, $boarddir; checkSession('post'); //Do i have a htaccess?..... if not, return me to the main section please if (!file_exists($boarddir . '/.htaccess')) { redirectexit('action=admin;area=adkseoadmin;sa=htaccess;' . $context['session_var'] . '=' . $context['session_id']); } //Update settings please :) updateSettingsAdkPortal(array('enable_pages_seo' => (int) $_POST['enable_pages_seo'], 'enable_download_seo' => (int) $_POST['enable_download_seo'])); redirectexit('action=admin;area=adkseoadmin;sa=settings;' . $context['session_var'] . '=' . $context['session_id']); }
function EnableNotifications() { checkSession('get'); updateSettingsAdkPortal(array('enable_pages_notifications' => isset($_REQUEST['set']) ? 1 : 0)); global $context; redirectexit('action=admin;area=modules;sa=viewadminpages;sa=viewadminpages;' . $context['session_var'] . '=' . $context['session_id']); }
function AdkDownloadSaveSettings() { //Check the session checkSession('post'); $download_enable = !empty($_POST['download_enable']) ? 1 : 0; $download_max_filesize = (int) $_POST['download_max_filesize']; $download_images_size = (int) $_POST['download_images_size']; $download_set_files_per_page = (int) $_POST['download_set_files_per_page']; $download_enable_sendpmApprove = !empty($_POST['download_enable_sendpmApprove']) ? 1 : 0; $download_sendpm_body = CleanAdkStrings($_POST['download_sendpm_body']); $download_sendpm_userId = (int) $_POST['download_sendpm_userId']; $download_max_attach_download = (int) $_POST['download_max_attach_download']; $adkcolor_border = CleanAdkStrings($_POST['adkcolor_border']); $adkcolor_fondo = CleanAdkStrings($_POST['adkcolor_fondo']); $adkcolor_fonttitle = CleanAdkStrings($_POST['adkcolor_fonttitle']); $adkcolor_font = CleanAdkStrings($_POST['adkcolor_font']); $adkcolor_link = CleanAdkStrings($_POST['adkcolor_link']); $adkcolor_attach = CleanAdkStrings($_POST['adkcolor_attach']); //update it updateSettingsAdkPortal(array('download_enable' => $download_enable, 'download_max_filesize' => $download_max_filesize, 'download_images_size' => $download_images_size, 'download_set_files_per_page' => $download_set_files_per_page, 'download_enable_sendpmApprove' => $download_enable_sendpmApprove, 'download_sendpm_body' => $download_sendpm_body, 'download_sendpm_userId' => $download_sendpm_userId, 'download_max_attach_download' => $download_max_attach_download, 'adkcolor_border' => $adkcolor_border, 'adkcolor_fondo' => $adkcolor_fondo, 'adkcolor_fonttitle' => $adkcolor_fonttitle, 'adkcolor_font' => $adkcolor_font, 'adkcolor_link' => $adkcolor_link, 'adkcolor_attach' => $adkcolor_attach)); redirectexit('action=admin;area=adkdownloads'); }