lexical adjustment, all licence occurrencies are replaced wit tos word
[brisk.git] / web / Obj / user.phh
index 9554cc0..1d4b594 100644 (file)
@@ -328,12 +328,12 @@ class User {
                                       $this->rec->supp_comp_get()));
   }
 
-  function licence_store()
+  function tos_store()
   {
       if (($bdb = BriskDB::create()) == FALSE) {
           return FALSE;
       }
-      return ($bdb->user_licence_update($this->code, $this->rec->lice_vers_get()));
+      return ($bdb->user_tos_update($this->code, $this->rec->tos_vers_get()));
   }
 
   function state_store()
@@ -561,7 +561,7 @@ class User {
       // GLOBAL $first_loop;
       GLOBAL $G_with_splash, $G_splash_content, $G_splash_interval, $G_splash_idx;
       GLOBAL $G_splash_w, $G_splash_h, $G_splash_timeout;
-      GLOBAL $G_lice_vers, $G_lice_fname, $G_lice_dthard, $G_lice_dtsoft, $G_lice_idx;
+      GLOBAL $G_tos_vers, $G_tos_fname, $G_tos_dthard, $G_tos_dtsoft, $G_tos_idx;
 
       GLOBAL $S_load_stat;
       
@@ -611,36 +611,25 @@ class User {
               log_rd("roomma ".$this->step);
               $curtime = time();
               if ($this->rec !== FALSE) {
-                  if ($curtime > $G_lice_dtsoft || $curtime > $G_lice_dthard) {
-                      if (versions_cmp($this->rec->lice_vers_get(), $G_lice_vers) < 0) { // comparison between user version and current version
-                          if ($curtime > $G_lice_dtsoft) {
+                  if ($curtime > $G_tos_dtsoft || $curtime > $G_tos_dthard) {
+                      if (versions_cmp($this->rec->tos_vers_get(), $G_tos_vers) < 0) { // comparison between user version and current version
+                          if ($curtime > $G_tos_dtsoft) {
                               // call notify soft
                               // FIXME: manage translations
-                              $ret .=  show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_lice_fname, $G_lice_vers, $G_lang))),
+                              $ret .=  show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_tos_fname, $G_tos_vers, $G_lang))),
                                        0, array("Accetto.", "Rifiuto.", "Leggo poi.",  /* , "Scarico." */),
-                                       "lice_confirm", 600, 600, TRUE, 0);
-                              $ret .= sprintf("act_licencemgr('soft', g_nd.ret_get(), '%s', '%s');", 
-                                              xcape($this->rec->lice_vers_get()), xcape($G_lice_vers));
+                                       "tos_confirm", 600, 600, TRUE, 0);
+                              $ret .= sprintf("act_tosmgr('soft', g_nd.ret_get(), '%s', '%s');",
+                                              xcape($this->rec->tos_vers_get()), xcape($G_tos_vers));
                           }
-                          else if ($curtime > $G_lice_dthard) {
+                          else if ($curtime > $G_tos_dthard) {
                               // call notify hard
-                              $ret .=  show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_lice_fname, $G_lice_vers, $G_lang))),
+                              $ret .=  show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_tos_fname, $G_tos_vers, $G_lang))),
                                        0, array("Accetto.", "Rifiuto." /* , "Scarico." */),
-                                       "lice_confirm", 600, 600, TRUE, 0);
-                              $ret .= sprintf("act_licencemgr('hard', g_nd.ret_get(), '%s', '%s');", 
-                                              xcape($this->rec->lice_vers_get()), xcape($G_lice_vers));
+                                       "tos_confirm", 600, 600, TRUE, 0);
+                              $ret .= sprintf("act_tosmgr('hard', g_nd.ret_get(), '%s', '%s');",
+                                              xcape($this->rec->tos_vers_get()), xcape($G_tos_vers));
                           }
-
-
-                          /* $ret .=  show_notify_ex(str_replace("\n", " ", "Versione corrente: [".$this->rec->lice_vers_get()."] Versione sito: ".$G_lice_vers), */
-                          /*     ($is_super ? 0 : $G_splash_timeout), */
-                          /*     // $mlang_indrd[($is_super ? 'btn_btotabsup' : 'btn_backtotab')][$G_lang], */
-                          /*     $mlang_indrd['btn_backtotab'][$G_lang], */
-                          /*     $G_splash_w, $G_splash_h, true, */
-                          /*     ($is_super ? 0 : $G_splash_timeout)); */
-                          /* $ret .= sprintf('|createCookie("CO_lice_date%d", %d, 24*365, cookiepath);', $G_lice_idx, $curtime); */
-
-
                       }
                   }
               }