<?php

$res = $this->oDb->toArray("SELECT * FROM langs");
if (count($res) > 1) {
	$str = '<div id="langs">'."\n";
	for ($i=0;$i<count($res);$i++) {
		$img = '<img src="'.$this->path['core_flags_url'].$res[$i]['flag'].'" alt="'.$res[$i]['langname'].'" width="18" height="12" />';
		$str .= '<a href="'.$this->oUrl->langLink($res[$i]['lang']).'" title="'.$res[$i]['langname'].'" />'.$img.'</a>'."\n";
	}
	$str .= '</div>'."\n";
	return $str;
} else
	return "";

?>