<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts Multicart                     |
// +----------------------------------------------------------------------+
// | Authors: Programmer<programmer@armia.com>        		              |
// +----------------------------------------------------------------------+
// | Copyrights Armia Systems, Inc and iScripts.com � 2005                |
// | All rights reserved                                                  |
// +----------------------------------------------------------------------+
// | This script may not be distributed, sold, given away for free to     |
// | third party, or used as a part of any internet services such as      |
// | webdesign etc.                                                       |
// +----------------------------------------------------------------------+
?>
<?php
include "includes/config.php";
include "includes/session.php";
include "includes/functions.php";
if(isset( $_SESSION["sess_userid"]) and $_SESSION["sess_userid"]!= ""){
	$userid = $_SESSION["sess_userid"];
}
else
{
	header("Location:".SITE_URL."/login.php");
	exit;
}


                $_SESSION["sess_addresses_collected"] = false;
		$_SESSION["sess_stock_adjusted"] = false;
		$_SESSION['couponCode_det']='';
		if(isset($_SESSION['guest_login']) && $_SESSION['guest_login']!='')
		{
                    if(function_exists('session_unregister')){
			session_unregister($_SESSION['guest_login']);
			session_unregister($_SESSION['sess_userid']);
                        session_unregister($_SESSION['SHIPPING_TOTAL']);
                    }else{
                        unset($_SESSION['guest_login']);
			unset($_SESSION['sess_userid']);
                        unset($_SESSION['SHIPPING_TOTAL']);
                    }
			$_SESSION['guest_login']='';
			$_SESSION["sess_userid"]='';
		}
		$_SESSION["sess_guest_username"]='';
		$_SESSION["sess_guest_password"]='';
		 $_SESSION["sessShippingDisplayName"]='';
		  $_SESSION['sess_giftcertificate_code']='';
		 $_SESSION['sess_gift_amount_used']='';
		 $_SESSION['amount_paid']='';
		 $_SESSION['sess_giftcertificate_available_amt']='';
                 $_SESSION["SHIPPING_DETAILS"] = '';
                  $_SESSION["TAX_DETAILS"] = '';
                  $_SESSION["TAX_TOTAL"] = '';
                  $_SESSION["SHIPPING_TOTAL"] = '';
                  $_SESSION["SESS_BUYER_COMMENTS"] ='';
                  
                    unset($_SESSION['SHIPPING_TOTAL']);
                    $_SESSION["SHIPPING_DETAILS"]   =array();
                     unset($_SESSION["SHIPPING_DETAILS"]);
                     unset($_SESSION["TAX_DETAILS"]);
                     unset($_SESSION['couponCode_det']);
           $payment_completed =true;

/*display the active template*/

$active_template = displayTemplate();


include "includes/htmltop.php";

/* Top File Name */

include_once ("includes/".$active_template[0]);


?>
<div align="left" class="main_body">

			<!--mainbody area start -->


		<!--center content area start-->

		<div align="left" id="item_details">


		<!--items display area start -->

		<div align="left" id="items_top_area">

				<div align="left" id="items_top_area_ttl"><?php echo PP_PAY_SUCCESS_TEXT;?></div>
		</div>

		<div>&nbsp;</div>

		<div class="text_information" align="center"><?php echo $message?></div>

		<div align="center" id="items_display_area">

		<table cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td class="text_information" align="center">
					<b style="background-color:#000000; margin-bottom:15px;  font-family:Arial, Helvetica, sans-serif; font-size:12px; padding:10px 10px 10px 10px; color:#67CB1A;"><?php echo ORDER_PLACED_SUCESS_TEXT;?></b>
				</td>
			</tr>
			<tr>
			  <td height="8" align="center" ></td>
		  </tr>


			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td align="center">
					<input type='button' value='<?php echo HOME_LINK;?>'  class='button' onClick="window.location.href='<?php echo SITE_URL?>/index.php'">
					&nbsp;&nbsp;<input type='button' value='<?php echo CONTINUE_SHOPPING_BUTTON;?>'  class='button' onClick="window.location.href='<?php echo SITE_URL?>/categorydetail.php'">
				</td>
			</tr>
	  </table>
	</div>

	<div align="left" class="float_clear1"></div>
	 <!--items display area end -->
	  </div>
	<!--center content area end-->
	<div align="left" class="clear"></div>
	<!--mainbody area end -->
	</div>
	<div align="left" class="clear"></div>


<?php
include "includes/".$active_template[2];	/* Bottom File Name */
?>															