<?php
/*---------------------------------------------------+
| HoloCMS - Website and Content Management System
+----------------------------------------------------+
| Copyright © 2008 Meth0d
+----------------------------------------------------+
| HoloCMS is provided "as is" and comes without
| warrenty of any kind. 
+---------------------------------------------------*/

include('global.php');
include('INC/class.session.php');

$pagename = "Historique de transactions";
$pageid = "history";
$body_id = "home";

include('templates/community_subheader.php');
include('templates/community_header.php');

?>

<div id="container">
	<div id="content" style="position: relative" class="clearfix">
    <div id="column1" class="column">
				<div class="habblet-container ">		
						<div class="cbb clearfix brown ">
	
							<h2 class="title">Historique de transactions
							</h2>
						<div id="tx-log">

<div class="box-content">
Ceci est un aperçu de l'historique de vos transactions de crédit. Ils sont mis à jour dès que la transaction est faite. Vous pouvez voir jusqu'à 50 enregistrements.
</div>

<table class="tx-history">
<thead>
	<tr>
		<th class="tx-date">Date</th>
		<th class="tx-amount">Action</th>
		<th class="tx-description">Description</th>
	</tr>
</thead>
<tbody>
<?php
$tick = 0;

$get_em = mysql_query("SELECT date,amount,descr FROM cms_transactions WHERE userid = '".$my_id."' ORDER BY id DESC LIMIT 50") or die(mysql_error());
while($row = mysql_fetch_assoc($get_em)){

	$tick++;
	if(IsEven($tick)){ $even = "even"; } else { $even = "odd"; }

	printf("	<tr class=\"%s\">
		<td class=\"tx-date\">%s</td>
		<td class=\"tx-amount\">%s</td>
		<td class=\"tx-description\">%s</td>
	</tr>",$even,$row['date'],$row['amount'],$row['descr']);
}
?>
</tbody>
</table>

</div>
	
						
					</div>
				</div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
			 
</div><div id="column2" class="column">
				<div class="habblet-container ">		
						<div class="cbb clearfix brown ">
	
							<h2 class="title">Votre porte monnaie
							</h2>
						<div id="purse-habblet">
	
<ul>
    <li class="even icon-purse">
        <div>Tu as</div>
        <span class="purse-balance-amount"><?php echo $myrow['credits']; ?> Credits</span>
        <div class="purse-tx"><a href="history">Historique de transactions</a></div>
    </li>

    <li class="odd">

    </li>
</ul>
<div id="purse-redeem-result">
</div>
</div>

<script type="text/javascript">
	new PurseHabblet();
</script>
	
						
					</div>
				</div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
			 
				<div class="habblet-container ">		
	
						
	
						
					
				</div>
				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>			 
			 
</div>

<?php

include('templates/community_footer.php');

?>
