* @license Unlicense https://unlicense.org/ * @link https://github.com/ksolmon/torn-vault-tracker */ require_once __DIR__ . '/config.php'; require_once __DIR__ . '/functions.php'; $bootstrapWarning = null; $needsBackfill = false; try { foreach (USER_KEYS as $key => $value) { syncUserLogs($key); // If the sync didn't populate this user, backfill is still needed. $pdo = getDatabaseConnection(); $stmt = $pdo->prepare('SELECT COUNT(*) FROM vault WHERE user = :user'); $stmt->bindValue(':user', $key); $stmt->execute(); if ((int)$stmt->fetchColumn() === 0) { $needsBackfill = true; } } } catch (Exception $e) { $bootstrapWarning = $e->getMessage(); } if ($needsBackfill) { // Heavy work remains. Return a loading page that auto-refreshes; // each refresh does another page of API fetches. ?>
Warning:
One-time backfill in progress. The Torn API returns up to 100 vault entries per call; we'll keep fetching until your full history is loaded. This page will refresh automatically.
User |
Date / Time (TCT) |
Operation |
Amount |
Balance After |
|---|