[2] | 1 | <?php |
---|
[2363] | 2 | |
---|
| 3 | /*************************************************************************** |
---|
| 4 | * Expresso Livre * |
---|
| 5 | * http://www.expressolivre.org * |
---|
| 6 | * -------------------------------------------- * |
---|
| 7 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 8 | * under the terms of the GNU General Public License as published by the * |
---|
| 9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 10 | * option) any later version. * |
---|
| 11 | \**************************************************************************/ |
---|
[2] | 12 | |
---|
| 13 | class bo_group |
---|
| 14 | { |
---|
| 15 | |
---|
| 16 | var $so; |
---|
| 17 | |
---|
| 18 | function bo_group() |
---|
| 19 | { |
---|
| 20 | $this->so = CreateObject('contactcenter.so_group'); |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | function get_groups() |
---|
| 24 | { |
---|
| 25 | return $this->so -> select(); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | function get_group($id) |
---|
| 29 | { $result = $this-> so -> select($id); |
---|
| 30 | return $result[0]; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | function commit($status, $data) |
---|
| 34 | { |
---|
| 35 | if($status == 'insert') |
---|
| 36 | $result = $this-> so -> insert($data); |
---|
| 37 | |
---|
| 38 | else if($status == 'update') |
---|
| 39 | $result = $this-> so -> update($data); |
---|
| 40 | |
---|
| 41 | else if($status == 'delete') |
---|
| 42 | $result = $this-> so -> delete($data); |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | return $result; |
---|
| 46 | } |
---|
| 47 | |
---|
[1280] | 48 | function get_all_contacts($field = false,$owner=null){ |
---|
[2] | 49 | |
---|
[1280] | 50 | $result = $this-> so -> selectAllContacts($field,$owner); |
---|
[2] | 51 | return $result; |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | function verify_contact($email){ |
---|
| 55 | |
---|
| 56 | $result = $this-> so -> verifyContact($email); |
---|
| 57 | return $result; |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | function get_contacts_by_group($id){ |
---|
| 61 | |
---|
| 62 | $result = $this-> so -> selectContactsByGroup($id); |
---|
| 63 | return $result; |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | function getContactsByGroupAlias($alias){ |
---|
| 67 | $result = $this-> so -> selectContactsByGroupAlias($alias); |
---|
| 68 | return $result; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | } |
---|
| 73 | ?> |
---|