<?
class settings {

function settings() {
	global $sys;
	require_once($sys['root']."/system/class/lib.csv.php");
	$this->dbFilePath = $sys['root']."/system/data/setup.dat";
	$this->db = new CSV("setup.dat", $sys['root']."/system/data/");
	$this->db->assoc = true;
	$this->db->readDB();
	$this->config = $this->db->db[0];
}

function set($var, $val) {
	$this->db->update("0", array ($var=>$val));
	$this->config[$var] = $val;
	return true;
}

function update() {
	return $this->db->writeDB(false, true);
}

}



?>