increment game and match counter at the end of a game
[brisk.git] / web / commons.js
index 36eb7c4..5b6e915 100644 (file)
@@ -270,7 +270,7 @@ function send_mesg(mesg)
     var is_conn = (sess == "not_connected" ? false : true);
     
     // alert("xhr_wr: "+xhr_wr+"  is_conn: "+is_conn);
-    xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
+    xhr_wr.open('GET', 'index_wr.php?&'+(is_conn ? 'sess='+sess : '')+'&stp='+gst.st+'&mesg='+mesg, (is_conn ? true : false));
     xhr_wr.setRequestHeader("If-Modified-Since", new Date().toUTCString());
     xhr_wr.onreadystatechange = function() { return; };
     if (typeof(g_debug) == 'number' && g_debug > 0
@@ -1027,9 +1027,11 @@ var CHATT_MAXLINES = 40;
 function user_decorator(user)
 {
     var name, i, sp = "", cl = "";
-    var flags = user[0] & 0x03 | ((user[0] & 0x040000) >> 16);
+    var flags = user[0] & 0x03 | ((user[0] & 0x0c0000) >> 16);
 
-    for (i = 0 ; i < 3 ; i++) {
+    // console.log(user[1]+" FLAGS: "+flags);
+
+    for (i = 0 ; i < 4 ; i++) {
         if (flags & (1 << i)) {
             cl += sp + "au" + i;
             sp = " ";
@@ -1037,7 +1039,7 @@ function user_decorator(user)
     }
 
     if (flags != 0)
-        name = "<span class='" + cl + "'>"+user[1]+"</span>";
+        name = "<span class='" + cl + "'><span>"+user[1]+"</span></span>";
     else
         name = user[1];
 
@@ -1412,3 +1414,8 @@ function download_mgr(url)
 download_mgr.prototype = {
     ifra: null
 }
+
+function submit_click(obj)
+{
+    obj.form.elements['realsub'].value = obj.id;
+}