2 * Written by Richard W.M. Jones <rich@merjis.com>.
3 * Copyright (C) 2004 Merjis Ltd.
4 * $Id: edit_page_css_form.ml,v 1.1 2004/09/07 10:14:09 rich Exp $
14 let template = get_template "edit_page_css_form.html"
16 let run r (q : cgi) (dbh : Dbi.connection) (hostid, _) _ =
17 let page = q#param "page" in
19 let sth = dbh#prepare_cached "select css from pages
20 where hostid = ? and url = ?" in
21 sth#execute [`Int hostid; `String page];
24 match sth#fetch1 () with
26 | [ `String css ] -> css
27 | _ -> assert false in
29 template#set "page" page;
30 template#set "css" css;