<?php
/**
 * Installation file for CSVI VirtueMart
 *
 * @package 	CSVIVirtueMart
 * @author 		Roland Dalmulder
 * @link 		http://www.csvimproved.com
 * @copyright 	Copyright (C) 2006 - 2012 RolandD Cyber Produksi
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: install.csvivirtuemart.php 1892 2012-02-11 11:01:09Z RolandD $
 */

defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

/**
 * Load the CSVI VirtueMart installer 
 * 
 * @copyright 
 * @author 		RolandD
 * @todo 
 * @see 
 * @access 		public
 * @param 
 * @return 
 * @since 		3.0
 */
function com_install() {
	// First check the PHP version
	if (version_compare(phpversion(), '5.2', '<') == '-1') {
		?>
		<div><?php echo JHtml::_('image', JURI::root().'/administrator/components/com_csvivirtuemart/assets/images/csvivirtuemart_logo.png', 'CSVI VirtueMart'); ?></div>
		<?php
		echo '<span style="font-weight: bold; color: #FF0000;">'.sprintf('You are running PHP version %s, CSVI VirtueMart requires at least PHP version 5.2. Installation cannot continue.', phpversion()).'</span>';
	}
	else {
		// Redirect to CSVI VirtueMart Installer
		header ( "HTTP/1.1 303 See Other" );
		header ( "Location: " . JURI::base () . "index.php?option=com_csvivirtuemart&view=install" ); 
	}
}
?>