"No" link to full.mc is now absolute.
[irspy-moved-to-github.git] / web / htdocs / details / delete.mc
1 %# $Id: delete.mc,v 1.5 2007-02-20 19:21:26 mike Exp $
2 <%args>
3 $id
4 $really => 0
5 </%args>
6 % if (!$really) {
7      <h2>Warning</h2>
8      <p class="error">
9       Are you sure you want to delete the target
10       <% xml_encode($id) %>?
11      </p>
12      <p>
13       <a href="?really=1&amp;id=<% xml_encode(uri_escape($id)) %>">Yes</a><br/>
14       <a href="/full.html?id=<% xml_encode(uri_escape($id)) %>">No</a><br/>
15      </p>
16 % } else {
17 <%perl>
18     my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
19                                     user => "admin", password => "fruitbat",
20                                     elementSetName => "zeerex");
21     # I am thinking that ZOOM should provide delete(), update(), etc.
22     my $p = $conn->package();
23     $p->option(action => "recordDelete");
24     $p->option(recordIdOpaque => $id);
25     $p->option(record => "<dummy/>"); # Work around Zebra bug
26     $p->send("update");
27     $p->destroy();
28
29     $p = $conn->package();
30     $p->send("commit");
31     $p->destroy();
32 </%perl>
33      <p>
34       Deleted record
35       <% xml_encode($id) %>
36      </p>
37 % }