escape($hname); $q = "UPDATE " . TB_PREFIX . "hero SET unit = $hunit, name = '$hnameEsc', level = $hlvl, points = $exp, experience = $experience, health = '$hhealth', attack = $hatk, defence = $hdef, attackbonus = $hob, defencebonus = $hdb, regeneration = $hrege WHERE heroid = $hid AND uid = $id"; $return = $database->query($q); // --------------------------------------------------------------------------- // Log admin - adaptat pentru tabelul tău // --------------------------------------------------------------------------- if ($return) { $adminId = (int)$_SESSION['id']; $time = time(); $logText = "Changed hero info for user $id (hero $hid)"; $logEsc = $database->escape($logText); $database->query( "INSERT INTO " . TB_PREFIX . "admin_log (`id`, `user`, `log`, `time`) " . "VALUES (0, '$adminId', '$logEsc', $time)" ); $status = "&cs=1"; } } header("Location: ../../../Admin/admin.php?p=player&uid=" . (int)$id . $status); exit; ?>