HMT Latest News
Please select the date and open up the news tree.
0) AND ( node.type IN ( 'info_page')) AND ( term_node.tid = 68) AND ( node.created <= NOW( ) +60) ORDER BY created_year_month DESC"; $rst = mysql_query($query); $prev_year = ""; $prev_month = ""; if ($rst) { // loop through each and check on year and month changes print "
\n"; $c_class='head first'; while ($row = mysql_fetch_array($rst)) { $n_date = $row['created_year_month']; $n_year = substr($n_date,0,4); $n_month = substr($n_date,9); $n_day = substr($n_date,4,2); $n_dstr = $n_day . " " . $n_month . " " . $n_year; $n_nid = $row['nid']; $n_node = node_load($n_nid); $n_title = strip_tags(html_entity_decode($n_node->title)); $n_ipath = $n_node->field_middle_image[0]['filepath']; $n_image = theme('imagecache','news_image', strip_tags($n_ipath), '','',''); $n_head = strip_tags(html_entity_decode($n_node->field_body_0[0]['value'])); $n_url = drupal_get_path_alias('node/'.$n_nid); $para = substr(strip_tags($n_node->field_body_detail[0]['value']),0, 300); $cut = strrpos($para," "); $n_body = substr($para,0,$cut); //output year if different if (0 != strcmp($n_year,$prev_year)) { if ($prev_year) print "
\n"; $prev_year = $n_year; $prev_month = ""; $year_zebra = ($year_zebra == 'even') ? 'odd' : 'even'; print "

". $n_year . "

\n"; print "
\n"; } if (0 != strcmp($n_month, $prev_month)) { if ($prev_month) print "
\n"; $prev_month = $n_month; $month_zebra = ($month_zebra == 'even') ? 'odd' : 'even'; print "

". $n_month ."

\n"; print "
\n"; } // output info block $item_zebra = ($item_zebra == 'even') ? 'odd' : 'even'; print "
". $n_dstr . " : " . $n_title ."
\n"; $c_class='head'; // catch first one, then reset print "
\n"; print "
"; print "
"; print "". $n_image .""; print "
\n"; print "
"; print ""; print "

". $n_head ."

"; print "
\n"; print "

". $n_body ."...

"; print "
\n"; print "
\n"; print "
\n"; } print "
"; /* end of month */ print "
"; /* end of year */ print "
"; /* end of accordion */ } ?>

Contact Details

HMT
Unit 8
Boundary Road
Haverhill
Suffolk
CB9 7UW
01440 704520