Ignore:
Timestamp:
2007/03/16 09:36:36 (16 years ago)
Author:
rebelt
Message:

下記の問題点の修正です。

  • 検証結果18
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mobile/html/mobile/mypage/change.php

    r11674 r11896  
    7878    $objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn); 
    7979 
     80    // Ìá¤ë¥Ü¥¿¥óÍѽèÍý 
     81    if (!empty($_POST["return"])) { 
     82        switch ($_POST["mode"]) { 
     83        case "complete": 
     84            $_POST["mode"] = "set3"; 
     85            break; 
     86        case "confirm": 
     87            $_POST["mode"] = "set2"; 
     88            break; 
     89        default: 
     90            $_POST["mode"] = "set1"; 
     91            break; 
     92        } 
     93    } 
     94 
    8095    //--¡¡ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 
    8196    if ($_POST["mode"] == "set1") { 
     
    93108    } 
    94109 
    95     if ($objPage->arrErr || $_POST["mode"] == "return") {       // ÆþÎÏ¥¨¥é¡¼¤Î¥Á¥§¥Ã¥¯ 
     110    if ($objPage->arrErr || !empty($_POST["return"])) {     // ÆþÎÏ¥¨¥é¡¼¤Î¥Á¥§¥Ã¥¯ 
    96111        foreach($objPage->arrForm as $key => $val) { 
    97112            $objPage->$key = $val; 
     
    101116        if ($_POST["mode"] == "set1") { 
    102117            $checkVal = array("email", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02"); 
    103             foreach($objPage->arrForm as $key => $val) { 
    104                 if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val; 
    105             } 
    106  
    107118        } elseif ($_POST["mode"] == "set2") { 
    108119            $checkVal = array("sex", "year", "month", "day", "zip01", "zip02"); 
    109             foreach($objPage->arrForm as $key => $val) { 
    110                 if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val; 
    111             } 
    112120        } else { 
    113             $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03"); 
    114             foreach($objPage->arrForm as $key => $val) { 
    115                 if ($key != "mode" && $key != "subm" & !in_array($key, $checkVal)) $objPage->list_data[ $key ] = $val; 
    116             } 
    117         } 
    118  
     121            $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mail_flag"); 
     122        } 
     123 
     124        foreach($objPage->arrForm as $key => $val) { 
     125            if ($key != "return" && $key != "mode" && $key != "confirm" && $key != session_name() && !in_array($key, $checkVal)) { 
     126                $objPage->list_data[ $key ] = $val; 
     127            } 
     128        } 
    119129 
    120130    } else { 
     
    146156        //-- ¥Ç¡¼¥¿ÀßÄê 
    147157        unset($objPage->list_data); 
     158        if ($_POST["mode"] == "set1") { 
     159            $checkVal = array("sex", "year", "month", "day", "zip01", "zip02"); 
     160        } elseif ($_POST["mode"] == "set2") { 
     161            $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mail_flag"); 
     162        } 
     163 
    148164        foreach($_POST as $key => $val) { 
    149             if ($key != "mode" && $key != "subm") $objPage->list_data[ $key ] = $val; 
     165            if ($key != "return" && $key != "mode" && $key != "confirm" && $key != session_name() && !in_array($key, $checkVal)) { 
     166                $objPage->list_data[ $key ] = $val; 
     167            } 
    150168        } 
    151169 
     
    186204        } 
    187205    } 
     206} 
     207 
     208$arrPrivateVariables = array('secret_key', 'first_buy_date', 'last_buy_date', 'buy_times', 'buy_total', 'point', 'note', 'status', 'create_date', 'update_date', 'del_flg', 'cell01', 'cell02', 'cell03', 'mobile_phone_id'); 
     209foreach ($arrPrivateVariables as $key) { 
     210    unset($objPage->list_data[$key]); 
    188211} 
    189212 
Note: See TracChangeset for help on using the changeset viewer.