- $display_tel = format_display_number($this->tel, $error_tel);
- $display_fax = format_display_number($this->fax, $error_fax);
- XDB::execute("INSERT INTO profile_phones (uid, link_type, link_id, tel_id, tel_type,
- search_tel, display_tel, pub)
- VALUES ({?}, 'hq', 0, 0, 'fixed', {?}, {?}, 'public'),
- ({?}, 'hq', 0, 1, 'fax', {?}, {?}, 'public')",
- $jobid, format_phone_number($this->tel), $display_tel,
- $jobid, format_phone_number($this->fax), $display_fax);
-
- $gmapsGeocoder = new GMapsGeocoder();
- $address = $gmapsGeocoder->getGeocodedAddress($this->address);
- Geocoder::getAreaId($address, 'administrativeArea');
- Geocoder::getAreaId($address, 'subAdministrativeArea');
- Geocoder::getAreaId($address, 'locality');
- XDB::execute("INSERT INTO profile_addresses (jobid, type, id, accuracy,
- text, postalText, postalCode, localityId,
- subAdministrativeAreaId, administrativeAreaId,
- countryId, latitude, longitude, updateTime,
- north, south, east, west)
- VALUES ({?}, 'hq', 0, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?},
- {?}, {?}, FROM_UNIXTIME({?}), {?}, {?}, {?}, {?})",
- $jobid, $this->address['accuracy'], $this->address['text'], $this->address['postalText'],
- $this->address['postalCode'], $this->address['localityId'],
- $this->address['subAdministrativeAreaId'], $this->address['administrativeAreaId'],
- $this->address['countryId'], $this->address['latitude'], $this->address['longitude'],
- $this->address['updateTime'], $this->address['north'], $this->address['south'],
- $this->address['east'], $this->address['west']);