source: branches/1.2/contactcenter/inc/class.so_contact_address_type.inc.php @ 2

Revision 2, 2.2 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2  /***************************************************************************\
3  * eGroupWare - Contacts Center                                              *
4  * http://www.egroupware.org                                                 *
5  *                                                                           *
6  * Storage Object Classes                                                    *
7  * Written by:                                                               *
8  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
9  *  sponsored by Thyamad - http://www.thyamad.com                            *
10  * ------------------------------------------------------------------------- *
11  *  This program is free software; you can redistribute it and/or modify it  *
12  *  under the terms of the GNU General Public License as published by the    *
13  *  Free Software Foundation; either version 2 of the License, or (at your   *
14  *  option) any later version.                                               *
15  \***************************************************************************/
16
17
18        include_once( "class.so_type.inc.php" );
19       
20        class so_contact_address_type extends so_type
21        {
22       
23                function so_contact_address_type ( $id = false )
24                {
25                        $this->init();
26                       
27                        $this->main_fields = array(
28                                'id_typeof_contact_address' => array(
29                                        'name'  => 'id_typeof_contact_address',
30                                        'type'  => 'primary',
31                                        'state' => 'empty',
32                                        'value' => &$this->id
33                                ),
34                                'contact_address_type_name' => array(
35                                        'name'  => 'contact_address_type_name',
36                                        'type'  => false,
37                                        'state' => 'empty',
38                                        'value' => false
39                                )
40                        );
41
42                        $this->type_name = & $this->main_fields['contact_address_type_name'];
43
44                        $this->db_tables = array(
45                                'phpgw_cc_typeof_ct_addrs' => array(
46                                        'type'   => 'main',
47                                        'keys'   => array(
48                                                'primary' => array(&$this->main_fields['id_typeof_contact_address']),
49                                                'foreign' => false
50                                        ),
51                                        'fields' => & $this->main_fields
52                                )
53                        );
54                       
55                        if ($id)
56                        {
57                                if (!$this->checkout($id))
58                                {
59                                        $this->reset_values();
60                                        $this->state = 'new';
61                                }
62                        }
63                        else
64                        {
65                                $this->state = 'new';
66                        }
67                }
68       
69        }
70?>
Note: See TracBrowser for help on using the repository browser.