<?php 
//get my info using the id
$sql255="SELECT * from j_users WHERE 
j_id='".$row['j_recipient_id']."'"; //  
$result255 = runSQL($sql255);
$data25 = mysqli_fetch_array($result255);
$r_id = $data25['j_id'];
$r_username = $data25['j_username'];
$r_firstname = $data25['j_firstname'];
$r_lastname = $data25['j_lastname'];
$r_wallet = $data25['j_wallet']; 
$r_name = trim("$r_firstname $r_lastname");
?>


<li class="list-group-item">
	<span class="subject">Type</span>
	<br/>
	<span class="desc <?php if($row['j_paid']>0){ echo 'text-danger'; }else{ echo 'text-primary'; } ?>">
		<?php echo $row['j_type']; ?> 
	</span> [<?php echo $row['j_kind']; ?>]
</li>

<li class="list-group-item">
	<span class="subject"> Trading Status</span>
	<br/>
	<span class="desc">
		<?php 
		echo t_status($row['j_status'],$row['j_id']);
		?>
	</span>
</li>

<?php 
/*
<?php if(isset($_SESSION['j_admin']) && $row['j_paid'] > 0){ ?>
<li class="list-group-item">
	<span class="subject"> Re-trade Cash </span>
	<br/>
	<span class="desc">
		<?php 
		echo "<a class='app_btn bg-primary' href='".$dir."re-invest?r=".$row['j_transact_id']."'> Re-invest </a>";
		?>
	</span>
</li>
<?php } ?>
*/
?>

<li class="list-group-item">
	<span class="subject">Amount</span>
	<br/>
	<span class="desc">
		<?php echo amount_w_c($row['j_amount'],$row['j_currency']); ?>  
	</span>
</li>



<li class="list-group-item">
	<span class="subject">Duration</span>
	<br/>
	<span class="desc">
		<?php echo $row['j_duration']; ?> 
	</span>
</li>



<li class="list-group-item">
	<span class="subject">Return on Trade</span>
	<br/>
	<span class="desc">
		<?php echo amount_w_c($row['j_roi'],$row['j_currency']); ?> 
	</span>
</li>

<li class="list-group-item">
	<span class="subject">Total</span>
	<br/>
	<span class="desc">
		<?php echo amount_w_c($row['j_total'],$row['j_currency']); ?> 
	</span>
</li>

<?php 
/*
<li class="list-group-item">
	<span class="subject">Start Date</span>
	<br/>
	<span class="desc">
		<?php echo FULL_DATE($row['j_date']); ?> 
	</span>
</li>
*/
?>
<?php 
if($row['j_paid'] > 0){
?>
<li class="list-group-item">
	<span class="subject">Start Date</span>
	<br/>
	<span class="desc">
		<?php 
		//$start_date= date('Y-m-d H:i:s', strtotime($row['j_end_date']. ' -'.$row['j_duration'].''));
		$start_date=$row['j_date'];
		echo FULL_DATE($start_date); ?> 
	</span>
</li>


<li class="list-group-item">
	<span class="subject">Next Pay Date</span>
	<br/>
	<span class="desc">
		<?php 
	   if($row['j_end_date']>$CurrentDate){
	   echo FULL_DATE($row['j_next_pay_date']);
	   }else{
		 echo "---"; 
	   }
	   ?>
	</span>
</li>

<li class="list-group-item">
	<span class="subject">End Date</span>
	<br/>
	<span class="desc">
		<?php echo FULL_DATE($row['j_end_date']); ?>
	</span>
</li>

<li class="list-group-item">
	<span class="subject">Amount Earned</span>
	<br/>
	<span class="desc">
		<?php echo amount_w_c($row['j_profit_ngn'],$row['j_currency']); ?> 
	</span>
</li>

<?php } ?>


<?php 
/*
<li class="list-group-item">
	<span class="subject">Balance after Transaction</span>
	<br/>
	<span class="desc">
		<?php echo amount_w_c($row['j_bal'],$row['j_currency']); ?> 
	</span>
</li>
*/
?>


<li class="list-group-item">
	<span class="subject">Description</span>
	<br/>
	<span class="desc">
		<?php echo $row['j_desc']; ?> 
	</span>
</li>

<li class="list-group-item">
	<span class="subject">Payment Method</span>
	<br/>
	<span class="desc">
		<?php echo $row['j_gateway']; ?>
	</span>
</li>


<li class="list-group-item">
	<span class="subject">Reference ID</span>
	<br/>
	<span class="desc">
		<?php echo $row['j_transact_id']; ?>
	</span>
</li>



<li class="list-group-item">
	<span class="subject">Date/Time</span>
	<br/>
	<span class="desc">
		<?php echo time_ago($row['j_date']); ?>
	</span>
</li>
