<?php

class Announcement_Model extends CI_Model {

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    
    function get_announcement_list()
	{
		$lang = strtolower(str_replace('-', '_', get_language()));
		
	    $query = $this->db->query("SELECT title_{$lang} AS title, message_{$lang} AS content, created_date, updated_date FROM sw_announcements WHERE status = 1 ORDER BY created_date DESC");
		
		return $query;
	}
}