(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
let canonical_hostname = q#param "canonical_hostname" in
let hostnames = try q#param "hostnames" with Not_found -> "" in
let canonical_hostname = q#param "canonical_hostname" in
let hostnames = try q#param "hostnames" with Not_found -> "" in
) else (
(* In theory we could verify characters in hostnames. However
* it's probably best to assume the sysadmin knows what they're up to
) else (
(* In theory we could verify characters in hostnames. However
* it's probably best to assume the sysadmin knows what they're up to
let hostid = create_host dbh canonical_hostname hostnames template title
"Administrator" "123456" true None in
(* Commit to the database. *)
let hostid = create_host dbh canonical_hostname hostnames template title
"Administrator" "123456" true None in
(* Commit to the database. *)
(* Print confirmation page. *)
let buttons = [
{ Template.StdPages.label = "OK";
Template.StdPages.link = "/_bin/admin/host.cmo";
Template.StdPages.method_ = None;
(* Print confirmation page. *)
let buttons = [
{ Template.StdPages.label = "OK";
Template.StdPages.link = "/_bin/admin/host.cmo";
Template.StdPages.method_ = None;