]> mop.ddnsfree.com - git repositories - brisk.git/commitdiff
from html_streaming to xynt_streaming object name
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 13 Nov 2012 06:13:46 +0000 (07:13 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 13 Nov 2012 06:22:23 +0000 (07:22 +0100)
INSTALL.sh
web/Obj/brisk.phh
web/Obj/user.phh
web/briskin5/Obj/briskin5.phh
web/briskin5/index.php
web/briskin5/index_rd.php
web/index.php
web/index_rd.php
web/index_wr.php
web/xynt-streaming-ifra.js [moved from web/xynt-http-streaming-ifra.js with 100% similarity]
web/xynt-streaming.js [moved from web/xynt-http-streaming.js with 95% similarity]

index 3195e3aa9ae39aeed39a5df45a97ea517ec2b5a3..bffa041315558e4e3c1d4212c4c7228b15e1ff6c 100755 (executable)
@@ -334,7 +334,7 @@ sed -i "s@define *( *'BRISK_AUTH_CONF',[^)]*)@define('BRISK_AUTH_CONF', \"$brisk
 
 sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$prefix_path\";@g" ${web_path}__/commons.js
 
-sed -i "s@\( \+cookiepath *: *\)\"[^\"]*\" *,@\1 \"$prefix_path\",@g" ${web_path}__/xynt-http-streaming.js
+sed -i "s@\( \+cookiepath *: *\)\"[^\"]*\" *,@\1 \"$prefix_path\",@g" ${web_path}__/xynt-streaming.js
 
 document_root="$(grep DocumentRoot "${apache_conf}"  | grep -v '^#' | awk '{ print $2 }')"
 sed -i "s@^\(\$DOCUMENT_ROOT *= *[\"']\)[^\"']*\([\"']\)@\1$document_root\2@g" ${web_path}__/spush/*.ph*
index 586f0d9b23739d5bf51da6ebc0a6695f192a4c27..a94412e8d03e2748b86d9e4b0bb346947fa00a81 100644 (file)
@@ -984,7 +984,7 @@ class Room {
 
       $ret = "gst.st = ".($user_cur->step+1)."; ".($remove_wagon ? sprintf("tra.rem(%d);",$table_idx) : "");
       if ($from_table && ($user_cur->table == $table_idx || $user->idx_get() == $i)) {
-       $ret .= 'gst.st_loc++; hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");|';
+       $ret .= 'gst.st_loc++; xstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");|';
        // $ret .= 'gst.st_loc++; document.location.assign("index.php");|';
        log_main("DOCUMENT.index.php: from table");
       }
index cc4d211b4c1df2358a93a532412d5b35f789389c..d0940550a89fb82578d5df0404a1ec24f37d2927 100644 (file)
@@ -591,7 +591,7 @@ class User {
       
       $is_page_streaming = TRUE;
       log_crit("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE"));
-      return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'));
+      return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'));
   }
   
   // FIXME TO SUPPORT iframe
@@ -605,7 +605,7 @@ class User {
       
       log_rd2("PAGE_SYNC");
       printf("xXx USER::PAGE_SYNC [%s]\n", get_class($this));
-      return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page));
+      return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); xstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page));
   }
 
 
@@ -760,11 +760,11 @@ class User {
     $body .= sprintf("<html>
 <head>
 <script type=\"text/javascript\" src=\"%scommons.js\"></script>
-<script type=\"text/javascript\" src=\"%sxynt-http-streaming-ifra.js\"></script>
+<script type=\"text/javascript\" src=\"%sxynt-streaming-ifra.js\"></script>
 <script type=\"text/javascript\">
-var http_streaming = \"ready\";", self::base_get(), self::base_get());
+var xynt_streaming = \"ready\";", self::base_get(), self::base_get());
     $body .= sprintf("
-window.onload = function () { if (http_streaming != \"ready\") { http_streaming.reload(); } };
+window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.reload(); } };
 </script>
 </head>
 <body>");
@@ -819,13 +819,13 @@ function stream_init($init_string, $enc, &$header_out, &$body, $get, $post, $coo
     $body .= sprintf("<html>
 <head>
 <script type=\"text/javascript\" src=\"%scommons.js\"></script>
-<script type=\"text/javascript\" src=\"%sxynt-http-streaming-ifra.js\"></script>
+<script type=\"text/javascript\" src=\"%sxynt-streaming-ifra.js\"></script>
 <script type=\"text/javascript\">
-var http_streaming = \"ready\";", self::base_get(), self::base_get());
+var xynt_streaming = \"ready\";", self::base_get(), self::base_get());
     if ($this->rd_scristp > 0)
         $body .= sprintf("last_clean = %d;\n", ($this->rd_scristp-1));
     $body .= sprintf("
-window.onload = function () { if (http_streaming != \"ready\") { http_streaming.reload(); } };
+window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.reload(); } };
 </script> 
 </head>
 <body>");
index 22b75d14bebb56674a0859ffcab00a9dcd809ea3..c16d14c0d0cca463f653bdbad686fd3f9415ec40 100644 (file)
@@ -729,11 +729,11 @@ class Bin5_user extends User {
     $body .= sprintf("<html>
 <head>
 <script type=\"text/javascript\" src=\"%scommons.js\"></script>
-<script type=\"text/javascript\" src=\"%sxynt-http-streaming-ifra.js\"></script>
+<script type=\"text/javascript\" src=\"%sxynt-streaming-ifra.js\"></script>
 <script type=\"text/javascript\">
-var http_streaming = \"ready\";", self::base_get(), self::base_get());
+var xynt_streaming = \"ready\";", self::base_get(), self::base_get());
     $body .= sprintf("
-window.onload = function () { if (http_streaming != \"ready\") { http_streaming.reload(); } };
+window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.reload(); } };
 </script>
 </head>
 <body>");
@@ -754,7 +754,7 @@ push(\"%s\");
         
         $is_page_streaming = TRUE;
         log_crit("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE"));
-        return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");'));
+        return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");'));
     }
     
     protected function page_sync($sess, $page)
@@ -764,7 +764,7 @@ push(\"%s\");
         $is_page_streaming = TRUE;
         log_rd2("PAGE_SYNC");
         printf("xXx BIN5_USER::PAGE_SYNC\n");
-        return (sprintf('hstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("%s");', $page));
+        return (sprintf('xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("%s");', $page));
     }
 
     protected function maincheck($cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step, $splashdate, $table_idx, $table_token)
@@ -1355,7 +1355,7 @@ class Bin5 {
             $user_cur->laccwr = $curtime;
 
             $ret = "gst.st = ".($user_cur->step+1)."; ";
-            $ret .= 'gst.st_loc++; hstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");|';
+            $ret .= 'gst.st_loc++; xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");|';
 
             log_wr($user_cur->sess." BIN5_WAKEUP: ".$ret);
             $user_cur->comm[$user_cur->step % COMM_N] = $ret;
index 1e0ba3bb5fef01875001d11c05f5078880533ea4..7142f46d9cfa7b96fc3a34d08ab5a3a8a9510aad 100644 (file)
@@ -64,7 +64,7 @@ function bin5_index_main(&$header_out, $addr, $get, $post, $cookie)
 <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-http-streaming.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>
@@ -76,7 +76,7 @@ function bin5_index_main(&$header_out, $addr, $get, $post, $cookie)
 <body>
 <SCRIPT type="text/javascript">
    var sess = "not_connected";
-   var hstm = null;
+   var xstm = null;
    var g_lang = "<?php echo "$G_lang"; ?>";
    var stat = "table";
    var subst = "none";
@@ -110,13 +110,13 @@ window.onload = function() {
   preferences_update();
 
   sess = "<?php echo "$sess"; ?>";
-  hstm = new http_streaming(window, null /* console */, gst, 'table_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
-  hstm.hbit_set(heartbit);
+  xstm = new xynt_streaming(window, null /* console */, gst, 'table_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
+  xstm.hbit_set(heartbit);
   
   window.onbeforeunload = onbeforeunload_cb;  
   window.onunload = onunload_cb;  
 
-  hstm.start(); 
+  xstm.start();
   // 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);
index dab09f36deca096c7d360adcbcf2c22f23f46d03..0a66fc8cf9e5abecd8c3de77629fda995343ba41 100644 (file)
@@ -64,7 +64,7 @@ function blocking_error($is_unrecoverable)
 
   $is_page_streaming = TRUE;
   log_rd2("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE"));
-  return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");'));
+  return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");'));
 }
 
 function page_sync($sess, $page)
@@ -73,7 +73,7 @@ function page_sync($sess, $page)
 
   $is_page_streaming = TRUE;
   log_rd2("PAGE_SYNC");
-  return (sprintf('hstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("%s");', $page));
+  return (sprintf('xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("%s");', $page));
 }
 
 function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step, $table_idx, $table_token)
@@ -100,7 +100,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
     if (($sem = Bin5::lock_data(FALSE, $table_idx)) == FALSE) { 
         // wait 20 secs, then restart the xhr 
         ignore_user_abort(FALSE);
-        return ("sleep(gst,20000);|hstm.xhr_abort();");
+        return ("sleep(gst,20000);|xstm.xhr_abort();");
     }
 
     if (($user = Bin5_user::load_data($table_idx, $proxy_step['i'], $sess)) == FALSE) {
@@ -119,7 +119,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
         if (($sem = Bin5::lock_data(TRUE, $table_idx)) == FALSE) { 
             // wait 20 secs, then restart the xhr 
             ignore_user_abort(FALSE);
-            return ("sleep(gst,20000);|hstm.xhr_abort();");
+            return ("sleep(gst,20000);|xstm.xhr_abort();");
         }
         $S_load_stat['lL_laccgarb']++;
 
@@ -196,7 +196,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
 //         else {
 //             ignore_user_abort(FALSE);
             
-//             return ("sleep(gst,20000);|hstm.xhr_abort();");
+//             return ("sleep(gst,20000);|xstm.xhr_abort();");
 //         }
         
 //         $first_loop = FALSE;
index 390bc784317db97c1c0fbed410691b805138c0e5..72658baf9ad9f5bba134abf0e17c23917e6a9912 100644 (file)
@@ -865,7 +865,7 @@ supported by:<br>
 <!--<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-http-streaming.js"></script>
+<script type="text/javascript" src="xynt-streaming.js"></script>
 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
 <script type="text/javascript" src="AC_OETags.js"></script>
 <script type="text/javascript" src="room.js"></script>
@@ -886,7 +886,7 @@ supported by:<br>
    var gst  = new globst();
    var topbanner_sfx, topbanner_dx;
    var g_brow = null;
-   var hstm = null;
+   var xstm = null;
    var sess = "not_connected";
    var spo_slide, sup_slide;
 
@@ -1001,7 +1001,7 @@ echo "$body"; ?>
 <script type="text/javascript" src="menu.js"></script>
 <script type="text/javascript" src="ticker.js"></script>
 <script type="text/javascript" src="heartbit.js"></script>
-<script type="text/javascript" src="xynt-http-streaming.js"></script>
+<script type="text/javascript" src="xynt-streaming.js"></script>
 <script type="text/javascript" src="room.js"></script>
 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
 <script type="text/javascript" src="AC_OETags.js"></script>
@@ -1057,8 +1057,8 @@ else {
 
 ?>
      sess = "<?php echo "$sess"; ?>";
-hstm = new http_streaming(window, null /* console*/ , gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);});
-     hstm.hbit_set(heartbit);
+xstm = new xynt_streaming(window, 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;
      window.onbeforeunload = onbeforeunload_cb;
@@ -1070,7 +1070,7 @@ hstm = new http_streaming(window, null /* console*/ , gst, 'index_php', 'sess',
        $("proflashext").innerHTML = "";
 
      // console.log("session from main: "+sess);
-     hstm.start();
+     xstm.start();
      // alert("ARR LENGTH "+g_preload_img_arr.length);
      // FIXME: preload image will be fired by stream instead here
      // setTimeout(preload_images, 0, g_preload_img_arr, g_imgct); 
index d2b589858e71c075e5a7c30bbe45b475d7548e5b..31c90582a01f94dbc28a488c6d815714744a554a 100644 (file)
@@ -70,7 +70,7 @@ function blocking_error($is_unrecoverable)
 
   $is_page_streaming = TRUE;
   log_crit("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE"));
-  return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'));
+  return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'));
 }
 
 function page_sync($sess, $page, $table_idx, $table_token)
@@ -82,7 +82,7 @@ function page_sync($sess, $page, $table_idx, $table_token)
   $is_page_streaming = TRUE;
 
   log_rd2("PAGE_SYNC");
-  return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page));
+  return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); xstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page));
 }
 
 
@@ -123,7 +123,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
     if (($sem = Room::lock_data(FALSE)) == FALSE) { 
         // wait 20 secs, then restart the xhr 
         ignore_user_abort(FALSE);
-        return ("sleep(gst,20000);|hstm.xhr_abort();");
+        return ("sleep(gst,20000);|xstm.xhr_abort();");
     }
     
     // Verifica l'expire time lato server
@@ -140,7 +140,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
         if (($sem = Room::lock_data(TRUE)) == FALSE) { 
             // wait 20 secs, then restart the xhr 
             ignore_user_abort(FALSE);
-            return ("sleep(gst,20000);|hstm.xhr_abort();");
+            return ("sleep(gst,20000);|xstm.xhr_abort();");
         }
         $S_load_stat['lL_laccgarb']++;
 
@@ -216,7 +216,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su
 //             // wait 20 secs, then restart the xhr 
 //             ignore_user_abort(FALSE);
             
-//             return ("sleep(gst,20000);|hstm.xhr_abort();");
+//             return ("sleep(gst,20000);|xstm.xhr_abort();");
 //         }
 //         $first_loop = FALSE;
 //     } // if  ($first_loop == TRUE) {
index 77460517f4b3bb4f06f80199e1f6c92b3bf3f143..310e4f21fc2366d4b77aef242376d08e413ea948 100644 (file)
@@ -642,7 +642,7 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie)
                         while (array_pop($user_cur->comm) != NULL);
           
                         $ret = "";
-                        $ret .= sprintf('gst.st_loc++; gst.st=%d; createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); createCookie("lang", "%s", 24*365, cookiepath); hstm.stop(); window.onunload = null ; window.onbeforeunload = null ; document.location.assign("briskin5/index.php");|', $user_cur->step+1, $table_idx, $table_token, $G_lang);
+                        $ret .= sprintf('gst.st_loc++; gst.st=%d; createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); createCookie("lang", "%s", 24*365, cookiepath); xstm.stop(); window.onunload = null ; window.onbeforeunload = null ; document.location.assign("briskin5/index.php");|', $user_cur->step+1, $table_idx, $table_token, $G_lang);
                         
                         $user_cur->comm[$user_cur->step % COMM_N] = $ret;
                         $user_cur->trans_step = $user_cur->step + 1;
similarity index 95%
rename from web/xynt-http-streaming.js
rename to web/xynt-streaming.js
index fe325be9c34d4162d31c1ff4280fc033d4d47e06..f716d8cd9f2d40b5bef97d424e7d7641b4d7f122 100644 (file)
@@ -1,6 +1,6 @@
 // old targetpage == page and moved into start method
 
-function http_streaming(win, console, gst, from, cookiename, sess, sandbox, page, cmdproc)
+function xynt_streaming(win, console, gst, from, cookiename, sess, sandbox, page, cmdproc)
 {
     this.win = win;
     this.console = console;
@@ -18,7 +18,7 @@ function http_streaming(win, console, gst, from, cookiename, sess, sandbox, page
     this.keepalive_new = -1;
 }
 
-http_streaming.prototype = {
+xynt_streaming.prototype = {
     win:               null,
     console:           null,
     gst:               null,
@@ -57,7 +57,7 @@ http_streaming.prototype = {
 
         createCookie(this.cookiename, sess, 24*365, this.cookiepath);
         // alert("start");
-        this.log("http_streaming:start restart: "+this.restart_n);
+        this.log("xynt_streaming:start restart: "+this.restart_n);
         this.keepalives_equal = 0;
         this.ifra = this.doc.createElement("iframe");
         this.ifra.style.visibility = "hidden";
@@ -105,7 +105,7 @@ http_streaming.prototype = {
         if (!this.watchable) {
             do {
                 try{
-                    if (typeof(this.ifra.contentWindow.http_streaming) == 'undefined')
+                    if (typeof(this.ifra.contentWindow.xynt_streaming) == 'undefined')
                         break;
                 }
                 catch(b) {
@@ -116,8 +116,8 @@ http_streaming.prototype = {
                   on IE7 the the window frame scope is cleaned after the href is set, so we wait 
                   for a well know variable value before assign this object value to it (OO is a passion)
                 */
-                if (this.ifra.contentWindow.http_streaming == "ready") {
-                    this.ifra.contentWindow.http_streaming = this;
+                if (this.ifra.contentWindow.xynt_streaming == "ready") {
+                    this.ifra.contentWindow.xynt_streaming = this;
                     this.watchable = true;
                     this.watchdog_ct = 0;
                     this.log("hs::watchdog: watchable = yes");
@@ -234,7 +234,7 @@ http_streaming.prototype = {
     },
 
     //
-    // moved to xynt-http-streaming-ifra as push()
+    // moved to xynt-streaming-ifra as push()
     //
     // keepalive: function (s) {
     //     this.log("hs::keepalive");