root/main/trunk/greenstone2/macros/dateqry.dm @ 32220

Revision 28898, 3.5 KB (checked in by ak19, 6 years ago)

1. The cgiargq query variable is now no longer escaped in the 3 simply or large forms that use it. fqv and other js escaped fields are unchanged, since the jssafe now ensures that backslashes are escaped for macro files, so these resolve correctly in query.dm. 2. securitytools.cpp and .h updated to additionally escape back slashes for macro files when javascript escaping. This is done by default, since jssafe variants of cgiargs are all that are used, and they're used in macro files. 3. Encoded versions of decodedcompressedoptions are now used in all macro files. They're always used in attributes, so the attrsafe version which is set in receptionist.cpp is used.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1# this file must be UTF-8 encoded
2
3package query
4
5
6#######################################################################
7# Macros whose values are set from within the server at runtime. These
8# are here only for reference and to set default values if required.           
9#######################################################################
10
11_quotedquery_ {}
12_freqmsg_ {}
13_resultline_ {}
14_thisfirst_ {}
15_thislast_ {}
16_nextfirst_ {}
17_nextlast_ {}
18_prevfirst_ {}
19_prevlast_ {}
20_searchhistorylist_ {}
21
22_imagethispage_ {_labelSearch_}
23
24#######################################################################
25# icons
26#######################################################################
27
28_queryresultsbar_ {
29<div class="divbar">
30<p class="navbar">_texthresults_</p>
31</div>
32}
33
34# _iconnext_ and _iconprev_ are overridden in this package as we
35# don't want alt text here
36_iconnext_{<img src="_httpiconmore_" width=_widthmore_ height=_heightmore_ border=0 align=top>}
37_iconnext_ [v=1] {}
38_iconprev_{<img src="_httpiconless_" width=_widthless_ height=_heightless_ border=0 align=top>}
39_iconprev_ [v=1] {}
40
41
42
43#######################################################################
44# page content
45#######################################################################
46
47_pagetitle_ {_If_(_cgiargq_,_textquerytitle_,_textnoquerytitle_)}
48
49_content_ {
50_optnavigationbar_
51
52_queryform_
53_If_(_searchhistorylist_,<center>
54_searchhistorylist_
55</center>)
56_If_(_cgiargq_,_queryresultsbar_
57<small>
58_freqmsg_
59_textpostprocess_</small><br>
60,<center><div class="divbar">&nbsp;</div></center>)<br>
61_resultline_<p>
62}
63
64_queryform_ {
65<!-- query form -->
66<form name=QueryForm method=get action="_gwcgi_">
67
68<input type=hidden name="a" value="q">
69<input type=hidden name="e" value="_decodedcompressedoptionsAttrsafe_">
70<input type=hidden name="r" value="1">
71<input type=hidden name="hs" value="1">
72<input type=hidden name="g" value="Document"
73<center>
74<table><tr><td>
75<nobr>
76    _textselect_<br>
77<nobr> 
78</tr></td>
79<tr><td>
80<nobr>
81    <center>
82    <input type="text" name="q" value="_cgiargqAttrsafe_" size="50">
83    <input type="submit" value="_textbeginsearch_">
84    </center>
85</nobr>
86</tr></td>
87<tr><td>
88    _textdatesearch_<br>
89</tr></td>
90<tr><td>
91    <center>
92_textstartdate_
93<input type="text" name="ds" value = "_cgiargdsAttrsafe_"size="4" maxlength="4">
94<select name="dsbc" value="_cgiargdsbcAttrsafe_" size="1">
95    <option value = "0"_If_(_cgiargdsbc_,, selected)>_textad_
96    <option value = "1"_If_(_cgiargdsbc_, selected)>_textbc_
97</select>
98_textenddate_
99<input type="text" name="de" value = "_cgiargdeAttrsafe_" size="4" maxlength="4"> 
100<select name="debc" size="1">
101    <option value = "0" _If_(_cgiargdebc_,, selected)>_textad_
102    <option value = "1" _If_(_cgiargdebc_, selected)>_textbc_
103</select>
104</center>     
105</tr></td>
106<tr><td>
107_textexplaineras_
108</tr></td>
109</table>
110</center>
111</form>
112<!-- end of query form -->
113}
114
115_textselect_ {_If_(_cgiargb_,_textadvancedsearch_,_textsimplesearch_)}
116
117# we want to put the links to previous/next pages of results
118# in the footer
119_pagefooterextra_ {
120<center>
121<table cellspacing=0 cellpadding=0 width=_pagewidth_>
122<tr>
123<td align=left>_If_(_prevfirst_,<a href="_httpquery_&r=_prevfirst_">_iconprev__textmatches__prevfirst_ - _prevlast_</a>)</td>
124<td align=right>_If_(_nextfirst_,<a href="_httpquery_&r=_nextfirst_">_textmatches__nextfirst_ - _nextlast__iconnext_</a>)</td>
125</tr></table>
126</center>
127}
128
129_querytypeselection_ {
130<select name="t">
131<option value="1"_If_(_cgiargt_, selected)>_textsome_
132<option value="0"_If_(_cgiargt_,, selected)>_textall_
133</select>
134}
135
136
137
138
139
140
141
142
143
144
Note: See TracBrowser for help on using the browser.