<?php
global $userdata;
// make sure google maps is enabled
$gmap_check = get_option('cp_gmaps_key');
?>
<!-- right sidebar -->
<div class="content_right">
<div class="tabprice">
<ul class="tabnavig">
<li><a href="#priceblock1"><span class="big"><?php _e('Member', 'cp') ?></span></a></li>
<li><a href="#priceblock2"><span class="big"><?php _e('Buy Now', 'cp') ?></span></a></li>
</ul>
<!-- tab 1 -->
<div id="priceblock1">
<div class="clr"></div>
<div class="singletab">
<div class="priceblocksmall dotted">
<p align="center" class="member-title"><?php _e('Information about this Stereolisting','cp');?></p>
<ul class="member">
<p><span><?php _e('For sale by:','cp');?></span>
<?php
// check to see if ad is legacy or not
if(get_post_meta($post->ID, 'name', true)) {
if (get_the_author() != '') { ?>
<a href="<?php echo CP_AUTHOR_PATH . strtolower(get_the_author_meta('user_login')); ?>"><?php the_author_meta('display_name'); ?></a>
<?php
} else {
echo get_post_meta($post->ID, 'name', true);
} ?>
<?php } else { ?>
<a href="<?php echo CP_AUTHOR_PATH . strtolower(get_the_author_meta('user_login')); ?>"><?php the_author_meta('display_name'); ?></a>
<?php
}
?>
</p>
<p><span><?php _e('View or write feedback for:','cp');?></span>
<a href="<?php echo get_option( 'siteurl' ). "/feedback/" . strtolower(get_the_author_meta('user_login')); ?>"><?php the_author_meta('display_name'); ?></a>
</p>
<ul>
<?php query_posts(array('posts_per_page' => 3, 'post_status' => 'publish', 'author' => get_the_author_meta('ID'), 'orderby' => RAND, 'post__not_in' => array($post->ID))); ?>
<p>Other Stereolistings by this member:</p>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post() ?>
<li>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
<?php else: ?>
<li><?php _e('No other ads by this poster found.','appthemes'); ?></li>
<?php endif; ?>
</ul>
<p align="center"><b><em><a href="<?php echo get_author_posts_url(get_the_author_id()); ?>" class="btn"><span><?php _e('View all ads by','appthemes'); ?> <?php the_author_meta('display_name'); ?> »</span></a></em></b></p>
</ul>
<div class="clr"></div>
</div>
</div><!-- /singletab -->
</div><!-- /priceblock1 -->
<!-- tab 2 -->
<div id="priceblock2">
<div class="clr"></div>
<div class="singletab">
<?php if (get_option('cp_ad_inquiry_form') == 'yes' && is_user_logged_in()) {
include_once(TEMPLATEPATH . '/includes/sidebar-contact.php' );
} elseif (get_option('cp_ad_inquiry_form') <> 'yes'){
include_once(TEMPLATEPATH . '/includes/sidebar-contact.php' );
} else {
?>
<div class="pad25"></div>
<p class="contact_msg center"><strong><?php _e('You must be logged in to inquire about this ad.', 'cp') ?></strong></p>
<div class="pad100"></div>
<?php } ?>
</div><!-- /singletab -->
</div><!-- /priceblock2 -->
<!-- tab 3 -->
</div><!-- /tabprice -->
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar_ad')) : else : ?>
<!-- no dynamic sidebar so don't do anything -->
<?php endif; ?>
</div><!-- /content_right -->