<?PHP
class messages_Model {

	var $call_controller = array('messages');
	var $call_designer = array('messages');
	var $call_helper = array('title', 'pageGenerator');

	function emails(){

		$this->messages->get_emails_data()->Page('emails');
	}
	function mass_mail(){

		$this->messages->POST('create_emails')->method();

		$this->messages->get_mass_mail_data()->Page('mass_mail');
	}
	function statistics(){

		$this->messages->get_statistics_data()->Page('statistics');
	}
	function emailer_add(){

		$this->messages->get_emailer_add_data()->Page('emailer_add');
	}
	function emailer(){

		$this->messages->get_emailer_data()->Page('emailer');
	}
	function dashboard(){

		$this->messages->get_dashboard_data()->Page('dashboard');
	}

	function send_to_friend(){

		$this->messages->POST('send_to_friend')->method();

		$this->messages->get_send_to_friend_data()->Page('send_to_friend');
	}

	function init(){

		$this->messages->POST('insert')->method();
		$this->messages->POST('update')->method();
		$this->messages->GET('action=delete')->method('delete');
	}

	function messages(){

		$this->init();
		$this->messages->message_list()->Page('messages');
	}


	function edit(){

		$this->init();
		$this->messages->edit()->Page('edit');
	}
}
?>