From: Matteo Nastasi (mop) Date: Tue, 3 Dec 2013 18:54:26 +0000 (+0100) Subject: read terms-of-service from file X-Git-Tag: v4.11.0~9 X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=dd8ea26db05952301b2f52c10f5cf0c17338fca3 read terms-of-service from file --- diff --git a/web/Obj/brisk.conf-templ.pho b/web/Obj/brisk.conf-templ.pho index eeb5b54..19d99c8 100644 --- a/web/Obj/brisk.conf-templ.pho +++ b/web/Obj/brisk.conf-templ.pho @@ -86,7 +86,7 @@ $G_btrace_pref_sub = "/home/nastasi/web/"; // licence related stuff $G_lice_vers = "2.0"; -$G_lice_fname = "licence_complete_filename"; +$G_lice_fname = "Obj/doc/terms-of-use_%s_%s.txt"; // USE date +%s -d 'Wed Nov 20 18:35:41 CET 2013' to calculate $G_lice_dthard = 1384968941; $G_lice_dtsoft = 1384968941; diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 69842e8..9554cc0 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -557,7 +557,7 @@ class User { protected function maincheck($get, $post, $cookie) { - GLOBAL $G_lang, $mlang_indrd; + GLOBAL $G_lang, $G_base, $mlang_indrd; // 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; @@ -615,7 +615,8 @@ class User { 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, + // FIXME: manage translations + $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_lice_fname, $G_lice_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');", @@ -623,7 +624,7 @@ class User { } else if ($curtime > $G_lice_dthard) { // call notify hard - $ret .= show_notify_document("Versione corrente: [".$this->rec->lice_vers_get()."] Versione sito: ".$G_lice_vers, + $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_lice_fname, $G_lice_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');", diff --git a/web/commons.js b/web/commons.js index 6fb210e..a38a36c 100644 --- a/web/commons.js +++ b/web/commons.js @@ -697,6 +697,7 @@ function notify_document(st, text, tout, butt, confirm_func, w, h, is_opa, block cont.style.borderBottomColor = "gray"; cont.style.height = (h - 30)+"px"; cont.style.overflow = "auto"; + cont.style.fontFamily = "monospace"; cont.innerHTML = text; box = document.createElement("div");