Логгирование уехало в класс.
This commit is contained in:
@@ -90,17 +90,7 @@ class Bank
|
||||
$receiverId = $this->user_id;
|
||||
$text .= " Комиссия: " . $this->bankCommission($amount);
|
||||
}
|
||||
|
||||
$db = new SQLite3('databases/logs.sqlite');
|
||||
$db->exec("CREATE TABLE IF NOT EXISTS bank_logs (id integer constraint bank_logs_pk primary key autoincrement, sender_id integer, receiver_id integer, amount integer, type text, text text)");
|
||||
$logLine = $db->prepare("INSERT INTO bank_logs (sender_id, receiver_id, amount, type, text) VALUES (?, ?, ?, ?, ?)");
|
||||
$logLine->bindParam(1, $senderId, SQLITE3_INTEGER);
|
||||
$logLine->bindParam(2, $receiverId, SQLITE3_INTEGER);
|
||||
$logLine->bindParam(3, $amount, SQLITE3_INTEGER);
|
||||
$logLine->bindParam(4, $operationType, SQLITE3_TEXT);
|
||||
$logLine->bindParam(5, $text, SQLITE3_TEXT);
|
||||
$logLine->execute();
|
||||
$logLine->close();
|
||||
GameLogs::addBankLog($senderId,$receiverId,$amount,$operationType,$text);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user