<?php
defined('PRODUCT_NAME') or die;
class TeamModule extends ModuleInstance
{
	function render()
	{
		$data = array("module_instance_id" 	=> $this->module_instance_id,
		              "title" 				=> $this->setting("title"),
		              "title_heading_level" => $this->setting("title_heading_level"),
		              "module_class" 		=> $this->setting("module_class"),
		              "top_text" 			=> $this->setting("top_text"),
		              "bottom_text" 		=> $this->setting("bottom_text"),
		              "circle_size" 		=> $this->setting("circle_size"),
		              "column_size" 		=> $this->setting("column_size"),
		              "number_of_members" 	=> $this->setting("number_of_members"));

		for($i=1; $i<=$this->setting("number_of_members"); $i++)
		{
			$data["name" . $i] 			= $this->setting("name" . $i);
			$data["title" . $i] 		= $this->setting("title" . $i);
			$data["link" . $i] 			= $this->setting("link" . $i);
			$data["photo_path" . $i] 	= $this->setting("photo_path" . $i);
			$data["facebook" . $i] 		= $this->setting("facebook" . $i);
			$data["twitter" . $i] 		= $this->setting("twitter" . $i);
			$data["gplus" . $i] 		= $this->setting("gplus" . $i);
		}

		$this->load->view("modules/team/module", $data);
	}
}
