getUserArray($session, 1); if (!$admin || (int)$admin['access'] !== 9) { die('

Access Denied: You are not Admin!

'); } // --------------------------------------------------------------------------- // Reset gold // --------------------------------------------------------------------------- $database->query("UPDATE " . TB_PREFIX . "users SET gold = 0 WHERE id > 0"); // --------------------------------------------------------------------------- // Log admin // --------------------------------------------------------------------------- $adminId = (int)$_SESSION['id']; $time = time(); $logText = "Reset gold to 0 for all users"; $logEsc = $database->escape($logText); $database->query( "INSERT INTO " . TB_PREFIX . "admin_log (`id`, `user`, `log`, `time`) " . "VALUES (0, '$adminId', '$logEsc', $time)" ); header("Location: ../../../Admin/admin.php?p=maintenenceResetGold&g=1"); exit; ?>