add multi-rules management
[brisk.git] / web / error.php
1 <?php
2 /*
3  *  brisk - error.php
4  *
5  *  Copyright (C) 2014-2015 Matteo Nastasi
6  *                          mailto: nastasi@alternativeoutput.it 
7  *                                  matteo.nastasi@milug.org
8  *                          web: http://www.alternativeoutput.it
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * General Public License for more details. You should have received a
19  * copy of the GNU General Public License along with this program; if
20  * not, write to the Free Software Foundation, Inc, 59 Temple Place -
21  * Suite 330, Boston, MA 02111-1307, USA.
22  *
23  */
24
25 $G_base = "";
26
27 require_once("Obj/brisk.phh");
28 require_once("Obj/user.phh");
29 require_once("Obj/auth.phh");
30 require_once("Obj/dbase_${G_dbasetype}.phh");
31
32 $mlang_error = array( 'headline'     => array('it' => 'briscola chiamata in salsa ajax',
33                                               'en' => 'declaration briscola in ajax sauce <b>(Beta)</b>'),
34                       'content'      => array('it' => 'C\'è qualche problema sul server.<br><br>Tra qualche istante questa pagina proverà a riconnettersi automaticamente.<br><br>Ci dispiace del disagio.',
35                                               'en' => 'EN E\' occorso qualche problema sul server.<br>Questa pagina proverà automaticamente a riconnettersi tra qualche istante.<br>Ci dispiace per il disagio.' ) );
36
37 $host  = $_SERVER['HTTP_HOST'];
38 $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
39 $redir_url = "http://$host$uri/";
40
41 mt_srand(make_seed());
42 $redir_rnd = rand(15, 25);
43 $redir_meta = sprintf('<META HTTP-EQUIV="refresh" CONTENT="%d;URL=\'%s\'">', $redir_rnd, $redir_url);
44 ?>
45 <html>
46 <head>
47 <title>Brisk: errore!</title>
48 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
49 <?php echo "$redir_meta\n"?>
50 <link rel="shortcut icon" href="img/brisk_ico.png">
51 <script type="text/javascript" src="commons.js"></script> 
52 <script type="text/javascript" src="prefs.js"></script>
53 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
54 <script type="text/javascript" src="menu.js"></script>
55 <script type="text/javascript" src="heartbit.js"></script>
56 <script type="text/javascript" src="xynt-streaming.js"></script>
57 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
58 <script type="text/javascript" src="AC_OETags.js"></script>
59 <script type="text/javascript" src="room.js"></script>
60 <script type="text/javascript" src="md5.js"></script>
61 <script type="text/javascript" src="probrowser.js"></script>
62 <script type="text/javascript" src="json2.js"></script>
63 <link rel="stylesheet" type="text/css" href="brisk.css">
64 <link rel="stylesheet" type="text/css" href="room.css">
65 </head>
66 <body style="background-image: url('img/saddysunbg.png');">
67 <?php
68 /* MLANG: "briscola chiamata in salsa ajax", */
69
70 mt_srand(make_seed());
71 if (!$G_is_local) {
72     $rn = rand(0, 1);
73
74     if ($rn == 0) { 
75         $banner_top_left = '<script type="text/javascript"><!--
76 google_ad_client = "pub-5246925322544303";
77 google_ad_width = 234;
78 google_ad_height = 60;
79 google_ad_format = "234x60_as";
80 google_ad_type = "text_image";
81 google_ad_channel = "";
82 google_color_border = "808080";
83 google_color_bg = "f6f6f6";
84 google_color_link = "ffae00";
85 google_color_text = "404040";
86 google_color_url = "000000";
87 //-->
88 </script>
89 <script type="text/javascript"
90   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
91 </script>';
92         $banner_top_right = carousel_top();
93     }
94     else { 
95         $banner_top_left = carousel_top();
96         $banner_top_right = '<script type="text/javascript"><!--
97 google_ad_client = "pub-5246925322544303";
98 google_ad_width = 234;
99 google_ad_height = 60;
100 google_ad_format = "234x60_as";
101 google_ad_type = "text_image";
102 google_ad_channel = "";
103 google_color_border = "808080";
104 google_color_bg = "f6f6f6";
105 google_color_link = "ffae00";
106 google_color_text = "404040";
107 google_color_url = "000000";
108 //-->
109 </script>
110 <script type="text/javascript"
111   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
112 </script>';
113     }
114 }
115 else { // !$G_is_local
116     $banner_top_left  = carousel_top();
117     $banner_top_right = carousel_top();
118 }
119
120 $brisk_header_form = '<div class="container">
121 <!-- =========== header ===========  -->
122 <div id="header" class="header">
123 <table width="100%%" border="0" cols="3"><tr>
124 <td align="left"><div style="padding-left: 8px;">'.$banner_top_left.'</div></td>
125 <td align="center"><div style="text-align: center;">
126     <img class="nobo" src="img/brisk_logo64.png">
127     '.$mlang_error['headline'][$G_lang].'<br>
128     </div></td>
129 <td align="right"><div style="padding-right: 8px;">
130 '.$banner_top_right.'</div></td>
131 </tr></table>
132 </div>';
133
134 printf($brisk_header_form);
135 ?> 
136
137 <div style="text-align: center; font-size: 18px; height: 600px;">
138     <div style="height: 200px;"></div>
139     <?php echo $mlang_error['content'][$G_lang]; ?>
140 </div>
141
142 <div id="imgct"></div>
143 <div id="logz"></div>
144 <div id="sandbox"></div>
145 <div id="sandbox2"></div>
146 <div id="response"></div>
147 <div id="xhrstart"></div>
148 <pre>
149 <div id="xhrlog"></div>
150 </pre>
151 <div id="xhrdeltalog"></div>
152 </body>
153 </html>