modified check to skip chatt call to be able to log all msg in moderation
[brisk.git] / web / index.php
index a5e1ebc..1f6f636 100644 (file)
@@ -50,10 +50,16 @@ $mlang_room = array( 'userpasserr'  => array('it' => 'Utente e/o password errati
                                              'en' => '<br>The nickname you are using it\'s already registered, <br><br>if its proprietary authenticates<br><br>you will named ghost<i>N</i>.'),
                      'btn_rettabs'  => array('it' => 'torna ai tavoli',
                                              'en' => 'back to tables'),
+                     'btn_moder'     => array('it' => 'Modera.',
+                                             'en' => 'Moderate.'),
+                     'btn_reload'     => array('it' => 'Reload.',
+                                             'en' => 'Reload.'),
                      'btn_exit'     => array('it' => 'Esco.',
                                              'en' => 'Exit.'),
                      'btn_prefs_save' => array('it' => 'Salva.',
                                              'en' => 'Save.'),
+                     'btn_prefs_reset' => array('it' => 'Annulla.',
+                                             'en' => 'Reset.'),
                      'btn_prefs_close' => array('it' => 'Chiudi.',
                                              'en' => 'Close.'),
                      'tit_tabl'     => array('it' => 'Tavolo ',
@@ -118,7 +124,21 @@ $mlang_room = array( 'userpasserr'  => array('it' => 'Utente e/o password errati
                      'listaut_desc' => array('it' => 'leggi soltanto i messaggi degli utenti con password',
                                              'en' => 'listen messages only from authenticated users'),
                      'listisol_desc'=> array('it' => 'visualizza Brisk come se fosse solo per utenti con password',
-                                             'en' => 'show Brisk like an authenticated user only site'),
+                                            'en' => 'show Brisk like an authenticated user only site'),
+                     'suppcomp_tit' =>  array('it' => 'personalizza la tua S',
+                                            'en' => 'customize your S'),
+                     'suppcomp_r' =>  array('it' => 'rosso',
+                                            'en' => 'red'),
+                     'suppcomp_g' =>  array('it' => 'verde',
+                                            'en' => 'green'),
+                     'suppcomp_b' =>  array('it' => 'blu',
+                                            'en' => 'blue'),
+                     'suppcomp_fg' =>  array('it' => 'colore',
+                                            'en' => 'color'),
+                     'suppcomp_bg' =>  array('it' => 'sfondo',
+                                            'en' => 'background'),
+                     'suppcomp_range' =>  array('it' => '(0-255)',
+                                            'en' => '(0-255)'),
                      'tit_splash'   => array('it' => 'splash',
                                              'en' => 'splash'),
                      'splash_desc'  => array('it' => 'attiva la finestra di splash',
@@ -391,8 +411,15 @@ function index_main(&$room, $transp_type, &$header_out, $addr, $get, $post, $coo
       $standup .= '<div id="room_tit"><span class="room_titin"><b>'.$mlang_room['standing'][$G_lang].'</b></span></div>';
       
       $standup .= sprintf('<div id="standup" class="room_standup"></div>');
-      // MLANG Esco.
-      $standup .= '<div id="esco" class="esco"><input type="button" class="button" name="xreload"  value="Reload." onclick="act_reloadroom();"><input class="button" name="logout" value="'.$mlang_room['btn_exit'][$G_lang].'" onclick="esco_cb();" type="button"></div>';
+      // MLANG (Modera) Reload Esco.
+      // TODO: moderation button if moderator only
+      if (1 == 1) {
+          $moder_button = '<input type="button" class="button" name="xmoder"  value="'.$mlang_room['btn_moder'][$G_lang].'" onclick="act_moderate();">';
+      }
+      else {
+          $moder_button = '';
+      }
+      $standup .= '<div id="esco" class="esco">'.$moder_button.'<input type="button" class="button" name="xreload"  value="'.$mlang_room['btn_reload'][$G_lang].'" onclick="act_reloadroom();"><input class="button" name="logout" value="'.$mlang_room['btn_exit'][$G_lang].'" onclick="esco_cb();" type="button"></div>';
       $standup .= '</div></td></tr></table>';
   }
   
@@ -1199,10 +1226,11 @@ type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chi
 <div id="xhrlog"></div>
 <div id="xhrdeltalog"></div>
 </div>
-<div id="preferences" class="notify" style="z-index: 200; width: 600px; margin-left: -300px; height: 400px; top: 126px; visibility: hidden;">
+<div id="preferences" class="notify" style="z-index: 200; width: 600px; margin-left: -300px; height: 240px; top: 150px; visibility: hidden;">
 <div id="preferences_child" style="border-bottom: 1px solid gray; overflow: auto; height: 370px;">
 
 <h2><?php echo $mlang_room['tit_prefs'][$G_lang]; ?></h2>
+<table style="margin: auto;"><tr><td style="vertical-align: top;">
 <!--#
     #  LISTEN
     #-->
@@ -1227,49 +1255,73 @@ type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chi
 </span></td></tr>
 </table>
 </div>
-
+<?php
+if ($user->is_supp_custom()) {
+?>
+</td>
+<td style="vertical-align: top;">
 <!--#
     #  SUPPORTER ONLY
     #-->
 <div style="float: left; padding: 8px;">
-<table style="border: 1px solid gray;"><tr><th colspan="3" style="background-color: #cccccc;">
-xx<?php echo $mlang_room['itm_list'][$G_lang];?>
+<table style="border: 1px solid gray;"><tr><th colspan="4" style="background-color: #cccccc;">
+<?php echo $mlang_room['suppcomp_tit'][$G_lang];?>
 </th></tr>
 <tr>
-<td><input style="width: 3em;" id="s_fg_r" type="text" maxlength="3" size="3" name="s_fg_r"
+<th>
+<?php echo $mlang_room['suppcomp_fg'][$G_lang];?>
+</th><td><input style="width: 3em;" id="s_fg_r" type="text" maxlength="3" size="3" name="s_fg_r"
  onchange="prefs_update('supp');" value="255"
- title="'<?php echo $mlang_room['listall_desc'][$G_lang];?>'">
-   <span id="list_all">xx<?php echo $mlang_room['tit_listall'][$G_lang];?></span></td>
+ title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
+   <span id="list_all"><?php echo $mlang_room['suppcomp_r'][$G_lang];?></span></td>
 <td><input style="width: 3em;" id="s_fg_g" type="text" maxlength="3" size="3" name="s_fg_g"
  onchange="prefs_update('supp');" value="255"
- title="'<?php echo $mlang_room['listall_desc'][$G_lang];?>'">
-   <span id="list_all">xx<?php echo $mlang_room['tit_listall'][$G_lang];?></span></td>
+ title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
+   <span id="list_all"><?php echo $mlang_room['suppcomp_g'][$G_lang];?></span></td>
 <td><input style="width: 3em;" id="s_fg_b" type="text" maxlength="3" size="3" name="s_fg_b"
  onchange="prefs_update('supp');" value="255"
- title="'<?php echo $mlang_room['listall_desc'][$G_lang];?>'">
-   <span id="list_all">xx<?php echo $mlang_room['tit_listall'][$G_lang];?></span></td>
+ title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
+   <span id="list_all"><?php echo $mlang_room['suppcomp_b'][$G_lang];?></span></td>
 </tr>
 <tr>
+<th>
+<?php echo $mlang_room['suppcomp_bg'][$G_lang];?>
+</th>
 <td><input style="width: 3em;" id="s_bg_r" type="text" maxlength="3" size="3" name="s_bg_r"
  onchange="prefs_update('supp');" value="255"
- title="'<?php echo $mlang_room['listall_desc'][$G_lang];?>'">
-   <span id="list_all">xx<?php echo $mlang_room['tit_listall'][$G_lang];?></span></td>
+ title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
+   <span id="list_all"><?php echo $mlang_room['suppcomp_r'][$G_lang];?></span></td>
 <td><input style="width: 3em;" id="s_bg_g" type="text" maxlength="3" size="3" name="s_bg_g"
  onchange="prefs_update('supp');" value="255"
- title="'<?php echo $mlang_room['listall_desc'][$G_lang];?>'">
-   <span id="list_all">xx<?php echo $mlang_room['tit_listall'][$G_lang];?></span></td>
+ title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
+   <span id="list_all"><?php echo $mlang_room['suppcomp_g'][$G_lang];?></span></td>
 <td><input style="width: 3em;" id="s_bg_b" type="text" maxlength="3" size="3" name="s_bg_b"
  onchange="prefs_update('supp');" value="255"
- title="'<?php echo $mlang_room['listall_desc'][$G_lang];?>'">
-   <span id="list_all">xx<?php echo $mlang_room['tit_listall'][$G_lang];?></span></td>
+ title="'<?php echo $mlang_room['suppcomp_range'][$G_lang];?>'">
+   <span id="list_all"><?php echo $mlang_room['suppcomp_b'][$G_lang];?></span></td>
 </tr>
-<tr><td colspan="3">
+<tr><td colspan="4" style="text-align: center;">
 <img id="s_img" class="nobo" src="img/noimg.png">
 </td></tr>
 </table>
 </div>
-
-
+</td>
+<td>
+<?php
+}
+else {
+?>
+<input id="s_fg_r" type="hidden" name="s_fg_r">
+<input id="s_fg_g" type="hidden" name="s_fg_g">
+<input id="s_fg_b" type="hidden" name="s_fg_b">
+<input id="s_bg_r" type="hidden" name="s_bg_r">
+<input id="s_bg_g" type="hidden" name="s_bg_g">
+<input id="s_bg_b" type="hidden" name="s_bg_b">
+<input id="s_img"  type="hidden" name="s_bg_b">
+<?php
+}
+?>
+</td></tr></table>
 <div style="width: 95%; /* background-color: red; */ margin: auto; text-align: left;">
 <br><br>
                                                           <!-- <input type="checkbox" name="pref_ring_endauct" id="pref_ring_endauct" onclick="pref_ring_endauct_set(this);"><?php /* echo $mlang_room['itm_ringauc'][$G_lang]; */ ?> -->
@@ -1277,7 +1329,11 @@ xx<?php echo $mlang_room['itm_list'][$G_lang];?>
 
 
 </div>
-<div class="notify_clo"><input type="submit" class="input_sub" style="bottom: 4px;" onclick="$('preferences').style.visibility = 'hidden';" value="<?php echo $mlang_room['btn_prefs_close'][$G_lang]; ?>"/> <input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_save();" value="<?php echo $mlang_room['btn_prefs_save'][$G_lang]; ?>"/></div>
+<div class="notify_clo">
+<input type="submit" class="input_sub" style="bottom: 4px;" onclick="$('preferences').style.visibility = 'hidden';" value="<?php echo $mlang_room['btn_prefs_close'][$G_lang]; ?>"/> 
+<input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_reset();" value="<?php echo $mlang_room['btn_prefs_reset'][$G_lang]; ?>"/>
+<input type="submit" class="input_sub" style="bottom: 4px;" onclick="prefs_save();" value="<?php echo $mlang_room['btn_prefs_save'][$G_lang]; ?>"/>
+</div>
 </div>
 </body>
 </html>