G_base var added to fix relative path problem in include of includes
[brisk.git] / web / index_wr.php
index b6a73e7..0db96eb 100644 (file)
@@ -2,7 +2,7 @@
 /*
  *  brisk - index_wr.php
  *
- *  Copyright (C) 2006-2009 Matteo Nastasi
+ *  Copyright (C) 2006-2011 Matteo Nastasi
  *                          mailto: nastasi@alternativeoutput.it 
  *                                  matteo.nastasi@milug.org
  *                          web: http://www.alternativeoutput.it
  * not, write to the Free Software Foundation, Inc, 59 Temple Place -
  * Suite 330, Boston, MA 02111-1307, USA.
  *
- * $Id$
- *
  */
 
+$G_base = "";
+
 require_once("Obj/brisk.phh");
 require_once("Obj/auth.phh");
 // require_once("Obj/proxyscan.phh");
@@ -98,6 +98,7 @@ if (array_search($_SERVER['REMOTE_ADDR'], $G_black_list) !== FALSE) {
 
 $is_spawn = FALSE;
 
+log_mop(0, 'index_wr.php: COMM: '.xcapemesg($mesg));
 log_wr('COMM: '.xcapemesg($mesg));
 
 $sem = Room::lock_data();
@@ -148,19 +149,27 @@ if (($user = &$room->get_user($sess, &$idx)) == FALSE) {
   }
   else if ($argz[0] == 'help') {
     /* MLANG: "torna ai tavoli" */ 
-    echo show_notify(str_replace("\n", " ", $G_room_help[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 600, 500);
+    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_backtotab'][$G_lang], 400, 200);
+    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_backtotab'][$G_lang], 400, 200);
+    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_backtotab'][$G_lang], 400, 200);
+    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') {
+    GLOBAL $G_false;
+
+    require_once("briskin5/Obj/briskin5.phh");
+    require_once("briskin5/Obj/placing.phh");
+
+    echo show_notify(str_replace("\n", " ", placings_show($G_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_backtotab'][$G_lng], 400, 200);
+    echo show_notify(str_replace("\n", " ", $G_room_whysupport[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lng], 400, 200);
   }
   else { 
     log_wr("Get User Error");
@@ -172,6 +181,8 @@ $argz = explode('|', xcapemesg($mesg));
 
 log_wr('POSTSPLIT: '.$argz[0]);
 
+log_mop($user->step, 'index_wr.php: after get_user()');
+
 if ($argz[0] == 'shutdown') {
   log_auth($user->sess, "Shutdown session.");
 
@@ -411,6 +422,20 @@ else if ($user->stat == 'room') {
     $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] = "gst.st = ".($user->step+1)."; ";
+
+
+    $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);
@@ -419,6 +444,23 @@ else if ($user->stat == 'room') {
     $user->step_inc();
     
   }
+
+
+  else if ($argz[0] == 'placing') {
+
+    require_once("briskin5/Obj/briskin5.phh");
+    require_once("briskin5/Obj/placing.phh");
+
+    $user->comm[$user->step % COMM_N] =  "gst.st = ".($user->step+1)."; ";
+    $user->comm[$user->step % COMM_N] .= show_notify_ex(str_replace("\n", " ", placings_show($user)), 0, $mlang_indwr['btn_backtotab'][$G_lang], 800, 600, TRUE, 0);
+
+    log_wr($user->comm[$user->step % COMM_N]);
+    $user->step_inc();
+
+
+  }
+
+
   else if ($argz[0] == 'roadmap') {
     $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
     $user->comm[$user->step % COMM_N] .=  show_notify(str_replace("\n", " ", $G_room_roadmap[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 400, 200);
@@ -629,6 +671,7 @@ else if ($user->stat == 'room') {
 }
 log_wr("before save data");
 Room::save_data($room);
+log_mop($user->step, 'index_wr.php: after save_data()');
 
 Room::unlock_data($sem);
 exit;