<?php
/**
 * 
 * Template Name: Page paiement
 */

get_header(); ?>
<?php
$paHT = get_option('prix_id_code'); // prix hors taxes 
$taux =  get_option('tva_code'); // taux tva
$coefTVA = ($taux + 100) / 100;
$revientHT = $paHT;
$revientTTC = round($revientHT * $coefTVA, 2);
$tvaARecuperer = $revientTTC - $revientHT;
$pvTTC = $revientHT * $coeff;
$pvHT = round($pvTTC / $coefTVA, 2);
$tvaEncaisse = $pvTTC - $pvHT;
$tvaAPayer = $tvaEncaisse - $tvaARecuperer;
?>
<div class="row">
			<!-- Wide Column -->
			<div class="twelve columns">
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
		
		<div class="edit-post"><?php edit_post_link(__('Modifier cet article')); ?></div>
		
			

			<div class="post_description">
				<?php the_content(); ?>
                
                
                
                <!-- tableau prix client -->
<div class="clear"></div>
<?php if ( is_user_logged_in() ) { ?>
<div class="table-client">
<p><strong>Paiement en ligne</strong></p>
<table cellspacing="0">
    <tr><th>Description</th><th>Prix</th><th>Montant</th></tr>
    <tr><td width="250"><?php echo get_option('desc_produit_code'); ?></td><td>HT</td><td><?php echo $revientHT;?> &#128;</td></tr>
    <tr><td></td><td>TVA</td><td><?php echo $tvaARecuperer;?> &#128;</td></tr>
    <tr><td></td><td>Total TTC</td><td><?php echo $revientTTC;?> &#128;</td></tr>
    <tr><td class="btn-paiement" colspan="3">

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="<?php echo get_option('paypal_id_code'); ?>">
<input type="image" class="btn-paypal" src="http://lacoordination.be/wp-content/uploads/btn-paypal.png" border="0" name="submit" alt="PayPal - la solution de paiement en ligne la plus simple et la plus sécurisée !">
<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
</form>
<img class="btn-paypal-card" align="center" width="280px" height="28px" src="http://lacoordination.be/wp-content/uploads/paypal-card.png" />
</td></tr>
    </table>
                </div>
          <br />  <br />  <br />  <br />
      
  <div class="table-client">
  <p><strong>Paiement par versement bancaire</strong></p>
<table cellspacing="0">
    <tr><th>Description</th><th>Prix</th><th>Montant</th></tr>
    <tr><td width="250"><?php echo get_option('desc_produit_code'); ?></td><td>HT</td><td><?php echo $revientHT;?> &#128;</td></tr>
    <tr><td></td><td>TVA</td><td><?php echo $tvaARecuperer;?> &#128;</td></tr>
    <tr><td></td><td>Total TTC</td><td><?php echo $revientTTC;?> &#128;</td></tr>
    <tr><td class="vir-paiement" colspan="3">
    <?php echo get_option('desc_virement_code'); ?>
    
    </td></tr>
    </table>
    <?php } else { ?>
    
    <div class="member-page">

<table width="600" align="center" border="1">
  <tr>
    <th style=" text-align:center;" scope="col">&laquo; Vous devez &ecirc;tre membre ou connect&eacute; pour pouvoir acheter cette fonctionnalit&eacute; &raquo; </th>
  </tr>
  <tr>
    <td><div class="member-btn"><a href="http://www.laprevention.be/login?action=login">Me connecter</a></div></td>
  </tr>
  <tr>
    <td><div class="member-btn-2"><a href="http://www.laprevention.be/login?action=register">Devenir Membre </a></div>(Inscription gratuite)</td>
  </tr>
</table>
</div>
<?php } ?>
			
            </div>

				<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'kubrick') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

			<div class="clear"></div>
            <?php  // comments_template(); ?>
            
           
		

	<?php endwhile; else: ?>
    <?php endif; ?>

   

	</div>
    </div>
<?php  get_sidebar(); ?>
    </div>
    </div>
 
   <div class="clear"></div>
<?php get_footer(); ?>