X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_rd.php;h=6dcb6e9a52d82f30fec128821b25ffcae678708c;hb=2fc5f744b08dabc232c6a3cc370e9f788ab182ea;hp=240891b1d642957530090bebf3e670539a22b328;hpb=9441f09e33850c2a74e00ec909da4522c451abb6;p=brisk.git diff --git a/web/index_rd.php b/web/index_rd.php index 240891b..6dcb6e9 100644 --- a/web/index_rd.php +++ b/web/index_rd.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"); @@ -44,7 +46,7 @@ function unrecerror() GLOBAL $is_page_streaming; $is_page_streaming = TRUE; - return (sprintf('the_end=true; document.location.assign("index.php");')); + return (sprintf('the_end=true; window.onunload = null; document.location.assign("index.php");')); } @@ -64,6 +66,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su // Aggiorna l'expire time lato server if ($first_loop == TRUE) { if (($user = &get_user($bri, $sess, $idx)) == FALSE) { + unlock_data($sem); return (unrecerror()); } log_auth($sess, "update lacc"); @@ -79,7 +82,6 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su unlock_data($sem); } else { - unlock_data($sem); return (FALSE); } @@ -98,6 +100,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su $sem = lock_data(); $bri = &load_data(); if (($user = &get_user($bri, $sess, $idx)) == FALSE) { + unlock_data($sem); return (unrecerror()); } if ($user->the_end) @@ -141,13 +144,12 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su $new_stat = $user->stat; $new_subst = $user->subst; $new_step = $user->step; - - unlock_data($sem); } else { $sem = lock_data(); $bri = &load_data(); if (($user = &get_user($bri, $sess, $idx)) == FALSE) { + unlock_data($sem); return (unrecerror()); } if ($cur_step < $user->step) {