#!/usr/local/bin/perl
#
# /opt/web/content/www.ukoln.ac.uk/resources/cgi-bin/404-script/page-not-found.cgi
#
# Script to print out pretty page saying \"The page you requested
# could not be found, please go away\"
# 
# Or words to that effect.  (-8

#####################################################################
#
# Initialise:
#


my $url = $ENV{SCRIPT_URI};

my $navtop;
my $search;
my $navprojects;
my $navtopic;
my $footer;
open(FPI, "<../../../modules-ssi/nav-top.ssi") || die ("Unable to open template file!\n$!\n");
while (<FPI>) {
	  $navtop.= $_;
  }
  close FPI;

open(FPI, "<../../../modules-ssi/search.ssi") || die ("Unable to open template file!\n$!\n");
while (<FPI>) {
	  $search.= $_;
  }
  close FPI;

open(FPI, "<../../../modules-ssi/nav-projects.ssi") || die ("Unable to open template file!\n$!\n");
while (<FPI>) {
	  $navprojects.= $_;
  }
  close FPI;

open(FPI, "<../../../modules-ssi/nav-topic.ssi") || die ("Unable to open template file!\n$!\n");
while (<FPI>) {
	  $navtopic.= $_;
  }
  close FPI;

open(FPI, "<../../../modules-ssi/footerBasic.ssi") || die ("Unable to open template file!\n$!\n");
while (<FPI>) {
	  $footer.= $_;
  }
  close FPI;

print "Content-type: text/html\n\n";
print " 
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">
<head>
  <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />
  <title>Error: 404</title>
  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"/styles/basic.css\" />
  <link rel=\"stylesheet\" type=\"text/css\" media=\"print\" href=\"/styles/print.css\" />
  <link rel=\"shortcut icon\" href=\"/favicon.ico\" type=\"image/x-icon\" />
  <!--[if gt IE 6]>
    <link href=\"/styles/IE7.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />
  <![endif]-->
  <!--[if lt IE 7]>
    <link href=\"/styles/IE6.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />
  <![endif]-->
  <script src=\"/scripts/captions.js\" type=\"text/javascript\"></script>
</head>
<body>
<div id=\"container\">
  <a id=\"title\" href=\"/\"><span class=\"hide\">UKOLN</span></a>
  <div id=\"strapline\">
    <span class=\"hide\">Raising Awareness</span>
  </div>
  ".$navtop."
  <div class=\"clear\"></div>  
  <div class=\"row\" id=\"intro\">
    ".$search."
    <div id=\"preface\">
      <div class=\"module\">
        <blockquote>
          <p>\"A centre of excellence in digital information management,
            providing advice and services to the library, information and
            cultural heritage communities.\"</p>
        </blockquote>
        <cite>UKOLN is based at the <a href=\"http://www.bath.ac.uk/\">University
          of Bath</a>.</cite> 
      </div>
    </div>
  </div>
  <div class=\"clear\"></div>
  <div class=\"row\" id=\"page\">
    <div id=\"margin\">
      ".$navprojects."
      ".$navtopic."
      <hr />
    </div>
    <div id=\"content\">
      <!-- content starts -->
      <h1>Not Found</h1>
      <div class=\"module\">
        <p>The URL <b style=\"color:#ff0000;\">$url</b> does not correspond to
          any resources on this server.</p>
        <p>This may be because the link you followed was out of date, or a URL
          has been mistyped.</p>
        <p>If you are searching for references to a specific item, please use 
          the search facility below.</p>
      </div>
      <div class=\"module feature\" \">
        <form action='http://www.ukoln.ac.uk/search/' method=\"get\">
        <p>
          <label for=\"query\">Words:</label><br />
          <input class=\"field\" style=\"display:inline;\" id =\"query\" name=\"query\" type=\"text\" alt=\"Search Terms\" />
          <input class=\"button\" style=\"display:inline;\" id=\"submit\" type=\"button\" value=\"Search\" />
        </p>
        </form>
      </div>
      <div class=\"clear\">&nbsp;</div>
      <!-- content ends -->
    </div>
    <div id=\"column_bottom\">&nbsp;</div>
  </div>
</div>
".$footer."
</body>
</html>
      ";  

#         <div class=\"module related_links_b\">
#           <h2>Browse by <span>Project</span></h2>
#           <ul>
#             <li><a href=\"/activities/\">A to Z of projects and activities</a></li>
#           </ul>
#         </div>
#         <div class=\"module related_links_b\">
#           <h2>Research and Awareness</h2>
#           <ul>
#             <li><a href=\"/bib-man/\">Bibliographic Management</a></li>
#             <li><a href=\"/cd-focus/\">Collection Description Focus</a></li>
#             <li><a href=\"http://www.dcc.ac.uk/\">Digital Curation Centre</a></li>
#             <li><a href=\"http://www.ukoln.ac.uk/metadata/dcmi/\">DCMI Affiliate</a></li>
#             <li><a href=\"/distributed-systems/\">Distributed Systems</a></li>
#             <li><a href=\"http://www.ukoln.ac.uk/projects/grand-challenge\">Grand Challenge Project</a></li>
#             <li><a href=\"/interop-focus/\">Interoperability Focus</a></li>
#             <li><a href=\"/repositories/digirep/\">JISC Digital Repositories Programme</a></li>
#             <li><a href=\"/metadata/\">Metadata</a></li>
#             <li><a href=\"/qa-focus/\">QA Focus</a></li>
#             <li><a href=\"/web-focus/\">Web Focus</a></li>
#           </ul>
#         </div>
#         <div class=\"module related_links_b\">
#           <h2>Events</h2>
#           <ul>
#             <li><a href=\"/events/\">Conferences &amp; Workshops</a></li>
#           </ul>
#         </div>
#         <div class=\"module related_links_b\">
#           <h2>Services</h2>
#           <ul>
#             <li><a href=\"http://www.ariadne.ac.uk/\">Ariadne</a></li>
#             <li><a href=\"http://www.ukoln.ac.uk/metadata/dcdot/\">DC-dot</a></li>
#             <li><a href=\"/focus/\">Focus on UKOLN</a></li>
#             <li><a href=\"/interop-focus/gpg/\">GPG for Developers of Cultural Heritage Web Services</a></li>
#             <li><a href=\"http://rssxpress.ukoln.ac.uk/\">RSS-xpress</a></li>
#           </ul>
#         </div>
#         <div class=\"module related_links_b\">
#           <h2>Mirrors</h2>
#           <ul>
#             <li><a href=\"http://mirrored.ukoln.ac.uk/lis-journals/dlib/\">D-Lib Magazine</a></li>
#             <li><a href=\"http://uk.dublincore.org/\">Dublin Core</a></li>
#             <li><a href=\"http://mirrored.ukoln.ac.uk/lib-license/\">Liblicense</a></li>
#           </ul>
#         </div>
#         <div class=\"module related_links_b\">
#         <h2>UKOLN Hosted</h2>
#           <ul>
#             <li><a href=\"/services/lic/\">LIC reports</a></li>
#             <li><a href=\"http://www.jibs.ac.uk\">JIBS</a></li>
#             <li><a href=\"http://hosted.ukoln.ac.uk/lissps/\">LISSPS</a></li>
#           </ul>
#         </div>
#         <hr />
################################################################################
#   <!--TR>
#     <TD><p class='search'>Match:<BR><SELECT name=method> <OPTION selected
#         value=and>All<OPTION value=or>Any<OPTION
#       value=boolean>Boolean</OPTION></SELECT> </TD>
#     <TD class=boxes><p>Sort Results by:<BR><SELECT name=sort> <OPTION selected
#         value=score>Score<OPTION value=time>Time<OPTION value=title>Title<OPTION
#         value=revscore>Reverse Score<OPTION value=revtime>Reverse Time<OPTION
#         value=revtitle>Reverse Title</OPTION></SELECT> </TD>
#     <TD class=boxes><p>In:<BR><SELECT name=restrict> <OPTION value=''>All
#         areas</OPTION> <OPTION selected value=www.ukoln.ac.uk>UKOLN</OPTION>
#         <OPTION value=www.ukoln.ac.uk/metadata>- Metadata</OPTION> <OPTION
#         value=www.ukoln.ac.uk/web-focus>- Web Focus</OPTION> <OPTION
#         value=www.ukoln.ac.uk/interop-focus>- Interoperability Focus</OPTION>
#         <OPTION value=www.ukoln.ac.uk/public>- Public Library
#         Networking</OPTION> <OPTION value=www.ukoln.ac.uk/dlis>- Distributed
#         Library Systems</OPTION> <OPTION value=www.ukoln.ac.uk/bib-man>-
#         Bibliographic Management</OPTION> <OPTION value=www.ukoln.ac.uk/events>-
#         Events</OPTION> <OPTION value=PUBLICPEOPLE>- Public Library People
#         Directory</OPTION> <OPTION value=www.rdn.ac.uk>- Resource Discovery
#         Network</OPTION> <OPTION value=www.ariadne.ac.uk>- Ariadne</OPTION>
#         <OPTION value=www.cultivate-int.org>- Cultivate Interactive</OPTION>
#         <OPTION value=www.exploit-lib.org>- Exploit
#     Interactive</OPTION></SELECT></TD>
#     <TD class=boxes><p>Show:<BR><SELECT name=matchesperpage> <OPTION selected
#         value=10>10</OPTION> <OPTION value=20>20</OPTION> <OPTION
#         value=50>50</OPTION> <OPTION value=100>100</OPTION></SELECT>&nbsp;results
#     </TD><INPUT name=config type=hidden value=ukoln_all>
#   </TR-->
