+ if ($this->rec !== FALSE) {
+ 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_tos_fname, $G_tos_vers, $G_lang))),
+ 0, array("Accetto.", "Rifiuto.", "Leggo poi.", /* , "Scarico." */),
+ "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_tos_dthard) {
+ // call notify hard
+ $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_tos_fname, $G_tos_vers, $G_lang))),
+ 0, array("Accetto.", "Rifiuto." /* , "Scarico." */),
+ "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));
+ }
+ }
+ }
+ }