";
echo (" Current Values
");
echo "Default: " . $conf->default . "
\n";
echo ("
Starting Test...
");
// now all prferences are loaded
echo ("Loading preferences...");
$password = 'lam';
$default = $conf->default;
echo ("done
");
// next we modify them and save config.cfg
echo ("Changing preferences...");
$conf->setPassword("123456");
$conf->default = "lam";
$conf->save();
echo ("done
");
// at last all preferences are read from config.cfg and compared
echo ("Loading and comparing...");
$conf = new LAMCfgMain();
if (!$conf->checkPassword("123456")) echo ("
Saving password failed!
");
if ($conf->default != "lam") echo ("
Saving Default failed!
");
echo ("done
");
// restore old values
echo ("Restoring old preferences...");
$conf->setPassword($password);
$conf->default = $default;
$conf->save();
echo ("done
");
// finished
echo ("
Test is complete.");
echo ("
Current Config
");
echo "Default: " . $conf->default . "
\n";
?>