source: companies/serpro/contactcenter/inc/class.so_company_address_type.inc.php @ 903

Revision 903, 2.1 KB checked in by niltonneto, 15 years ago (diff)

Importacao inicial do Expresso do Serpro

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