remove FlashPlayer control javascript file
[brisk.git] / web / Obj / singlemsg.phh
1 <?php
2 /*
3  *  brisk - singlemsg.php
4  *
5  *  Copyright (C) 2014      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
33 $mlang_singlemsg = array( 'headline'     => array('it' => 'briscola chiamata in salsa ajax',
34                                               'en' => 'declaration briscola in ajax sauce <b>(Beta)</b>'),
35                       '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.',
36                                               'en' => 'EN E\' occorso qualche problema sul server.<br>Questa pagina proverà automaticamente a riconnettersi tra qualche istante.<br>Ci dispiace per il disagio.' ) );
37
38 function singlemsg($title, $msg, $redir_url=FALSE) {
39     GLOBAL $mlang_singlemsg, $G_is_local, $G_lang, $_SERVER;
40
41     $host  = $_SERVER['HTTP_HOST'];
42     $uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
43
44     mt_srand(make_seed());
45     if ($redir_url) {
46         // $redir_url = "http://$host$uri/";
47         $redir_rnd = rand(15, 25);
48         $redir_meta = sprintf('<META HTTP-EQUIV="refresh" CONTENT="%d;URL=\'%s\'">', $redir_rnd, $redir_url);
49     }
50     else {
51         $redir_meta = "";
52     }
53 ?>
54 <html>
55 <head>
56      <title><?php echo $title; ?></title>
57 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
58 <?php echo "$redir_meta\n"?>
59 <link rel="shortcut icon" href="img/brisk_ico.png">
60 <script type="text/javascript" src="commons.js"></script>
61 <script type="text/javascript" src="prefs.js"></script>
62 <!-- <script type="text/javascript" src="myconsole.js"></script> -->
63 <script type="text/javascript" src="menu.js"></script>
64 <script type="text/javascript" src="heartbit.js"></script>
65 <script type="text/javascript" src="xynt-streaming.js"></script>
66 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
67 <script type="text/javascript" src="room.js"></script>
68 <script type="text/javascript" src="md5.js"></script>
69 <script type="text/javascript" src="probrowser.js"></script>
70 <script type="text/javascript" src="json2.js"></script>
71 <link rel="stylesheet" type="text/css" href="brisk.css">
72 <link rel="stylesheet" type="text/css" href="room.css">
73 </head>
74      <body style="/*background-image: url('img/saddysunbg.png');*/">
75 <?php
76   /* MLANG: "briscola chiamata in salsa ajax", */
77
78   mt_srand(make_seed());
79   if (!$G_is_local) {
80       $rn = rand(0, 1);
81
82       if ($rn == 0) {
83           $banner_top_left = '<script type="text/javascript"><!--
84 google_ad_client = "pub-5246925322544303";
85 google_ad_width = 234;
86 google_ad_height = 60;
87 google_ad_format = "234x60_as";
88 google_ad_type = "text_image";
89 google_ad_channel = "";
90 google_color_border = "808080";
91 google_color_bg = "f6f6f6";
92 google_color_link = "ffae00";
93 google_color_text = "404040";
94 google_color_url = "000000";
95 //-->
96 </script>
97 <script type="text/javascript"
98   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
99 </script>';
100           $banner_top_right = carousel_top();
101       }
102       else {
103           $banner_top_left = carousel_top();
104           $banner_top_right = '<script type="text/javascript"><!--
105 google_ad_client = "pub-5246925322544303";
106 google_ad_width = 234;
107 google_ad_height = 60;
108 google_ad_format = "234x60_as";
109 google_ad_type = "text_image";
110 google_ad_channel = "";
111 google_color_border = "808080";
112 google_color_bg = "f6f6f6";
113 google_color_link = "ffae00";
114 google_color_text = "404040";
115 google_color_url = "000000";
116 //-->
117 </script>
118 <script type="text/javascript"
119   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
120 </script>';
121       }
122   }
123   else { // !$G_is_local
124       $banner_top_left  = carousel_top();
125       $banner_top_right = carousel_top();
126   }
127
128   $brisk_header_form = '<div class="container">
129 <!-- =========== header ===========  -->
130 <div id="header" class="header">
131 <table width="100%%" border="0" cols="3"><tr>
132 <td align="left"><div style="padding-left: 8px;">'.$banner_top_left.'</div></td>
133 <td align="center"><div style="text-align: center;">
134     <img class="nobo" src="img/brisk_logo64.png">
135     '.$mlang_singlemsg['headline'][$G_lang].'<br>
136     </div></td>
137 <td align="right"><div style="padding-right: 8px;">
138 '.$banner_top_right.'</div></td>
139 </tr></table>
140 </div>';
141
142     printf($brisk_header_form);
143 ?>
144
145 <div style="text-align: center; font-size: 24px; height: 600px;">
146      <div style="height: 200px;"></div>
147      <?php echo $msg; ?>
148 </div>
149
150 <div id="imgct"></div>
151 <div id="logz"></div>
152 <div id="sandbox"></div>
153 <div id="sandbox2"></div>
154 <div id="response"></div>
155 <div id="xhrstart"></div>
156 <pre>
157 <div id="xhrlog"></div>
158 </pre>
159 <div id="xhrdeltalog"></div>
160 </body>
161 </html>
162 <?php
163      }
164
165
166 // singlemsg("Ci siamo title", "Ci siamo");
167
168 ?>