<?php get_header(); ?>
<div id="content">

<div id="contentmiddle3">

<?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
?>
<div class="sm"><?php echo $curauth->nickname; ?></div>
<div class="sl"></div>
<h2><?php _e( 'About the author:', 'ines') ?> <?php echo $curauth->nickname; ?></h2>
<p><?php _e( 'Website:', 'ines') ?> <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></p>
<p><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon/favicon.png" alt="<?php _e('The Author', 'ines') ?>" class="left" /> 
<?php _e( 'Profile:', 'ines') ?> <?php the_author_description(); ?><br />
<a href="mailto:<?php the_author_email(); ?>"><?php _e( 'Email this author', 'ines') ?></a></p>

<h2><?php _e( 'Posts by', 'ines') ?> <?php echo $curauth->nickname; ?>:</h2>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div class="sm"><?php the_category(' <span>/</span> '); ?></div>
<div class="sl"></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

<div class="smeta">
<?php if ( get_the_author_meta( 'description' ) ) :  ?>
<div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'author_bio_avatar_size', 20 ) ); ?>
</div>
<?php endif; ?>
<?php _e('by', 'ines') ?> <?php the_author_posts_link(); ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>
<div class="sdate"><?php the_time('M'); ?> <?php the_time('j'); ?></div>

</div>

<div class="entry">
<div class="fr1">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php $image = get_the_post_thumbnail($post->ID, 'browse'); ?><?php echo $image; ?></a>
</div>
<?php the_excerpt(__('Read more'));?><div class="clearfix"></div>
<div class="read"><a title="<?php _e( 'Read more here', 'ines') ?>" href="<?php the_permalink() ?>"><?php _e( 'Read on', 'ines') ?> </a></div>
</div>
<div class="clearfix"></div>

<div class="postspace"></div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts by this author.'); ?></p>
<?php endif; ?>

<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi('', '', '', '', 3, false);} ?>
</div>
</div>

<?php get_template_part('bar'); ?>

</div>
<?php get_template_part('sbar'); ?>
</div>
<?php get_footer(); ?>