[763] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare - Admin - Peer Servers * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * Written by Joseph Engo <jengo@mail.com> * |
---|
| 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 | \**************************************************************************/ |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | class soserver |
---|
| 15 | { |
---|
| 16 | var $is = ''; |
---|
| 17 | var $debug = False; |
---|
| 18 | |
---|
| 19 | function soserver() |
---|
| 20 | { |
---|
| 21 | $this->is = CreateObject('phpgwapi.interserver'); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | function list_servers($data='',&$total) |
---|
| 25 | { |
---|
| 26 | if(@is_array($data)) |
---|
| 27 | { |
---|
| 28 | if($this->debug) { _debug_array($data); } |
---|
| 29 | list($start,$sort,$order,$query,$limit) = $data; |
---|
| 30 | } |
---|
| 31 | return $this->is->get_list($start,$sort,$order,$query,$limit,$total); |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | function read($id) |
---|
| 35 | { |
---|
| 36 | return $this->is->read_repository($id); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | function add($server_info) |
---|
| 40 | { |
---|
| 41 | return $this->is->create($server_info); |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | function update($server_info) |
---|
| 45 | { |
---|
| 46 | $this->is->server = $server_info; |
---|
| 47 | $this->is->save_repository($server_info['server_id']); |
---|
| 48 | return $this->is->read_repository($server_info['server_id']); |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | function delete($id) |
---|
| 52 | { |
---|
| 53 | return $this->is->delete($id); |
---|
| 54 | } |
---|
| 55 | } |
---|
| 56 | ?> |
---|