Location: PHPKode > projects > injooosm > administrator/components/com_injooosm/views/files/tmpl/importjgt.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: importjgt.php 2010-02-06 21:15:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage backend
 * @license GNU/GPL
 * @filesource
 *
 */
 
defined('_JEXEC') or die('Restricted access');
JToolBarHelper::title(JText::_('OSM_ADD_FILES'), 'categories.png');
JToolBarHelper::back($alt= 'Back', $href= 'javascript:history.back();');
$model = $this->getModel();
$rows = $model->_fetchJPTfiles();
if($rows == false) {
	JError::raiseNotice(0,JText::_('OSM_ERROR_NOJGTFOUND'));
} else {
$i=0;
$importdone = false;
foreach ( $rows AS $track ) {
	if($model->importFromJPT($track) == true) {
		$color = "green";
		$importdone = true;
	} else {
		$color = "red";
	}
		echo("<font color=\"".$color."\">".$track["file"]."</font><br />\n");
}
if ($importdone == true)
	JFactory::getApplication()->enqueueMessage(JText::_('OSM_JOOMGPSTRACKS_IMPORT_DONE'));
else
	JError::raiseNotice(0,JText::_('OSM_JOOMGPSTRACKS_IMPORT_FAILURE'));
}
Return current item: injooosm