<?php
// Exit if accessed directly
if ( !defined('ABSPATH')) exit;
/* Home Page */
?>
<?php get_header(); ?>
<div id="featured" class="grid col-940">
<div id="content-blog" class="grid col-620">
<div class="post-inner">
<!-- begin bullworthy featured category -->
<div id="issuer-alerts">
<?php $my_query = new WP_Query('category_name=issuer-alerts&posts_per_page=10'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if (is_sticky () ) { ?>
<h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<span class="released">Released on <?php the_date( 'l, F t Y' );?> at <?php the_time( 'g:i a' ); ?></span>
<div class="post-entry">
<div class="thumb">
<?php if ( has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" ><?php the_post_thumbnail( array('class' => 'alignleft') ); ?></a>
<?php endif; ?>
</div><!-- thumb -->
<div class="excerpt"><?php the_excerpt(); ?>
<?php $key = 'field_name'; $themeta = get_post_meta($post->ID, 'report_link', true);
if($themeta != '') { echo '<div class="read-more" style="margin-bottom: 5px;"><a href="' . get_post_meta($post->ID, 'report_link', true) . '" target="_blank">Access This Report Now</a></div>';} ?>
<div class="read-more"><a href="/issuer-alerts">View All Issuer Alerts</a></div>
</div><!-- excerpt -->
</div><!-- end of post-entry -->
<div class="clear"></div>
<h3>More Issuer Alerts:</h3>
<?php } else { ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php } ?>
</div><!-- post-ID -->
<?php endwhile; ?>
<?php wp_reset_query(); ?>
</div><!-- issuer-alerts -->
<div class="clear"></div>
<?php query_posts(array("post__not_in" =>get_option("sticky_posts"))); if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue;?>
<div id="post" <?php post_class(); ?>>
<h2 class="post-title">
<?php $key = 'field_name'; $themeta = get_post_meta($post->ID, 'otcqb', true);
if($themeta != '') { echo '<span class="title-ticker-otcqb">' . get_post_meta($post->ID, 'otcqb', true) . '</span>';} ?>
<?php $key = 'field_name'; $themeta = get_post_meta($post->ID, 'otcqx', true);
if($themeta != '') { echo '<span class="title-ticker-otcqx">' . get_post_meta($post->ID, 'otcqx', true) . '</span>';} ?>
<?php $key = 'field_name'; $themeta = get_post_meta($post->ID, 'otcpink', true);
if($themeta != '') { echo '<span class="title-ticker-otcpink">' . get_post_meta($post->ID, 'otcpink', true) . '</span>';} ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="post-meta">
<span class="authored">
Authored by <br><?php the_author_posts_link(); ?>
</span>
<span class="label">Traders Responding</span>
<span class="comments">
<?php if ( comments_open() ) : ?>
<span class="comments-link">
<?php comments_popup_link(__('0', 'responsive'), __('1', 'responsive'), __('%', 'responsive')); ?>
</span>
</span><!-- comments -->
<?php endif; ?>
<table class="trade_data"><script src="http://app.quotemedia.com/quotetools/jsVarsQuotes.go?webmasterId=101606&symbol=<?php echo get_post_meta($post->ID, ticker, true); ?>"></script>
<tbody>
<tr>
<td>Last Trade</td>
<td>Change</td>
<td>Volume</td>
<td>Market Cap</td>
</tr>
<tr>
<td class="blue">$<script>document.write(qmQuote.last);</script></td>
<td class="blue"><script>document.write(qmQuote.changePercent);</script></td>
<td class="blue"><script>document.write(qmQuote.volume);</script></td>
<td class="blue">$<script>document.write(qmQuote.marketCap);</script></td>
</tr>
</tbody>
</table>
</div><!-- end of .post-meta -->
<div class="post-entry">
<?php if ( has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
<?php the_post_thumbnail( 'thumbnail' ); ?>
</a>
<?php endif; ?>
<span class="excerpt-meta"><?php the_date( 'l, F t Y' );?> at <?php the_time( 'g:i a' ); ?> - </span><?php the_excerpt(); ?>
<?php wp_link_pages(array('before' => '<div class="pagination">' . __('Pages:', 'responsive'), 'after' => '</div>')); ?>
</div><!-- end of .post-entry -->
<div class="post-data">
<?php the_tags(__('Tagged with:', 'responsive') . ' ', ', ', '<br />'); ?>
<?php printf(__('Posted in %s', 'responsive'), get_the_category_list(', ')); ?>
</div><!-- end of .post-data -->
</div><!-- end of #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="navigation">
<div class="previous"><?php next_posts_link( __( '‹ Older posts', 'responsive' ) ); ?></div>
<div class="next"><?php previous_posts_link( __( 'Newer posts ›', 'responsive' ) ); ?></div>
</div><!-- end of .navigation -->
<?php endif; ?>
<?php endif; ?>
</div><!-- post-inner -->
</div><!-- content blog -->
<?php get_sidebar('right'); ?>
</div><!-- end of #featured -->
<?php get_sidebar('home'); ?>
<?php get_footer(); ?>