Дополнительный файл конфигов. Разнесение конфигов на игровые и системные.

This commit is contained in:
lopar
2021-03-10 23:03:59 +02:00
parent 32573f3e8e
commit d78b2eda34
34 changed files with 181 additions and 275 deletions
+3 -3
View File
@@ -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 = ?";