From 99a9460d759472acd9a54326c5d584a7a4bd4c06 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 2 Jan 2007 17:26:53 +0000 Subject: [PATCH] New --- web/htdocs/delete.html | 7 +++++++ web/htdocs/details/delete.mc | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 web/htdocs/delete.html create mode 100644 web/htdocs/details/delete.mc diff --git a/web/htdocs/delete.html b/web/htdocs/delete.html new file mode 100644 index 0000000..7485e71 --- /dev/null +++ b/web/htdocs/delete.html @@ -0,0 +1,7 @@ +%# $Id: delete.html,v 1.1 2007-01-02 17:26:53 mike Exp $ +<%args> +$id => undef + +<& /chrome/layout.mc, %ARGS, + title => "Delete target record", + component => "/details/delete.mc" &> diff --git a/web/htdocs/details/delete.mc b/web/htdocs/details/delete.mc new file mode 100644 index 0000000..5a75bbf --- /dev/null +++ b/web/htdocs/details/delete.mc @@ -0,0 +1,36 @@ +%# $Id: delete.mc,v 1.1 2007-01-02 17:27:08 mike Exp $ +<%args> +$id +$really => 0 + +% if (!$really) { +

Warning

+

+ Are you sure you want to delete the target + <% xml_encode($id) %>? +

+

+ Yes
+ No
+

+% } else { +<%perl> + my $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1", 0, + user => "admin", password => "fruitbat", + elementSetName => "zeerex"); + # I am thinking that ZOOM should provide delete(), update(), etc. + my $p = $conn->package(); + $p->option(action => "recordDelete"); + $p->option(recordIdOpaque => $id); + $p->send("update"); + $p->destroy(); + + $p = $conn->package(); + $p->send("commit"); + $p->destroy(); + +

+ Deleted record + <% xml_encode($id) %> +

+% } -- 1.7.10.4