3 * brisk - dbase_base.phh
5 * Copyright (C) 2011-2012 Matteo Nastasi
6 * mailto: nastasi@alternativeoutput.it
7 * matteo.nastasi@milug.org
8 * web: http://www.alternativeoutput.it
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details. You should have received a
19 * copy of the GNU General Public License along with this program; if
20 * not, write to the Free Software Foundation, Inc, 59 Temple Place -
21 * Suite 330, Boston, MA 02111-1307, USA.
40 function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $tos_vers,
41 $disa_reas, $guar_code, $match_cnt, $game_cnt)
44 $this->login = $login;
46 $this->email = $email;
48 $this->last_dona = $last_dona;
49 $this->supp_comp = $supp_comp;
50 $this->tos_vers = $tos_vers;
51 $this->disa_reas = $disa_reas;
52 $this->guar_code = $guar_code;
53 $this->match_cnt = $match_cnt;
54 $this->game_cnt = $game_cnt;
57 static function LoginDBItemFromRecord($rec)
59 $ret = new LoginDBItem($rec->code, $rec->login, $rec->pass,
60 $rec->email, $rec->type, $rec->last_dona,
61 $rec->supp_comp, $rec->tos_vers, $rec->disa_reas, $rec->guar_code,
62 $rec->match_cnt, $rec->game_cnt);
92 function last_dona_get()
94 return $this->last_dona;
97 function supp_comp_get()
99 return $this->supp_comp;
101 function supp_comp_set($supp_comp)
103 $this->supp_comp = $supp_comp;
106 function tos_vers_get()
108 return $this->tos_vers;
110 function tos_vers_set($tos_vers)
112 $this->tos_vers = $tos_vers;
115 function disa_reas_get()
117 return $this->disa_reas;
119 function disa_reas_set($disa_reas)
121 $this->disa_reas = $disa_reas;
123 function guar_code_get()
125 return $this->guar_code;
128 function match_cnt_get()
130 return $this->match_cnt;
132 function match_cnt_add($v)
134 return $this->match_cnt += $v;
137 function game_cnt_get()
139 return $this->game_cnt;
141 function game_cnt_add($v)
143 return $this->game_cnt += $v;
147 define('MAIL_TYP_CHECK', 1);
159 function MailDBItem($code, $ucode, $type, $tstamp, $subj, $body_txt, $body_htm, $hash=NULL)
162 $this->ucode = $ucode;
164 $this->tstamp = $tstamp;
166 $this->body_txt = $body_txt;
167 $this->body_htm = $body_htm;
171 static function MailDBItemFromRecord($rec)
173 $ret = new MailDBItem($rec->code, $rec->ucode, $rec->type, $rec->tstamp, $rec->subj,
174 $rec->body_txt, $rec->body_htm, $rec->hash);
181 return $bdb->mail_add_fromitem($this);