<?php include '/talkback/head-inc.php'; ?>
<?php

require_once "/var/www/vhosts/socanews.com/httpdocs/cmsAdmin/lib/viewer_functions.php";

  list($newsRecords, $newsMetaData) = getRecords(array(
    'tableName'   => 'news',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  
  $news = $newsRecords[0];
  
  list($morenewsRecords, $morenewsMetaData) = getRecords(array(
    'tableName'   => 'news',
    'limit'       => '5',
    'orderBy'     => 'publishDate DESC',
    'where'       => 'hidden != 1 AND publishDate < NOW()',
    'allowSearch' => '0',
  ));
  $morenews = $morenewsRecords[0];
  
  $morenewsnums = '0,';
  foreach ($morenewsRecords as $morenews) {
	  $morenewsnums .= $morenews['num'] . ',';
  }
  $morenewsnums = trim($morenewsnums, ',');
  
  $relatedkeywords = "summary LIKE '%" . str_replace(' ' , "%' OR summary LIKE '%", mysql_real_escape_string($news['summary'])) . "%'";  
  list($relatedStories, $relatedMetaData) = getRecords(array(
    'tableName'   => 'news',
    'limit'       => '5',
    'orderBy'     => 'publishDate DESC',
    'where'       => "hidden != 1 AND publishDate < NOW() AND ($relatedkeywords) AND num != {$morenews['num']} AND num NOT IN ($morenewsnums)",
    'allowSearch' => '0',
  ));  
  
  list($competitionsRecords, $competitionsMetaData) = getRecords(array(
    'tableName'   => 'competitions',
    'limit'       => '3',
    'orderBy'     => 'createdDate DESC',
    'allowSearch' => '0',
  ));  
 
   list($blogRecords, $blogMetaData) = getRecords(array(
    'tableName'   => 'blog',
    'limit'       => '4',
    'orderBy'     => 'createdDate DESC',
    'allowSearch' => '0',
  )); 
    
    
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="google-site-verification" content="P-ZTyHA7KHTNfJA7W3QMJvEHUHoue1P2k5jDcf5WP5U" />
<meta name="description" content="AdrianTNT.com flash menus, flash buttons, flash components, xml navigation systems, flash templates, pixel fonts. Free and commercial content."/>

<link href="http://www.socanews.com/styles/SN2.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="contentslider.css" />

<title>www.socanews.com | articles | <?php echo $news['title']; ?></title>
<link href="/styles/SN2.css" rel="stylesheet" type="text/css" />
<link href="/httpdocs/styles/SN2.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style></head>
<body>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#7CBAFF">
      <tr>
        <td width="20">&nbsp;</td>
        <td width="940" colspan="3">&nbsp;</td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
<td>&nbsp;</td>
<td width="207"><img src="/_images/site/SN-Web-logo.jpg" /></td>
<td width="5">&nbsp;</td>
<td width="728"><? include("../includeAds/articles728.html") ?></td>
<td>&nbsp;</td>
</tr>
      <tr>
        <td width="10">&nbsp;</td>
        <td width="940" colspan="3">&nbsp;</td>
        <td width="10">&nbsp;</td>
      </tr>
       <tr>
        <td width="10">&nbsp;</td>
        <td width="940" colspan="3"><?php require "../menu/hMenu1.html" ?></td>
        <td width="10">&nbsp;</td>
      </tr>
            <tr>
        <td width="10">&nbsp;</td>
        <td width="940" colspan="3"></td>
        <td width="10">&nbsp;</td>
      </tr>     
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#C0DEED">
<tr>
<td>&nbsp;</td>
<td valign="top">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="20">&nbsp;</td>
<td width="620" valign="top"><table width="940" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td >
    <table width="630" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td style="padding: 5px 5px 0px 5px; ">
    <?php foreach ($news['image'] as $upload): ?>
    <img src="<?php echo $upload['urlPath']; ?>" width="620" />
    <?php if ($upload['info1']): ?>
<table width="620" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="25"><DIV class="CAPTION"><?php echo $upload['info1']; ?></div></td>
</tr>
</table>
      <?php endif; ?>
      <?php break; ?>
    <?php endforeach; ?>      </td>
</tr>
</table>
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 5px 0 5px 0;"></div>
<table width="630" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="420" valign="top"><table width="420" border="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><div class="siHeaderBlueLarge"><?php echo $news['title']; ?></div>
<?php if ($news['title2']): ?><span class="articleContent"><?php echo $news['title2']; ?></span> <br /> <br /><?php endif; ?>
<div class="articleContent">
<?php if ($news['writers']): ?>Written by : <?php echo $news['writers']; ?><br /><?php endif; ?>
<?php if ($news['country']): ?>Location : <?php echo $news['country']; ?><br /><?php endif; ?>
<?php if ($news['photographer']): ?>Photograph By : <?php echo $news['photographer']; ?><br /><?php endif; ?>
<span class="articleContentDate">Posted : <?php echo date('F j, Y : g:i:s A', strtotime($news['publishDate'])); ?></span></div></td>
</tr>
<tr>
<td> <div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 0px 0 -8px 0;"></div>
<div class="articleContent"><?php echo $news['content']; ?></div></td>
</tr>
</table>
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 7px 0 7px 0;"></div>
<table width="420" border="0" cellspacing="0" cellpadding="0">

<tr>
    <td bgcolor="#FFFFFF" class="articleContent"><div id="disqus_thread">
<script type="text/javascript">
  /**
    * var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread] 
    */
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = 'http://socanews.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script></div>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=socanews">comments powered by Disqus.</a>
</noscript>
</td>
  </tr>
</table></td>
        <td width="10">&nbsp;</td>
        <td width="200" valign="top"><? include("../include/SocialNetworking.html") ?><br /><table width="200" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="50" bgcolor="#FFFFFF" ><div class="siHeaderBlue">more news</div>
                <div align="left">
<?php foreach ($morenews['image'] as $upload): ?>
<img src="<?php echo $upload['urlPath']; ?>" width="190" height="100" style="padding: 5px"/>
<?php break; ?>
<?php endforeach; ?>
<div class="articleContent"><a class="articleContentBold" href="<?php echo $morenews['_link']; ?>"><?php echo $morenews['title']; ?></a><br />
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 4px 0 4px 0;"> </div>
<?php foreach ($morenewsRecords as $key => $morenewsextra): ?>
<?php if ($key == 0): ?><?php continue; ?><?php endif; ?>
<a href="<?php echo $morenewsextra['_link']; ?>" class="articleContentBold"><?php echo $morenewsextra['title']; ?></a><br/>
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 4px 0 4px 0;"> </div>
<?php endforeach; ?>
</div>
                </div></td>
            </tr>
          </table></td>
      </tr>
    </table>
</td>
    <td width="10">&nbsp;</td>
    <td width="300" valign="top"><? include("../includeAds/articles300.html") ?><br /><span class="smallprintCAPS">advertisement</span><br />
<br /><? include("../include/TownSay.html") ?><br /><? include("../include/Write.html") ?><br /><? include("../include/BuyTickets.html") ?><br />
<? include("../include/latestMagazine.html") ?>

</td>
  </tr>
</table></td>
        <td width="20">&nbsp;</td>
      </tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="980" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" align="left" bgcolor="#C0DEED">
    <br />
<? include("../include/siteBottom.html") ?>

      </td>
        </tr>


    </table></td>
  </tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-493820-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<script type="text/javascript">
var disqus_shortname = 'socanews';
(function () {
  var s = document.createElement('script'); s.async = true;
  s.src = 'http://disqus.com/forums/socanews/count.js';
  (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>
