<?php
/**
* @version 1.0.0
* @package RStickets! 1.0.0
* @copyright (C) 2007-2008 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

// This is going to be redone, but for the time being, it's working as it is

//Init RS Adapter
require_once(dirname(__FILE__).'/../../../components/com_rstickets/adapter.php');
$RST_adapter = new RST_adapter();
$GLOBALS['RST_adapter'] = $RST_adapter;
require_once(RST_FRONTEND_ABS_PATH.'/functions.php');

// SET LANGUAGE
$rst_lang = $RST_adapter->getLanguage();
if (file_exists(RST_FRONTEND_ABS_PATH.'/lang/'.$rst_lang.'.php'))
	include(RST_FRONTEND_ABS_PATH.'/lang/'.$rst_lang.'.php');
else
	include(RST_FRONTEND_ABS_PATH.'/lang/english.php');

$message = '';
	
//Update Administrator Menu
//$q = "UPDATE `".$RST_adapter->getConfig('dbprefix')."components` SET admin_menu_img='../administrator/components/com_rstickets/images/rstickets_small.gif' WHERE admin_menu_link='option=com_rstickets'";
//mysql_query($q);

//Create RStickets! tables
//$result = rst_parse_mysql_dump(RST_BACKEND_ABS_PATH.'/tmp/rstickets-install.sql');
//if($result=='ok') $message .= RST_INSTALLER_TABLES_OK;
//else $mesage .= sprintf(RST_INSTALLER_TABLES_ERROR,$result);

$message .= RST_INSTALLER_TABLES_OK;

//Add sample data
$message .= RST_INSTALLER_DB_OK;
?>
<div align="left" width="100%">
	<img src="components/com_rstickets/images/rstickets.jpg" alt="RStickets! Logo"/>
</div>
<br/>
<table class="adminform">
	<tr>
		<td align="left">
		<?php echo RST_INSTALLER_WELCOME;?>
		</td>
	</tr>
</table><br/>
<table class="adminform">
	<tr>
		<td align="left">
		<?php echo $message;?>
		</td>
	</tr>
</table><br/><br/>
<div align="left" width="100%"><b>RStickets! Installed</b></div>