* brisk - briskin5/index.php
*
* Copyright (C) 2006-2012 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
$G_base = "../";
require_once("../Obj/brisk.phh");
-require_once("../Obj/proxyscan.phh");
require_once("Obj/briskin5.phh");
$mlang_bin5_index = array( 'aucwin' => array( 'it' => 'Hai vinto l\'asta.<br> Scegli il seme:',
);
-function bin5_index_main($transp_type, &$header_out, $addr, $get, $post, $cookie)
+function bin5_index_main($transp_type, $header, &$header_out, $addr, $get, $post, $cookie)
{
GLOBAL $G_lang, $mlang_bin5_index;
+
+ $transp_port = ((array_key_exists("X-Forwarded-Proto", $header) &&
+ $header["X-Forwarded-Proto"] == "https") ? 443 : 80);
+
if (($table_idx = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
unset ($table_idx);
if (($laststate = gpcs_var('laststate', $get, $post, $cookie)) === FALSE)
if (($sess = gpcs_var('sess', $get, $post, $cookie)) === FALSE)
unset ($sess);
- // Use of proxies isn't allowed.
- // if (is_proxy()) {
- // return (FALSE);
- // }
-
+ fprintf(STDERR, "PREF_DECK SET %s", (isset($cookie['CO_bin5_pref_deck']) ? "YES" : "NO"));
+
+ $deck = (isset($cookie['CO_bin5_pref_deck']) ? $cookie['CO_bin5_pref_deck'] : 'xx');
+
// header('Content-type: text/html; charset="utf-8"',true);
?>
<html>
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Brisk - Tavolo <?php echo "$table_idx";?></title>
<link rel="shortcut icon" href="../img/brisk_ico.png">
-<script type="text/javascript" src="../commons.js"></script>
-<script type="text/javascript" src="../heartbit.js"></script>
-<script type="text/javascript" src="../xynt-streaming.js"></script>
-<script type="text/javascript" src="dnd.js"></script>
-<script type="text/javascript" src="dom-drag.js"></script>
-<script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
-<script type="text/javascript" src="briskin5.js"></script>
-<script type="text/javascript" src="../AC_OETags.js"></script>
-<link rel="stylesheet" type="text/css" href="../brisk.css">
-<link rel="stylesheet" type="text/css" href="briskin5.css">
+<script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
+<script type="text/javascript" src="../commons.js?v=<? echo BSK_BUSTING; ?>"></script>
+<script type="text/javascript" src="../heartbit.js?v=<? echo BSK_BUSTING; ?>"></script>
+<script type="text/javascript" src="../xynt-streaming.js?v=<? echo BSK_BUSTING; ?>"></script>
+<script type="text/javascript" src="dnd.js?v=<? echo BSK_BUSTING; ?>"></script>
+<script type="text/javascript" src="dom-drag.js?v=<? echo BSK_BUSTING; ?>"></script>
+<script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js?v=<? echo BSK_BUSTING; ?>"></script>
+<script type="text/javascript" src="briskin5.js?v=<? echo BSK_BUSTING; ?>"></script>
+<link rel="stylesheet" type="text/css" href="../brisk.css?v=<? echo BSK_BUSTING; ?>">
+<link rel="stylesheet" type="text/css" href="briskin5.css?v=<? echo BSK_BUSTING; ?>">
</head>
<body>
<SCRIPT type="text/javascript">
+ var $$ = jQuery.noConflict();
+
+ var myname = null;
var sess = "not_connected";
var xstm = null;
var g_lang = "<?php echo "$G_lang"; ?>";
var stat = "table";
var subst = "none";
var table_pos = "";
- var g_withflash = false;
+ var g_jukebox = null;
+ var g_deck = "<?php echo "$deck"; ?>";
var asta_ptr;
var area_ptr;
var gst = new globst();
- gst.st = <?php
- log_load("bin5/index.php");
+ gst.st = <?php
+ log_load("bin5/index.php");
if (isset($laststate) == false) {
$laststate = -1;
var g_imgtot = g_preload_img_arr.length;
var g_exitlock = 0;
+
window.onload = function() {
- g_withflash = DetectFlashVer(6,0,0);
+ g_jukebox = new jukebox([{'name': 'cow', 'file': 'cow.mp3'},
+ {'name': 'rooster', 'file': 'rooster.mp3'},
+ {'name': 'ringbell', 'file': 'ringbell.mp3'}]);
remark_off();
preferences_init();
preferences_update();
sess = "<?php echo "$sess"; ?>";
- xstm = new xynt_streaming(window, "<?php echo "$transp_type"; ?>", null /* console */, gst, 'table_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
+ xstm = new xynt_streaming(window, <?php printf("\"%s\", %d", $transp_type, $transp_port); ?>, 2, null /* console */, gst, 'table_php', 'sess', sess, $('sandbox'), 'index_rd.php', function(com){eval(com);});
xstm.hbit_set(heartbit);
-
- window.onbeforeunload = onbeforeunload_cb;
- window.onunload = onunload_cb;
+
+ window.onbeforeunload = onbeforeunload_cb;
+ window.onunload = onunload_cb;
xstm.start();
+
+ addEvent($('select_rules'), "change", function() { act_select_rules(this.value); } );
+ addEvent($('select_deck'), "change", function() { act_select_deck(this.value); } );
// FIXME: add this setTimeout(preload_images into data stream to avoid
// race on opened socket
// setTimeout(preload_images, 0, g_preload_img_arr, g_imgct);
<img id="asta8" src="img/asta8.png" class="astacard">
<img id="asta9" src="img/asta9.png" class="astacard">
<div id="astaptdiv" class="punti">
- <input class="puntifield" id="astapt" name="astapt" type="text" maxsize="3" size="3" value="61">
+ <input class="puntifield" id="astapt" name="astapt" type="text" maxsize="3" size="3" value="61">
</div>
<img id="astaptsub" src="img/astaptsub_ro.png" class="astacard">
- <img id="astapasso" src="img/astapasso_ro.png" class="astacard">
- <img id="astalascio" src="img/astalascio_ro.png" class="astacard">
+ <img id="astapasso" src="img/astapasso_ro.png" class="astacard">
+ <img id="astalascio" src="img/astalascio_ro.png" class="astacard">
</div>
<div id="name" class="pubinfo"></div>
<div id="public" class="public">
<div class="vert_midfloat">
<div id="pubasta" class="vert_innfloat_so">
- <img id="pubacard" src="img/astapasso_ro.png" class="pubacard">
+ <img id="pubacard" src="img/astapasso_ro.png" class="pubacard">
<div id="pubapnt"></div>
</div>
</div>
<div id="public_ea" class="public_ea">
<div class="vert_midfloat">
<div id="pubasta_ea" class="vert_innfloat">
- <img id="pubacard_ea" src="img/astapasso_ro.png" class="pubacard_ea">
+ <img id="pubacard_ea" src="img/astapasso_ro.png" class="pubacard_ea">
<div id="pubapnt_ea"></div>
</div>
</div>
<div id="public_ne" class="public_ne">
<div class="vert_midfloat">
<div id="pubasta_ne" class="vert_innfloat">
- <img id="pubacard_ne" src="img/astapasso_ro.png" class="pubacard_ne">
+ <img id="pubacard_ne" src="img/astapasso_ro.png" class="pubacard_ne">
<div id="pubapnt_ne"></div>
</div>
</div>
<div id="public_nw" class="public_nw">
<div class="vert_midfloat">
<div id="pubasta_nw" class="vert_innfloat">
- <img id="pubacard_nw" src="img/astapasso_ro.png" class="pubacard_nw">
+ <img id="pubacard_nw" src="img/astapasso_ro.png" class="pubacard_nw">
<div id="pubapnt_nw"></div>
</div>
</div>
<div id="public_we" class="public_we">
<div class="vert_midfloat">
<div id="pubasta_we" class="vert_innfloat">
- <img id="pubacard_we" src="img/astapasso_ro.png" class="pubacard_we">
+ <img id="pubacard_we" src="img/astapasso_ro.png" class="pubacard_we">
<div id="pubapnt_we"></div>
</div>
</div>
<td style="text-align: center;"><input type="button" class="button" name="xreload" value="<?php echo $mlang_bin5_index['tit_relo'][$G_lang]; ?>" onclick="act_reload();"></td>
<td style="text-align: center;"><input type="button" class="button" name="xout" value="<?php echo $mlang_bin5_index['tit_out'][$G_lang]; ?>" onclick="safelogout();"></td>
</tr><tr>
-<td style="text-align: center;"><img id="stm_stat" class="nobo" src="img/line-status_cb.png"></td>
+<td style="text-align: center;"><img id="stm_stat" class="nobo" src="img/line-status_b.png"></td>
<td style="text-align: center;"><input type="button" class="button" name="xpref" value="<?php echo $mlang_bin5_index['tit_pref'][$G_lang]; ?>" onclick="preferences_showhide();"></td>
</td>
<td style="text-align: center;"><img id="exitlock" class="button" style="visibility: hidden; border: 0px; display: inline; position: relative;" onclick="act_exitlock();"></td>
</div>
<div id="preferences" class="notify" style="z-index: 200; width: 400px; margin-left: -200px; height: 200px; top: 126px; visibility: hidden;">
-<div id="preferences_child" style="border-bottom: 1px solid gray; overflow: auto; height: 170px;">
+<div id="preferences_child" style="border-bottom: 1px solid gray; overflow: auto; height: 170px; text-align: center">
<h2><?php echo $mlang_bin5_index['tit_pref'][$G_lang]; ?></h2>
<div style="width: 95%; /* background-color: red; */ margin: auto; text-align: left;">
-<br><br>
-<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] ?>
-</div>
-
-
+ <div>
+ <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] ?>
+ </div>
+ <div>
+ <label>Regole:</label> <?php dom_select_rules();?>
+ </div>
+ <div>
+ <label>Tipo di carte:</label> <?php dom_select_deck($deck);?>
+ </div>
</div>
<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>
</div>