Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | class bo_group |
---|
4 | { |
---|
5 | |
---|
6 | var $so; |
---|
7 | |
---|
8 | function bo_group() |
---|
9 | { |
---|
10 | $this->so = CreateObject('contactcenter.so_group'); |
---|
11 | } |
---|
12 | |
---|
13 | function get_groups() |
---|
14 | { |
---|
15 | return $this->so -> select(); |
---|
16 | } |
---|
17 | |
---|
18 | function get_group($id) |
---|
19 | { $result = $this-> so -> select($id); |
---|
20 | return $result[0]; |
---|
21 | } |
---|
22 | |
---|
23 | function commit($status, $data) |
---|
24 | { |
---|
25 | if($status == 'insert') |
---|
26 | $result = $this-> so -> insert($data); |
---|
27 | |
---|
28 | else if($status == 'update') |
---|
29 | $result = $this-> so -> update($data); |
---|
30 | |
---|
31 | else if($status == 'delete') |
---|
32 | $result = $this-> so -> delete($data); |
---|
33 | |
---|
34 | |
---|
35 | return $result; |
---|
36 | } |
---|
37 | |
---|
38 | function get_all_contacts($field = false,$owner=null){ |
---|
39 | |
---|
40 | $result = $this-> so -> selectAllContacts($field,$owner); |
---|
41 | return $result; |
---|
42 | } |
---|
43 | |
---|
44 | function verify_contact($email){ |
---|
45 | |
---|
46 | $result = $this-> so -> verifyContact($email); |
---|
47 | return $result; |
---|
48 | } |
---|
49 | |
---|
50 | function verify_shared_contact($owner,$email){ |
---|
51 | |
---|
52 | $result = $this-> so -> verifySharedContact($owner,$email); |
---|
53 | return $result; |
---|
54 | } |
---|
55 | |
---|
56 | function get_contacts_by_group($id){ |
---|
57 | |
---|
58 | $result = $this-> so -> selectContactsByGroup($id); |
---|
59 | return $result; |
---|
60 | } |
---|
61 | |
---|
62 | function getContactsByGroupAlias($alias){ |
---|
63 | $result = $this-> so -> selectContactsByGroupAlias($alias); |
---|
64 | return $result; |
---|
65 | } |
---|
66 | |
---|
67 | |
---|
68 | } |
---|
69 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.