log_wr("LOCK_DATA ".FTOK_PATH."/table".$table_idx);
// echo "LOCK: ".FTOK_PATH."/main";
// exit;
- if (($tok = ftok(FTOK_PATH."/table".$table_idx, "B")) == -1) {
+ // FIXME monitor this step
+ if (($tok = @ftok(FTOK_PATH."/table".$table_idx, "B")) == -1) {
echo "FTOK FAILED";
exit;
}
- // echo "FTOK ".$tok."<br>";
- if (($res = sem_get($tok)) == FALSE) {
+ // FIXME monitor this step
+ if (($res = @sem_get($tok)) == FALSE) {
echo "SEM_GET FAILED";
exit;
}
{
// alert("EA: "+ea);
$("name").innerHTML = so;
- $("name").title = so;
+ $("name").title = unescapeHTML(so);
$("name_ea").innerHTML = ea;
- $("name_ea").title = ea;
+ $("name_ea").title = unescapeHTML(ea);
$("name_ne").innerHTML = ne;
- $("name_ne").title = ne;
+ $("name_ne").title = unescapeHTML(ne);
$("name_nw").innerHTML = nw;
- $("name_nw").title = nw;
+ $("name_nw").title = unescapeHTML(nw);
$("name_we").innerHTML = we;
- $("name_we").title = we;
+ $("name_we").title = unescapeHTML(we);
return;
}
$("esco").innerHTML = "<input class=\"button\" name=\"logout\" type=\"button\" value=\"Esco.\" onclick=\"window.onunload = null; act_logout();\" type=\"button\">";
}
+function unescapeHTML(cont) {
+ var div = document.createElement('div');
+ var memo = "";
+ var i;
+
+ div.innerHTML = cont;
+ if (div.childNodes[0]) {
+ if (div.childNodes.length > 1) {
+ if (div.childNodes.toArray)
+ alert("si puo");
+ else {
+ var length = div.childNodes.length, results = new Array(length);
+ while (length--)
+ results[length] = div.childNodes[length];
+
+ for (i=0 ; i<results.length ; i++)
+ memo = memo + results[i].nodeValue;
+ }
+
+ return (memo);
+ }
+ else {
+ return (div.childNodes[0].nodeValue);
+ }
+ }
+ else {
+ return ('');
+ }
+}
+
function playsound(tag, sound) {
// g_withflash is a global var
if (g_withflash) {
Room::unlock_data($sem);
ignore_user_abort(FALSE);
log_load("RESYNC");
- return (page_sync($user->sess, $to_stat == "table" ? "briskin5/index.php" : "index.php"));
+ return (page_sync($user->sess, ($to_stat == "table" ? "briskin5/index.php" : "index.php"), $user->table, $user->table_token));
}
log_rd2("lost history, refresh from scratch");
$new_step = -1;