|
From: <te...@us...> - 2012-09-17 07:48:19
|
Revision: 5666
http://web-erp.svn.sourceforge.net/web-erp/?rev=5666&view=rev
Author: tehonu
Date: 2012-09-17 07:48:10 +0000 (Mon, 17 Sep 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/Suppliers.php
Added Paths:
-----------
trunk/includes/CountriesArray.php
Modified: trunk/Suppliers.php
===================================================================
--- trunk/Suppliers.php 2012-09-15 23:52:28 UTC (rev 5665)
+++ trunk/Suppliers.php 2012-09-17 07:48:10 UTC (rev 5666)
@@ -10,6 +10,7 @@
$BookMark = 'NewSupplier';
include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');
+include('includes/CountriesArray.php');
Function Is_ValidAccount ($ActNo) {
@@ -412,7 +413,7 @@
if ($map_host=="") {
echo '<div class="warn">' . _('Warning - Geocode Integration is enabled, but no hosts are setup. Go to Geocode Setup') . '</div>';
} else {
- $address = $_POST['Address1'] . ', ' . $_POST['Address2'] . ', ' . $_POST['Address3'] . ', ' . $_POST['Address4'];
+ $address = $_POST['Address1'] . ', ' . $_POST['Address2'] . ', ' . $_POST['Address3'] . ', ' . $_POST['Address4'] . ', ' . $_POST['Address5']. ', ' . $_POST['Address6'];
$base_url = 'http://' . MAPS_HOST . '/maps/geo?output=xml' . '&key=' . KEY;
$request_url = $base_url . '&q=' . urlencode($address);
@@ -463,6 +464,8 @@
address2='" . $_POST['Address2'] . "',
address3='" . $_POST['Address3'] . "',
address4='" . $_POST['Address4'] . "',
+ address5='" . $_POST['Address5'] . "',
+ address6='" . $_POST['Address6'] . "',
telephone='". $_POST['Phone'] ."',
fax = '". $_POST['Fax']."',
email = '" . $_POST['Email'] . "',
@@ -489,6 +492,8 @@
address2='" . $_POST['Address2'] . "',
address3='" . $_POST['Address3'] . "',
address4='" . $_POST['Address4'] . "',
+ address5='" . $_POST['Address5'] . "',
+ address6='" . $_POST['Address6'] . "',
telephone='" . $_POST['Phone']."',
fax = '" . $_POST['Fax'] . "',
email = '" . $_POST['Email'] . "',
@@ -522,6 +527,8 @@
address2,
address3,
address4,
+ address5,
+ address6,
telephone,
fax,
email,
@@ -544,6 +551,8 @@
'" . $_POST['Address2'] . "',
'" . $_POST['Address3'] . "',
'" . $_POST['Address4'] . "',
+ '" . $_POST['Address5'] . "',
+ '" . $_POST['Address6'] . "',
'" . $_POST['Phone'] . "',
'" . $_POST['Fax'] . "',
'" . $_POST['Email'] . "',
@@ -568,12 +577,14 @@
prnMsg(_('A new supplier for') . ' ' . $_POST['SuppName'] . ' ' . _('has been added to the database'),'success');
- unset ($SupplierID);
+ unset($SupplierID);
unset($_POST['SuppName']);
unset($_POST['Address1']);
unset($_POST['Address2']);
unset($_POST['Address3']);
unset($_POST['Address4']);
+ unset($_POST['Address5']);
+ unset($_POST['Address6']);
unset($_POST['Phone']);
unset($_POST['Fax']);
unset($_POST['Email']);
@@ -673,6 +684,31 @@
echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td>
<td><input type="text" name="Address4" size="42" maxlength="40" /></td>
</tr>';
+ echo '<tr><td>' . _('Address Line 5') . ':</td>
+ <td><input type="text" name="Address5" size="42" maxlength="40" /></td>
+ </tr>';
+/* echo '<tr><td>' . _('Country') . ':</td>
+ <td><input type="text" name="Address6" size="42" maxlength="40" /></td>
+ </tr>';
+*/
+
+echo '<tr>
+ <td>' . _('Country') . ':</td>
+ <td><select name="Address6">';
+
+foreach ($CountriesArray as $CountryEntry => $CountryName){
+ if (isset($_POST['Address6']) AND ($_POST['Address6'] == $CountryEntry)){
+ echo '<option selected="selected" value="' . $CountryEntry . '">' . $CountryName .'</option>';
+ } elseif (!isset($_POST['Address6'])) {
+ echo '<option selected="selected" value="' . $CountryEntry . '">' . $CountryName .'</option>';
+ } else {
+ echo '<option value="' . $CountryEntry . '">' . $CountryName .'</option>';
+ }
+}
+
+echo '</select></td>
+ </tr>';
+
echo '<tr><td>' . _('Telephone') . ':</td>
<td><input type="text" name="Phone" size="30" maxlength="40" /></td>
</tr>';
@@ -796,6 +832,8 @@
address2,
address3,
address4,
+ address5,
+ address6,
telephone,
fax,
email,
@@ -821,6 +859,8 @@
$_POST['Address2'] = stripcslashes($myrow['address2']);
$_POST['Address3'] = stripcslashes($myrow['address3']);
$_POST['Address4'] = stripcslashes($myrow['address4']);
+ $_POST['Address5'] = stripcslashes($myrow['address5']);
+ $_POST['Address6'] = stripcslashes($myrow['address6']);
$_POST['CurrCode'] = stripcslashes($myrow['currcode']);
$_POST['Phone'] = $myrow['telephone'];
$_POST['Fax'] = $myrow['fax'];
@@ -855,6 +895,29 @@
<td><input type="text" name="Address3" value="' . $_POST['Address3'] . '" size="42" maxlength="40" /></td></tr>';
echo '<tr><td>' . _('Address Line 4 (Postal Code)') . ':</td>
<td><input type="text" name="Address4" value="' . $_POST['Address4'] . '" size="42" maxlength="40" /></td></tr>';
+ echo '<tr><td>' . _('Address Line 5') . ':</td>
+ <td><input type="text" name="Address5" value="' . $_POST['Address5'] . '" size="42" maxlength="40" /></td></tr>';
+/* echo '<tr><td>' . _('Country') . ':</td>
+ <td><input type="text" name="Address6" value="' . $_POST['Address6'] . '" size="42" maxlength="40" /></td></tr>';
+*/
+echo '<tr>
+ <td>' . _('Country') . ':</td>
+ <td><select name="Address6">';
+
+foreach ($CountriesArray as $CountryEntry => $CountryName){
+ if (isset($_POST['Address6']) AND ($_POST['Address6'] == $CountryEntry)){
+ echo '<option selected="selected" value="' . $CountryEntry . '">' . $CountryName .'</option>';
+ } elseif (!isset($_POST['Address6'])) {
+ echo '<option selected="selected" value="' . $CountryEntry . '">' . $CountryName .'</option>';
+ } else {
+ echo '<option value="' . $CountryEntry . '">' . $CountryName .'</option>';
+ }
+}
+
+echo '</select></td>
+ </tr>';
+
+
echo '<tr><td>' . _('Telephone') . ':</td>
<td><input '.(in_array('Name',$Errors) ? 'class="inputerror"' : '').' type="text" name="Phone" value="' . $_POST['Phone'] . '" size="42" maxlength="40" /></td></tr>';
echo '<tr><td>' . _('Facsimile') . ':</td>
Added: trunk/includes/CountriesArray.php
===================================================================
--- trunk/includes/CountriesArray.php (rev 0)
+++ trunk/includes/CountriesArray.php 2012-09-17 07:48:10 UTC (rev 5666)
@@ -0,0 +1,223 @@
+<?php
+$CountriesArray = array();
+
+$CountriesArray['AD'] = _('Andorra');
+$CountriesArray['AE'] = _('United Arab Emirates');
+$CountriesArray['AF'] = _('Afghanistan');
+$CountriesArray['AG'] = _('Antigua & Barbuda');
+$CountriesArray['AI'] = _('Anguilla');
+$CountriesArray['AL'] = _('Albania');
+$CountriesArray['AM'] = _('Armenia');
+$CountriesArray['AN'] = _('Antilles, Netherlands');
+$CountriesArray['AO'] = _('Angola');
+$CountriesArray['AR'] = _('Argentina');
+$CountriesArray['AS'] = _('American Samoa');
+$CountriesArray['AT'] = _('Austria');
+$CountriesArray['AU'] = _('Australia');
+$CountriesArray['AW'] = _('Aruba');
+$CountriesArray['AZ'] = _('Azerbaijan');
+$CountriesArray['BA'] = _('Bosnia and Herzegovina');
+$CountriesArray['BB'] = _('Barbados');
+$CountriesArray['BD'] = _('Bangladesh');
+$CountriesArray['BE'] = _('Belgium');
+$CountriesArray['BF'] = _('Burkina Faso');
+$CountriesArray['BG'] = _('Bulgaria');
+$CountriesArray['BH'] = _('Bahrain');
+$CountriesArray['BI'] = _('Burundi');
+$CountriesArray['BJ'] = _('Benin');
+$CountriesArray['BM'] = _('Bermuda');
+$CountriesArray['BN'] = _('Brunei Darussalam');
+$CountriesArray['BO'] = _('Bolivia');
+$CountriesArray['BR'] = _('Brazil');
+$CountriesArray['BS'] = _('Bahamas, The');
+$CountriesArray['BT'] = _('Bhutan');
+$CountriesArray['BW'] = _('Botswana');
+$CountriesArray['BY'] = _('Belarus');
+$CountriesArray['BZ'] = _('Belize');
+$CountriesArray['CA'] = _('Canada');
+$CountriesArray['CD'] = _('Congo');
+$CountriesArray['CF'] = _('Central African Republic');
+$CountriesArray['CG'] = _('Congo');
+$CountriesArray['CH'] = _('Switzerland');
+$CountriesArray['CI'] = _('Cote D Ivoire');
+$CountriesArray['CK'] = _('Cook Islands');
+$CountriesArray['CL'] = _('Chile');
+$CountriesArray['CM'] = _('Cameroon');
+$CountriesArray['CN'] = _('China');
+$CountriesArray['CO'] = _('Colombia');
+$CountriesArray['CR'] = _('Costa Rica');
+$CountriesArray['CS'] = _('Montenegro');
+$CountriesArray['CT'] = _('Catalonia');
+$CountriesArray['CU'] = _('Cuba');
+$CountriesArray['CV'] = _('Cape Verde');
+$CountriesArray['CY'] = _('Cyprus');
+$CountriesArray['CZ'] = _('Czech Republic');
+$CountriesArray['DE'] = _('Germany');
+$CountriesArray['DJ'] = _('Djibouti');
+$CountriesArray['DK'] = _('Denmark');
+$CountriesArray['DM'] = _('Dominica');
+$CountriesArray['DO'] = _('Dominican Republic');
+$CountriesArray['DZ'] = _('Algeria');
+$CountriesArray['EC'] = _('Ecuador');
+$CountriesArray['EE'] = _('Estonia');
+$CountriesArray['EG'] = _('Egypt');
+$CountriesArray['ER'] = _('Eritrea');
+$CountriesArray['ES'] = _('Spain');
+$CountriesArray['ET'] = _('Ethiopia');
+$CountriesArray['EZ'] = _('Euskadi');
+$CountriesArray['FI'] = _('Finland');
+$CountriesArray['FJ'] = _('Fiji');
+$CountriesArray['FK'] = _('Falkland Islands');
+$CountriesArray['FM'] = _('Micronesia');
+$CountriesArray['FO'] = _('Faroe Islands');
+$CountriesArray['FR'] = _('France');
+$CountriesArray['GA'] = _('Gabon');
+$CountriesArray['GD'] = _('Grenada');
+$CountriesArray['GE'] = _('Georgia');
+$CountriesArray['GF'] = _('French Guiana');
+$CountriesArray['GF'] = _('Guiana, French');
+$CountriesArray['GG'] = _('Guernsey and Alderney');
+$CountriesArray['GH'] = _('Ghana');
+$CountriesArray['GI'] = _('Gibraltar');
+$CountriesArray['GL'] = _('Greenland');
+$CountriesArray['GM'] = _('Gambia, the');
+$CountriesArray['GN'] = _('Guinea');
+$CountriesArray['GP'] = _('Guadeloupe');
+$CountriesArray['GP'] = _('Guinea, Equatorial');
+$CountriesArray['GQ'] = _('Equatorial Guinea');
+$CountriesArray['GR'] = _('Greece');
+$CountriesArray['GT'] = _('Guatemala');
+$CountriesArray['GU'] = _('Guam');
+$CountriesArray['GW'] = _('Guinea-Bissau');
+$CountriesArray['GY'] = _('Guyana');
+$CountriesArray['HK'] = _('Hong Kong, (China)');
+$CountriesArray['HN'] = _('Honduras');
+$CountriesArray['HR'] = _('Croatia');
+$CountriesArray['HT'] = _('Haiti');
+$CountriesArray['HU'] = _('Hungary');
+$CountriesArray['ID'] = _('Indonesia');
+$CountriesArray['IE'] = _('Ireland');
+$CountriesArray['IL'] = _('Israel');
+$CountriesArray['IN'] = _('India');
+$CountriesArray['IQ'] = _('Iraq');
+$CountriesArray['IR'] = _('Iran, Islamic Republic of');
+$CountriesArray['IS'] = _('Iceland');
+$CountriesArray['IT'] = _('Italy');
+$CountriesArray['JE'] = _('Jersey');
+$CountriesArray['JM'] = _('Jamaica');
+$CountriesArray['JO'] = _('Jordan');
+$CountriesArray['JP'] = _('Japan');
+$CountriesArray['KE'] = _('Kenya');
+$CountriesArray['KG'] = _('Kyrgyzstan');
+$CountriesArray['KH'] = _('Cambodia');
+$CountriesArray['KI'] = _('Kiribati');
+$CountriesArray['KM'] = _('Comoros');
+$CountriesArray['KN'] = _('Saint Kitts and Nevis');
+$CountriesArray['KR'] = _('Korea, (South) Rep. of');
+$CountriesArray['KW'] = _('Kuwait');
+$CountriesArray['KX'] = _('Kosovo');
+$CountriesArray['KY'] = _('Cayman Islands');
+$CountriesArray['KZ'] = _('Kazakhstan');
+$CountriesArray['LA'] = _('Lao People s Dem. Rep.');
+$CountriesArray['LB'] = _('Lebanon');
+$CountriesArray['LC'] = _('Saint Lucia');
+$CountriesArray['LI'] = _('Liechtenstein');
+$CountriesArray['LK'] = _('Sri Lanka (ex-Ceilan)');
+$CountriesArray['LS'] = _('Lesotho');
+$CountriesArray['LT'] = _('Lithuania');
+$CountriesArray['LU'] = _('Luxembourg');
+$CountriesArray['LV'] = _('Latvia');
+$CountriesArray['LY'] = _('Libyan Arab Jamahiriya');
+$CountriesArray['MA'] = _('Morocco');
+$CountriesArray['MC'] = _('Monaco');
+$CountriesArray['MD'] = _('Moldova, Republic of');
+$CountriesArray['MG'] = _('Madagascar');
+$CountriesArray['MK'] = _('Macedonia, TFYR');
+$CountriesArray['ML'] = _('Mali');
+$CountriesArray['MM'] = _('Myanmar (ex-Burma)');
+$CountriesArray['MN'] = _('Mongolia');
+$CountriesArray['MO'] = _('Macao, (China)');
+$CountriesArray['MP'] = _('Northern Mariana Islands');
+$CountriesArray['MQ'] = _('Martinique');
+$CountriesArray['MR'] = _('Mauritania');
+$CountriesArray['MT'] = _('Malta');
+$CountriesArray['MU'] = _('Mauritius');
+$CountriesArray['MV'] = _('Maldives');
+$CountriesArray['MW'] = _('Malawi');
+$CountriesArray['MX'] = _('Mexico');
+$CountriesArray['MY'] = _('Malaysia');
+$CountriesArray['MZ'] = _('Mozambique');
+$CountriesArray['NA'] = _('Namibia');
+$CountriesArray['NC'] = _('New Caledonia');
+$CountriesArray['NE'] = _('Niger');
+$CountriesArray['NG'] = _('Nigeria');
+$CountriesArray['NI'] = _('Nicaragua');
+$CountriesArray['NL'] = _('Netherlands');
+$CountriesArray['NO'] = _('Norway');
+$CountriesArray['NP'] = _('Nepal');
+$CountriesArray['NZ'] = _('New Zealand');
+$CountriesArray['OM'] = _('Oman');
+$CountriesArray['PA'] = _('Panama');
+$CountriesArray['PE'] = _('Peru');
+$CountriesArray['PF'] = _('French Polynesia');
+$CountriesArray['PG'] = _('Papua New Guinea');
+$CountriesArray['PH'] = _('Philippines');
+$CountriesArray['PK'] = _('Pakistan');
+$CountriesArray['PL'] = _('Poland');
+$CountriesArray['PS'] = _('Palestinian Territory');
+$CountriesArray['PT'] = _('Portugal');
+$CountriesArray['PY'] = _('Paraguay');
+$CountriesArray['QA'] = _('Qatar');
+$CountriesArray['QB'] = _('Quebec');
+$CountriesArray['RE'] = _('Reunion');
+$CountriesArray['RO'] = _('Romania');
+$CountriesArray['RS'] = _('Serbia');
+$CountriesArray['RU'] = _('Russian Federation');
+$CountriesArray['RW'] = _('Rwanda');
+$CountriesArray['SA'] = _('Saudi Arabia');
+$CountriesArray['SB'] = _('Solomon Islands');
+$CountriesArray['SC'] = _('Seychelles');
+$CountriesArray['SD'] = _('Sudan');
+$CountriesArray['SE'] = _('Sweden');
+$CountriesArray['SG'] = _('Singapore');
+$CountriesArray['SI'] = _('Slovenia');
+$CountriesArray['SK'] = _('Slovakia');
+$CountriesArray['SM'] = _('San Marino');
+$CountriesArray['SN'] = _('Senegal');
+$CountriesArray['SO'] = _('Somalia');
+$CountriesArray['SR'] = _('Suriname');
+$CountriesArray['ST'] = _('Sao Tome and Principe');
+$CountriesArray['SV'] = _('El Salvador');
+$CountriesArray['SY'] = _('Syrian Arab Republic');
+$CountriesArray['SZ'] = _('Swaziland');
+$CountriesArray['TD'] = _('Chad');
+$CountriesArray['TG'] = _('Togo');
+$CountriesArray['TH'] = _('Thailand');
+$CountriesArray['TJ'] = _('Tajikistan');
+$CountriesArray['TM'] = _('Turkmenistan');
+$CountriesArray['TN'] = _('Tunisia');
+$CountriesArray['TO'] = _('Tonga');
+$CountriesArray['TP'] = _('East Timor (Timor-Leste)');
+$CountriesArray['TR'] = _('Turkey');
+$CountriesArray['TT'] = _('Trinidad & Tobago');
+$CountriesArray['TW'] = _('Taiwan');
+$CountriesArray['TZ'] = _('Tanzania, United Rep. of');
+$CountriesArray['UA'] = _('Ukraine');
+$CountriesArray['UG'] = _('Uganda');
+$CountriesArray['UK'] = _('United Kingdom');
+$CountriesArray['US'] = _('United States');
+$CountriesArray['UY'] = _('Uruguay');
+$CountriesArray['UZ'] = _('Uzbekistan');
+$CountriesArray['VC'] = _('St. Vincent & the Grenadines');
+$CountriesArray['VE'] = _('Venezuela');
+$CountriesArray['VG'] = _('British Virgin Islands');
+$CountriesArray['VI'] = _('Virgin Islands, U.S.');
+$CountriesArray['VN'] = _('Viet Nam');
+$CountriesArray['VU'] = _('Vanuatu');
+$CountriesArray['WS'] = _('Samoa');
+$CountriesArray['YE'] = _('Yemen');
+$CountriesArray['ZM'] = _('Zambia');
+$CountriesArray['ZW'] = _('Zimbabwe');
+
+asort($CountriesArray);
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|