1 %# $Id: layout.mc,v 1.35 2007-06-28 13:36:46 mike Exp $
8 use URI::Escape qw(uri_escape uri_escape_utf8);
11 use ZOOM::IRSpy::Utils qw(utf8param isodate xml_encode cql_target cql_quote
12 irspy_xpath_context irspy_make_identifier
13 irspy_record2identifier
14 irspy_identifier2target modify_xml_document
17 % $r->content_type("text/html; charset=utf-8");
18 <?xml version="1.0" encoding="UTF-8"?>
20 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
21 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
24 <title>IRSpy: <% xml_encode($title) %></title>
25 <link rel="stylesheet" type="text/css" href="/style.css"/>
28 <table border="0" cellpadding="0" cellspacing="0" width="100%">
35 <h1><a class="logo" href="/">IRSpy</a></h1>
39 <h1 class="title"><% xml_encode($title) %></h1>
46 <table border="0" cellpadding="0" cellspacing="0" width="100%">
49 <!-- Force display -->
61 <table border="0" cellpadding="0" cellspacing="0" width="100%">
63 <td valign="top" class="panel1">
65 <a href="/"><b>Home</b></a><br/>
66 <a href="/admin/all.html">Test all targets</a><br/>
67 <a href="/find.html">Find a target</a><br/>
68 <a href="/admin/edit.html?op=new">Add a target</a><br/>
69 <a href="/admin/upload.html">Upload a target</a><br/>
70 <a href="/stats.html">Statistics</a><br/>
75 % foreach my $i ('a' .. 'z') {
76 <a href="/find.html?dc.title=^<% $i %>*&_sort=dc.title&_count=9999&_search=Search"><tt><% uc($i) %></tt></a>
78 <a href="/find.html?cql.allRecords=1+not+dc.title+=/regexp/firstInField+[a-z].*&_sort=dc.title&_count=9999&_search=Search">[Others]</a>
81 # Find the identifier to use in the record-specific menu, if any. If
82 # the identifier components are all present (e.g. because a record has
83 # just been edited or copied) we make an ID from those; otherwise we
84 # use the "id" parameter, if specified.
85 my $id = utf8param($r, "id");
87 # Make up ID for newly created records.
88 my $protocol = utf8param($r, "protocol");
89 my $host = utf8param($r, "host");
90 my $port = utf8param($r, "port");
91 my $dbname = utf8param($r, "dbname");
92 #warn "id='$id', protocol='$protocol' host='$host', port='$port', dbname='$dbname'";
93 #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n";
94 if (defined $protocol && defined $host &&
95 defined $port && defined $dbname) {
96 $id = irspy_make_identifier($protocol, $host, $port, $dbname);
97 #warn "id set to '$id'";
105 <a href="<% xml_encode("/full.html?id=" . uri_escape($id)) %>">Show details</a>
107 <a href="<% xml_encode("/admin/edit.html?op=edit&id=" . uri_escape($id)) %>">Edit details</a>
109 <a href="<% xml_encode("/admin/edit.html?op=copy&id=" . uri_escape($id)) %>">Copy target</a>
111 <a href="<% xml_encode("/admin/delete.html?id=" . uri_escape($id)) %>">Delete target</a>
113 <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id)) . "&test=Quick" %>">Quick Test</a>
115 <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id)) . "&test=Main" %>">Full Test</a>
118 <a href="<% xml_encode("/raw.html?id=" . uri_escape($id)) %>">XML</a>
120 <%doc><!-- Maybe this would be too heavyweight -->
122 % my $host = "bagel.indexdata.dk";
124 <a href="/find.html?net.host=<% $host %>&net.port=<% $port %>&_search=Search"
125 >All databases on this server</a>
132 <a href="/doc.html">Contents</a>
136 <a href="http://validator.w3.org/check?uri=referer"><img
137 src="/valid-xhtml10.png"
138 alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
140 <a href="http://jigsaw.w3.org/css-validator/"><img
142 alt="Valid CSS!" height="31" width="88" /></a>
145 <td class="spacer"> </td>
147 <& $component, %ARGS &>
155 Powered by <a style="text-decoration: none"
156 href="http://indexdata.com/"