confirmation function added to notify_document js function
[brisk.git] / web / Obj / user.phh
index 80d3ce9..a7d9357 100644 (file)
@@ -316,13 +316,21 @@ class User {
       $this->flags = ($flags_old | ($flags & $mask));
   }
 
-  function store_set()
+  function prefs_store()
   {
       if (($bdb = BriskDB::create()) == FALSE) {
           return FALSE;
       }
       return ($bdb->user_prefs_update($this->code, ($this->flags & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
-                                      $this->rec->supp_comp));
+                                      $this->rec->supp_comp_get()));
+  }
+
+  function licence_store()
+  {
+      if (($bdb = BriskDB::create()) == FALSE) {
+          return FALSE;
+      }
+      return ($bdb->user_licence_update($this->code, $this->rec->lice_vers_get()));
   }
 
   function rd_data_set($curtime, $transp, $enc, $stat, $subst, $step, $from)
@@ -597,7 +605,7 @@ class User {
                               // call notify soft
                               $ret .=  show_notify_document("Versione corrente: [".$this->rec->lice_vers_get()."] Versione sito: ".$G_lice_vers,
                                        0, array("Accetto.", "Rifiuto.", "Leggo poi.",  /* , "Scarico." */),
-                                       400, 600, TRUE, 0);
+                                       "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));
                           }
@@ -605,7 +613,7 @@ class User {
                               // call notify hard
                               $ret .=  show_notify_document("Versione corrente: [".$this->rec->lice_vers_get()."] Versione sito: ".$G_lice_vers,
                                        0, array("Accetto.", "Rifiuto." /* , "Scarico." */),
-                                       400, 600, TRUE, 0);
+                                       "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));
                           }
@@ -818,7 +826,7 @@ function is_supp_custom()
             return (TRUE);
         }
         /*
-          if ($this->rec->last_dona > 1356994800) {
+          if ($this->rec->last_dona_get() > 1356994800) {
               return (TRUE);
           }
         */