- Add favicon link.
[privoxy.git] / templates / blocked
1 ##########################################################
2 #
3 # "Blocked" Error Output template for Privoxy.
4 #
5 #  NOTE: UNLIKE THE OTHER TEMPLATES, THIS ONE USES
6 #  JavaScript write() TO GENERATE THE PAGE IN JS_AWARE
7 #  BROWSERS. SYMBOL SUBSTITUTIONS THAT RESULT IN MULTILINE
8 #  STRINGS WILL BREAK THE JavaScript SYNTAX.
9 #  USE WITH CAUTION.
10 #
11 # USING HTML TEMPLATES:
12 # ---------------------
13 #
14 # Template files are written in plain HTML, with a few
15 # additions:
16
17 # - Lines that start with a '#' character like this one
18 #   are ignored
19 #
20 # - Each item in the below list of exported symbols will
21 #   be replaced by dynamically generated text, if they
22 #   are enclosed in '@'-characters. E.g. The string @version@
23 #   will be replaced by the version number of Privoxy.
24 #
25 # - One special application of this is to make whole blocks
26 #   of the HTML template disappear if the condition <name>
27 #   is not given. Simply enclose the block between the two
28 #   strings @if-<name>start and if-<name>-end@. The strings
29 #   should be placed in HTML comments (<!-- -->), so the
30 #   html structure won't be messed when the magic happens.
31 #   
32 # USABLE SYMBOLS IN THIS TEMPLATE:
33 # --------------------------------
34 #
35 #  my-ip-addr:
36 #    The IP-address that the client used to reach this proxy
37 #  my-hostname:
38 #    The hostname associated with my-ip-addr
39 #  admin-address:
40 #    The email address of the pxoxy's administrator, as configured
41 #    in the config file
42 #  default-cgi:
43 #    The URL for the "main menu" builtin CGI of this proxy
44 #  menu:
45 #    List of <li> elements linking to the other available CGIs
46 #  version:
47 #    The version number of the proxy software
48 #  code-status:
49 #    The development status of the proxy software: "alpha", "beta",
50 #    or "stable".
51 #  homepage:
52 #    The URL of the SourceForge ijbswa project, who maintains this
53 #    software.
54 #
55 #  protocol:
56 #    The request's protocol: http:// or https://
57 #  hostport:
58 #    The host and port part of the blocked request's URL.
59 #  path:
60 #    The path part of the blocked request's URL.
61 #  path-ue:
62 #    The path part of the blocked request's URL, url-encoded.
63 #
64 #
65 # CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
66 # ------------------------------------------------------------------
67 #
68 #  unstable:
69 #    This is an alpha or beta release of the proxy software
70 #  have-adminaddr-info:
71 #    An e-mail address for the local Privoxy adminstrator has
72 #    been specified and is available through the "admin-address"
73 #    symbol
74 #  have-proxy-info:
75 #    A URL for online documentation about this proxy has been
76 #    specified and is available through the "proxy-info-url"
77 #    symbol
78 #  have-help-info:
79 #    If either have-proxy-info is true or have-adminaddr-info is
80 #    true, have-help-info is true.  Used to conditionally include
81 #    a grey box for any and all help info.
82 #  force-support:
83 #    Privoxy has been compiled with support for forced loading
84 #    of blocked content. In that case, the symbol "force-prefix" is
85 #    avaiable, which translates to the FORCE_PREFIX  
86 #
87 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
88 <html>
89  <head>
90   <title>Request blocked (Privoxy@@my-hostname@)</title>
91   <meta http-equiv="Content-Style-Type" content="text/css">
92   <meta http-equiv="Content-Script-Type" content="text/javascript">
93   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
94   <meta name="robots" content="noindex,nofollow">
95   <link rel="shortcut icon" href="@default-cgi@error-favicon.ico" type="image/x-icon">
96   <style type="text/css">
97 #include cgi-style.css
98   </style>
99   <script type="text/javascript" language="javascript">
100   <!--
101     /*
102      * Is this window or frame too small
103      * for the full-blown "blocked" page?
104      */
105     function isSmallFrame()
106     {
107        minWidth  = 650;
108        minHeight = 330;
109
110        /* 
111         * Navigator, Mozilla, Opera
112         */
113        if (window.innerWidth 
114            && (window.innerWidth >= minWidth) 
115            && (window.innerHeight >= minHeight))
116        {
117           return false;
118        }
119  
120        /* 
121         * MSIE
122         */
123        else if (document.body && document.body.clientWidth 
124                 && (document.body.clientWidth >= minWidth)
125                 && (document.body.clientHeight >= minHeight))
126        {
127           return false;
128        }
129
130        /*
131         * Small window or unsupported browser
132         */
133        return true;
134    }
135   //-->
136   </script>
137  </head>
138  <body>
139   <script type="text/javascript" language="javascript">
140   <!--
141 #   Note: The same small version is used at the bottom
142 #         of this file in the <noscript> context. If you
143 #         make changes here, keep the other version in sync!
144
145   if (isSmallFrame())
146   {
147      document.write('\
148    <p class="small" align="center"> \
149     <a href="@default-cgi@" target="_blank">Privoxy</a> blocked <b>@protocol@@hostport@@path@</b>. \
150     <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@" target="_blank">See why</a> \
151     <!-- @if-force-support-start --> \
152     or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
153     <!-- if-force-support-end@ --> \
154    </p> \
155    ');
156
157   }
158   else
159   {
160      document.write('\
161   <table cellpadding="20" cellspacing="10" border="0" width="100%">\
162     <tr> \
163       <td class="status"> \
164         BLOCKED \
165       </td> \
166       <td class="title" width=100%> \
167          <h1> \
168           This is <a href="@homepage@">Privoxy</a> @version@ on @my-hostname@ (@my-ip-address@), port @my-port@, \
169           @if-enabled-display-then@enabled@else-not-enabled-display@disabled@endif-enabled-display@ \
170         </h1> \
171       </td> \
172     </tr> \
173  \
174 <!-- @if-unstable-start --> \
175 # This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in \
176     <tr> \
177       <td class="warning" colspan="2"> \
178         <h2>Warning:</h2> \
179         <p> \
180           <b>Please note that this <font color=red>@code-status@</font> release \
181           of the proxy software is not intended for production systems! \
182           <br>Use at your own risk. See the <a href="http://www.gnu.org/copyleft/gpl.html">license</a> for details.</b> \
183         </p> \
184       </td> \
185     </tr> \
186 <!-- if-unstable-end@ --> \
187  \
188     <tr> \
189       <td class="box" colspan="2"> \
190         <h2>Request for blocked URL</h2> \
191         <p>Your request for <b>@protocol@@hostport@@path@</b> was blocked. \
192           <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@">See why</a> \
193     <!-- @if-force-support-start --> \
194           or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
195 <!-- if-force-support-end@ --> \
196         </p> \
197       </td> \
198     </tr> \
199  \
200     <tr> \
201       <td class="box" colspan="2"> \
202         <h2>More Privoxy:</h2> \
203         <ul>@menu@<li><a href="@user-manual@">Documentation</a></li></ul> \
204       </td> \
205     </tr> \
206  \
207     <tr> \
208       <td class="info" colspan="2"> \
209         <big><b>Support and Service via Sourceforge:</b></big> \
210         <p> \
211           We value your feedback. To provide you with the best support, \
212           we ask that you: \
213         </p> \
214         <ul> \
215           <li> \
216             use the <a href="http://sourceforge.net/tracker/?group_id=11118&amp;atid=211118">support forum</a> or (better) the \
217             <a href="http://sourceforge.net/mail/?group_id=11118">mailing lists</a> to get help. \
218           </li> \
219           <li> \
220             submit banners and all problems with the actions file only through the \
221             <a href="javascript:void(window.open(\'http://www.privoxy.org/actions\',\'Feedback\',\'width=600,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no\').focus());">actions \
222             file feedback system</a>. \
223           </li> \
224           <li> \
225             submit bugs only through our <a href="http://sourceforge.net/tracker/?group_id=11118&amp;atid=111118">bug tracker</a>. \
226             Make sure that the bug has not yet been submitted. \
227           </li> \
228           <li> \
229             submit feature requests only through our <a href="http://sourceforge.net/tracker/?atid=361118&amp;group_id=11118&amp;func=browse">feature \
230             request tracker</a>. \
231           </li> \
232         </ul> \
233       </td> \
234     </tr> \
235  \
236 <!-- @if-have-help-info-start --> \
237     <tr> \
238       <td class="info" colspan="2"> \
239         <h2>Local Privoxy support:</h2> \
240  \
241 <!-- @if-have-proxy-info-start --> \
242         <p>You can consult the <a href="@proxy-info-url@">online documentation</a> for more information about this Privoxy installation.</p> \
243 <!-- if-have-proxy-info-end@ --> \
244  \
245 <!-- @if-have-adminaddr-info-start --> \
246         <p>Address e-mail questions about this service to \
247           <a href="mailto:@admin-address@"><code>@admin-address@</code></a>, \
248           who will be glad to help you. \
249         </p> \
250 <!-- if-have-adminaddr-info-end@ --> \
251       </td> \
252     </tr> \
253 <!-- if-have-help-info-end@ --> \
254  \
255   </table> \
256      ');
257   }
258   //-->
259   </script>
260
261 #   Note: The same small version is used above via JavaScript
262 #         If you make changes here, keep the other version in sync!
263
264   <noscript>
265    <p class="small" align="center">
266     <a href="@default-cgi@" target="_blank">Privoxy</a> blocked <b>@protocol@@hostport@@path@</b>.
267     <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@" target="_blank">See why</a>
268     <!-- @if-force-support-start -->
269     or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>.
270     <!-- if-force-support-end@ -->
271    </p>
272   </noscript>
273
274  </body>
275 </html>