X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=2b97b93a670fb6141a92c3975e7c75e1b9ab679b;hb=0678cbbbbf7ba11361b8716258302e276570b73e;hp=2d514af4e45413ca39960658e2bb25258f619888;hpb=bbd72460bcf4269ffd21cfb97e0ab616ac7276e7;p=brisk.git diff --git a/web/index_wr.php b/web/index_wr.php index 2d514af..2b97b93 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -120,6 +120,8 @@ Ciò è necessario per ottenere la password.

Saluti e buone partite, mop.
', 'en' => 'EN mhtml [%s] [%s]'), 'info_err' => array( 'it' => 'E\' occorso un errore (%d), riprova più tardi.', + 'en' => 'Some error occurs (%d), retry later.'), + 'info_auth' => array('it' => 'Non essendo autenticato non puoi costruire una rete di preferenze.', 'en' => 'Some error occurs (%d), retry later.') ); @@ -228,9 +230,6 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) echo show_notify(str_replace("\n", " ", placings_show(FALSE)), 0, $mlang_indwr['btn_close'][$G_lang], 800, 600); } - else if ($argz[0] == 'whysupport') { - echo show_notify(str_replace("\n", " ", $G_room_whysupport[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lng], 400, 200); - } else if ($argz[0] == 'apprentice') { if (($cli_name = gpcs_var('cli_name', $get, $post, $cookie)) === FALSE) $cli_name = ""; @@ -362,16 +361,22 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) log_wr("PING RECEIVED"); } else if ($argz[0] == 'info') { - if ($argz[1] == 'save') { - if (!isset($post['info'])) { + if ($user->is_auth()) { + if ($argz[1] == 'save') { + if (!isset($post['info'])) { + return FALSE; + } + if (($ret = $brisk->info_save($user, $post['info'])) == 0) { + echo "1"; + return TRUE; + } + + printf($mlang_indwr['info_err'][$G_lang], $ret); return FALSE; } - if (($ret = $brisk->info_save($user, $post['info'])) == 0) { - echo "1"; - return TRUE; - } - - printf($mlang_indwr['info_err'][$G_lang], $ret); + } + else { + printf($mlang_indwr['info_auth'][$G_lang]); return FALSE; } } @@ -760,17 +765,9 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) log_wr($user->comm[$user->step % COMM_N]); $user->step_inc(); - } - else if ($argz[0] == 'whysupport') { - $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; - $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_whysupport[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 400, 200); - - log_wr($user->comm[$user->step % COMM_N]); - $user->step_inc(); - } else if ($argz[0] == 'chatt') { - $brisk->chatt_send(&$user, xcapemesg($mesg)); + $brisk->chatt_send(&$user, xcapemesg($mesg), $mlang_indwr); } else if ($argz[0] == 'tosmgr') { // check IF is authnticated user, both terms of service versions matches @@ -957,16 +954,13 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) } else if ($argz[0] == 'logout') { $brisk->ghost_sess->push($curtime, $user->sess, GHOST_SESS_REAS_LOUT); + $user->the_end = TRUE; + $brisk->room_outstandup($user); - if ($user->subst == 'sitdown') { - log_load("ROOM WAKEUP"); - $brisk->room_wakeup($user); - } - else if ($user->subst == 'standup') - $brisk->room_outstandup($user); - else - log_rd2("LOGOUT FROM WHAT ???"); + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= sprintf('gst.st_loc++; xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'); + $user->step_inc(); } } /********************** @@ -985,9 +979,13 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) } else if ($argz[0] == 'logout') { $brisk->ghost_sess->push($curtime, $user->sess, GHOST_SESS_REAS_LOUT); - $user->the_end = TRUE; + $user->the_end = TRUE; $brisk->room_wakeup($user); + + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= sprintf('gst.st_loc++; xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'); + $user->step_inc(); } } }