the dbase part is moved to another file to be able to use sql or file (new files)
[brisk.git] / web / Obj / dbase_base.phh
diff --git a/web/Obj/dbase_base.phh b/web/Obj/dbase_base.phh
new file mode 100644 (file)
index 0000000..2db3934
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+  /*
+   *  brisk - dbase_base.phh
+   *
+   *  Copyright (C) 2011      Matteo Nastasi
+   *                          mailto: nastasi@alternativeoutput.it 
+   *                                  matteo.nastasi@milug.org
+   *                          web: http://www.alternativeoutput.it
+   *
+   * This program is free software; you can redistribute it and/or modify
+   * it under the terms of the GNU General Public License as published by
+   * the Free Software Foundation; either version 2 of the License, or
+   * (at your option) any later version.
+   *
+   * This program is distributed in the hope that it will be useful, but
+   * WITHOUT ANY WARRANTY; without even the implied warranty of
+   * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   * General Public License for more details. You should have received a
+   * copy of the GNU General Public License along with this program; if
+   * not, write to the Free Software Foundation, Inc, 59 Temple Place -
+   * Suite 330, Boston, MA 02111-1307, USA.
+   *
+   */
+
+
+class LoginDBItem {
+    var $code;
+    var $login;
+    var $pass;
+    var $email;
+    var $type;
+
+    function LoginDBItem($code, $login, $pass, $email, $type)
+    {
+        $this->code  = $code;
+        $this->login = $login;
+        $this->pass  = $pass;
+        $this->email = $email;
+        $this->type  = $type;
+    }
+
+    static function &LoginDBItemFromRecord($rec)
+    {
+        $ret = & new LoginDBItem($rec->code, $rec->login, $rec->pass, 
+                                 $rec->email, $rec->type);
+
+        return ($ret);
+    }
+
+    function codeget()
+    {
+        return $this->code;
+    }
+
+    function loginget()
+    {
+        return $this->login;
+    }
+    
+    function passget()
+    {
+        return $this->pass;
+    }
+
+    function emailget()
+    {
+        return $this->email;
+    }
+
+    function typeget()
+    {
+        return $this->type;
+    }
+
+}
+
+?>
\ No newline at end of file