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