From f341c32413c83788cf6cf23fe911c401c2f9adad Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Tue, 10 Dec 2013 17:58:32 +0100 Subject: [PATCH] js: add confirm function attributes to notify_document class, php: add document download manager, php: add alert about TOS switch date --- INSTALL.sh | 2 +- TODO.txt | 11 ++--- web/Obj/brisk.conf-templ.pho | 3 ++ web/Obj/brisk.phh | 6 +-- web/Obj/doc/terms-of-service_V1.1_it.pdf | Bin 0 -> 17307 bytes web/Obj/sac-a-push.phh | 2 +- web/Obj/user.phh | 43 ++++++++++------- web/brisk.css | 10 ++++ web/commons.js | 57 ++++++++++++++++++----- web/doc_download.php | 24 ++++++++++ 10 files changed, 120 insertions(+), 38 deletions(-) create mode 100644 web/Obj/doc/terms-of-service_V1.1_it.pdf create mode 100644 web/doc_download.php diff --git a/INSTALL.sh b/INSTALL.sh index aae8e21..6ed3fa7 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -328,7 +328,7 @@ for i in $(find web -type d | sed 's/^....//g'); do install -d ${web_path}__/$i done -for i in $(find web -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*.txt' | sed 's/^....//g'); do +for i in $(find web -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^....//g'); do install -m 644 "web/$i" "${web_path}__/$i" done chmod 755 "${web_path}__/spush/brisk-spush.php" diff --git a/TODO.txt b/TODO.txt index c7591ef..44d21cb 100644 --- a/TODO.txt +++ b/TODO.txt @@ -5,6 +5,7 @@ ----------+ - AUTO-MAINTENANCE . Terms Of Service acceptance + DONE . print date of hard switch DONE . TOS version DONE . user TOS acceptance (db field) DONE . show TOS ([show me later, yes, no]/[yes, no]) @@ -14,14 +15,12 @@ DONE . show current TOS DONE . disable user reason integer field and remove SUSPEND state (db, php) DONE . fix tos layout - . opt - download TOS - . checkbox for anonimous users with message when not checked - . opt - button on when arrived to the bottom of the TOS - . min - check TOS version between config file and TOS file + DONE . opt - download TOS + . opt - checkbox for anonimous users with message when not checked + . opt - button enabled when arrived to the bottom of the TOS only + . opt - check TOS version between config file and TOS file . show guaranteer - . email validation - . account expiration diff --git a/web/Obj/brisk.conf-templ.pho b/web/Obj/brisk.conf-templ.pho index 78e4fbb..946df99 100644 --- a/web/Obj/brisk.conf-templ.pho +++ b/web/Obj/brisk.conf-templ.pho @@ -84,6 +84,9 @@ $G_black_list = array(); // this is the prefix path to remove from backtrace $G_btrace_pref_sub = "/home/nastasi/web/"; +// where documents are stored +$G_doc_path = "Obj/doc/"; + // licence related stuff $G_tos_vers = "2.0"; $G_tos_fname = "Obj/doc/terms-of-service_%s_%s.txt"; diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 5fb98fb..a0b7556 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -2880,7 +2880,7 @@ function show_notify_ex($text, $tout, $butt, $w, $h, $is_opaque, $block_time) return sprintf('var noti = new notify_ex(gst,"%s",%d,"%s",%d,%d, %s, %d);', $text, $tout, $butt, $w, $h, ($is_opaque ? "true" : "false"), $block_time); } -function show_notify_document($text, $tout, $butt_arr, $confirm_func, $w, $h, $is_opaque, $block_time) +function show_notify_document($text, $tout, $butt_arr, $confirm_func, $confirm_func_args, $w, $h, $is_opaque, $block_time) { log_main("SHOW_NOTIFY OPAQUE: ".$text); @@ -2889,8 +2889,8 @@ function show_notify_document($text, $tout, $butt_arr, $confirm_func, $w, $h, $i $butts .= sprintf("%s'%s'", ($i == 0 ? "" : ","), $butt_arr[$i]); } - return sprintf('g_nd = new notify_document(gst, "%s", %d, [ %s ], %s, %d, %d, %s, %d);|', - escpush($text), $tout, $butts, ($confirm_func == NULL ? "null" : $confirm_func), $w, $h, ($is_opaque ? "true" : "false"), $block_time); + return sprintf('g_nd = new notify_document(gst, "%s", %d, [ %s ], %s, %s, %d, %d, %s, %d);|', + escpush($text), $tout, $butts, ($confirm_func == NULL ? "null" : $confirm_func), (($confirm_func == NULL|| $confirm_func_args == NULL) ? "[]" : $confirm_func_args), $w, $h, ($is_opaque ? "true" : "false"), $block_time); } diff --git a/web/Obj/doc/terms-of-service_V1.1_it.pdf b/web/Obj/doc/terms-of-service_V1.1_it.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9300e3c59865f0d0faa4cfc9fee25cedb16f0913 GIT binary patch literal 17307 zcmdVCbx>W+(l3ld@Zj$5wsCiNciXtTOK^905AN;`!QB#^pn>2HmptdZN8a<^x?k1z z$E~}n)?PEcdU|Ghe%&)wt9z3xii*=SGqAyu4;Bx04YmyC!LkrB5!oAC!SeDl$^z}o zT`Y)LKPbwK;+8fpKqp3V8zUE>DA2^-6v)pH>+IqLG_r;D$o{1*7q!oh+&xo!VCUCRfuU{ z9XMz=cyHd>9VkIaW6gk!k#>D9=A+}35E1g-gILq-n93DN8 zzmU7+@v+5u8rhQ&F`$?mK5Zpys&5L_d72LHmyJ^3u3tUCzguOzzwF)8_xH;*$m>C? zUR-s4XQ$106VM|V^zqL&uoAy|^{_h?mxiJwML-jjf7raryRl?t$gL7Cr=*M{#K3!J zHd3?Oy5LG{XGqJ>q3zU2d*5+X``t2yW@jweB4rN89*v1ThBo-gnV@%yL>bOVAst*s z@A#H;mnh8Plyc|fIN_;|HhPZ$a-=xaYa||uQ7P)uyB3#MvX>+V(Luu=EJ;`i#V`aL zlAi4agEBBm=^M0xruu7Y;9V7_(Xl_xz`3Xio3Nl;Qa>R~ssA#c3NrsXOS%#WsZK7Z z43|z*wZ5!Zg8MwFM#61jO>$I#$xk@|5hn>9Rj+}Ww#l%i#hRAtOnWBi0Wr#l zoR%*J4)CVJsLvsJ|AZsgUYfuXR8K$VOB_$f;rTM33%Ojyq}sf-J)>TRnXg4XN*x@; zrJ;?H-3g;bW+CSoMQwo}yp9!CZmp>y*Ha{z{XO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SG3l7Ze93R^VIk}jEIPCud`kS@o literal 0 HcmV?d00001 diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 08ced76..5a525bb 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -611,7 +611,7 @@ class Sac_a_push { GLOBAL $G_splash_w, $G_topbanner, $G_with_donors, $G_with_poll; GLOBAL $G_with_sidebanner, $G_with_sidebanner2, $G_with_splash; GLOBAL $G_with_topbanner; - GLOBAL $G_tos_vers, $G_tos_fname, $G_tos_dtsoft, $G_tos_dthard, $G_tos_idx; + GLOBAL $G_tos_vers, $G_tos_fname, $G_tos_dtsoft, $G_tos_dthard, $G_tos_idx, $G_doc_path; if ($this->main_loop) { return (FALSE); diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 94df362..a31765f 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -89,8 +89,12 @@ $mlang_user = array( 'en' => ' agree '), 'btn_refuse' => array('it' => ' rifiuto ', 'en' => ' refuse '), - 'btn_after' => array('it' => ' leggo poi ', - 'en' => ' read later ') + 'btn_dload' => array('it' => ' scarico ', + 'en' => ' download '), + 'btn_later' => array('it' => ' leggo poi ', + 'en' => ' read later '), + 'toc_date_dscl' => array('it' => 'I nuovi termini di servizio entreranno in vigore il %s.', + 'en' => 'EN I nuovi termini di servizio entreranno in vigore il %s.') ); class User { @@ -564,7 +568,7 @@ class User { protected function maincheck($get, $post, $cookie) { - GLOBAL $G_lang, $G_base, $mlang_user; + GLOBAL $G_lang, $G_base, $G_doc_path, $mlang_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; @@ -618,24 +622,31 @@ class User { log_rd("roomma ".$this->step); $curtime = time(); if ($this->rec !== FALSE) { + $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 - if ($curtime > $G_tos_dtsoft) { - // call notify soft - $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_tos_fname, $G_tos_vers, $G_lang))), - 0, array($mlang_user['btn_agree'][$G_lang], $mlang_user['btn_refuse'][$G_lang], $mlang_user['btn_after'][$G_lang] /* , "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)); + $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("
%s
", + sprintf($mlang_user['toc_date_dscl'][$G_lang], + strftime("%e/%m/%Y", $G_tos_dthard))); } - else if ($curtime > $G_tos_dthard) { + else { // call notify hard - $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_tos_fname, $G_tos_vers, $G_lang))), - 0, array($mlang_user['btn_agree'][$G_lang], $mlang_user['btn_refuse'][$G_lang] /* , "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)); + $type = "hard"; + $preface = ""; } + $ret .= show_notify_document($preface.esclfhtml(file_get_contents($doc_filepath)), 0, $buttons, + "tos_confirm", sprintf("[ '%s/doc_download.php?doc=%s' ]", SITE_PREFIX, + basename($doc_filename, ".txt")), 600, 600, TRUE, 0); + + $ret .= sprintf("act_tosmgr('%s', g_nd.ret_get(), '%s', '%s');", $type, + xcape($this->rec->tos_vers_get()), xcape($G_tos_vers)); } } } diff --git a/web/brisk.css b/web/brisk.css index ba9b454..89bf298 100644 --- a/web/brisk.css +++ b/web/brisk.css @@ -144,6 +144,16 @@ div.notify_clo { bottom: 4px; } +div.doc_alert { + color: #ff5400; + background-color: #ffd780; + font-family: monospace; + font-weight: bold; + text-align: center; + margin: 8px; + padding: 8px; +} + .input_text { background-color: #f8f8f8; border: 1px solid gray; diff --git a/web/commons.js b/web/commons.js index 566ffa7..9d07b5d 100644 --- a/web/commons.js +++ b/web/commons.js @@ -45,8 +45,8 @@ var mlang_commons = { 'imgload_a' : { 'it' : 'Immagini caricate ', 'en' : '(only aut.)' }, '2' : { 'it' : '(isolam.to)', 'en' : '(isolation)' } }, - 'tos_refu' : { 'it' : 'Rifiutando di sottoscrivere i nuovi termini del servizio non ti sarà più possibile accedere col tuo utente registrato al sito, sei proprio sicuro di non voler accettare le nuove condizioni d\'uso ?', - 'en' : 'EN Rifiutando di sottoscrivere i nuovi termini del servizio non ti sarà più possibile accedere col tuo utente registrato al sito, sei proprio sicuro di non voler accettare le nuove condizioni d\'uso ?', + 'tos_refu' : { 'it' : 'Rifiutando di sottoscrivere i nuovi termini del servizio non ti sarà più possibile accedere come utente registrato al sito, sei proprio sicuro di voler rifiutare le nuove condizioni d\'uso ?', + 'en' : 'EN Rifiutando di sottoscrivere i nuovi termini del servizio non ti sarà più possibile accedere come utente registrato al sito, sei proprio sicuro di voler rifiutare le nuove condizioni d\'uso ?' } }; @@ -478,8 +478,8 @@ function postact_logout() /* type - 'hard' or 'soft' - code - if soft: accept (0), refuse (1), after (2) - if hard: accept (0), refuse (1) + code - if soft: accept (0), refuse (1), download (2), later (3) + if hard: accept (0), refuse (1), download (2) */ function act_tosmgr(type, code, tos_curr, tos_vers) { @@ -496,16 +496,26 @@ function act_tosmgr(type, code, tos_curr, tos_vers) default: break; } + return true; } -function tos_confirm(val) +function tos_confirm(val, url) { - if (val == 1) { + var dlm; + + switch (val) { + case 1: return (window.confirm(mlang_commons['tos_refu'][g_lang])); + break; + case 2: + dlm = new download_mgr(url); + return false; + break; + default: + return true; + break; } - - return true; } /* @@ -659,7 +669,7 @@ function div_show(div) block_time: */ -function notify_document(st, text, tout, butt, confirm_func, w, h, is_opa, block_time) +function notify_document(st, text, tout, butt, confirm_func, confirm_func_args, w, h, is_opa, block_time) { var i, clo, clodiv_ctx, clodiv_wai, box; @@ -667,7 +677,7 @@ function notify_document(st, text, tout, butt, confirm_func, w, h, is_opa, block this.ancestor = document.body; this.confirm_func = confirm_func; - + this.confirm_func_args = confirm_func_args; this.st.st_loc_new++; clodiv_ctx = document.createElement("div"); @@ -744,6 +754,7 @@ notify_document.prototype = { tblkid: null, confirm_func: null, + confirm_func_args: [], ret: -1, @@ -792,7 +803,11 @@ notify_document.prototype = { hide: function(val) { if (this.confirm_func != null) { - if (this.confirm_func(val) == false) { + var args; + + args = [ val ].concat(this.confirm_func_args); + + if (this.confirm_func.apply(null, args) == false) { return false; } } @@ -1385,3 +1400,23 @@ function url_complete(parent, url) return (host+path+url); } } + +function download_mgr(url) +{ + var ifra; + + if ((ifra = $('the_downloader')) == null) { + ifra = document.createElement("iframe"); + ifra.style.display = "none"; + ifra.id = 'the_downloader'; + document.body.appendChild(ifra); + } + + ifra.contentWindow.location.href = url; + + this.ifra = ifra; +} + +download_mgr.prototype = { + ifra: null +} diff --git a/web/doc_download.php b/web/doc_download.php new file mode 100644 index 0000000..d447c19 --- /dev/null +++ b/web/doc_download.php @@ -0,0 +1,24 @@ + \ No newline at end of file -- 2.17.1