diff --git a/functions.php b/functions.php index 0e1d82a..88887f7 100644 --- a/functions.php +++ b/functions.php @@ -5,6 +5,7 @@ * Project name: Battles-Game */ +use Battles\Database\DBPDO; use Battles\Travel; use Battles\User; @@ -398,9 +399,8 @@ function timeOut($ttm) return $out; } -function show_eff_inf($u) +function show_eff_inf(int $u): string { - global $db; $img = [ 1 => "travma.gif", 2 => "magic/sleep.gif", 3 => "magic/sleepf.gif", 4 => "magic/haos.gif", 5 => "magic/obezl.gif", 6 => "expx15.gif", 7 => "euphoria.png", 8 => "sleep_obj.gif", @@ -414,22 +414,22 @@ function show_eff_inf($u) ]; $r = ''; - $effs = $db->ofetchAll('SELECT * FROM users_effects WHERE type != 20 AND owner_id = ?', $u); + + $effs = DBPDO::INIT()->ofetchAll('SELECT * FROM users_effects WHERE owner_id = ?', $u); $i = 0; while ($i < count($effs)) { - - $r .= '