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.
38 function LoginDBItem($code, $login, $pass, $email, $type, $last_dona, $supp_comp, $tos_vers, $disa_reas, $guar_code)
41 $this->login = $login;
43 $this->email = $email;
45 $this->last_dona = $last_dona;
46 $this->supp_comp = $supp_comp;
47 $this->tos_vers = $tos_vers;
48 $this->disa_reas = $disa_reas;
49 $this->guar_code = $guar_code;
52 static function LoginDBItemFromRecord($rec)
54 $ret = new LoginDBItem($rec->code, $rec->login, $rec->pass,
55 $rec->email, $rec->type, $rec->last_dona,
56 $rec->supp_comp, $rec->tos_vers, $rec->disa_reas, $rec->guar_code);
86 function last_dona_get()
88 return $this->last_dona;
91 function supp_comp_get()
93 return $this->supp_comp;
95 function supp_comp_set($supp_comp)
97 $this->supp_comp = $supp_comp;
100 function tos_vers_get()
102 return $this->tos_vers;
104 function tos_vers_set($tos_vers)
106 $this->tos_vers = $tos_vers;
109 function disa_reas_get()
111 return $this->disa_reas;
113 function disa_reas_set($disa_reas)
115 $this->disa_reas = $disa_reas;
117 function guar_code_get()
119 return $this->guar_code;
124 define('MAIL_TYP_CHECK', 1);
136 function MailDBItem($code, $ucode, $type, $tstamp, $subj, $body_txt, $body_htm, $hash=NULL)
139 $this->ucode = $ucode;
141 $this->tstamp = $tstamp;
143 $this->body_txt = $body_txt;
144 $this->body_htm = $body_htm;
148 static function MailDBItemFromRecord($rec)
150 $ret = new MailDBItem($rec->code, $rec->ucode, $rec->type, $rec->tstamp, $rec->subj,
151 $rec->body_txt, $rec->body_htm, $rec->hash);
158 return $bdb->mail_add_fromitem($this);