Location: PHPKode > scripts > Gas mileage calculator > mod_gascalc.php
<?php
/**
 * @package Module Gas Mileage Calculator for Joomla! 1.5
 * @version $Id: mod_gascalc.php 711 2011-08-20 23:26:33Z you $
 * @author CalendarScripts
 * @copyright (C) 2011- CalendarScripts
 * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/  

//no direct access
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
 
// include the helper file
require_once(dirname(__FILE__).DS.'helper.php');

if(!empty($_POST['gascalc_ok']))
{
   $_calc=new ModGasCalcHelper();
   
   $message=$_calc->calculate();
}
 
// include the template for display
require(JModuleHelper::getLayoutPath('mod_gascalc'));
?>
Return current item: Gas mileage calculator