- Timestamp:
- 2010/03/11 10:35:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tmp/version-2_5-test/data/class/pages/shopping/LC_Page_Shopping_DelivAddr.php
r18562 r18609 80 80 //ログイン判定 81 81 if (!$objCustomer->isLoginSuccess(true)){ 82 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR , "", false, "", true);82 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 83 83 } 84 84 … … 138 138 // 郵便番号から住所の取得 139 139 if (@$this->arrForm['pref'] == "" && @$this->arrForm['addr01'] == "" && @$this->arrForm['addr02'] == "") { 140 $address = $this->lfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']);140 $address = SC_Utils_Ex::sfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']); 141 141 $this->arrForm['pref'] = @$address[0]['state']; 142 142 $this->arrForm['addr01'] = @$address[0]['city'] . @$address[0]['town']; … … 177 177 exit; 178 178 } else { 179 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR , "", false, "", true);179 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 180 180 } 181 181 break; … … 298 298 } 299 299 300 // 郵便番号から住所の取得301 function lfGetAddress($zipcode) {302 303 $conn = new SC_DBconn(ZIP_DSN);304 305 // 郵便番号検索文作成306 $zipcode = mb_convert_kana($zipcode ,"n");307 $sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?";308 309 $data_list = $conn->getAll($sqlse, array($zipcode));310 311 // インデックスと値を反転させる。312 $arrREV_PREF = array_flip($this->arrPref);313 314 /*315 総務省からダウンロードしたデータをそのままインポートすると316 以下のような文字列が入っているので 対策する。317 ・(1・19丁目)318 ・以下に掲載がない場合319 */320 $town = $data_list[0]['town'];321 $town = ereg_replace("(.*)$","",$town);322 $town = ereg_replace("以下に掲載がない場合","",$town);323 $data_list[0]['town'] = $town;324 $data_list[0]['state'] = $arrREV_PREF[$data_list[0]['state']];325 326 return $data_list;327 }328 329 300 /* 別のお届け先住所を一時受注テーブルへ */ 330 301 function lfRegistOtherDelivData($uniqid, $objCustomer, $other_deliv_id) {
Note: See TracChangeset
for help on using the changeset viewer.