Ignore:
Timestamp:
2007/03/16 16:21:16 (19 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/mobile/shopping/deliv_addr.php

    r11894 r11902  
    3434//-- ¥Ç¡¼¥¿ÀßÄê 
    3535foreach($_POST as $key => $val) { 
    36     if ($key != "mode") $objPage->list_data[ $key ] = $val; 
    37 } 
    38  
     36    if ($key != "mode" && $key != "return" && $key != "submit" && $key != session_name()) { 
     37        $objPage->list_data[ $key ] = $val; 
     38    } 
     39} 
    3940// ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ­¤ò¥Á¥§¥Ã¥¯ 
    4041$uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess); 
     
    5657                        ); 
    5758 
     59// Ìá¤ë¥Ü¥¿¥óÍѽèÍý 
     60if (!empty($_POST["return"])) { 
     61    switch ($_POST["mode"]) { 
     62    case 'complete': 
     63        $_POST["mode"] = "set2"; 
     64        break; 
     65    case 'set2': 
     66        $_POST["mode"] = "set1"; 
     67        break; 
     68    default: 
     69        header("Location: " . gfAddSessionId('deliv.php')); 
     70        exit; 
     71    } 
     72} 
     73 
    5874switch ($_POST['mode']){ 
    5975    case 'set1': 
    6076        $objPage->arrErr = lfErrorCheck1($objPage->arrForm); 
    61         if (count($objPage->arrErr) == 0) { 
     77        if (count($objPage->arrErr) == 0 && empty($_POST["return"])) { 
    6278            $objPage->tpl_mainpage = 'shopping/set1.tpl'; 
    6379 
     80            $checkVal = array("pref", "addr01", "addr02", "addr03", "tel01", "tel02", "tel03"); 
     81            foreach($checkVal as $key) { 
     82                unset($objPage->list_data[$key]); 
     83            } 
     84 
    6485            // Í¹ÊØÈֹ椫¤é½»½ê¤Î¼èÆÀ 
    65             $address = lfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']); 
    66  
    67             $objPage->arrForm['pref'] = @$address[0]['state']; 
    68             $objPage->arrForm['addr01'] = @$address[0]['city'] . @$address[0]['town']; 
     86            if (@$objPage->arrForm['pref'] == "" && @$objPage->arrForm['addr01'] == "" && @$objPage->arrForm['addr02'] == "") { 
     87                $address = lfGetAddress($_REQUEST['zip01'].$_REQUEST['zip02']); 
     88 
     89                $objPage->arrForm['pref'] = @$address[0]['state']; 
     90                $objPage->arrForm['addr01'] = @$address[0]['city'] . @$address[0]['town']; 
     91            } 
     92        } else { 
     93            $checkVal = array("name01", "name02", "kana01", "kana02", "zip01", "zip02"); 
     94            foreach($checkVal as $key) { 
     95                unset($objPage->list_data[$key]); 
     96            } 
    6997        } 
    7098        break; 
    7199    case 'set2': 
    72100        $objPage->arrErr = lfErrorCheck2($objPage->arrForm); 
    73         if (count($objPage->arrErr) == 0) { 
     101        if (count($objPage->arrErr) == 0 && empty($_POST["return"])) { 
    74102            $objPage->tpl_mainpage = 'shopping/set2.tpl'; 
    75103        } else { 
     
    77105 
    78106            $checkVal = array("pref", "addr01", "addr02", "addr03", "tel01", "tel02", "tel03"); 
    79             //-- ¥Ç¡¼¥¿ÀßÄê 
    80             unset($objPage->list_data); 
    81             foreach($_POST as $key => $val) { 
    82                 if ($key != "mode" && !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val; 
     107            foreach($checkVal as $key) { 
     108                unset($objPage->list_data[$key]); 
    83109            } 
    84110        } 
Note: See TracChangeset for help on using the changeset viewer.