<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
	$mod_template="file_list.tpl";
	$lang=Db::i()->selectRow("SELECT * FROM ?_langs WHERE lang_id=?", $_GET['var1']);
	addBreadcrumb($lang['lang_name']);
	
	$files=glob(LAB_PATH_KERNEL.'/languages/'.LabConfig::$cfg['default_lang']."/lang.*.php");
	foreach($files as $file)
	{
		$module=substr(basename($file, ".php"), 5);
		$module_name=getModuleInfo($module);
		Tpl::i()->append('modules', array('file'=>$module, 'name'=>$module_name));
	}

	function getModuleInfo($mod)
	{
		if (file_exists(LAB_PATH_MODULES.'/'.$mod."/config.xml"))
		{
			$xml = simplexml_load_file(LAB_PATH_MODULES.'/'.$mod."/config.xml");
			$data=get_object_vars($xml);
			return $data['name'];
		}
		else return '';
	}