<?php if (!defined('IN_CONTEXT')) die('access violation error!'); ?>
<div id="myPannel">

	<div class="title">
    	<div class="l">
        	<div class="r">
				<?php _e('My Account'); ?>
                
                <div class="order">
                  <a href="index.php?<?php echo Html::xuriquery('mod_onlinepay', 'saving'); ?>"><?php _e('Online Saving'); ?></a>
                </div>
            </div>
        </div>
    </div>

  <div class="kkair" style="height:30px;"></div>




<div class="contentbody">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="list" id="useraccount_state">
    <tbody>
        <tr>
            <td class="label"><?php _e('Total Saving'); ?></td>
            <td class="entry"><?php echo $curr_user_ext->total_saving; ?></td>
            <td class="label"><?php _e('Total Payment'); ?></td>
            <td class="entry"><?php echo $curr_user_ext->total_payment; ?></td>
        </tr>
        <tr>
            <td class="label"><?php _e('Balance'); ?></td>
            <td class="entry" colspan="3"><?php echo $curr_user_ext->balance; ?></td>
        </tr>
    </tbody>
</table>
</div>

	<div class="kkair"></div>

	<div class="title">
    	<div class="l">
        	<div class="r">
				<?php _e('Transaction History'); ?>
            </div>
        </div>
  </div>

    
    
<div class="contentbody">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="list" id="userfinance_list">
	<thead>
		<tr>
            <th><?php _e('Time'); ?></th>
            <th><?php _e('Amount'); ?></th>
            <th><?php _e('Type'); ?></th>
            <th><?php _e('Memo'); ?></th>
        </tr>
    </thead>
    <tbody>
    <?php
    if (sizeof($transactions) > 0) {
        $row_idx = 0;
        foreach ($transactions as $transaction) {
    ?>
        <tr class="row_style_<?php echo $row_idx; ?>">
            <td class="aligncenter"><?php echo date('Y-m-d H:i:s', $transaction->action_time); ?></td>
        	<td class="aligncenter"><?php echo $transaction->amount; ?></td>
        	<td class="aligncenter"><?php echo Toolkit::switchText($transaction->type, 
                    array('1' => __('Saving'), '2' => __('Deduction'))); ?></td>
        	<td class="aligncenter"><?php echo $transaction->memo; ?></td>
        </tr>
    <?php
            $row_idx = 1 - $row_idx;
        }
    } else {
    ?>
    	<tr class="row_style_0">
    		<td colspan="4"><?php _e('No Records!'); ?></td>
    	</tr>
    <?php
    }
    ?>
    </tbody>
</table>
</div>
<div class="space"></div>
<?php
include_once(P_TPL.'/common/pager.php');
?>
</div>