Generic sort mechanism. Sort supported by relevance, string, or string w/o lead.
[pazpar2-moved-to-github.git] / www / demo / page_segments.phpi
1 <?php
2
3 /* $Id: page_segments.phpi,v 1.10 2007-01-15 04:34:29 quinn Exp $
4  * ---------------------------------------------------
5  * Page segments 
6  */
7
8
9 function insert_header () {
10     echo <<<END_OF_HEADER
11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
12 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13   <head>
14     <title>Keystone Retriever</title>
15     <link rel="author" href="http://www.indexdata.dk" />
16     <link href="css/styles.css" rel="stylesheet" type="text/css"
17           media="screen, all" />
18     <script type="text/javascript" src="search.js"></script>
19   </head>
20   <body onload="initialize();">
21     <div class="container">
22       <div class="topbar">
23         <a href=".">
24           <img id="logo" src="gfx/logo.gif" width="155" height="36"
25                alt="Keystone Retriever" />
26         </a>
27         <div class="topmenu">
28           <a href="about.php" class="topmenu">ABOUT</a>
29           <a href="help.php" class="topmenu">HELP</a>
30         </div>
31       </div>
32       <div class="search">  
33         <span>ENTER SEARCH TERM:</span>
34         <div>
35           <form name="search" onsubmit="start_search(); return false;">
36             <input id="query" type="text" class="search" tabindex="1"
37                   maxlength="255" value="" />
38             <input type="submit" class="button" value="Search" />
39             <input type="hidden" name="startrec" id="startrec"/>
40             <input type="hidden" name="action_type" id="action_type"
41                    value="search"/>
42           </form>
43           <p>
44           <class class="sort" id="sortselect"></class>
45         </div>
46       </div>
47       <div class="main">
48         <div class="leftbar" id="termlists">
49           <b>Limit search results</b><br />
50           Narrow your search by using the keywords below:<br />
51           <br />
52           <a id="facet_subject" class="unselected"
53              onclick="toggle_facet(this)">Subject</a>
54           <span id="facet_subject_terms" class="facet"
55                style="display: block;"></span>
56           
57           <br />
58
59           <a id="facet_author" class="unselected"
60              onclick="toggle_facet(this)">Author</a>
61           <span id="facet_author_terms" class="facet"
62                style="display: block;"></span>
63           
64         </div>
65         <div class="content" id="body">
66 END_OF_HEADER;
67 }
68
69
70 function insert_footer () {
71     global $show_status;
72     
73     echo '</div>
74           <div style="display: ', ($show_status == 1 ? 'block' : 'none'),
75           ';">Status: <span id="status">Initializing</span>
76           <span id="stat"></span>
77           </div>
78           <div class="clear"></div>
79         </div>
80       </div>
81     </body>
82   </html>';
83 }