<?php
/**
* Joomla! 1.5 component injooosm
*
* @version $Id: view.html.php 2009-11-22 14:03:00$
* @author Christian Knorr
* @package injooosm
* @subpackage backend
* @license GNU/GPL
* @filesource
*
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Import Joomla! libraries
jimport( 'joomla.application.component.view');
/**
*
*/
class injooosmViewInfo extends JView {
/**
*
* @param object $tpl
*/
function display($tpl = null) {
parent::display($tpl);
}
function getVersion() {
$return = array();
$latest = file ("http://injooosm.sourceforge.net/version.php");
$latest = $latest[0];
$xml = simplexml_load_file(JPATH_SITE.DS."administrator".DS."components".DS."com_injooosm".DS."injooosm.xml");
$thisversion = (string)$xml->version;
if ( $latest == $thisversion ) {
$return["this"] = $thisversion;
$return["latest"] = "<font color=\"green\">".JText::_('OSM_STATE_LATEST')."</font>\n";
} else {
$return["this"] = "<font color=\"orange\">".$thisversion."</font>";
$return["latest"] = "<font color=\"red\">".JText::_('OSM_UPDATE')."</font> ".
JText::_('OSM_UPDATE_LINK_A')." ".
"<a href=\"http://sourceforge.net/projects/injooosm/files/\" target=\"_blank\">".
JText::_('OSM_UPDATE_LINK_B').
"</a> ".JText::_('OSM_UPDATE_LINK_C')." <font color=\"orange\">".$latest."</font>".
JText::_('OSM_UPDATE_LINK_D');
}
return $return;
}
}