diff --git a/lib/functions/froxlor/function.getLanguages.php b/lib/functions/froxlor/function.getLanguages.php new file mode 100644 index 00000000..413e4049 --- /dev/null +++ b/lib/functions/froxlor/function.getLanguages.php @@ -0,0 +1,34 @@ + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * + */ + +function getLanguages() { + + $result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_LANGUAGE . "` "; + $languages_array = array(); + + while ($row = $result_stmt->fetch(PDO::FETCH_ARRAY)) { + if (!isset($languages_array[$row['language']]) + && !in_array($row['language'], $languages_array) + ) { + $languages_array[$row['language']] = html_entity_decode($row['language']); + } + } + + return $languages_array; +}