Acoustical News and Announcements
To view the latest news, please select the date and open up the news tree.
$readmore = 1;
$news_count = 0;
$rst = mysql_query("SELECT DISTINCT FROM_UNIXTIME(n.created, '%Y') as the_year FROM node n, term_node tn, term_data td WHERE n.type='internalpage' AND n.nid = tn.nid and tn.tid = td.tid and td.name = 'News' and td.vid = '10' ORDER BY n.created DESC");
while($row=mysql_fetch_array($rst))
{
echo " ". $row['the_year'] ."
"; if($row['the_year']==date("Y")) { echo "
"; if($row['the_year']==date("Y")) { echo "
";
}
else
{
echo "
\n";
?>
";
}
$rst_month = mysql_query("SELECT DISTINCT FROM_UNIXTIME(n.created, '%M') as the_month FROM node n, term_node tn, term_data td WHERE FROM_UNIXTIME(n.created, '%Y')='".$row['the_year']."' AND n.nid = tn.nid and tn.tid = td.tid and td.name = 'News' and td.vid = '10' ORDER BY n.created DESC");
while($row_month = mysql_fetch_array($rst_month))
{
echo " ". $row_month['the_month'] ."
"; if($row_month['the_month']==date("M") && $row_year['the_year']==date("Y")) { echo "
\n";
echo ""; if($row_month['the_month']==date("M") && $row_year['the_year']==date("Y")) { echo "
";
}
else
{
echo "
\n";
}
echo "";
}
$rst_day = mysql_query("SELECT DISTINCT FROM_UNIXTIME(n.created, '%D') as the_day FROM node n, term_node tn, term_data td WHERE FROM_UNIXTIME(n.created, '%Y')='".$row['the_year']."' AND n.nid = tn.nid and tn.tid = td.tid and td.name = 'News' and td.vid = '10' AND FROM_UNIXTIME(n.created, '%M')='".$row_month['the_month']."' ORDER BY n.created DESC");
while($row_day = mysql_fetch_array($rst_day))
{
$rst_news = mysql_query("SELECT * FROM node n, term_node tn, term_data td WHERE FROM_UNIXTIME(n.created, '%D')='".$row_day['the_day']."' AND FROM_UNIXTIME(n.created, '%M')='".$row_month['the_month']."' AND n.nid = tn.nid and tn.tid = td.tid and td.name = 'News' and td.vid = '10' AND FROM_UNIXTIME(n.created, '%Y')='".$row['the_year']."'");
while($row_news=mysql_fetch_array($rst_news))
{
//$news_title = str_replace("'", "'", $row_news['title']);
$news_title = htmlspecialchars($row_news['title'],ENT_QUOTES);
$news_id = $row_news['nid'];
$news_count ++;
echo " ". $row_day['the_day'] ." - ". $news_title ."";
echo "
\n";
}
echo "";
//echo "
\n";
}
}
echo ""; //echo "Close [X]"; //echo "
"; $news_node = node_load($news_id); echo "";
$d_id = "p_img" . $news_node->nid;
echo "
";
if($news_node->field_top_image_0[0]['filepath'])
{
$trans_img = "
";
print l($trans_img, "node/$news_node->nid", NULL, NULL, NULL, NULL, TRUE);
}
echo "
";
if($news_node->field_top_image_0[0]['filepath'])
{
echo '';
}
echo "
";
print l($trans_img, "node/$news_node->nid", NULL, NULL, NULL, NULL, TRUE);
}
echo "";
echo "
";
echo "". $news_node->title ."
"; echo "". strip_tags($news_node->field_body_description[0]['value']) ."
"; echo "". $news_node->field_body_detail[0]['value'] ."
"; echo "". strip_tags($news_node->field_summary_description[0]['value']) ."
"; if($readmore==1) { echo ""; } echo ""; echo "Close [X]"; echo "
"; echo "Contact Details
Acoustical Control Engineers Limited
Broadway,
Bourn,
Cambridge.
England.
CB23 2TA
T. +44 (0) 1954 718344
F. +44 (0) 1954 718355