Beispiel #1
0
 function clearTransaction($orderNumber, $response)
 {
     sqlconnect();
     $sql = "update monetTransaction set paymentStatus = " . toSql($response->paymentStatus) . ", authCode = " . toSql(null) . ", updated=NOW(), payId=" . toSql(null) . " where orderNumber = " . toSql($orderNumber);
     $this->log->write($sql);
     sqlExecute($sql);
 }
Beispiel #2
0
}
// Clean all post variables up, prevent SESSION hijacking.
foreach ($_POST as $key => $val) {
    if (substr($key, 0, 1) != "_") {
        ${$key} = $val;
    }
}
$success = false;
$installed = false;
if (count($_POST) && !($db && $host && $user && $cms_user && $cms_pass)) {
    $error = "Errors found! Please fix the highlighted fields and submit the form again.";
} elseif (count($_POST)) {
    if ($write_host && $write_user && $write_password) {
        $sql_connection = @sqlconnect($write_host, $write_user, $write_password, $write_port, $write_socket);
    } else {
        $sql_connection = @sqlconnect($host, $user, $password, $port, $socket);
    }
    if (!$sql_connection) {
        $error = "Could not connect to MySQL server.";
    } else {
        // Try to create the database
        sqlquery("CREATE DATABASE IF NOT EXISTS `{$db}`");
        // Try to select it
        $select = sqlselectdb($db);
        if (!$select) {
            $error = "Error accessing/creating database “{$db}”.";
        }
    }
}
if (!$error && count($_POST)) {
    // Let domain/www_root/static_root be set by post for command line installs