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_main.inc.php"); |
---|
19 | |
---|
20 | class so_country |
---|
21 | { |
---|
22 | |
---|
23 | function so_country ( $id = false ) |
---|
24 | { |
---|
25 | if($id) |
---|
26 | { |
---|
27 | $obj = CreateObject('phpgwapi.country'); |
---|
28 | $countries = $obj->country_array; |
---|
29 | |
---|
30 | if ($countries[$id]) |
---|
31 | { |
---|
32 | $name = lang($countries[$id]); |
---|
33 | $this->country = $name{0} . strtolower(substr($name, 1)); |
---|
34 | } |
---|
35 | } |
---|
36 | } |
---|
37 | |
---|
38 | |
---|
39 | /*********************************************************************\ |
---|
40 | * Methods to Get Information * |
---|
41 | \*********************************************************************/ |
---|
42 | |
---|
43 | /*! |
---|
44 | |
---|
45 | @function get_country_name |
---|
46 | @abstract Returns the Name of the Country |
---|
47 | @author Raphael Derosso Pereira |
---|
48 | |
---|
49 | */ |
---|
50 | function get_country_name ( ) |
---|
51 | { |
---|
52 | return $this->country; |
---|
53 | } |
---|
54 | } |
---|
55 | |
---|
56 | ?> |
---|