4c2b9e1ef040ac69bdce21a6b8799bd396d73a3a
[privoxy.git] / templates / show-url-info
1 ########################################################################
2 #
3 # File        :  $Source: /cvsroot/ijbswa/current/templates/show-url-info,v $
4 #
5 # Purpose     :  Template for Privoxy's show-url-info CGI page.
6 #
7 # Copyright   :  Written by and Copyright (C) 2001-2007 the SourceForge
8 #                Privoxy team. http://www.privoxy.org/
9 #
10 #                This program is free software; you can redistribute it 
11 #                and/or modify it under the terms of the GNU General
12 #                Public License as published by the Free Software
13 #                Foundation; either version 2 of the License, or (at
14 #                your option) any later version.
15 #
16 #                This program is distributed in the hope that it will
17 #                be useful, but WITHOUT ANY WARRANTY; without even the
18 #                implied warranty of MERCHANTABILITY or FITNESS FOR A
19 #                PARTICULAR PURPOSE.  See the GNU General Public
20 #                License for more details.
21 #
22 #                The GNU General Public License should be included with
23 #                this file.  If not, you can view it at
24 #                http://www.gnu.org/copyleft/gpl.html
25 #                or write to the Free Software Foundation, Inc., 59
26 #                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27 #
28 # Revisions   :
29 #    $Log: show-url-info,v $
30 #    Revision 1.26  2008/05/05 10:03:06  fabiankeil
31 #    If the provided URL isn't valid, don't show the
32 #    cgi-editor-is-disabled and filters-might-be-ineffective
33 #    sections.
34 #
35 #    Revision 1.25  2008/04/26 10:34:18  fabiankeil
36 #    If zlib support is unavailable and there are content filters active
37 #    but the prevent-compression action is disabled, include a warning
38 #    on the show-url-info page that compression might prevent filtering.
39 #
40 #    Revision 1.24  2008/02/10 17:26:52  fabiankeil
41 #    Reduce superfluous white space by not marking
42 #    up the final results list as paragraph.
43 #
44 #    Revision 1.23  2008/02/01 06:04:31  fabiankeil
45 #    If edit buttons on the show-url-info CGI page are hidden, explain why.
46 #
47 #    Revision 1.22  2007/12/08 14:29:06  fabiankeil
48 #    Use CSS to let the URL and pattern input fields scale with
49 #    the browser width and try to prevent vertical scroll bars
50 #    if the width is less than 80 characters. Closes #1843596,
51 #    thanks to Gerry Murphy and Lee.
52 #
53 #    Revision 1.21  2007/11/15 19:11:11  fabiankeil
54 #    Reword HTTPS URL information.
55 #
56 #    Revision 1.20  2007/07/21 12:19:50  fabiankeil
57 #    If show-url-info is called with an URL that Privoxy
58 #    would reject as invalid, don't show unresolved forwarding
59 #    variables, "final matches" or claim the site's secure.
60 #
61 #    Revision 1.19  2007/02/10 16:55:22  fabiankeil
62 #    - Show forwarding settings on the show-url-info page
63 #    - Fix some HTML syntax errors.
64 #
65 #
66 #########################################################################
67 # USING HTML TEMPLATES:
68 # ---------------------
69 #
70 # Template files are written win plain HTML, with a few
71 # additions:
72
73 # - Lines that start with a '#' character like this one
74 #   are ignored
75 #
76 # - Each item in the below list of exported symbols will
77 #   be replaced by dynamically generated text, if they
78 #   are enclosed in '@'-characters. E.g. The string @version@
79 #   will be replaced by the version number of Privoxy.
80 #
81 # - One special application of this is to make whole blocks
82 #   of the HTML template disappear if the condition <name>
83 #   is not given. Simply enclose the block between the two
84 #   strings @if-<name>start and if-<name>-end@. The strings
85 #   should be placed in HTML comments (<!-- -->), so the
86 #   html structure won't be messed when the magic happens.
87 #   
88 # USABLE SYMBOLS IN THIS TEMPLATE:
89 # --------------------------------
90 #
91 #  my-ip-addr:
92 #    The IP-address that the client used to reach Privoxy
93 #  my-hostname:
94 #    The hostname associated with my-ip-addr
95 #  admin-address:
96 #    The email address of the Privoxy administrator, as configured
97 #    in the config file
98 #  default-cgi:
99 #    The URL for Privoxy's "main menu" builtin CGI page
100 #  menu:
101 #    List of <li> elements linking to the other available CGIs
102 #  version:
103 #    Privoxy's version number
104 #  code-status:
105 #    Privoxy's development status: "alpha", "beta", or "stable".
106 #  homepage:
107 #    The Privoxy web site.
108 #
109 # CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
110 # ------------------------------------------------------------------
111 #
112 #  unstable:
113 #    this is an alpha or beta release of the proxy software
114 #  have-adminaddr-info:
115 #    An e-mail address for the local Privoxy adminstrator has
116 #    been specified and is available through the "admin-address"
117 #    symbol
118 #  have-proxy-info:
119 #    A URL for online documentation about this proxy has been
120 #    specified and is available through the "proxy-info-url"
121 #    symbol
122 #  have-help-info:
123 #    If either have-proxy-info is true or have-adminaddr-info is
124 #    true, have-help-info is true.  Used to conditionally include
125 #    a grey box for any and all help info.
126 #  url-given:
127 #    The CGI was called with a url parameter. In that case, the
128 #    following symbols are available:
129 #    url:
130 #      The given URL
131 #    default:
132 #      The system default for actions
133 #    matches:
134 #      The list of all matches in the actions file that this URL
135 #      produced, along with the actions that were triggered by
136 #      these matches
137 #    final:
138 #      The actions that are associated with the URL at the end of
139 #      the matching process
140 #  no-forwarder: Requests to url will be made directly.
141 #  http-forwarder:
142 #      Requests to url will be made through a HTTP proxy
143 #      forward-host:
144 #         The IP address or its hostname
145 #      forward-port.
146 #         The proxy port
147 #  socks-forwarder:
148 #      Requests to url will be made through a socks proxy
149 #      socks-type:
150 #         The socks type: socks4 or socks4a
151 #      gateway-host:
152 #         The IP address or its hostname
153 #      gateway-port:
154 #         The proxy port.
155 #
156 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
157 <html>
158
159 <head>
160   <title>Privoxy@@my-hostname@ URL Info</title>
161   <meta http-equiv="Content-Style-Type" content="text/css">
162   <meta http-equiv="Content-Script-Type" content="text/javascript">
163   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
164   <meta name="robots" content="noindex,nofollow">
165   <link rel="stylesheet" type="text/css" href="@default-cgi@send-stylesheet">
166   <link rel="shortcut icon" href="@default-cgi@favicon.ico" type="image/x-icon">
167   <link rel="search" type="application/opensearchdescription+xml" title="Privoxy URL Info" href="/url-info-osd.xml">
168 </head>
169
170 <body>
171
172   <table summary="" cellpadding="20" cellspacing="10" border="0" width="100%">
173     <tr>
174       <td class="title">
175
176 #include mod-title
177
178       </td>
179     </tr>
180
181 <!-- @if-unstable-start -->
182 # This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in
183     <tr>
184       <td class="warning">
185
186 #include mod-unstable-warning
187
188       </td>
189     </tr>
190 <!-- if-unstable-end@ -->
191
192 <!-- @if-url-given-start -->
193     <tr>
194       <td class="box">
195 <!-- @if-valid-url-start -->
196         <h2>Forwarding settings:</h2>
197         <p>
198           Requests for <a href="@url@">@url@</a> will be <!--
199
200 # "Interesting" formatting to prevent white space at the end of the sentence.
201
202           @if-no-forwarder-start -->
203
204              made <b>directly</b>, no forwarding settings apply<!--
205
206           if-no-forwarder-end@--><!--
207           @if-http-forwarder-start --><!-- @if-socks-forwarder-start -->
208
209              first <!--
210
211           if-socks-forwarder-end@ --><!-- if-http-forwarder-end@ --><!--
212           @if-socks-forwarder-start -->
213
214              forwarded through <b>@socks-type@-proxy @gateway-host@:@gateway-port@</b><!--
215
216           if-socks-forwarder-end@ --><!--
217           @if-http-forwarder-start --><!-- @if-socks-forwarder-start -->
218
219              and then <!--
220
221           if-socks-forwarder-end@ --><!-- if-http-forwarder-end@ --><!--
222           @if-http-forwarder-start -->
223
224              forwarded through <b>HTTP-proxy @forward-host@:@forward-port@</b><!--
225
226           if-http-forwarder-end@ -->.
227       </td>
228     </tr>
229     <tr>
230       <td class="box">
231 <!-- @if-https-start -->
232         <h2>NOTE:</h2>
233         <p>This is a HTTPS URL, so the part after the "/" is ignored
234           as Privoxy doesn't see the path for real HTTPS requests either.</p>
235 <!-- if-https-end@ -->
236 <!-- if-valid-url-end@ -->
237         <h2>Matches for <a href="@url@">@url@</a>:</h2>
238         @matches@
239 <!-- @if-valid-url-start -->
240 <!-- @if-cgi-editor-is-disabled-start -->
241         <p>
242           The CGI editor is currently disabled, thus no edit buttons are shown.<br>
243           Please have a look at the
244            <a href="@user-manual@config.html#ENABLE-EDIT-ACTIONS">enable-edit-actions documentation</a>
245           to learn how to enable it and what the risks are.
246         </p>
247 <!--  if-cgi-editor-is-disabled-end@ -->
248 <!-- @if-valid-url-end -->
249       </td>
250     </tr>
251 <!-- @if-valid-url-start -->
252 <!-- @if-filters-might-be-ineffective-start -->
253     <tr>
254       <td class="warning">
255         <h2>Warning:</h2>
256         <p>
257           This Privoxy version has been build without zlib support,
258           <strong>content filters will not work if the server sends compressed content.</strong>
259           Consider enabling the <a title="prevent-compression documentation"
260            href="@user-manual@actions-file.html#PREVENT-COMPRESSION">prevent-compression</a>
261           action for this URL or rebuild Privoxy with zlib support.
262         </p>
263       </td>
264     </tr>
265 <!-- if-filters-might-be-ineffective-end@ -->
266     <tr>
267       <td class="box">
268         <h2>Final results:</h2>
269         <b>@final@</b>
270       </td>
271     </tr>
272 <!-- if-valid-url-end@ -->
273 <!-- if-url-given-end@ -->
274
275 <!-- @if-privoxy-is-toggled-off-start -->
276
277     <tr>
278       <td class="warning">
279         <h2>Warning:</h2>
280         <p>
281           <strong>Privoxy is currently toggled off. Matching actions will not apply
282           unless you <a href="@default-cgi@toggle?set=enable">toggle Privoxy on</a> first.</strong>
283         </p>
284       </td>
285     </tr>
286 <!-- if-privoxy-is-toggled-off-end@ -->
287
288     <tr>
289       <td class="box">
290         <h2>Look up the actions for a 
291 <!-- @if-url-given-start -->new<!-- if-url-given-end@ -->
292           URL:</h2>
293         <form method="GET" action="@default-cgi@show-url-info">
294           <p>
295             <input type="text" name="url" size="80" value="@url@" class="url"> 
296             <input type="submit" value="Go">
297           </p>
298         </form>
299       </td>
300     </tr>
301
302     <tr>
303       <td class="box">
304         <h2>More Privoxy:</h2>
305         <ul>@menu@<li><a href="@user-manual@">Documentation</a></li></ul>
306       </td>
307     </tr>
308
309     <tr>
310       <td class="info">
311
312 #include mod-support-and-service
313
314       </td>
315     </tr>
316
317 <!-- @if-have-help-info-start -->
318     <tr>
319       <td class="info">
320
321 #include mod-local-help
322
323       </td>
324     </tr>
325 <!-- if-have-help-info-end@ -->
326
327   </table>
328
329 </body>
330 </html>