Дополнительный файл конфигов. Разнесение конфигов на игровые и системные.
This commit is contained in:
@@ -19,7 +19,7 @@ class GameLogs
|
||||
*/
|
||||
public static function addBankLog(int $senderId, int $receiverId, int $amount, string $type, string $text)
|
||||
{
|
||||
$db = new SQLite3(Config::$db_sqlite);
|
||||
$db = new SQLite3(GameConfigs::DB_SQLITE);
|
||||
$row = $db->prepare("INSERT INTO bank_logs (sender_id, receiver_id, amount, type, text) VALUES (?, ?, ?, ?, ?)");
|
||||
$row->bindParam(1, $senderId, SQLITE3_INTEGER);
|
||||
$row->bindParam(2, $receiverId, SQLITE3_INTEGER);
|
||||
@@ -45,7 +45,7 @@ class GameLogs
|
||||
if (empty($type)) {
|
||||
$type = "system";
|
||||
}
|
||||
$db = new SQLite3(Config::$db_sqlite);
|
||||
$db = new SQLite3(GameConfigs::DB_SQLITE);
|
||||
$row = $db->prepare("INSERT INTO users_logs (user_id, author_id, type, text) VALUES (?,?,?,?)");
|
||||
$row->bindParam(1, $userId, SQLITE3_INTEGER);
|
||||
$row->bindParam(2, $authorId, SQLITE3_INTEGER);
|
||||
@@ -57,7 +57,7 @@ class GameLogs
|
||||
|
||||
public static function getUserLogs($userId = null, $type = null): SQLite3Result
|
||||
{
|
||||
$db = new SQLite3(Config::$db_sqlite);
|
||||
$db = new SQLite3(GameConfigs::DB_SQLITE);
|
||||
|
||||
if ($userId && $type) {
|
||||
$query = "SELECT * FROM users_logs WHERE user_id = ? AND type = ?";
|
||||
|
||||
Reference in New Issue
Block a user