<?php

class log_category {
	private $logc_id;
	private $logc_name;
	private $logc_title;
	private $logc_type;
	private $logc_table;
	private $logc_field;
	private $logc_selector;	

	public function set_logc_id($_id) {
		$this->logc_id = $_id;
	}

	public function set_logc_name($_name) {
		$this->logc_name = $_name;
	}

	public function set_logc_title($_title) {
		$this->logc_title = $_title;
	}

	public function set_logc_type($_type) {
		$this->logc_type = $_type;
	}

	public function set_logc_table($_table) {
		$this->logc_table = $_table;
	}

	public function set_logc_field($_field) {
		$this->logc_field = $_field;
	}

	public function set_logc_selector($_selector) {
		$this->logc_selector = $_selector;
	}

	public function get_logc_id() {
		return $this->logc_id;
	}

	public function get_logc_name() {
		return $this->logc_name;
	}

	public function get_logc_title() {
		return $this->logc_title;
	}

	public function get_logc_type() {
		return $this->logc_type;
	}

	public function get_logc_table() {
		return $this->logc_table;
	}

	public function get_logc_field() {
		return $this->logc_field;
	}

	public function get_logc_selector() {
		return $this->logc_selector;
	}

	public function set_logc_data_by_id($_logc_id) {
		global $sql, $user;
		$logc_data_assoc_array = $sql->assoc_array("select * from log_category where logc_id = " . $_logc_id);
		$logc_data_array = $logc_data_assoc_array[0];
		foreach ($logc_data_array as $field => $value) {
			$function_name = "set_" . $field;
			$this->$function_name($value);
		}
	}
}

?>