      [:br]
      content]]))
 
+(defn page-not-found []
+  "<h1>Page not found</h1>")
+
 (defn make-dump-link [row]
   (let [base (str "/user/" (:name row) "/dumps/" (:name row ) "." (:endtime row))
         file-base (str "/srv/un.nethack.nu" base)

      [:a {:href (str base extension)} "dump #" (:id row)]
      [:div "No dump file for game " (:id row)])))

(defn rs-to-table [rs]
  [:table
   [:tr
    [:th "game"]
    [:th "name"]
    [:th "points"]
    [:th "deathdate"]
    [:th "death"]]
   (map #'rs-row-to-tr rs)])

(defn rs-row-to-tr [row]
  [:tr
   [:td [:a {:href (str "/game/" (:id row))} (:id row)]]
   [:td [:a {:href (str "/user/" (:name row))} (:name row)]]
   [:td (:points row)]
   [:td (:deathdate row)]
   [:td [:a {:href (str "/cause/" (url-encode (:death_uniq row)))} (:death row)]]])

(defn game [id]
  (sql/with-connection db

           [:div
            [:h2 name]
            [:p (:games_played row) " games played, " (:ascensions row) " ascensions."]
            [:a {:href (str "/user/" name "/dumps/")} "dumps"]
            [:br]
            [:a {:href (str "/user/" name "/ttyrecs/")} "ttyrecs"]
            [:br]
            [:br]
            (sql/with-query-results
              rs2
              ["select * from xlogfile where name = ? order by endtime desc limit 50" name]
              (doall rs2)
              (rs-to-table rs2))]))))))

(defn users []
  (sql/with-connection db
    (sql/with-query-results
