pageLoadTimeStart(); ################################################################################# ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## ## Version: 18.05.2026 ## ## Filename: a2b2.php ## ## Developed by: Dzoki ## ## Refactored by: Shadow ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## URLs: https://travianz.org ## ## https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# use App\Utils\AccessLogger; include_once("GameEngine/Village.php"); AccessLogger::logRequest(); $uid = (int)$session->uid; $amount = (int)($_SESSION['amount'] ?? 0); $packages = [ 199 => 60, 499 => 120, 999 => 360, 1999 => 1000, 4999 => 2000 ]; if (isset($_GET['newdid'])) { $_SESSION['wid'] = (int)$_GET['newdid']; header("Location: a2b2.php"); exit; } $building->procBuild($_GET); $transactionProcessed = false; $oldBalance = 0; $newBalance = 0; $goldAdded = 0; if (isset($packages[$amount]) && $amount > 0) { $goldAdded = $packages[$amount]; $result = mysqli_query($database->dblink, "SELECT gold FROM " . TB_PREFIX . "users WHERE id = $uid LIMIT 1"); $user = mysqli_fetch_assoc($result); $oldBalance = (int)$user['gold']; mysqli_query($database->dblink, "UPDATE " . TB_PREFIX . "users SET gold = gold + $goldAdded WHERE id = $uid"); $result = mysqli_query($database->dblink, "SELECT gold FROM " . TB_PREFIX . "users WHERE id = $uid LIMIT 1"); $user = mysqli_fetch_assoc($result); $newBalance = (int)$user['gold']; $transactionProcessed = true; $_SESSION['amount'] = 0; } ?> <?php echo SERVER_NAME . ' - Account transactions'; ?> gpack == null || GP_ENABLE == false) { echo ''; echo ''; } else { echo ''; echo ''; } ?>

Account transactions

Thank you for your purchase here at .

Below you see the entry record. Out of it, you can observe your old as well as your new account balance.

Record of
Description Gold Action Gold Date
  Account Balance (old)
 
 
 
 
 
Package
Gold
 
  Account Balance (new)
 
 

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.

dblink, "SELECT gold FROM ".TB_PREFIX."users WHERE id = $uid LIMIT 1"); $golds = mysqli_fetch_assoc($result); $stats = mysqli_fetch_assoc(mysqli_query($database->dblink, " SELECT SUM(CASE WHEN gold > 0 THEN gold ELSE 0 END) as received, SUM(CASE WHEN gold < 0 THEN -gold ELSE 0 END) as spent FROM ".TB_PREFIX."gold_fin_log WHERE uid = $uid ")); $received = (int)($stats['received'] ?? 0); $spent = (int)($stats['spent'] ?? 0); ?>

Here you can see your current account statement.

Current balance: Gold   |   Total received: +   |   Total spent: -

dblink, "SELECT l.*, v.name as vname FROM ".TB_PREFIX."gold_fin_log l LEFT JOIN ".TB_PREFIX."vdata v ON v.wref = l.wid WHERE l.uid = $uid ORDER BY l.time DESC LIMIT 200" ); $balance = (int)$golds['gold']; if (mysqli_num_rows($q) > 0) { while ($r = mysqli_fetch_assoc($q)) { $date = date('d.m.Y H:i:s', $r['time']); $villageName = !empty($r['vname']) ? htmlspecialchars($r['vname'], ENT_QUOTES, 'UTF-8') : '-'; $action = htmlspecialchars($r['action'], ENT_QUOTES, 'UTF-8'); $details = htmlspecialchars(($r['details'] ?? ''), ENT_QUOTES, 'UTF-8'); $gold = (int)$r['gold']; if (stripos($details, 'Mass gift') !== false) { $action = 'Admin Gift (All)'; $details = str_replace('Mass gift by ', 'by ', $details); } elseif (stripos($details, 'gift by') !== false) { $action = 'Admin Gift'; } $color = $gold < 0 ? '#FF6F0F' : '#71D000'; $sign = $gold > 0 ? '+' : ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $balance -= $gold; } } else { echo ' '; } ?>
Gold history
Date & Time Village Action Details Gold Balance
'.$date.'
'.$villageName.'
'.$action.'
'.$details.'
'.$sign.$gold.'
'.$balance.'
No transactions yet.

Please verify the information.
It will let us know if the data is incorrect.

Please mail your username, package, order time and email used to our billing address.








"; include("Templates/links.tpl"); } ?>
pageLoadTimeEnd() - $start_timer) * 1000); ?> ms