<?php
/*
  CRE Loaded , Open Source E-Commerce Solutions
  http://www.creloaded.com
  Portions  Copyright (c) 2003 osCommerce

     Chain Reaction Works, Inc
     Copyright &copy; 2005 - 2007 Chain Reaction Works, Inc.

  Released under the GNU General Public License
*/
  require('includes/languages/' . $language . '/upgrade_7.php');

  $http_url = parse_url($_POST['HTTP_WWW_ADDRESS']);
  $http_server = $http_url['scheme'] . '://' . $http_url['host'];
  $http_catalog = $http_url['path'];
  if (isset($http_url['port']) && !empty($http_url['port'])) {
    $http_server .= ':' . $http_url['port'];
  }

if ($_POST['skip'] != 'true') {

  $message = "\n\n" . $_POST['full_name'] . ' Submitted Application for CRE Merchant ' . "\n\n" .
  TEXT_COMPANY_NAME . ' ' . $_POST['company'] . "\n" .
  TEXT_FULL_NAME . ' ' . $_POST['full_name'] . "\n" .
  TEXT_TELEPHONE . ' ' . $_POST['telephone'] . "\n" .
  TEXT_NIGHT_PHONE . ' ' . $_POST['nightphone'] . "\n" .
  TEXT_COUNTRY . ' ' . $_POST['country'] . "\n" .
  TEXT_EMAIL_ADDRESS . ' ' . $_POST['email_address'] . "\n" .
  TEXT_YEARS_IN_BUSINESS . ' ' . $_POST['businessyears'] . "\n" . 
  TEXT_WEBSITE . ' ' . $_POST['website'] . "\n" . 
  TEXT_PROCESSING . ' ' . $_POST['processing'] . "\n" .
  TEXT_START_PROCESSING . ' ' . $_POST['start_processing'] . "\n" .
  TEXT_COMMENTS . "\n" . cre_html2txt($_POST['comments']) . "\n" . 
  '============================================================' . "\n\n" . 
  'Customer IP : ' . $_SERVER['REMOTE_ADDR'] . "\n" . 
  'Custmer ISP: ' . gethostbyaddr($_SERVER['REMOTE_ADDR']) . "\n";

  $headers = 'From: ' . $_POST['full_name'] . '<' . $_POST['email_address'] . '>' . "\r\n" .
             'Reply-To: ' . $_POST['email_address'] . "\r\n" .
             'X-Mailer: PHP/' . phpversion();
  @mail('application@cremerchant.com,sales@creloaded.com', 'Application for CRE Merchant from Install ' . $_POST['full_name'], $message, $headers);
}
?>

<h1>Installation Complete</h1>
<p><?php echo TEXT_INSTALL_3 ; ?></p>

<?php if ($_POST['skip'] != 'true') { ?>
 <p><?php echo TEXT_DESCRIPTION_CREM;?></p>
<?php } ?>
<table width="300" align="center">
<tr>
<td align="center" colspan="2"><div class="notice"><p><?php echo TEXT_INSTALL_7 ;?></p></div>
</td>
</tr>
<tr>
<td align="center"><a href="<?php echo $http_server . $http_catalog . 'index.php'; ?>" target="_blank"><?php echo TEXT_INSTALL_5 ;?></a></td>
<td align="center"><a href="<?php echo $http_server . $http_catalog . 'admin/index.php'; ?>" target="_blank"><?php echo TEXT_INSTALL_6 ;?></a>
</tr>
</table>