f4fc60fcdda45992d2577b5afc25f640711beadb
[brisk.git] / web / briskin5 / index.php
1 <?php
2 /*
3  *  brisk - briskin5/index.php
4  *
5  *  Copyright (C) 2006-2011 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 /* MLANG: le img dell'asta */
26
27 $G_base = "../";
28
29 require_once("../Obj/brisk.phh");
30 require_once("../Obj/proxyscan.phh");
31 require_once("Obj/briskin5.phh");
32
33 $mlang_bin5_index = array( 'aucwin' => array( 'it' => 'Hai vinto l\'asta.<br> Scegli il seme:',
34                                               'en' => 'You win the auction.<br> Choose the seed:' ),
35                            'tit_pref'=>array( 'it' => 'Preferenze.',
36                                               'en' => 'Preferences.'),
37                            'itm_ringauc' => array('it' => 'riproduci un suono di notifica alla fine dell\' asta',
38                                                   'en' => 'play a sound at the end of the auction'),
39                            'btn_update'  => array('it' => 'Aggiorna.',
40                                                   'en' => 'Update.' )
41                            );
42
43
44 function bin5_index_main(&$header_out, $addr, $get, $post, $cookie)
45 {
46     GLOBAL $G_lang, $mlang_bin5_index;
47     if (($table_idx = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
48         unset ($table_idx);
49     if (($laststate = gpcs_var('laststate', $get, $post, $cookie)) === FALSE)
50         unset ($laststate);
51     if (($sess = gpcs_var('sess', $get, $post, $cookie)) === FALSE)
52         unset ($sess);
53
54     // Use of proxies isn't allowed.
55     // if (is_proxy()) {
56     // return (FALSE);
57     // }
58     
59 // header('Content-type: text/html; charset="utf-8"',true);
60     ?>
61 <html>
62 <head>
63 <title>Brisk - Tavolo <?php echo "$table_idx";?></title>
64 <link rel="shortcut icon" href="../img/brisk_ico.png">
65 <script type="text/javascript" src="../commons.js"></script> 
66 <script type="text/javascript" src="../heartbit.js"></script>
67 <script type="text/javascript" src="../xynt-http-streaming.js"></script>
68 <script type="text/javascript" src="dnd.js"></script>
69 <script type="text/javascript" src="dom-drag.js"></script>
70 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
71 <script type="text/javascript" src="briskin5.js"></script>
72 <script type="text/javascript" src="../AC_OETags.js"></script>
73 <link rel="stylesheet" type="text/css" href="../brisk.css">
74 <link rel="stylesheet" type="text/css" href="briskin5.css">
75 </head>
76 <body>
77 <SCRIPT type="text/javascript">
78    var sess = "not_connected";
79    var hstm = null;
80    var g_lang = "<?php echo "$G_lang"; ?>";
81    var stat = "table";
82    var subst = "none";
83    var table_pos = "";
84    var g_withflash = false;
85
86    var asta_ptr;
87    var area_ptr;
88
89    var gst  = new globst();
90    gst.st = <?php 
91        log_load("bin5/index.php");
92
93    if (isset($laststate) == false) {
94        $laststate = -1;
95    }
96    echo $laststate;
97    ?>;
98 var g_is_spawn=1;
99 // var g_table_idx=<?php echo "$table_idx";?>;
100
101 var g_imgct= 0;
102 var g_imgtot = g_preload_img_arr.length;
103 var g_exitlock = 0;
104
105 window.onload = function() {
106   g_withflash = DetectFlashVer(6,0,0);
107   remark_off();
108
109   preferences_init();
110   preferences_update();
111
112   sess = "<?php echo "$sess"; ?>";
113   hstm = new http_streaming(window, console, gst, 'table_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
114   hstm.hbit_set(heartbit);
115   
116   window.onbeforeunload = onbeforeunload_cb;  
117   window.onunload = onunload_cb;  
118
119   hstm.start(); 
120   setTimeout(preload_images, 0, g_preload_img_arr, g_imgct); 
121 }
122 </SCRIPT>
123 <div id="bg" class="area">
124
125 <div id="remark" class="remark0"></div>
126 <img id="card0" src="img/00.png" class="card">
127 <img id="card1" src="img/01.png" class="card">
128 <img id="card2" src="img/02.png" class="card">
129 <img id="card3" src="img/03.png" class="card">
130 <img id="card4" src="img/04.png" class="card">
131 <img id="card5" src="img/05.png" class="card">
132 <img id="card6" src="img/06.png" class="card">
133 <img id="card7" src="img/07.png" class="card">
134 <img id="takes" src="img/cover.png" class="cover">
135 <img id="card_ne0" src="img/cover.png" class="cover">
136 <img id="card_ne1" src="img/cover.png" class="cover">
137 <img id="card_ne2" src="img/cover.png" class="cover">
138 <img id="card_ne3" src="img/cover.png" class="cover">
139 <img id="card_ne4" src="img/cover.png" class="cover">
140 <img id="card_ne5" src="img/cover.png" class="cover">
141 <img id="card_ne6" src="img/cover.png" class="cover">
142 <img id="card_ne7" src="img/cover.png" class="cover">
143 <img id="takes_ne" src="img/cover.png" class="cover">
144 <img id="card_nw0" src="img/cover.png" class="cover">
145 <img id="card_nw1" src="img/cover.png" class="cover">
146 <img id="card_nw2" src="img/cover.png" class="cover">
147 <img id="card_nw3" src="img/cover.png" class="cover">
148 <img id="card_nw4" src="img/cover.png" class="cover">
149 <img id="card_nw5" src="img/cover.png" class="cover">
150 <img id="card_nw6" src="img/cover.png" class="cover">
151 <img id="card_nw7" src="img/cover.png" class="cover">
152 <img id="takes_nw" src="img/cover.png" class="cover">
153 <img id="card_ea0" src="img/cover_ea.png" class="cover">
154 <img id="card_ea1" src="img/cover_ea.png" class="cover">
155 <img id="card_ea2" src="img/cover_ea.png" class="cover">
156 <img id="card_ea3" src="img/cover_ea.png" class="cover">
157 <img id="card_ea4" src="img/cover_ea.png" class="cover">
158 <img id="card_ea5" src="img/cover_ea.png" class="cover">
159 <img id="card_ea6" src="img/cover_ea.png" class="cover">
160 <img id="card_ea7" src="img/cover_ea.png" class="cover">
161 <img id="takes_ea" src="img/cover_ea.png" class="cover">
162 <img id="card_we0" src="img/cover_we.png" class="cover">
163 <img id="card_we1" src="img/cover_we.png" class="cover">
164 <img id="card_we2" src="img/cover_we.png" class="cover">
165 <img id="card_we3" src="img/cover_we.png" class="cover">
166 <img id="card_we4" src="img/cover_we.png" class="cover">
167 <img id="card_we5" src="img/cover_we.png" class="cover">
168 <img id="card_we6" src="img/cover_we.png" class="cover">
169 <img id="card_we7" src="img/cover_we.png" class="cover">
170 <img id="takes_we" src="img/cover_we.png" class="cover">
171 <div id="asta" class="asta">
172   <img id="asta0" src="img/asta0.png" class="astacard">
173   <img id="asta1" src="img/asta1.png" class="astacard">
174   <img id="asta2" src="img/asta2.png" class="astacard">
175   <img id="asta3" src="img/asta3.png" class="astacard">
176   <img id="asta4" src="img/asta4.png" class="astacard">
177   <img id="asta5" src="img/asta5.png" class="astacard">
178   <img id="asta6" src="img/asta6.png" class="astacard">
179   <img id="asta7" src="img/asta7.png" class="astacard">
180   <img id="asta8" src="img/asta8.png" class="astacard">
181   <img id="asta9" src="img/asta9.png" class="astacard">
182   <div id="astaptdiv" class="punti">
183     <input class="puntifield" id="astapt" name="astapt" type="text" maxsize="3" size="3" value="61"> 
184   </div>
185   <img  id="astaptsub" src="img/astaptsub_ro.png" class="astacard">
186   <img  id="astapasso" src="img/astapasso_ro.png" class="astacard"> 
187   <img  id="astalascio" src="img/astalascio_ro.png" class="astacard"> 
188 </div>
189 <div id="name" class="pubinfo"></div>
190 <div id="public" class="public">
191    <div class="vert_midfloat">
192        <div id="pubasta" class="vert_innfloat_so">
193            <img id="pubacard" src="img/astapasso_ro.png" class="pubacard"> 
194            <div id="pubapnt"></div>
195        </div>
196    </div>
197 </div>
198 <div id="name_ea" class="pubinfo_ea"></div>
199 <div id="public_ea" class="public_ea">
200    <div class="vert_midfloat">
201       <div id="pubasta_ea" class="vert_innfloat">
202          <img id="pubacard_ea" src="img/astapasso_ro.png" class="pubacard_ea">  
203          <div id="pubapnt_ea"></div>
204       </div>
205    </div>
206 </div>
207 <div id="name_ne" class="pubinfo_ne"></div>
208 <div id="public_ne" class="public_ne">
209    <div class="vert_midfloat">
210       <div id="pubasta_ne" class="vert_innfloat">
211          <img id="pubacard_ne" src="img/astapasso_ro.png" class="pubacard_ne">  
212          <div id="pubapnt_ne"></div>
213       </div>
214    </div>
215 </div>
216 <div id="name_nw" class="pubinfo_nw"></div>
217 <div id="public_nw" class="public_nw">
218    <div class="vert_midfloat">
219       <div id="pubasta_nw" class="vert_innfloat">
220          <img id="pubacard_nw" src="img/astapasso_ro.png" class="pubacard_nw">  
221          <div id="pubapnt_nw"></div>
222       </div>
223    </div>
224 </div>
225 <div id="name_we" class="pubinfo_we"></div>
226 <div id="public_we" class="public_we">
227    <div class="vert_midfloat">
228       <div id="pubasta_we" class="vert_innfloat">
229          <img id="pubacard_we" src="img/astapasso_ro.png" class="pubacard_we">  
230          <div id="pubapnt_we"></div>
231       </div>
232    </div>
233 </div>
234 <div id="chooseed" class="chooseed">
235                            <?php echo $mlang_bin5_index['aucwin'][$G_lang]; ?>
236 <img id="seed0" src="img/00.png" class="seed0">
237 <img id="seed1" src="img/10.png" class="seed1">
238 <img id="seed2" src="img/20.png" class="seed2">
239 <img id="seed3" src="img/30.png" class="seed3">
240 </div>
241 <div id="caller" class="caller">
242 <div id="callerinfo" class="callerinfo">Info</div>
243 <img id="callerimg" src="img/noimg.png" class="callerimg">
244 </div>
245 <div class="table_commands">
246 <table>
247 <tr>
248 <td style="text-align: center;"><input type="button" class="button" name="xinfo"  value="Info." onclick="act_tableinfo();"></td>
249 <td style="text-align: center;"><input type="button" class="button" name="xreload"  value="Reload." onclick="act_reload();"></td>
250 <td style="text-align: center;"><input type="button" class="button" name="xout"  value="Out." onclick="safelogout();"></td>
251 </tr><tr>
252 <td style="text-align: center;" colspan="2"><input type="button" class="button" name="xpref"  value="<?php echo $mlang_bin5_index['tit_pref'][$G_lang]; ?>" onclick="preferences_showhide();"></td>
253 <td style="text-align: center;"><img id="exitlock" class="button" style="visibility: hidden; border: 0px; display: inline; position: relative;" onclick="act_exitlock();"></td>
254 </tr>
255 </table>
256 </div>
257 <!--
258 <div class="table_commands">
259 <input type="button" class="button" name="xinfo"  value="Info." onclick="act_tableinfo();">
260 <input type="button" class="button" name="xreload"  value="Reload." onclick="act_reload();">
261 <div style="vertical-align: top;">
262 <img id="exitlock" class="button" style="visibility: hidden; border: 0px; display: inline; position: relative;" onclick="act_exitlock();"><input type="button" class="button" name="xout"  value="Out." onclick="safelogout();">
263 </div>
264 </div>
265 -->
266
267 </div>
268
269
270 <div class="subarea">
271 <div id="txt" class="chattshort"></div>
272     <table class="chattshort_table"><tr><td style="width:1%; text-align: right;">
273     <div id="myname"></div>
274     </td><td>
275     <input id="txt_in" maxlength="128" type="text" style="width: 100%;" onkeypress="chatt_checksend(this,event);">
276     </td></tr></table>
277
278 <div id="flasou" style="text-align: left;"></div>
279 <hr>
280 <div id="heartbit" style="text-align: left;"></div>
281 <hr>
282 <div id="imgct" style="text-align: left;">HERE</div>
283 <hr>
284 <div id="sandbox" style="text-align: left;"></div>
285 <div id="sandbox2" style="text-align: left;"></div>
286 <div id="sandbox3" style="text-align: left;"></div>
287 <pre>
288 <div id="xhrlog" style="text-align: left;"></div>
289 </pre>
290 <div id="xhrdeltalog" style="text-align: left;"></div>
291 </div>
292
293 <div id="preferences" class="notify" style="z-index: 200; width: 400px; margin-left: -200px; height: 200px; top: 126px; visibility: hidden;">
294 <div id="preferences_child" style="border-bottom: 1px solid gray; overflow: auto; height: 170px;">
295
296 <h2><?php echo $mlang_bin5_index['tit_pref'][$G_lang]; ?></h2>
297 <div style="width: 95%; /* background-color: red; */ margin: auto; text-align: left;">
298 <br><br>
299 <input type="checkbox" name="pref_ring_endauct" id="pref_ring_endauct" onclick="pref_ring_endauct_set(this);"><?php echo $mlang_bin5_index['itm_ringauc'][$G_lang] ?>
300 </div>
301
302
303 </div>
304 <div class="notify_clo"><input type="submit" class="input_sub" style="bottom: 4px;" onclick="act_preferences_update();" value="<?php echo $mlang_bin5_index['btn_update'][$G_lang]; ?>"/></div>
305 </div>
306
307
308 </body>
309 </html>
310 <?php
311 }
312 ?>