<?php

class backup {
	private $bu_id;
	private $bu_name;
	private $bu_date;
	private $bu_deleted;


	public function set_bu_id($_item) {
		$this->bu_id = $_item;
	}

	public function set_bu_name($_item) {
		$this->bu_name = $_item;
	}

	public function set_bu_date($_item) {
		$this->bu_date = $_item;
	}

	public function set_bu_deleted($_item) {
		$this->bu_deleted = $_item;
	}

	public function get_bu_id() {
		return $this->bu_id;
	}

	public function get_bu_name() {
		return $this->bu_name;
	}

	public function get_bu_date() {
		return $this->bu_date;
	}

	public function get_bu_deleted() {
		return $this->bu_deleted;
	}

	public function set_backup_data_by_id($_id) {
		//SETTING ID ALAPJÁN KÉRI LE;
		//HA KELL, LEHET KÜLÖN FUNCTION-T ÍRNI HOGY ID ALAPJÁN KÉRJE
		global $sql;
		$set_data_assoc_array = $sql->assoc_array("select * from backup where bu_id = " . $_id);
		$set_data_array = $set_data_assoc_array[0];
		foreach ($set_data_array as $field => $value) {
			$function_name = "set_" . $field;
			$this->$function_name($value); //alapadatok beállítása
		}

	}

}


?>