1 %# $Id: layout.mc,v 1.23 2007-02-20 19:20:23 mike Exp $
11 use ZOOM::IRSpy::Utils qw(isodate xml_encode cql_quote cql_target
12 irspy_xpath_context modify_xml_document
15 % $r->content_type("text/html; charset=utf-8");
16 <?xml version="1.0" encoding="UTF-8"?>
18 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
19 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
20 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
22 <title>IRSpy: <% xml_encode($title) %></title>
23 <link rel="stylesheet" type="text/css" href="/style.css"/>
26 <table border="0" cellpadding="0" cellspacing="0" width="100%">
30 <h1><a class="logo" href="/">IRSpy</a></h1>
34 <h1 class="title"><% xml_encode($title) %></h1>
38 <table border="0" cellpadding="0" cellspacing="0" width="100%">
41 <!-- Force display -->
53 <table border="0" cellpadding="0" cellspacing="0" width="100%">
55 <td valign="top" class="panel1">
57 <a href="/"><b>Home</b></a><br/>
58 <a href="/admin/all.html">Test all targets</a><br/>
59 <a href="/find.html">Find a target</a><br/>
60 <a href="/admin/edit.html?op=new">Add a target</a><br/>
61 <a href="/stats.html">Statistics</a><br/>
66 % foreach my $i ('a' .. 'z') {
67 <a href="/find.html?dc.title=^<% $i %>*&_sort=dc.title&_count=9999&_search=Search"><tt><% uc($i) %></tt></a>
71 my $id = $r->param("id");
73 # Make up ID for newly created records. It would be more
74 # rigorously correct, but insanely inefficient, to submit the
75 # record to Zebra and then search for it; but since we know the
76 # formula for IDs anyway, we just build one by hand.
77 my $id = $r->param("id");
78 my $host = $r->param("host");
79 my $port = $r->param("port");
80 my $dbname = $r->param("dbname");
81 #warn "id='$id', host='$host', port='$port', dbname='$dbname'";
82 #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n";
83 if ((!defined $id || $id eq "") &&
84 defined $host && defined $port && defined $dbname) {
85 $id = "$host:$port/$dbname";
86 #warn "id set to '$id'";
90 % if (defined $id && $r->param("op") ne "copy") {
94 <a href="<% xml_encode("/full.html?id=" . uri_escape($id)) %>">Show details</a>
96 <a href="<% xml_encode("/admin/edit.html?op=edit&id=" . uri_escape($id)) %>">Edit details</a>
98 <a href="<% xml_encode("/admin/edit.html?op=copy&id=" . uri_escape($id)) %>">Copy target</a>
100 <a href="<% xml_encode("/admin/delete.html?id=" . uri_escape($id)) %>">Delete target</a>
102 <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id)) . "&test=Quick" %>">Quick Test</a>
104 <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id)) . "&test=Main" %>">Full Test</a>
107 <a href="<% xml_encode("/raw.html?id=" . uri_escape($id)) %>">XML</a>
109 <%doc><!-- Maybe this would be too heavyweight -->
111 % my $host = "bagel.indexdata.dk";
113 <a href="/find.html?net.host=<% $host %>&net.port=<% $port %>&_search=Search"
114 >All databases on this server</a>
121 <a href="/doc.html">Contents</a>
125 <a href="http://validator.w3.org/check?uri=referer"><img
126 src="/valid-xhtml10.png"
127 alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
129 <a href="http://jigsaw.w3.org/css-validator/"><img
131 alt="Valid CSS!" height="31" width="88" /></a>
134 <td class="spacer"> </td>
136 <& $component, %ARGS &>
144 Powered by <a style="text-decoration: none"
145 href="http://indexdata.com/"