<?php
ob_start();

error_reporting(0);
/**
 * 
 * Template Name: Annonces
 */

get_header(); ?>

<!-- upload image -->
<script type="text/javascript">
/* function to display file name when selected */
$.fn.fileName = function() {
	var $this = $(this),
	$val = $this.val(),
	valArray = $val.split('\\'),
	newVal = valArray[valArray.length-1],
	$button = $this.siblings('.button');
	if(newVal !== '') {
		$button.text(newVal);
  	}
};

$().ready(function() {
	/* on change, focus or click call function fileName */
	$('input[type=file]').bind('change focus click', function() {$(this).fileName()});
});
</script>

<div class="row">
    
<div id="row-fix">

	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
			<div class="entry">
				<?php the_content(); ?>
			
              
				   <!-- WINE RATING FORM -->
		<?php if ( is_user_logged_in() ) { ?>
<?php include (TEMPLATEPATH .'/annonces/forms.php');?>
        <?php }
else {
   
include (TEMPLATEPATH . '/membre/login.php');
}
?>

				

			</div>
		
		<div class="clear"></div>
        
	<?php edit_post_link(__('Modifier.'), '<p>', '</p>'); ?>
  	
            
            
     
		

	

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

   
</div>   
</div>
</div>
<?php get_footer(); ?>