<?php
class Mopi extends Model
{
	function Mopi()
	{
		parent::Model();
	}

	function index()
	{
		redirect('');
	}

	function get_opi_pages($cat = 'Vásárlói vélemények', $lang = 'hun')
	{
        //get user opinions
		$opinions = array();
        $opi_result = $this->mpages->get_category_pages($cat,$lang);

		if($opi_result)
		{
	        foreach($opi_result as $opi)
	        {
	            $opinions[] = $this->mpages->get_row($opi->page_id);
	        }
  		}

		empty($opinions) ? $opinions = false : '';
		
		return $opinions;
	}
}
?>