<?php


class camp_contact_type {
	private $cct_id;
	private $cct_name;
	private $cct_owner;
	private $cct_deleted;

	public function set_cct_id($_item) {
		$this->cct_id = $_item;
	}

	public function set_cct_name($_item) {
		$this->cct_name = $_item;
	}

	public function set_cct_owner($_item) {
		$this->cct_owner = $_item;
	}

	public function set_cct_deleted($_item) {
		$this->cct_deleted = $_item;
	}

	public function get_cct_id() {
		return $this->cct_id;
	}

	public function get_cct_name() {
		return $this->cct_name;
	}

	public function get_cct_owner() {
		return $this->cct_owner;
	}

	public function get_cct_deleted() {
		return $this->cct_deleted;
	}

	public function set_cct_data_by_id($_id) {
    	global $sql;
		$ck_data_assoc_array = $sql->assoc_array("select * from camp_contact_type where cct_id = " . $_id);
		$ck_data_array = $ck_data_assoc_array[0];
		foreach ($ck_data_array as $field => $value) {
			$function_name = "set_" . $field;
			$this->$function_name($value);
		}
    }
}

?>