From: Matteo Nastasi (mop) Date: Wed, 4 Dec 2013 06:41:33 +0000 (+0100) Subject: lexical adjustment, all licence occurrencies are replaced wit tos word X-Git-Tag: v4.11.0~8 X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=d805fe6d9173d5de9a5a0e09e1a466f865b66017 lexical adjustment, all licence occurrencies are replaced wit tos word --- diff --git a/TODO.txt b/TODO.txt index 2bfef1f..128598c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,19 +4,19 @@ FEATURES | ----------+ - AUTO-MAINTENANCE - . policy acceptance - DONE . policy version - DONE . user policy acceptance (db field) - DONE . show licence ([show me later, yes, no]/[yes, no]) + . Terms Of Service acceptance + DONE . TOS version + DONE . user TOS acceptance (db field) + DONE . show TOS ([show me later, yes, no]/[yes, no]) DONE . switch-off date DONE . manage accept DONE . manage refuse - DONE . show current licence + DONE . show current TOS . WIP disable user reason integer field and remove SUSPEND state (db, php) . checkbox for anonimous users with message when not checked - . opt - button on when arrived to the bottom of the licence - . opt - download licence - . min - check licence version between config file and licence file + . opt - button on when arrived to the bottom of the TOS + . opt - download TOS + . min - check TOS version between config file and TOS file . show guaranteer . email validation diff --git a/sql/sql.d/062-guar-policy-expire.sql b/sql/sql.d/062-guar-policy-expire.sql index 72a2449..d7e22b5 100644 --- a/sql/sql.d/062-guar-policy-expire.sql +++ b/sql/sql.d/062-guar-policy-expire.sql @@ -1,6 +1,6 @@ --- add current licence version accepted by users -ALTER TABLE #PFX#users DROP COLUMN lice_vers; -ALTER TABLE #PFX#users ADD COLUMN lice_vers text DEFAULT ''; -- current accepted licence version +-- add current terms of service version accepted by users +ALTER TABLE #PFX#users DROP COLUMN tos_vers; +ALTER TABLE #PFX#users ADD COLUMN tos_vers text DEFAULT ''; -- current accepted terms of service version -- add reason field for disabled users ALTER TABLE #PFX#users DROP COLUMN disa_reas; diff --git a/web/Obj/brisk.conf-templ.pho b/web/Obj/brisk.conf-templ.pho index 19d99c8..78e4fbb 100644 --- a/web/Obj/brisk.conf-templ.pho +++ b/web/Obj/brisk.conf-templ.pho @@ -85,10 +85,10 @@ $G_black_list = array(); $G_btrace_pref_sub = "/home/nastasi/web/"; // licence related stuff -$G_lice_vers = "2.0"; -$G_lice_fname = "Obj/doc/terms-of-use_%s_%s.txt"; +$G_tos_vers = "2.0"; +$G_tos_fname = "Obj/doc/terms-of-service_%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; -$G_lice_idx = 1; +$G_tos_dthard = 1384968941; +$G_tos_dtsoft = 1384968941; +$G_tos_idx = 1; ?> diff --git a/web/Obj/dbase_base.phh b/web/Obj/dbase_base.phh index 938a277..d0ca39a 100644 --- a/web/Obj/dbase_base.phh +++ b/web/Obj/dbase_base.phh @@ -31,10 +31,10 @@ class LoginDBItem { var $type; var $last_dona; var $supp_comp; - var $lice_vers; + var $tos_vers; var $disa_reas; - function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $lice_vers, $disa_reas) + function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $tos_vers, $disa_reas) { $this->code = $code; $this->login = $login; @@ -43,7 +43,7 @@ class LoginDBItem { $this->type = $type; $this->last_dona = $last_dona; $this->supp_comp = $supp_comp; - $this->lice_vers = $lice_vers; + $this->tos_vers = $tos_vers; $this->disa_reas = $disa_reas; } @@ -51,7 +51,7 @@ class LoginDBItem { { $ret = new LoginDBItem($rec->code, $rec->login, $rec->pass, $rec->email, $rec->type, $rec->last_dona, - $rec->supp_comp, $rec->lice_vers, $rec->disa_reas); + $rec->supp_comp, $rec->tos_vers, $rec->disa_reas); return ($ret); } @@ -95,13 +95,13 @@ class LoginDBItem { $this->supp_comp = $supp_comp; } - function lice_vers_get() + function tos_vers_get() { - return $this->lice_vers; + return $this->tos_vers; } - function lice_vers_set($lice_vers) + function tos_vers_set($tos_vers) { - $this->lice_vers = $lice_vers; + $this->tos_vers = $tos_vers; } function disa_reas_get() diff --git a/web/Obj/dbase_pgsql.phh b/web/Obj/dbase_pgsql.phh index d923fb9..e744425 100644 --- a/web/Obj/dbase_pgsql.phh +++ b/web/Obj/dbase_pgsql.phh @@ -200,12 +200,12 @@ class BriskDB return TRUE; } - function user_licence_update($code, $lice_vers) + function user_tos_update($code, $tos_vers) { GLOBAL $G_dbpfx; - $user_sql = sprintf("UPDATE %susers SET (lice_vers) = ('%s') WHERE code = %d;", - $G_dbpfx, escsql($lice_vers), $code); + $user_sql = sprintf("UPDATE %susers SET (tos_vers) = ('%s') WHERE code = %d;", + $G_dbpfx, escsql($toss_vers), $code); fprintf(STDERR, "REQUEST [%s]\n", $user_sql); if ( ! (($user_pg = $this->query($user_sql)) != FALSE && pg_affected_rows($user_pg) == 1) ) { return FALSE; diff --git a/web/Obj/doc/terms-of-service_V1.1_it.txt b/web/Obj/doc/terms-of-service_V1.1_it.txt new file mode 100644 index 0000000..5c3a7c6 --- /dev/null +++ b/web/Obj/doc/terms-of-service_V1.1_it.txt @@ -0,0 +1,73 @@ + +Regolamento per gli utenti autenticati del sito di Brisk. Vers. 1.1 +=================================================================== + +1. Coesistenza pacifica. +------------------------ + +Ognuno è libero di esprimere le proprie opinioni nel rispetto +degli altri; se qualcuno si dovesse sentire offeso dalle +parole di qualcun altro quello che si deve fare è: + +- segnalare la cosa a colui che ha arrecato l'offesa per +assicurarsi della non intenzionalità dell'offesa medesima +e possibilmente chiarirsi subito + +- IN TUTTI I CASI, se non ci si ritiene soddisfatti o l'insulto +era palesemente intenzionale, NON SI CONTRATTACCA ma si segnala +l'accaduto a me (il gestore del sito) e prenderò io una decisione +sul da farsi: ammonizione, revoca della password o quant'altro. + + +2. Strumenti d'indagine. +------------------------ + +Vi chiedo esplicitamente la possibilità di poter visionare i +log delle chat del sito al fine di verificare eventuali segnalazioni +di abusi. + +Vi garantisco che l'analisi dei log sarà fatta esclusivamente da +me e che non verrà divulgato a terzi nessun contenuto esclusi +ovviamente vincoli di legge come richieste da parte delle autorità. + + +3. Non si può avere più di un nickname per utente. +-------------------------------------------------- + +Non è possibile che una singola persona abbia più di un nickname +con password. + +4. Autorizzazione alla divulgazione del proprio garante. +-------------------------------------------------------- + +Si autorizza il sito a divulgare il nickname del proprio garante. + +5. Trattamento dei dati personali. +---------------------------------- + +Informativa ex art. 13 D.lgs. 196/2003 + +Gentile Signore/a, + +Desideriamo informarLa che il D.lgs. n. 196 del 30 giugno 2003 +("Codice in materia di protezione dei dati personali") prevede la tutela +delle persone e di altri soggetti rispetto al trattamento dei dati personali. + +Secondo la normativa indicata, tale trattamento sarà improntato ai principi +di correttezza, liceità e trasparenza e di tutela della Sua riservatezza e +dei Suoi diritti. + +Ai sensi dell'articolo 13 del D.lgs. n.196/2003, pertanto, Le forniamo +le seguenti informazioni: + +1. I dati da Lei forniti verranno trattati per le seguenti finalità: garantire +comunicazioni riservate tra il sito e l'utente. + +2. Il trattamento sarà di tipo informatizzato. + +3. Il conferimento dei dati è obbligatorio e l'eventuale rifiuto di fornire +tali dati (indirizzo email) comporta la mancata possibilità di proseguire +ad offrirLe un accesso riservato al sito e comunicazioni riservate. + +4. I dati non saranno comunicati ad altri soggetti, né saranno +oggetto di diffusione. diff --git a/web/Obj/doc/terms-of-use_V1.1_it.txt b/web/Obj/doc/terms-of-use_V1.1_it.txt deleted file mode 100644 index 5c3a7c6..0000000 --- a/web/Obj/doc/terms-of-use_V1.1_it.txt +++ /dev/null @@ -1,73 +0,0 @@ - -Regolamento per gli utenti autenticati del sito di Brisk. Vers. 1.1 -=================================================================== - -1. Coesistenza pacifica. ------------------------- - -Ognuno è libero di esprimere le proprie opinioni nel rispetto -degli altri; se qualcuno si dovesse sentire offeso dalle -parole di qualcun altro quello che si deve fare è: - -- segnalare la cosa a colui che ha arrecato l'offesa per -assicurarsi della non intenzionalità dell'offesa medesima -e possibilmente chiarirsi subito - -- IN TUTTI I CASI, se non ci si ritiene soddisfatti o l'insulto -era palesemente intenzionale, NON SI CONTRATTACCA ma si segnala -l'accaduto a me (il gestore del sito) e prenderò io una decisione -sul da farsi: ammonizione, revoca della password o quant'altro. - - -2. Strumenti d'indagine. ------------------------- - -Vi chiedo esplicitamente la possibilità di poter visionare i -log delle chat del sito al fine di verificare eventuali segnalazioni -di abusi. - -Vi garantisco che l'analisi dei log sarà fatta esclusivamente da -me e che non verrà divulgato a terzi nessun contenuto esclusi -ovviamente vincoli di legge come richieste da parte delle autorità. - - -3. Non si può avere più di un nickname per utente. --------------------------------------------------- - -Non è possibile che una singola persona abbia più di un nickname -con password. - -4. Autorizzazione alla divulgazione del proprio garante. --------------------------------------------------------- - -Si autorizza il sito a divulgare il nickname del proprio garante. - -5. Trattamento dei dati personali. ----------------------------------- - -Informativa ex art. 13 D.lgs. 196/2003 - -Gentile Signore/a, - -Desideriamo informarLa che il D.lgs. n. 196 del 30 giugno 2003 -("Codice in materia di protezione dei dati personali") prevede la tutela -delle persone e di altri soggetti rispetto al trattamento dei dati personali. - -Secondo la normativa indicata, tale trattamento sarà improntato ai principi -di correttezza, liceità e trasparenza e di tutela della Sua riservatezza e -dei Suoi diritti. - -Ai sensi dell'articolo 13 del D.lgs. n.196/2003, pertanto, Le forniamo -le seguenti informazioni: - -1. I dati da Lei forniti verranno trattati per le seguenti finalità: garantire -comunicazioni riservate tra il sito e l'utente. - -2. Il trattamento sarà di tipo informatizzato. - -3. Il conferimento dei dati è obbligatorio e l'eventuale rifiuto di fornire -tali dati (indirizzo email) comporta la mancata possibilità di proseguire -ad offrirLe un accesso riservato al sito e comunicazioni riservate. - -4. I dati non saranno comunicati ad altri soggetti, né saranno -oggetto di diffusione. diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index b2efb61..08ced76 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_lice_vers, $G_lice_fname, $G_lice_dtsoft, $G_lice_dthard, $G_lice_idx; + GLOBAL $G_tos_vers, $G_tos_fname, $G_tos_dtsoft, $G_tos_dthard, $G_tos_idx; if ($this->main_loop) { return (FALSE); diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 9554cc0..1d4b594 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -328,12 +328,12 @@ class User { $this->rec->supp_comp_get())); } - function licence_store() + function tos_store() { if (($bdb = BriskDB::create()) == FALSE) { return FALSE; } - return ($bdb->user_licence_update($this->code, $this->rec->lice_vers_get())); + return ($bdb->user_tos_update($this->code, $this->rec->tos_vers_get())); } function state_store() @@ -561,7 +561,7 @@ class 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; - GLOBAL $G_lice_vers, $G_lice_fname, $G_lice_dthard, $G_lice_dtsoft, $G_lice_idx; + GLOBAL $G_tos_vers, $G_tos_fname, $G_tos_dthard, $G_tos_dtsoft, $G_tos_idx; GLOBAL $S_load_stat; @@ -611,36 +611,25 @@ class User { log_rd("roomma ".$this->step); $curtime = time(); if ($this->rec !== FALSE) { - 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) { + 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_lice_fname, $G_lice_vers, $G_lang))), + $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." */), - "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)); + "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_lice_dthard) { + else if ($curtime > $G_tos_dthard) { // call notify hard - $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_lice_fname, $G_lice_vers, $G_lang))), + $ret .= show_notify_document(esclfhtml(file_get_contents($G_base.sprintf($G_tos_fname, $G_tos_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');", - xcape($this->rec->lice_vers_get()), xcape($G_lice_vers)); + "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)); } - - - /* $ret .= show_notify_ex(str_replace("\n", " ", "Versione corrente: [".$this->rec->lice_vers_get()."] Versione sito: ".$G_lice_vers), */ - /* ($is_super ? 0 : $G_splash_timeout), */ - /* // $mlang_indrd[($is_super ? 'btn_btotabsup' : 'btn_backtotab')][$G_lang], */ - /* $mlang_indrd['btn_backtotab'][$G_lang], */ - /* $G_splash_w, $G_splash_h, true, */ - /* ($is_super ? 0 : $G_splash_timeout)); */ - /* $ret .= sprintf('|createCookie("CO_lice_date%d", %d, 24*365, cookiepath);', $G_lice_idx, $curtime); */ - - } } } diff --git a/web/commons.js b/web/commons.js index a38a36c..c5cee04 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)' } }, - 'lic_refu' : { 'it' : 'Rifiutando di sottoscrivere la nuova licenza d\' uso 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 la nuova licenza d\' uso 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 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 ?', } }; @@ -481,7 +481,7 @@ function postact_logout() code - if soft: accept (0), refuse (1), after (2) if hard: accept (0), refuse (1) */ -function act_licencemgr(type, code, lice_curr, lice_vers) +function act_tosmgr(type, code, tos_curr, tos_vers) { if (type != "soft" && type != "hard") { return false; @@ -489,7 +489,7 @@ function act_licencemgr(type, code, lice_curr, lice_vers) switch (code) { case 0: case 1: - send_mesg("licencemgr|"+type+"|"+code+"|"+lice_curr+"|"+lice_vers); + send_mesg("tosmgr|"+type+"|"+code+"|"+tos_curr+"|"+tos_vers); break; case 2: break; @@ -499,10 +499,10 @@ function act_licencemgr(type, code, lice_curr, lice_vers) return true; } -function lice_confirm(val) +function tos_confirm(val) { if (val == 1) { - return (window.confirm(mlang_commons['lic_refu'][g_lang])); + return (window.confirm(mlang_commons['tos_refu'][g_lang])); } return true; diff --git a/web/index_wr.php b/web/index_wr.php index 75fed15..014b125 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -88,7 +88,7 @@ define('LICMGR_CHO_AFTER', 2); function index_wr_main(&$room, $remote_addr_full, $get, $post, $cookie) { GLOBAL $G_shutdown, $G_black_list, $G_lang, $G_room_help, $G_room_about, $G_room_passwdhowto, $mlang_indwr; - GLOBAL $G_lice_vers; + GLOBAL $G_tos_vers; $remote_addr = addrtoipv4($remote_addr_full); log_load("index_wr.php"); @@ -548,20 +548,20 @@ function index_wr_main(&$room, $remote_addr_full, $get, $post, $cookie) else if ($argz[0] == 'chatt') { $room->chatt_send(&$user, xcapemesg($mesg)); } - else if ($argz[0] == 'licencemgr') { - // check IF is authnticated user, both licences version matches + else if ($argz[0] == 'tosmgr') { + // check IF is authnticated user, both terms of service versions matches if ($user->flags & USER_FLAG_AUTH && count($argz) == 5) { $f_type = $argz[1]; $f_code = $argz[2]; - $f_lice_curr = $argz[3]; $f_lice_vers = $argz[4]; + $f_tos_curr = $argz[3]; $f_tos_vers = $argz[4]; - if ("$f_lice_curr" == $user->rec->lice_vers_get() && - "$f_lice_vers" == "$G_lice_vers") { + if ("$f_tos_curr" == $user->rec->tos_vers_get() && + "$f_tos_vers" == "$G_tos_vers") { if ("$f_type" == "soft" || "$f_type" == "hard") { $res = 100; switch ($f_code) { case LICMGR_CHO_ACCEPT: - $user->rec->lice_vers_set($G_lice_vers); - $res = $user->licence_store(); + $user->rec->tos_vers_set($G_tos_vers); + $res = $user->tos_store(); break; case LICMGR_CHO_REFUSE: $user->flags_set(USER_FLAG_TY_DISABLE, USER_FLAG_TY_ALL);