include('config.php');
include('lib.php');
$link = opendb();
$prefix = $dbsettings["prefix"];
// Thanks to Predrag Supurovic from php.net for this function!
function dobatch ($p_query) {
$query_split = preg_split ("/[;]+/", $p_query);
foreach ($query_split as $command_line) {
$command_line = trim($command_line);
if ($command_line != '') {
$query_result = mysql_query($command_line);
if ($query_result == 0) {
break;
};
};
};
return $query_result;
}
if (isset($_POST["submit"])) {
$control = $prefix . "_control";
$users = $prefix . "_users";
$query = <<
"; } else { echo "User $id upgraded.
"; }
}
if ($errors != 0) {
echo "
The following errors occurred while upgrading the users list:
$errorlist";
} else {
echo "
The upgrade completed successfully. Please log in to the game and visit the control panel to update your main game settings.
You should also delete this file from your Dragon Knight directory for security reasons.";
}
} else {
echo "Click the button below to run the upgrade script.