<?php
/*

 osCommRes, Services Oline 
http://www.oscommres.com 
Copyright (c) 2005 osCommRes 

Freeway eCommerce 
http://www.zac-ware.com/freeway 
Copyright (c) 2007 ZacWare 

Released under the GNU General Public License 
  
*/
// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
if(tep_payment_installed('wallet.php')){
	if(!defined('BOX_HEADING_WALLET'))define('BOX_HEADING_WALLET', 'My Wallet');
?>
<!-- faqdesk //-->
<tr>
	<td>
<?php

// set application wide parameters
// this query set is for FAQDesk
	$info_box_contents = array();
	$info_box_contents[] = array(
		'align' => 'left',
		'text'  => BOX_HEADING_WALLET
	);
	$wallet_string='';
	new infoBoxHeading($info_box_contents, true, true);


	if (!tep_session_is_registered('customer_id')) {
		$wallet_string=' <a href='.FILENAME_LOGIN.'>'.BOX_WALLET_TEXT.'</a>';
	} else {
		$balance=tep_get_wallet_balance($customer_id);
		$wallet_string=' <a href="'.tep_href_link(FILENAME_ACCOUNT, '', 'SSL').'">'. BOX_WALLET_BALANCE. $currencies->format($balance).'</a><br><br>';
		$wallet_string.=' <a href="'.tep_href_link(FILENAME_WALLET_CHECKOUT_PAYMENT, '', 'SSL').'">'. tep_template_image_button('button_add_funds.gif',IMAGE_WALLET_ADD_FUNDS) .'</a><br><br>';
	}		
	
	$info_box_contents = array();
	$info_box_contents[] = array(
			'align' => 'left',
			'text'  => '<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr><td align="center" class="infoBoxNavigationContent">' . $wallet_string . '</td></tr></table>');
	new infoBox($info_box_contents);


	$info_box_contents = array();
	$info_box_contents[] = array('align' => 'left',
									'text'  => tep_draw_separator('pixel_trans.gif', '100%', '1')
								  );
	new infoBoxFooter($info_box_contents, true, true);
?>

<!-- faqdesk_eof //-->
		</td>
	</tr>
<?php } ?>
