X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=0f20a7b82451fd3b649c00858793005f326979ab;hb=2fc5f744b08dabc232c6a3cc370e9f788ab182ea;hp=4ce65cb1128ef8b34bf96ed091045c0377d7e453;hpb=f18bac8374119fa1f3c826e82cfc74ce2ce52dd7;p=brisk.git diff --git a/web/index_wr.php b/web/index_wr.php index 4ce65cb..0f20a7b 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -17,6 +17,8 @@ * not, write to the Free Software Foundation, Inc, 59 Temple Place - * Suite 330, Boston, MA 02111-1307, USA. * + * $Id$ + * */ require_once("brisk.phh"); @@ -42,7 +44,22 @@ if (($user = &get_user($bri, $sess, &$idx)) == FALSE) { } $argz = explode('|', $mesg); -if ($user->stat == 'room') { +if ($argz[0] == 'shutdown') { + log_auth($user_cur->sess, "Shutdown session."); + + $user->sess = ""; + $user->name = ""; + $user->the_end = FALSE; + + log_rd2($user->sess, "AUTO LOGOUT."); + if ($user->subst == 'sitdown' || $user->stat == 'table') + $bri->room_wakeup(&$user); + else if ($user->subst == 'standup') + $bri->room_outstandup(&$user); + else + log_rd2($sess, "SHUTDOWN FROM WHAT ???"); +} +else if ($user->stat == 'room') { if ($argz[0] == 'logout') { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $user->comm[$user->step % COMM_N] .= sprintf('postact_logout();'); @@ -88,7 +105,7 @@ if ($user->stat == 'room') { log_wr($sess, "Pre if!"); $ret = ""; - $ret .= sprintf('gst.st_loc++; gst.st=%d; the_end=true; document.location.assign("table.php");|', $user_cur->step+1); + $ret .= sprintf('gst.st_loc++; gst.st=%d; the_end=true; window.onunload = null ; document.location.assign("table.php");|', $user_cur->step+1); $user_cur->comm[$user_cur->step % COMM_N] = $ret; $user_cur->trans_step = $user_cur->step + 1;