1 %# $Id: layout.mc,v 1.20 2006-12-14 15:39:06 mike Exp $
11 use ZOOM::IRSpy::Utils qw(isodate xml_encode cql_quote cql_target
12 irspy_xpath_context modify_xml_document);
14 % $r->content_type("text/html; charset=utf-8");
15 <?xml version="1.0" encoding="UTF-8"?>
17 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
18 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
21 <title>IRSpy: <% xml_encode($title) %></title>
22 <link rel="stylesheet" type="text/css" href="/style.css"/>
25 <table border="0" cellpadding="0" cellspacing="0" width="100%">
29 <h1><a class="logo" href="/">IRSpy</a></h1>
33 <h1 class="title"><% xml_encode($title) %></h1>
37 <table border="0" cellpadding="0" cellspacing="0" width="100%">
40 <!-- Force display -->
52 <table border="0" cellpadding="0" cellspacing="0" width="100%">
54 <td valign="top" class="panel1">
56 <a href="/"><b>Home</b></a><br/>
57 <a href="/all.html">Test all targets</a><br/>
58 <a href="/find.html">Find a target</a><br/>
59 <a href="/edit.html?op=new">Add a target</a><br/>
60 <a href="/stats.html">Statistics</a><br/>
65 % foreach my $i ('a' .. 'z') {
66 <a href="/find.html?dc.title=^<% $i %>*&_sort=dc.title&_count=9999&_search=Search"><tt><% uc($i) %></tt></a>
70 my $id = $r->param("id");
72 # Make up ID for newly created records. It would be more
73 # rigorously correct, but insanely inefficient, to submit the
74 # record to Zebra and then search for it; but since we know the
75 # formula for IDs anyway, we just build one by hand.
76 my $id = $r->param("id");
77 my $host = $r->param("host");
78 my $port = $r->param("port");
79 my $dbname = $r->param("dbname");
80 #warn "id='$id', host='$host', port='$port', dbname='$dbname'";
81 #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n";
82 if ((!defined $id || $id eq "") &&
83 defined $host && defined $port && defined $dbname) {
84 $id = "$host:$port/$dbname";
85 #warn "id set to '$id'";
89 % if (defined $id && $r->param("op") ne "copy") {
93 <a href="<% xml_encode("/full.html?id=" . uri_escape($id)) %>">Show details</a>
95 <a href="<% xml_encode("/edit.html?op=edit&id=" . uri_escape($id)) %>">Edit details</a>
97 <a href="<% xml_encode("/edit.html?op=copy&id=" . uri_escape($id)) %>">Copy target</a>
99 <a href="<% xml_encode("/check.html?id=" . uri_escape($id)) . "&test=Quick" %>">Quick Test</a>
101 <a href="<% xml_encode("/check.html?id=" . uri_escape($id)) . "&test=Main" %>">Full Test</a>
104 <a href="<% xml_encode("/raw.html?id=" . uri_escape($id)) %>">XML</a>
106 <%doc><!-- Maybe this would be too heavyweight -->
108 % my $host = "bagel.indexdata.dk";
110 <a href="/find.html?net.host=<% $host %>&net.port=<% $port %>&_search=Search"
111 >All databases on this server</a>
118 <a href="/doc.html">Contents</a>
122 <a href="http://validator.w3.org/check?uri=referer"><img
123 src="/valid-xhtml10.png"
124 alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
126 <a href="http://jigsaw.w3.org/css-validator/"><img
128 alt="Valid CSS!" height="31" width="88" /></a>
131 <td class="spacer"> </td>
133 <& $component, %ARGS &>
141 Powered by <a style="text-decoration: none"
142 href="http://indexdata.com/"