%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home1/lightco1/public_html/plugins/user/joomlamailer/fields/
Upload File :
Create Path :
Current File : //home1/lightco1/public_html/plugins/user/joomlamailer/fields/address.php

<?php

/**

* Copyright (C) 2015  freakedout (www.freakedout.de)

* This program is free software: you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation, either version 3 of the License, or

* (at your option) any later version.

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License

* along with this program.  If not, see <http://www.gnu.org/licenses/>.

**/



defined('JPATH_PLATFORM') or die;



class JFormFieldAddress extends JFormField {

	protected $type = 'Address';



	protected function getInput() {

        $input = '<style type="text/css">.addressfield { margin-bottom: 1em !important; }</style>';

        $this->class = trim($this->class . ' addressfield');

        $class = 'class="' . $this->class . '" ';



        $input .= '<input type="text" name="' . $this->name . '[addr1]" ' . $class .

            'placeholder="' . JText::_('PLG_USER_JOOMLAMAILER_STREET_ADDRESS') . '" value="' . @$this->value['addr1'] . '" /><br />';



        $input .= '<input type="text" name="' . $this->name . '[addr2]" ' . $class .

            'placeholder="' . JText::_('PLG_USER_JOOMLAMAILER_ADDRESS_LINE_2') . '" value="' . @$this->value['addr2'] . '" /><br />';



        $input .= '<input type="text" name="' . $this->name . '[city]" ' . $class .

            'placeholder="' . JText::_('PLG_USER_JOOMLAMAILER_CITY') . '" value="' . @$this->value['city'] . '" /><br />';



        $input .= '<input type="text" name="' . $this->name . '[state]" ' . $class .

            'placeholder="' . JText::_('PLG_USER_JOOMLAMAILER_STATE_PROVINCE_REGION') . '"  value="' . @$this->value['state'] . '" /><br />';



        $input .= '<input type="text" name="' . $this->name . '[zip]" ' . $class .

            'placeholder="' . JText::_('PLG_USER_JOOMLAMAILER_ZIP_POSTAL') . '" value="' . @$this->value['zip'] . '" /><br />';



        $options = array(

            array('value' => '', 'label' => JText::_('PLG_USER_JOOMLAMAILER_COUNTRY')),

            array('value' => 'AF', 'label' => 'AFGHANISTAN'),

            array('value' => 'AX', 'label' => 'ÅLAND ISLANDS'),

            array('value' => 'AL', 'label' => 'ALBANIA'),

            array('value' => 'DZ', 'label' => 'ALGERIA'),

            array('value' => 'AS', 'label' => 'AMERICAN SAMOA'),

            array('value' => 'AD', 'label' => 'ANDORRA'),

            array('value' => 'AO', 'label' => 'ANGOLA'),

            array('value' => 'AI', 'label' => 'ANGUILLA'),

            array('value' => 'AQ', 'label' => 'ANTARCTICA'),

            array('value' => 'AG', 'label' => 'ANTIGUA AND BARBUDA'),

            array('value' => 'AR', 'label' => 'ARGENTINA'),

            array('value' => 'AM', 'label' => 'ARMENIA'),

            array('value' => 'AW', 'label' => 'ARUBA'),

            array('value' => 'AU', 'label' => 'AUSTRALIA'),

            array('value' => 'AT', 'label' => 'AUSTRIA'),

            array('value' => 'AZ', 'label' => 'AZERBAIJAN'),

            array('value' => 'BS', 'label' => 'BAHAMAS'),

            array('value' => 'BH', 'label' => 'BAHRAIN'),

            array('value' => 'BD', 'label' => 'BANGLADESH'),

            array('value' => 'BB', 'label' => 'BARBADOS'),

            array('value' => 'BY', 'label' => 'BELARUS'),

            array('value' => 'BE', 'label' => 'BELGIUM'),

            array('value' => 'BZ', 'label' => 'BELIZE'),

            array('value' => 'BJ', 'label' => 'BENIN'),

            array('value' => 'BM', 'label' => 'BERMUDA'),

            array('value' => 'BT', 'label' => 'BHUTAN'),

            array('value' => 'BO', 'label' => 'BOLIVIA, PLURINATIONAL STATE OF'),

            array('value' => 'BA', 'label' => 'BOSNIA AND HERZEGOVINA'),

            array('value' => 'BW', 'label' => 'BOTSWANA'),

            array('value' => 'BV', 'label' => 'BOUVET ISLAND'),

            array('value' => 'BR', 'label' => 'BRAZIL'),

            array('value' => 'IO', 'label' => 'BRITISH INDIAN OCEAN TERRITORY'),

            array('value' => 'BN', 'label' => 'BRUNEI DARUSSALAM'),

            array('value' => 'BG', 'label' => 'BULGARIA'),

            array('value' => 'BF', 'label' => 'BURKINA FASO'),

            array('value' => 'BI', 'label' => 'BURUNDI'),

            array('value' => 'KH', 'label' => 'CAMBODIA'),

            array('value' => 'CM', 'label' => 'CAMEROON'),

            array('value' => 'CA', 'label' => 'CANADA'),

            array('value' => 'CV', 'label' => 'CAPE VERDE'),

            array('value' => 'KY', 'label' => 'CAYMAN ISLANDS'),

            array('value' => 'CF', 'label' => 'CENTRAL AFRICAN REPUBLIC'),

            array('value' => 'TD', 'label' => 'CHAD'),

            array('value' => 'CL', 'label' => 'CHILE'),

            array('value' => 'CN', 'label' => 'CHINA'),

            array('value' => 'CX', 'label' => 'CHRISTMAS ISLAND'),

            array('value' => 'CC', 'label' => 'COCOS (KEELING) ISLANDS'),

            array('value' => 'CO', 'label' => 'COLOMBIA'),

            array('value' => 'KM', 'label' => 'COMOROS'),

            array('value' => 'CG', 'label' => 'CONGO'),

            array('value' => 'CD', 'label' => 'CONGO, THE DEMOCRATIC REPUBLIC OF THE'),

            array('value' => 'CK', 'label' => 'COOK ISLANDS'),

            array('value' => 'CR', 'label' => 'COSTA RICA'),

            array('value' => 'CI', 'label' => 'CÔTE D\'IVOIRE'),

            array('value' => 'HR', 'label' => 'CROATIA'),

            array('value' => 'CU', 'label' => 'CUBA'),

            array('value' => 'CY', 'label' => 'CYPRUS'),

            array('value' => 'CZ', 'label' => 'CZECH REPUBLIC'),

            array('value' => 'DK', 'label' => 'DENMARK'),

            array('value' => 'DJ', 'label' => 'DJIBOUTI'),

            array('value' => 'DM', 'label' => 'DOMINICA'),

            array('value' => 'DO', 'label' => 'DOMINICAN REPUBLIC'),

            array('value' => 'EC', 'label' => 'ECUADOR'),

            array('value' => 'EG', 'label' => 'EGYPT'),

            array('value' => 'SV', 'label' => 'EL SALVADOR'),

            array('value' => 'GQ', 'label' => 'EQUATORIAL GUINEA'),

            array('value' => 'ER', 'label' => 'ERITREA'),

            array('value' => 'EE', 'label' => 'ESTONIA'),

            array('value' => 'ET', 'label' => 'ETHIOPIA'),

            array('value' => 'FK', 'label' => 'FALKLAND ISLANDS (MALVINAS)'),

            array('value' => 'FO', 'label' => 'FAROE ISLANDS'),

            array('value' => 'FJ', 'label' => 'FIJI'),

            array('value' => 'FI', 'label' => 'FINLAND'),

            array('value' => 'FR', 'label' => 'FRANCE'),

            array('value' => 'GF', 'label' => 'FRENCH GUIANA'),

            array('value' => 'PF', 'label' => 'FRENCH POLYNESIA'),

            array('value' => 'TF', 'label' => 'FRENCH SOUTHERN TERRITORIES'),

            array('value' => 'GA', 'label' => 'GABON'),

            array('value' => 'GM', 'label' => 'GAMBIA'),

            array('value' => 'GE', 'label' => 'GEORGIA'),

            array('value' => 'DE', 'label' => 'GERMANY'),

            array('value' => 'GH', 'label' => 'GHANA'),

            array('value' => 'GI', 'label' => 'GIBRALTAR'),

            array('value' => 'GR', 'label' => 'GREECE'),

            array('value' => 'GL', 'label' => 'GREENLAND'),

            array('value' => 'GD', 'label' => 'GRENADA'),

            array('value' => 'GP', 'label' => 'GUADELOUPE'),

            array('value' => 'GU', 'label' => 'GUAM'),

            array('value' => 'GT', 'label' => 'GUATEMALA'),

            array('value' => 'GG', 'label' => 'GUERNSEY'),

            array('value' => 'GN', 'label' => 'GUINEA'),

            array('value' => 'GW', 'label' => 'GUINEA-BISSAU'),

            array('value' => 'GY', 'label' => 'GUYANA'),

            array('value' => 'HT', 'label' => 'HAITI'),

            array('value' => 'HM', 'label' => 'HEARD ISLAND AND MCDONALD ISLANDS'),

            array('value' => 'VA', 'label' => 'HOLY SEE (VATICAN CITY STATE)'),

            array('value' => 'HN', 'label' => 'HONDURAS'),

            array('value' => 'HK', 'label' => 'HONG KONG'),

            array('value' => 'HU', 'label' => 'HUNGARY'),

            array('value' => 'IS', 'label' => 'ICELAND'),

            array('value' => 'IN', 'label' => 'INDIA'),

            array('value' => 'ID', 'label' => 'INDONESIA'),

            array('value' => 'IR', 'label' => 'IRAN, ISLAMIC REPUBLIC OF'),

            array('value' => 'IQ', 'label' => 'IRAQ'),

            array('value' => 'IE', 'label' => 'IRELAND'),

            array('value' => 'IM', 'label' => 'ISLE OF MAN'),

            array('value' => 'IL', 'label' => 'ISRAEL'),

            array('value' => 'IT', 'label' => 'ITALY'),

            array('value' => 'JM', 'label' => 'JAMAICA'),

            array('value' => 'JP', 'label' => 'JAPAN'),

            array('value' => 'JE', 'label' => 'JERSEY'),

            array('value' => 'JO', 'label' => 'JORDAN'),

            array('value' => 'KZ', 'label' => 'KAZAKHSTAN'),

            array('value' => 'KE', 'label' => 'KENYA'),

            array('value' => 'KI', 'label' => 'KIRIBATI'),

            array('value' => 'KP', 'label' => 'KOREA, DEMOCRATIC PEOPLE\'S REPUBLIC OF'),

            array('value' => 'KR', 'label' => 'KOREA, REPUBLIC OF'),

            array('value' => 'KW', 'label' => 'KUWAIT'),

            array('value' => 'KG', 'label' => 'KYRGYZSTAN'),

            array('value' => 'LA', 'label' => 'LAO PEOPLE\'S DEMOCRATIC REPUBLIC'),

            array('value' => 'LV', 'label' => 'LATVIA'),

            array('value' => 'LB', 'label' => 'LEBANON'),

            array('value' => 'LS', 'label' => 'LESOTHO'),

            array('value' => 'LR', 'label' => 'LIBERIA'),

            array('value' => 'LY', 'label' => 'LIBYAN ARAB JAMAHIRIYA'),

            array('value' => 'LI', 'label' => 'LIECHTENSTEIN'),

            array('value' => 'LT', 'label' => 'LITHUANIA'),

            array('value' => 'LU', 'label' => 'LUXEMBOURG'),

            array('value' => 'MO', 'label' => 'MACAO'),

            array('value' => 'MK', 'label' => 'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF'),

            array('value' => 'MG', 'label' => 'MADAGASCAR'),

            array('value' => 'MW', 'label' => 'MALAWI'),

            array('value' => 'MY', 'label' => 'MALAYSIA'),

            array('value' => 'MV', 'label' => 'MALDIVES'),

            array('value' => 'ML', 'label' => 'MALI'),

            array('value' => 'MT', 'label' => 'MALTA'),

            array('value' => 'MH', 'label' => 'MARSHALL ISLANDS'),

            array('value' => 'MQ', 'label' => 'MARTINIQUE'),

            array('value' => 'MR', 'label' => 'MAURITANIA'),

            array('value' => 'MU', 'label' => 'MAURITIUS'),

            array('value' => 'YT', 'label' => 'MAYOTTE'),

            array('value' => 'MX', 'label' => 'MEXICO'),

            array('value' => 'FM', 'label' => 'MICRONESIA, FEDERATED STATES OF'),

            array('value' => 'MD', 'label' => 'MOLDOVA, REPUBLIC OF'),

            array('value' => 'MC', 'label' => 'MONACO'),

            array('value' => 'MN', 'label' => 'MONGOLIA'),

            array('value' => 'ME', 'label' => 'MONTENEGRO'),

            array('value' => 'MS', 'label' => 'MONTSERRAT'),

            array('value' => 'MA', 'label' => 'MOROCCO'),

            array('value' => 'MZ', 'label' => 'MOZAMBIQUE'),

            array('value' => 'MM', 'label' => 'MYANMAR'),

            array('value' => 'NA', 'label' => 'NAMIBIA'),

            array('value' => 'NR', 'label' => 'NAURU'),

            array('value' => 'NP', 'label' => 'NEPAL'),

            array('value' => 'NL', 'label' => 'NETHERLANDS'),

            array('value' => 'AN', 'label' => 'NETHERLANDS ANTILLES'),

            array('value' => 'NC', 'label' => 'NEW CALEDONIA'),

            array('value' => 'NZ', 'label' => 'NEW ZEALAND'),

            array('value' => 'NI', 'label' => 'NICARAGUA'),

            array('value' => 'NE', 'label' => 'NIGER'),

            array('value' => 'NG', 'label' => 'NIGERIA'),

            array('value' => 'NU', 'label' => 'NIUE'),

            array('value' => 'NF', 'label' => 'NORFOLK ISLAND'),

            array('value' => 'MP', 'label' => 'NORTHERN MARIANA ISLANDS'),

            array('value' => 'NO', 'label' => 'NORWAY'),

            array('value' => 'OM', 'label' => 'OMAN'),

            array('value' => 'PK', 'label' => 'PAKISTAN'),

            array('value' => 'PW', 'label' => 'PALAU'),

            array('value' => 'PS', 'label' => 'PALESTINIAN TERRITORY, OCCUPIED'),

            array('value' => 'PA', 'label' => 'PANAMA'),

            array('value' => 'PG', 'label' => 'PAPUA NEW GUINEA'),

            array('value' => 'PY', 'label' => 'PARAGUAY'),

            array('value' => 'PE', 'label' => 'PERU'),

            array('value' => 'PH', 'label' => 'PHILIPPINES'),

            array('value' => 'PN', 'label' => 'PITCAIRN'),

            array('value' => 'PL', 'label' => 'POLAND'),

            array('value' => 'PT', 'label' => 'PORTUGAL'),

            array('value' => 'PR', 'label' => 'PUERTO RICO'),

            array('value' => 'QA', 'label' => 'QATAR'),

            array('value' => 'RE', 'label' => 'RÉUNION'),

            array('value' => 'RO', 'label' => 'ROMANIA'),

            array('value' => 'RU', 'label' => 'RUSSIAN FEDERATION'),

            array('value' => 'RW', 'label' => 'RWANDA'),

            array('value' => 'BL', 'label' => 'SAINT BARTHÉLEMY'),

            array('value' => 'SH', 'label' => 'SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA'),

            array('value' => 'KN', 'label' => 'SAINT KITTS AND NEVIS'),

            array('value' => 'LC', 'label' => 'SAINT LUCIA'),

            array('value' => 'MF', 'label' => 'SAINT MARTIN'),

            array('value' => 'PM', 'label' => 'SAINT PIERRE AND MIQUELON'),

            array('value' => 'VC', 'label' => 'SAINT VINCENT AND THE GRENADINES'),

            array('value' => 'WS', 'label' => 'SAMOA'),

            array('value' => 'SM', 'label' => 'SAN MARINO'),

            array('value' => 'ST', 'label' => 'SAO TOME AND PRINCIPE'),

            array('value' => 'SA', 'label' => 'SAUDI ARABIA'),

            array('value' => 'SN', 'label' => 'SENEGAL'),

            array('value' => 'RS', 'label' => 'SERBIA'),

            array('value' => 'SC', 'label' => 'SEYCHELLES'),

            array('value' => 'SL', 'label' => 'SIERRA LEONE'),

            array('value' => 'SG', 'label' => 'SINGAPORE'),

            array('value' => 'SK', 'label' => 'SLOVAKIA'),

            array('value' => 'SI', 'label' => 'SLOVENIA'),

            array('value' => 'SB', 'label' => 'SOLOMON ISLANDS'),

            array('value' => 'SO', 'label' => 'SOMALIA'),

            array('value' => 'ZA', 'label' => 'SOUTH AFRICA'),

            array('value' => 'GS', 'label' => 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS'),

            array('value' => 'ES', 'label' => 'SPAIN'),

            array('value' => 'LK', 'label' => 'SRI LANKA'),

            array('value' => 'SD', 'label' => 'SUDAN'),

            array('value' => 'SR', 'label' => 'SURINAME'),

            array('value' => 'SJ', 'label' => 'SVALBARD AND JAN MAYEN'),

            array('value' => 'SZ', 'label' => 'SWAZILAND'),

            array('value' => 'SE', 'label' => 'SWEDEN'),

            array('value' => 'CH', 'label' => 'SWITZERLAND'),

            array('value' => 'SY', 'label' => 'SYRIAN ARAB REPUBLIC'),

            array('value' => 'TW', 'label' => 'TAIWAN, PROVINCE OF CHINA'),

            array('value' => 'TJ', 'label' => 'TAJIKISTAN'),

            array('value' => 'TZ', 'label' => 'TANZANIA, UNITED REPUBLIC OF'),

            array('value' => 'TH', 'label' => 'THAILAND'),

            array('value' => 'TL', 'label' => 'TIMOR-LESTE'),

            array('value' => 'TG', 'label' => 'TOGO'),

            array('value' => 'TK', 'label' => 'TOKELAU'),

            array('value' => 'TO', 'label' => 'TONGA'),

            array('value' => 'TT', 'label' => 'TRINIDAD AND TOBAGO'),

            array('value' => 'TN', 'label' => 'TUNISIA'),

            array('value' => 'TR', 'label' => 'TURKEY'),

            array('value' => 'TM', 'label' => 'TURKMENISTAN'),

            array('value' => 'TC', 'label' => 'TURKS AND CAICOS ISLANDS'),

            array('value' => 'TV', 'label' => 'TUVALU'),

            array('value' => 'UG', 'label' => 'UGANDA'),

            array('value' => 'UA', 'label' => 'UKRAINE'),

            array('value' => 'AE', 'label' => 'UNITED ARAB EMIRATES'),

            array('value' => 'GB', 'label' => 'UNITED KINGDOM'),

            array('value' => 'US', 'label' => 'UNITED STATES'),

            array('value' => 'UM', 'label' => 'UNITED STATES MINOR OUTLYING ISLANDS'),

            array('value' => 'UY', 'label' => 'URUGUAY'),

            array('value' => 'UZ', 'label' => 'UZBEKISTAN'),

            array('value' => 'VU', 'label' => 'VANUATU'),

            array('value' => 'VA', 'label' => 'VATICAN CITY STATE'),

            array('value' => 'VE', 'label' => 'VENEZUELA, BOLIVARIAN REPUBLIC OF'),

            array('value' => 'VN', 'label' => 'VIET NAM'),

            array('value' => 'VG', 'label' => 'VIRGIN ISLANDS, BRITISH'),

            array('value' => 'VI', 'label' => 'VIRGIN ISLANDS, U.S.'),

            array('value' => 'WF', 'label' => 'WALLIS AND FUTUNA'),

            array('value' => 'EH', 'label' => 'WESTERN SAHARA'),

            array('value' => 'YE', 'label' => 'YEMEN'),

            array('value' => 'ZM', 'label' => 'ZAMBIA'),

            array('value' => 'ZW', 'label' => 'ZIMBABWE')

        ); //@todo: cross-reference this list with Mailchimp country list



        foreach ($options as &$o) {

            $o['label'] = mb_convert_case($o['label'], MB_CASE_TITLE, "UTF-8");

        }



        $input .= JHtml::_('select.genericlist', $options, @$this->name . '[country]', '', 'value', 'label', $this->value);



		return $input;

	}

}


Zerion Mini Shell 1.0