<?php 
/*
##################################################################
#                       PHP 4&5 MySQL 4&5                        #
##################################################################
#           Copyright (c) 2004-2008 Armia Systems Inc            #
##################################################################
#               This file is part of Cybermatch site             #
##################################################################
#    Developed By: simi (simi@armia.com)                         #

##################################################################
#               Developed On:   03-04-2008                       #
##################################################################
#               Modified By:                                     #
##################################################################
#               Modified On:                                     #
##################################################################
# 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.                                         #
##################################################################
*/

require_once ("config.inc.php");
require_once ("includes/userlogincheck.inc.php");
require_once ("includes/mysql.inc.php");
require_once ("includes/arrays.inc.php");
require_once ("classes/misc.class.php");
require_once ("classes/userside.class.php");
require_once ("includes/Pager/Pager.php");

$message	= "";
$pages		= "";
$script		= "";
$data		= array();
$array		= array();
$page		= isset($_REQUEST['page'])	?	trim($_REQUEST['page'])	:	"1";
$objC		= new check();
if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objM		= new misc($objDB);
	$objU	= new userside($objDB);
	
	$array		= $objM->get_my_payments($_SESSION['user_id']);
	$params 	= array(
		'mode'      => 'Sliding',
		'perPage'   => PAGESIZE,
		'urlVar'    => 'page',
		'extraVars' => array(),
		'itemData'  => $array
	);
	$objP 		= & Pager::factory($params);
	$data  		= $objP->getPageData();
	if (empty($data))
		$message	.= "No payment entries exist.<br>";
	else
		$pages	= $objP->links;		
	$script		= $objU->get_script($message);
	$message	= $objU->remove_script($message);
}
include_once ("title.inc.php");
include_once ("tophtml.inc.php");
?>


<div class="row">
	<div class="eight columns">
		<div class="search-rslts">
			<div class="row"><div class="inenr-hd"><h2>My Payments</h2></div></div>
			<div class="row">
				<form>
					<div class="newdesignforinput maintext1">
						<?php if(isset($message) && trim($message)!='')
							  {
						?>
						<div class="full_row">
							<div class="maintext1 warning"><?php echo $message;?></div>
						</div>
						<?php }//end if?>
						<?php if (!empty($data)) 
							  { 
									foreach ($data as $key => $value) 
									{ 
						?>
						
						<div class="full_row">
							<div class="twelve">
								<b>Payment On</b> : <?php echo date('m/d/Y',strtotime($value['dDay']))?>
							</div>							
						</div>
						
						<div class="full_row">
							<div class="twelve">
								Amount: $<?php echo (stripslashes($value['fAmount']))?>
							</div>							
						</div>
						
						<div class="full_row">
							<div class="twelve">
								Transaction key: <?php echo htmlspecialchars(stripslashes($value['vTxn_Id']))?>
							</div>							
						</div>
						
						<div class="full_row">
							<div class="twelve">
								Reason: <?php echo (stripslashes($value['vReason']))?> <?php echo $value['vType']=="W"?"(Profile Writing Product)":""?><?php echo $value['vType']=="P"?"(Profile Photography Product)":""?>
							</div>							
						</div>
						
						<div class="row" style="border-top:1px dotted #cccccc; "></div>
						
						<?php }//end foreach
						} //end if
						?>
						<div class="clear"></div>
						<?php if ($pages <> "") 
						{
						?>
						<div class="full_row">
							<div class="twelve pagenation"><?php echo $pages?></div>							
						</div>
						<?php } ?>
						
					</div>
				</form>
			</div>
		</div>
	</div>
	
	<div class="four columns right search_result_R">
		<?php include_once ("left.inc.php");?>
	</div>
	
</div>


<?php include_once('bottomhtml.inc.php');?>
