Copyright date updated
[brisk.git] / web / Obj / dbase_base.phh
1 <?php
2   /*
3    *  brisk - dbase_base.phh
4    *
5    *  Copyright (C) 2011-2012 Matteo Nastasi
6    *                          mailto: nastasi@alternativeoutput.it 
7    *                                  matteo.nastasi@milug.org
8    *                          web: http://www.alternativeoutput.it
9    *
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.
14    *
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.
22    *
23    */
24
25
26 class LoginDBItem {
27     var $code;
28     var $login;
29     var $pass;
30     var $email;
31     var $type;
32
33     function LoginDBItem($code, $login, $pass, $email, $type)
34     {
35         $this->code  = $code;
36         $this->login = $login;
37         $this->pass  = $pass;
38         $this->email = $email;
39         $this->type  = $type;
40     }
41
42     static function LoginDBItemFromRecord($rec)
43     {
44         $ret = new LoginDBItem($rec->code, $rec->login, $rec->pass, 
45                                  $rec->email, $rec->type);
46
47         return ($ret);
48     }
49
50     function code_get()
51     {
52         return $this->code;
53     }
54
55     function login_get()
56     {
57         return $this->login;
58     }
59     
60     function pass_get()
61     {
62         return $this->pass;
63     }
64
65     function email_get()
66     {
67         return $this->email;
68     }
69
70     function type_get()
71     {
72         return $this->type;
73     }
74
75 }
76
77 class LoginDBItemOld extends LoginDBItem {
78     function LoginDBItemOld($login, $pass, $email, $type)
79     {
80         parent::LoginDBItem(-1, $login, $pass, $email, $type);
81     }
82 }
83
84 ?>