X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=4429fd588ee047ee7255a3d8be01ca8d4e3ed5ca;hb=7755c2d3e9fb3f1e57e4a76f3588b41c14e065c0;hp=22f2587e310e697f7750074a3c4b0059816aea7d;hpb=c3ccbbd5bc7c8534127fa10b4f88b81cffc6029a;p=brisk.git diff --git a/web/index_wr.php b/web/index_wr.php index 22f2587..4429fd5 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -22,8 +22,8 @@ * */ -require_once("Obj/brisk.phh"); -require_once("Obj/auth.phh"); +// require_once("Obj/brisk.phh"); +// require_once("Obj/auth.phh"); // require_once("Obj/proxyscan.phh"); // Use of proxies isn't allowed. @@ -81,23 +81,26 @@ $mlang_indwr = array( 'btn_backtotab' => array( 'it' => 'Torna ai tavoli.', function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) { - GLOBAL $G_black_list; + GLOBAL $G_black_list, $G_lang, $G_room_help, $G_room_about, $mlang_indwr; log_load("index_wr.php"); if (($mesg = gpcs_var('mesg', $get, $post, $cookie)) === FALSE) unset($mesg); + if (($sess = gpcs_var('sess', $get, $post, $cookie)) === FALSE) + $sess = ""; + if (DEBUGGING == "local" && $remote_addr != '127.0.0.1') { echo "Debugging time!"; return (FALSE); } - + /* * MAIN */ - + /* if the IP is banned, exit without do nothing */ if (array_search($remote_addr, $G_black_list) !== FALSE) { sleep(5); @@ -114,7 +117,7 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) if (($user = $room->get_user($sess, &$idx)) == FALSE) { $argz = explode('|', xcapemesg($mesg)); - + if ($argz[0] == 'getchallenge') { if (isset($get['cli_name'])) $cli_name = $get['cli_name']; @@ -154,22 +157,22 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) return FALSE; } } - /* else if ($argz[0] == 'auth') { */ - /* printf("challenge|ok"); */ - /* } */ - /* else if ($argz[0] == 'help') { */ - /* /\* MLANG: "torna ai tavoli" *\/ */ - /* echo show_notify(str_replace("\n", " ", $G_room_help[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 600, 500); */ - /* } */ - /* else if ($argz[0] == 'about') { */ - /* echo show_notify(str_replace("\n", " ", $G_room_about[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 400, 220); */ - /* } */ - /* else if ($argz[0] == 'passwdhowto') { */ - /* echo show_notify(str_replace("\n", " ", $G_room_passwdhowto[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 400, 200); */ - /* } */ - /* else if ($argz[0] == 'roadmap') { */ - /* echo show_notify(str_replace("\n", " ", $G_room_roadmap[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 400, 200); */ - /* } */ + else if ($argz[0] == 'auth') { + printf("challenge|ok"); + } + else if ($argz[0] == 'help') { + /* MLANG: "torna ai tavoli" */ + echo show_notify(str_replace("\n", " ", $G_room_help[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 600, 500); + } + else if ($argz[0] == 'about') { + echo show_notify(str_replace("\n", " ", $G_room_about[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 400, 220); + } + else if ($argz[0] == 'passwdhowto') { + echo show_notify(str_replace("\n", " ", $G_room_passwdhowto[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 400, 200); + } + else if ($argz[0] == 'roadmap') { + echo show_notify(str_replace("\n", " ", $G_room_roadmap[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lang], 400, 200); + } /* else if ($argz[0] == 'placing') { */ /* require_once("briskin5/Obj/briskin5.phh"); */ /* require_once("briskin5/Obj/placing.phh"); */ @@ -190,26 +193,26 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) -/* $argz = explode('|', xcapemesg($mesg)); */ + $argz = explode('|', xcapemesg($mesg)); -/* log_wr('POSTSPLIT: '.$argz[0]); */ + log_wr('POSTSPLIT: '.$argz[0]); -/* log_wr($user->step, 'index_wr.php: after get_user()'); */ + log_wr($user->step, 'index_wr.php: after get_user()'); -/* if ($argz[0] == 'shutdown') { */ -/* log_auth($user->sess, "Shutdown session."); */ + if ($argz[0] == 'shutdown') { + log_auth($user->sess, "Shutdown session."); -/* $user->reset(); */ + $user->reset(); -/* log_rd2("AUTO LOGOUT."); */ -/* if ($user->subst == 'sitdown' || $user->stat == 'table') */ -/* $room->room_wakeup($user); */ -/* else if ($user->subst == 'standup') */ -/* $room->room_outstandup(&$user); */ -/* else { */ -/* log_rd2("SHUTDOWN FROM WHAT ???"); */ -/* } */ -/* } */ + log_rd2("AUTO LOGOUT."); + if ($user->subst == 'sitdown' || $user->stat == 'table') + $room->room_wakeup($user); + else if ($user->subst == 'standup') + $room->room_outstandup(&$user); + else { + log_rd2("SHUTDOWN FROM WHAT ???"); + } + } /* else if ($argz[0] == 'warranty') { */ /* GLOBAL $cli_name, $cli_email; */ @@ -412,44 +415,43 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) /* echo "$echont"; */ /* } */ -/* /\****************** */ -/* * * */ -/* * STAT: room * */ -/* * * */ -/* ******************\/ */ -/* else if ($user->stat == 'room') { */ -/* $user->laccwr = time(); */ +/****************** + * * + * STAT: room * + * * + ******************/ + else if ($user->stat == 'room') { + $user->laccwr = time(); -/* if ($argz[0] == 'help') { */ -/* $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; */ -/* $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_help[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 600, 500); */ + if ($argz[0] == 'help') { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_help[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 600, 500); -/* log_wr($user->comm[$user->step % COMM_N]); */ -/* $user->step_inc(); */ - -/* } */ -/* else if ($argz[0] == 'passwdhowto') { */ -/* $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; */ -/* $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_passwdhowto[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 600, 500); */ + log_wr($user->comm[$user->step % COMM_N]); + $user->step_inc(); -/* log_wr($user->comm[$user->step % COMM_N]); */ -/* $user->step_inc(); */ - -/* } */ -/* else if ($argz[0] == 'splash') { */ -/* GLOBAL $G_with_splash, $G_splash_content, $G_splash_interval, $G_splash_idx; */ -/* GLOBAL $G_splash_w, $G_splash_h, $G_splash_timeout; */ -/* $CO_splashdate = "CO_splashdate".$G_splash_idx; */ -/* GLOBAL $$CO_splashdate; */ + } + else if ($argz[0] == 'passwdhowto') { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_passwdhowto[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 600, 500); -/* $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; */ + log_wr($user->comm[$user->step % COMM_N]); + $user->step_inc(); + } + else if ($argz[0] == 'splash') { + GLOBAL $G_with_splash, $G_splash_content, $G_splash_interval, $G_splash_idx; + GLOBAL $G_splash_w, $G_splash_h, $G_splash_timeout; + $CO_splashdate = "CO_splashdate".$G_splash_idx; + GLOBAL $$CO_splashdate; -/* $user->comm[$user->step % COMM_N] .= show_notify_ex(str_replace("\n", " ", $G_splash_content[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], $G_splash_w, $G_splash_h, true, 0); */ + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; -/* log_wr($user->comm[$user->step % COMM_N]); */ -/* $user->step_inc(); */ -/* } */ + $user->comm[$user->step % COMM_N] .= show_notify_ex(str_replace("\n", " ", $G_splash_content[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], $G_splash_w, $G_splash_h, true, 0); + + log_wr($user->comm[$user->step % COMM_N]); + $user->step_inc(); + } /* else if ($argz[0] == 'about') { */ /* $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; */ /* $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_about[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 400, 200); */ @@ -491,9 +493,9 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) /* $user->step_inc(); */ /* } */ -/* else if ($argz[0] == 'chatt') { */ -/* $room->chatt_send(&$user, xcapemesg($mesg)); */ -/* } */ + else if ($argz[0] == 'chatt') { + $room->chatt_send(&$user, xcapemesg($mesg)); + } /* /\********************** */ /* * * */ /* * SUBST: standup * */ @@ -651,13 +653,13 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) /* log_wr("MOP finish"); */ /* } */ -/* else if ($argz[0] == 'logout') { */ -/* $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; */ -/* $user->comm[$user->step % COMM_N] .= 'postact_logout();'; */ -/* $user->the_end = TRUE; */ -/* $user->step_inc(); */ -/* } */ -/* } */ + else if ($argz[0] == 'logout') { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= 'postact_logout();'; + $user->the_end = TRUE; + $user->step_inc(); + } + } /* /\********************** */ /* * * */ /* * SUBST: sitdown * */