$G_lng = langtolng($G_lang);
$G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$G_brisk_version = "4.0.0";
+$G_brisk_version = "4.1.0";
/* MLANG: ALL THE INFO STRINGS IN brisk.phh */
-$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: adottato sac-a-push come motore per l\'invio dei dati in tempo reale.',
+$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: adottato sac-a-push come motore per l\'invio dei dati in tempo reale, nuovo trasporto httpfile per explorer.',
'Se vuoi iscriverti alla <a target="_blank" href="mailto:ml-briscola+subscribe@milug.org">Mailing List</a>, cliccala!' ),
'en' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NEWS</b>: usage of reader/writer locking instead of generic exclusive locking.',
'If you want to subscribe our <a target="_blank" href="ml-briscola+subscribe@milug.org">Mailing List</a>, click it!' ) );
printf("NEW_SOCKET (root): %d\n", intval($new_socket));
$enc = get_encoding($header);
-
+ if (isset($header['User-Agent']) && strstr($header['User-Agent'], "MSIE")) {
+ $transp_type = "htmlfile";
+ }
+ else {
+ $transp_type = "iframe";
+ }
force_no_cache($header_out);
switch ($path) {
case "":
case "index.php":
ob_start();
- index_main($this, $header_out, $addr, $get, $post, $cookie);
+ index_main($this, $transp_type, $header_out, $addr, $get, $post, $cookie);
$content = ob_get_contents();
ob_end_clean();
$addr = stream_socket_get_name($new_socket, TRUE);
$header_out = array();
- $enc = get_encoding($header);
-
$subs = SITE_PREFIX."briskin5/";
$subs_l = strlen($subs);
$rret = FALSE;
if (!strncmp($path, SITE_PREFIX, SITE_PREFIX_LEN)) {
- $rret = $this->app->request_mgr($this, $enc, $header_out, $new_socket, substr($path, SITE_PREFIX_LEN), $addr, $get, $post, $cookie);
+ $rret = $this->app->request_mgr($this, $header, $header_out, $new_socket, substr($path, SITE_PREFIX_LEN), $addr, $get, $post, $cookie);
}
if ($rret == FALSE) {
// FIXME: manage 404 !!!
printf("NEW_SOCKET (root): %d\n", intval($new_socket));
$enc = get_encoding($header);
+ if (isset($header['User-Agent']) && strstr($header['User-Agent'], "MSIE")) {
+ $transp_type = "htmlfile";
+ }
+ else {
+ $transp_type = "iframe";
+ }
+ force_no_cache($header_out);
if (($table_idx = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
unset($table_idx);
if (($table_token = gpcs_var('table_token', $get, $post, $cookie)) === FALSE)
unset($table_token);
- force_no_cache($header_out);
switch ($path) {
case "":
case "index.php":
ob_start();
- bin5_index_main($header_out, $addr, $get, $post, $cookie);
+ bin5_index_main($transp_type, $header_out, $addr, $get, $post, $cookie);
$content = ob_get_contents();
ob_end_clean();
);
-function bin5_index_main(&$header_out, $addr, $get, $post, $cookie)
+function bin5_index_main($transp_type, &$header_out, $addr, $get, $post, $cookie)
{
GLOBAL $G_lang, $mlang_bin5_index;
if (($table_idx = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
preferences_update();
sess = "<?php echo "$sess"; ?>";
- xstm = new xynt_streaming(window, 'iframe', null /* console */, gst, 'table_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
+ 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.hbit_set(heartbit);
window.onbeforeunload = onbeforeunload_cb;
return (sprintf('<a target="_blank" href="http://shop.alternativeoutput.it"><img class="nobo" style="display: inline; border: 1px solid #808080;" src="img/briskshop%d.gif"></a>', $rn));
}
-function index_main(&$room, &$header_out, $addr, $get, $post, $cookie)
+function index_main(&$room, $transp_type, &$header_out, $addr, $get, $post, $cookie)
{
GLOBAL $G_with_donors, $G_donors_cur, $G_donors_all;
GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local;
unset ($table_idx);
if (($table_token = gpcs_var('table_idx', $get, $post, $cookie)) === FALSE)
unset ($table_token);
-
-
+
// Use of proxies isn't allowed.
if (!$G_is_local && is_proxy($addr)) {
return FALSE;
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="img/brisk_ico.png">
<script type="text/javascript" src="commons.js"></script>
-<!--<script type="text/javascript" src="myconsole.js"></script> -->
+<!-- <script type="text/javascript" src="myconsole.js"></script> -->
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="heartbit.js"></script>
<script type="text/javascript" src="xynt-streaming.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="img/brisk_ico.png">
<script type="text/javascript" src="commons.js"></script>
- <!-- <script type="text/javascript" src="myconsole.js"></script> -->
+<!-- <script type="text/javascript" src="myconsole.js"></script> -->
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="ticker.js"></script>
<script type="text/javascript" src="heartbit.js"></script>
?>
sess = "<?php echo "$sess"; ?>";
-xstm = new xynt_streaming(window, 'iframe', null /* console*/ , gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
+xstm = new xynt_streaming(window, "<?php echo "$transp_type"; ?>", null /* console */, gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
xstm.hbit_set(heartbit);
tra = new train($('room_tit'));
window.onunload = onunload_cb;
// old targetpage == page and moved into start method
+//
+// CLASS transport_htmlfile
+//
+function transport_htmlfile(doc, page)
+{
+ this.doc = doc;
+ this.transfdoc = new ActiveXObject("htmlfile");
+ this.transfdoc.open();
+ /*this.transfdoc.write("<html><head><script>");
+ this.transfdoc.write("document.domain=\""+(doc.domain)+"\";");
+ this.transfdoc.write("</"+"script></"+"head>"); */
+ this.transfdoc.write("<html><body><iframe id='iframe'></iframe></body></html>");
+ this.transfdoc.close();
+
+ this.ifra = this.transfdoc.getElementById("iframe");
+ this.ifra.contentWindow.location.href = page;
+}
+
+transport_htmlfile.prototype = {
+ doc: null,
+ ifra: null,
+ tradoc: null,
+
+ destroy: function () { /* public */
+ if (this.ifra != null) {
+ // this.doc.body.removeChild(this.ifra);
+ // delete this.ifra;
+ this.ifra = null;
+ }
+
+ if (this.transfdoc) {
+ delete this.transfdoc;
+ this.transfdoc = null;
+ }
+ },
+
+ xstr_is_init: function () { /* public */
+ return (typeof(this.ifra.contentWindow.xynt_streaming) != 'undefined');
+ },
+
+ /* only after a successfull is_initialized call */
+ xstr_is_ready: function () { /* public */
+ return (this.ifra.contentWindow.xynt_streaming == "ready");
+ },
+
+ /* only after a successfull is_ready call to be sure the accessibility of the var */
+ xstr_set: function (xynt_streaming) { /* public */
+ this.ifra.contentWindow.xynt_streaming = xynt_streaming;
+ },
+
+ ctx_new_is_set: function () { /* public */
+ return (typeof(this.ifra.contentWindow.ctx_new) != 'undefined');
+ },
+
+ ctx_new_curlen_get: function () { /* public */
+ return (this.ifra.contentWindow.ctx_new.length);
+ },
+
+ ctx_new_getchar: function(idx) { /* public */
+ },
+
+ ctx_old_len_is_set: function () { /* public */
+ return (typeof(this.ifra.contentWindow.ctx_old_len) != 'undefined');
+ },
+
+ ctx_old_len_get: function () { /* public */
+ return (this.ifra.contentWindow.ctx_old_len);
+ },
+
+ ctx_old_len_set: function (len) { /* public */
+ this.ifra.contentWindow.ctx_old_len = len;
+ },
+
+ ctx_old_len_add: function (len) { /* public */
+ this.ifra.contentWindow.ctx_old_len += len;
+ },
+
+ new_part: function () { /* public */
+ return (this.ifra.contentWindow.ctx_new.substr(this.ifra.contentWindow.ctx_old_len));
+ },
+
+ scrcls_set: function (step) { /* public */
+ this.ifra.contentWindow.script_clean = step;
+ }
+}
+
+
+
+//
+// CLASS transport_iframe
+//
function transport_iframe(doc, page)
{
this.doc = doc;
if (this.transp_type == "iframe") {
this.transp = new transport_iframe(this.doc, this.page);
}
+ else if (this.transp_type == "htmlfile") {
+ this.transp = new transport_htmlfile(this.doc, this.page);
+ }
+ else
+ return;
// watchdog setting
this.watchdog_ct = 0;
do {
try{
// if (typeof(this.ifra.contentWindow.xynt_streaming) == 'undefined')
- if (!this.transp.xstr_is_init())
+ if (!this.transp.xstr_is_init()) {
+ this.log("hs::watchdog: xstr_is_init = false");
break;
+ }
}
catch(b) {
+ this.log("hs::watchdog: exception");
break;
}