2 * Written by Richard W.M. Jones <rich@merjis.com>.
3 * Copyright (C) 2004 Merjis Ltd.
4 * $Id: edit_host_css_form.ml,v 1.3 2004/09/08 15:46:53 rich Exp $
13 open Cocanwiki_template
15 let template = _get_template "admin/edit_host_css_form.html"
17 let run r (q : cgi) (dbh : Dbi.connection) _ _ =
18 let hostid = int_of_string (q#param "hostid") in
19 template#set "id" (string_of_int hostid);
21 let sth = dbh#prepare_cached "select css from hosts where id = ?" in
22 sth#execute [`Int hostid];
25 match sth#fetch1 () with
27 | [ `String css ] -> css
28 | _ -> assert false in
30 template#set "css" css;