News & Activities
$sql = "select * from ".TABLE_NEWS." where content_status='1' and content_name_en<>'' and content_show_home='1' order by content_date_created DESC limit 1";
$content_query = tep_db_query($sql);
$news_url = "corporate_news_corporate.php";
if(tep_db_num_rows($content_query)<=0){
$sql = "select * from ".TABLE_ACTIVITIES." where content_status='1' and content_name_en<>'' and content_show_home='1' order by content_date_created DESC limit 1";
$content_query = tep_db_query($sql);
$news_url = "corporate_news_internal.php";
}
if(tep_db_num_rows($content_query)>0){
$content = tep_db_fetch_array($content_query);
$content_id = $content['content_id'];
$content_name = $content['content_name_en'];
$content_thumbnail = $content['content_thumbnail'];
$content_year = current(explode('-', $content['content_date_created']));
if($content_thumbnail!="" and file_exists("userfiles/images_thumbnail/".$content_thumbnail)){
echo '
';
}
echo '
'.$content_name.'
';
echo '
';
}
?>