function addSetting($name, $value)
{
require_once $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "classes" . DIRECTORY_SEPARATOR . "settings.class.php";
$settings = new settings();
if ($settings::db_driver == "xml") {
// XML
$xmlSettings = simplexml_load_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "settings.xml");
$xmlSetting = $xmlSettings->addChild('setting');
$xmlSetting->addChild('name', $name);
$xmlSetting->addChild('value', $value);
file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "settings.xml", $xmlSettings->asXML());
} else {
// PDO
$dbh = $this->pdoOpen();
$sql = "INSERT INTO " . $settings::db_prefix . "settings (name, value) VALUES (:name, :value)";
$sth = $dbh->prepare($sql);
$sth->bindParam(':name', $name, PDO::PARAM_STR, 50);
$sth->bindParam(':value', $value, PDO::PARAM_STR, 100);
$sth->execute();
$sth = NULL;
$dbh = NULL;
}
}