[1, Cfg::USERNAME_MAX_LEN] ]); } catch (Exception $e) { exit(page_err( "invalid form parameters: " . $e->getMessage() )); } $db = new Database("../run/poker.db"); $u = $db->get_user($_GET["u"]); $n = htmlspecialchars($u->name); $me = whoami($db); $admin = !!$me && $me->id == $u->id ? "id}\">admin" : ""; $i = array(); foreach ($db->get_info($u->id)->into_array() as $k => $v) { switch ($k) { case "id": continue 2; case "uid": continue 2; } if (!$v) continue; $k = htmlspecialchars($k); $v = gettype($v) == "string" ? "
" . htmlspecialchars($v) . "" : htmlspecialchars((string)$v); array_push($i, <<