From 7b4375bcaf7de9530942d79b3bb78991054d7e84 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Thu, 14 Mar 2013 08:07:19 +0100 Subject: [PATCH] last_dona management factorization and promo --- web/Obj/brisk.phh | 10 +++++----- web/Obj/user.phh | 15 +++++++++++++++ web/briskin5/Obj/briskin5.phh | 2 +- web/index.php | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 058cf34..90c5b50 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -141,10 +141,10 @@ $mlang_brisk = array( 'btn_backstand'=> array( 'it' => 'torna in piedi', $G_lng = langtolng($G_lang); $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 ); -$G_brisk_version = "4.7.0"; +$G_brisk_version = "4.7.1"; /* MLANG: ALL THE INFO STRINGS IN brisk.phh */ -$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': aggiunta infrastruttura per gestire le preferenze utente lato server e la personalizzazione delle S di supporter.', +$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': prova il nuovo azioni->preferenze.', 'Se vuoi iscriverti alla Mailing List, cliccala!' ), 'en' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NEWS: server-side infrastructure to manage user preferences added and S customization added.', 'If you want to subscribe our Mailing List, click it!' ) ); @@ -779,7 +779,7 @@ class Client_prefs { $user->flags_set(($this->listen << 2), USER_FLAG_MAP_AUTH); fprintf(STDERR, "QQ %s::%s %x\n", __CLASS__, __FUNCTION__, $user->flags); - if ($user->rec != FALSE && $user->rec->last_dona > 1356994800) { + if ($user->is_supp_custom()) { $user->rec->supp_comp = $this->supp_comp; } if ($is_save) @@ -2231,7 +2231,7 @@ class Room $flags = $this->user[$i]->flags; // sql record exists AND last donate > 2013-01-01 - if ($this->user[$i]->rec != FALSE && $this->user[$i]->rec->last_dona > 1356994800) { + if ($this->user[$i]->is_supp_custom()) { $supp_comp_s = sprintf(', "%s"', $this->user[$i]->rec->supp_comp); } else { @@ -2279,7 +2279,7 @@ class Room $flags |= 1; log_main($user_cur->name. sprintf(" IN TABLE [%d]", $table_idx)); - if ($user_cur->rec != FALSE && $user_cur->rec->last_dona > 1356994800) + if ($user_cur->is_supp_custom()) $supp_comp_s = sprintf(', "%s"', $user_cur->rec->supp_comp); else $supp_comp_s = ''; diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 416dbb4..51956c8 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -762,6 +762,21 @@ static function base_get() return $c::BASE; } +function is_supp_custom() +{ + if ($this->rec != FALSE) { + if ($this->flags & USER_FLAG_TY_SUPER) { + return (TRUE); + } + /* + if ($this->rec->last_dona > 1356994800) { + return (TRUE); + } + */ + } + return (FALSE); +} + } // end class User diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index d7dc0df..008d85c 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -525,7 +525,7 @@ class Bin5_user extends User { log_wr("Bin5 constructor"); - $this->privflags = ($CO_bin5_pref_ring_endauct == "true" ? BIN5_USER_FLAG_RING_ENDAUCT : 0) | 0; + $thiz->privflags = ($CO_bin5_pref_ring_endauct == "true" ? BIN5_USER_FLAG_RING_ENDAUCT : 0) | 0; $thiz->table_orig = $table; $thiz->table = 0; diff --git a/web/index.php b/web/index.php index b5ed1e9..0b3076a 100644 --- a/web/index.php +++ b/web/index.php @@ -1245,7 +1245,7 @@ type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chi rec != FALSE && $user->rec->last_dona > 1356994800) { +if ($user->is_supp_custom()) { ?> -- 2.17.1