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.1 2004/09/07 10:14:10 rich Exp $
14 let template = get_template "admin/edit_host_css_form.html"
16 let run r (q : cgi) (dbh : Dbi.connection) _ _ =
17 let hostid = int_of_string (q#param "hostid") in
18 template#set "id" (string_of_int hostid);
20 let sth = dbh#prepare_cached "select css from hosts where id = ?" in
21 sth#execute [`Int hostid];
24 match sth#fetch1 () with
26 | [ `String css ] -> css
27 | _ -> assert false in
29 template#set "css" css;