<?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";

require_once("../sellerManagement.class.php");

$obj_seller_manage = new sellerManage($conn);

$settings_array = array('enablepaypal','enablepaypalsandbox','paypalemail','nseller_registration_amount');

$site_settings_array = $obj_seller_manage->getGeneralSettings($settings_array);

if(!empty($site_settings_array))
{
	$obj_seller_manage->setValues($site_settings_array);
}

if($obj_seller_manage->enablepaypalsandbox == "Y")
{
    
	$paypalurl = "https://www.sandbox.paypal.com/cgi-bin/webscr";
	$paypalbuttonurl = "https://www.sandbox.paypal.com/en_US/i/btn/x-click-but23.gif" ;
}
else
{
    
	$paypalurl = "https://www.paypal.com/cgi-bin/webscr";
	$paypalbuttonurl = "https://www.paypal.com/en_US/i/btn/x-click-but23.gif" ;
}



include "../includes/htmltop.php";
?>

<script src="../js/javascript_check.js"></script>
<script>
/*function checkArtistRegisterForm()
{

  var form_name = new Array('txtUserName','txtPassword','txtConfirmPassword','txtFirstName','txtLastName','txtAddress1','txtCity','txtState','ddlCountry','txtZIP','txtEmail');		
  var display_name = new Array('User Name','Password','Confirm Password','First Name','Last Name','Address1','City','State','Country','Zip','Email');
  var count = 11;	

  if(check_fields('frmRegister',form_name,display_name,count))	
  {
    	
	 showListArtistRegistration(document.frmRegister.txtUserName.value,document.frmRegister.txtEmail.value);	
   
  }
  else
  {
  
  		return false;
  
  }
   
}*/

</script>

		<body>
		
		<center>
		
		<div align="left" id="layout">
		
		
				
				
				<!--header area start -->
<?php

	include_once("../includes/topheader_seller.php")

?>
				
				<!--header area end -->
				
				
				
				
				<div align="left" class="main_body">
				<!--main body start -->
				
				
				
<?php
		include_once("../includes/artisttopmenu.php")
?>		
																					
								
					<div align="left" class="content_area">
					
					<!--content area start -->
							
					<div align="left" class="page_title">Seller Registration Step 3 </div>
															
					<div align="left">																			
						
				<table cellpadding="0" cellspacing="0" align="center" class="manage_table" width="100%">
				
<?php
if($obj_seller_manage->enablepaypal == "Y")
{

/*--------------Register a session to store the amount-------------*/
 //if (function_exists('session_unregister'))
    //(isset($_SESSION['SESS_seller_registration_amount']))?session_unregister('SESS_seller_registration_amount'):session_register('SESS_seller_registration_amount');
$_SESSION['SESS_seller_registration_amount'] = $obj_seller_manage->nseller_registration_amount;  

/*--------------Register a session to store the amount-------------*/
?>				
				
					<tr><td colspan="3">&nbsp;</td></tr>
					<tr>
						<td colspan="3" align="center"><b>Paypal Payment Gateway</b></td>
					</tr>
					<tr>
						<td align="center">
							<form action="<?php echo $paypalurl;?>" method="post" name="frmPayment">
							<div style="display:none;">&nbsp;&nbsp;&nbsp;navigate </div>
							<p>
								<input type="hidden" name="cmd" value="_xclick">
								<input type="hidden" name="bn" value="armiasystems_shoppingcart_wps_us">
								<input type="hidden" name="business" value="<?php echo $obj_seller_manage->paypalemail?>">
								<input type="hidden" name="item_name" value="Seller Registration with <?php echo SITE_NAME;?>">
								<input type="hidden" name="amount" value="<?php echo $obj_seller_manage->nseller_registration_amount?>">
								<input type="hidden" name="return" value="<?php echo SITE_URL ."/sellers/seller_success.php"; ?>">
								<input type="hidden" name="cancel_return" value="<?php echo SITE_URL ."/sellers/seller_failure.php"; ?>">
								<input type="hidden" name="no_note" value="1">
								<input type="hidden" name="currency_code" value="USD">
							 </p>	
							</form>
<SCRIPT>		  
	document.frmPayment.submit();		    
</SCRIPT>	
			
						</td>
					</tr>	
<?php
}
else
{

?>					
					<tr>
							<td colspan="3" align="center" class="text_information">Please contact the Administrator to enable the Paypal Payment Gateway</td>
					</tr>
<?php
}
?>					
				</table>

				</div>
						
						
				<!--content area end-->
								
				</div>
				
								
					<div align="left" class="clear_float"><img src="<?php echo $imagefolder;?>/clear.gif" alt="" width="1" height="1" /></div>
				<!--main body end -->
				</div>
				
				
<?php
	include "../includes/footer.php";
?>