- 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) {
- // call notify soft
- $ret .= show_notify_document("Versione corrente: [".$this->rec->lice_vers_get()."] Versione sito: ".$G_lice_vers,
- 0, array($mlang_indrd['btn_backtotab'][$G_lang],"pippo", "pluto"),
- 400, 600, TRUE, 0);
- $ret .= "alert('RESULT: ' + g_nd.ret_get());";
+ $doc_filepath = $G_base.$G_doc_path.sprintf($G_tos_fname, $G_tos_vers, $G_lang);
+ $doc_filename = basename($doc_filepath);
+ 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
+ $buttons = array($mlang_user['btn_agree'][$G_lang], $mlang_user['btn_refuse'][$G_lang],
+ $mlang_user['btn_dload'][$G_lang]);
+ if ($curtime > $G_tos_dtsoft && $curtime < $G_tos_dthard) {
+ // call notify soft (same as soft + later button)
+ array_push($buttons, $mlang_user['btn_later'][$G_lang]);
+ $type = "soft";
+ $preface = sprintf("<div class='doc_alert'>%s</div>",
+ sprintf($mlang_user['toc_date_dscl'][$G_lang],
+ strftime("%e/%m/%Y", $G_tos_dthard)));