<?php
/*
 * @version		$Id: Radio propagations module ver. 3.0.0 2013-12-31 13:00:00Z PA4RM $
 * @package		Joomla! 3.0 module
 * @copyright	Copyright (C) 2013 - PA4RM. All rights reserved.
 * @license		GNU/GPL
 */

class modRADIOPROPAGATIONSHelper
{
    public static function getRadioPropagations( $params )
    {
			$align = $params->get( 'align' );
			if ($align == "1") {
				$align = "left";
				}
			elseif ($align =="2") {
				$align = "center";
				}
			elseif ($align == "3") {
				$align = "right";
				}
			$xray = $params->get( 'xray' );
			$geomagnetic = $params->get( 'geomagnetic' );
			$d_region = $params->get( 'd_region' );
			echo '<table><tr><td align="'.$align.'">';
			if ($xray == "1") {
				echo '<br>Solar X-rays:<br><a href="http://www.n3kl.org/sun/noaa.html" target="_blank"><img src="http://www.n3kl.org/sun/images/status.gif" width="121" height="21" border="0" ALT="Status"></a>';
				}
			if ($geomagnetic == "1") {
				echo '<br>Geomagnetic field:<br><a href="http://www.n3kl.org/sun/noaa.html" target="_blank"><img src="http://www.n3kl.org/sun/images/kpstatus.gif" width="121" height="21" border="0" ALT="Status"></a>';
				}
			if ($d_region == "1") {
				echo '<br>D-Region Absorption<br>Prediction:<br><a href="http://www.swpc.noaa.gov/drap/index.html" target="_blank"><img src="http://www.swpc.noaa.gov/drap/Global.png" width="121" height="60" border="0" ALT="Status"></a>';
				}
			echo '<br>Created by <a href="http://www.pa4rm.com" target="_new"><b>PA4RM</b></a>';
			echo '</td></tr></table>';
    }
}
?>