<?php 
$sql_1 = db_query("SELECT node.nid AS nid,
					term_data.name AS term_data_name,
					term_data.vid AS term_data_vid,
					term_data.tid AS term_data_tid,
					DATE_FORMAT(FROM_UNIXTIME(node.created),'%m-%d-%y') AS node_created,
					node.title AS node_title,
					node_revisions.body AS node_revisions_body,
					node_revisions.format AS node_revisions_format
					FROM node node 
					LEFT JOIN term_node term_node ON node.vid = term_node.vid
					LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
					LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
					WHERE (node.type in ('news')) AND (node.status <> 0) AND term_data.name='Envoy Data News & Press'
					");
					
					$sql_2 = db_query("SELECT node.nid AS nid,
					term_data.name AS term_data_name,
					term_data.vid AS term_data_vid,
					term_data.tid AS term_data_tid,
					DATE_FORMAT(FROM_UNIXTIME(node.created),'%m-%d-%y') AS node_created,
					node.title AS node_title,
					node_revisions.body AS node_revisions_body,
					node_revisions.format AS node_revisions_format
					FROM node node 
					LEFT JOIN term_node term_node ON node.vid = term_node.vid
					LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
					LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
					WHERE (node.type in ('news')) AND (node.status <> 0) AND term_data.name='Industry News'
					");
					
					$sql_3 = db_query("SELECT node.nid AS nid,
					term_data.name AS term_data_name,
					term_data.vid AS term_data_vid,
					term_data.tid AS term_data_tid,
					DATE_FORMAT(FROM_UNIXTIME(node.created),'%m-%d-%y') AS node_created,
					node.title AS node_title,
					node_revisions.body AS node_revisions_body,
					node_revisions.format AS node_revisions_format
										FROM node node 
LEFT JOIN term_node term_node ON node.vid = term_node.vid
					LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
					LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
					WHERE (node.type in ('news')) AND (node.status <> 0) AND trim(term_data.name)='Around the Web'
					");
?>
<h1 class="envoyblue">&nbsp;&nbsp;&nbsp;News &amp; Updates</h1>
<!--RSS Icon/Link Goes Here: Should link to Aggregator-->
<div id="rsslink"><a href="rss.xml"><img alt="" src="<?php echo BASE_PATH;?>/sites/all/themes/envoy/images/rss icon.jpg" /></a></div>
<div id="pane2" class="scroll-pane">
<div id="subrightcontent"><span style="display: block; padding-bottom: 10px;" class="tickerhead"><a id="ednews" name="ednews" href="news_display/1">Envoy Data News &amp; Press</a></span> <br />
<?php while ($sql_envoy = db_fetch_object($sql_1)) { ?>
<p class="newspoint"><?php echo $sql_envoy->node_title?><a href="<?php echo BASE_PATH."node/".$sql_envoy->nid?>"> <?php echo substr(trim(strip_tags($sql_envoy->node_revisions_body)),0,20);?>..</a></p>
<?php } ?>     <!--<br />-->     <!--Breaks used for needed spacing-->     <span style="display: block; padding-bottom: 10px;" class="tickerhead"><a id="edindustry" name="edindustry" href="news_display/2">Industry News</a></span> <br />
<?php while ($sql_industry = db_fetch_object($sql_2)) { ?>
<p class="newspoint"><?php echo $sql_industry->node_title?><a href="<?php echo BASE_PATH."node/".$sql_industry->nid?>"> <?php echo substr(trim(strip_tags($sql_industry->node_revisions_body)),0,20);?>..</a></p>
<?php } ?>     <!--<br />-->     <!--Breaks used for needed spacing-->     <span style="display: block; padding-bottom: 10px;" class="tickerhead"><a id="edweb" name="edweb" href="news_display/3">Around the Web</a></span> <br />
<?php while ($sql_around = db_fetch_object($sql_3)) { ?>
<p class="newspoint"><strong><?php echo $sql_around->node_title?></strong><a href="<?php echo BASE_PATH."node/".$sql_around->nid?>"> <?php echo substr(trim(strip_tags($sql_around->node_revisions_body)),0,20);?>..</a></p>
<?php } ?>     <br />
<!--Breaks used for needed spacing-->
<p><strong><a style="font-weight: bold;" href="news_display">&nbsp;&nbsp;&nbsp;&nbsp;View all News</a></strong></p>
<br />
<!--Breaks used for needed spacing--></div>
</div>