Example #1
0
                $sql = "UPDATE {$tbl_admin_languages} SET available='0' WHERE id IN ('" . implode("','", $ids) . "')";
                Database::query($sql);
            }
            break;
    }
}
// setting the name of the tool
$tool_name = get_lang('PlatformLanguages');
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
// including the header file (which includes the banner itself)
Display::display_header($tool_name);
if (isset($_GET['action']) && $_GET['action'] == 'make_unavailable_confirmed') {
    $language_info = SubLanguageManager::get_all_information_of_language($_GET['id']);
    if ($language_info['available'] == 1) {
        SubLanguageManager::make_unavailable_language($_GET['id']);
        $platform_language = api_get_setting('platformLanguage');
        UserManager::update_all_user_languages($language_info['english_name'], $platform_language);
        Display::display_confirmation_message(get_lang('LanguageIsNowHidden'));
    }
}
// displaying the explanation for this tool
Display::display_normal_message(get_lang('PlatformLanguagesExplanation'));
// selecting all the languages
$sql_select = "SELECT * FROM {$tbl_admin_languages}";
$result_select = Database::query($sql_select);
$sql_select_lang = "SELECT * FROM {$tbl_settings_current} WHERE  category='Languages'";
$result_select_lang = Database::query($sql_select_lang);
$row_lang = Database::fetch_array($result_select_lang);
// the table data
$language_data = array();