From " . date('F', mktime(0,0,0,$display_month,1,$display_year)) . " " . $display_year . "
"; } $full_query = "SELECT * FROM `link_news` WHERE `is_draft` = 0 $where_clause ORDER BY `news_date` DESC"; $sql = mysql_query($full_query); $all_rows = mysql_num_rows($sql); for($i = 0; $i < $all_rows; $i++) { $row = mysql_fetch_array($sql); print "
"; $this_news_ID = $row['news_ID']; $image_sql = mysql_query("SELECT * FROM `link_media` NATURAL JOIN `link_media2news` WHERE `news_ID` = $this_news_ID ORDER BY `media_order` LIMIT 1"); $im_row = mysql_fetch_array($image_sql); if($im_row['media_link'] != "") { print "
"; } print "

" . html_entity_decode($row['news_title']) . "

"; print "
" . date('jS F Y', strtotime($row['news_date'])) . "
"; $fist_para = explode("

", html_entity_decode($row['news_content'])); print "
" . $fist_para[0] . "
[ read more ]

"; //print "
" . myTruncate(strip_tags(html_entity_decode($row['news_content'])), 200, '.', '.
[ read more ]
' ) . "
"; print "
"; } } else { print "
"; print "
◀ Back to all news


"; $sql = mysql_query("SELECT * FROM `link_news` WHERE `news_ID` = '$news_ID'"); $row = mysql_fetch_array($sql); $s = mysql_query("SELECT * FROM `link_media`,`link_media2news` WHERE `link_media2news`.`news_ID` = $news_ID AND `link_media`.`media_ID` = `link_media2news`.`media_ID` ORDER BY `link_media2news`.`media_order`"); //echo "SELECT * FROM `link_media`,`link_media2news` WHERE `link_media2news`.`news_ID` = $news_ID AND `link_media`.`media_ID` = `link_media2news`.`media_ID` ORDER BY `link_media2news`.`media_order`"; $all_media = mysql_num_rows($s); print "
"; for($m = 0; $m < $all_media; $m++) { $media_row = mysql_fetch_array($s); print "

"; } print "
"; print "

" . html_entity_decode($row['news_title']) . "

"; print "
" . date('jS F Y', strtotime($row['news_date'])) . "
"; print "
" . html_entity_decode($row['news_content']) . "
"; print "
"; } ?>