Ignore:
Timestamp:
2010/02/12 18:13:28 (16 years ago)
Author:
kajiwara
Message:

Ver2.4.3にアップデート

Location:
branches/version-2/data/class/pages/admin/contents
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2/data/class/pages/admin/contents/LC_Page_Admin_Contents.php

    r17204 r18561  
    8181 
    8282            if ($this->arrErr = $this->lfErrorCheck()) {       // 入力エラーのチェック 
    83                 foreach($_POST as $key => $val) { 
    84                     $this->$key = $val; 
     83                $arrParams = array("news_url", "news_title", "news_comment", "link_method"); 
     84 
     85                foreach($arrParams as $key) { 
     86                    $this->$key = $_POST[$key]; 
    8587                } 
    8688                $this->selected_year = $_POST["year"]; 
  • branches/version-2/data/class/pages/admin/contents/LC_Page_Admin_Contents_Inquiry.php

    r17846 r18561  
    110110                for ( $j=0; $j<count( $_POST['question'][$i]['option'] ); $j++ ){ 
    111111                    $_POST['question'][$i]['option'][$j] = mb_convert_kana( trim ( $_POST['question'][$i]['option'][$j] ) ); 
     112                } 
     113            } 
     114 
     115            for( $i = 0; $i < count( $_POST["question"] ); $i++ ) { 
     116                if( $_POST["question"][$i]["kind"] == 3 || $_POST["question"][$i]["kind"] == 4  ) { 
     117                    $temp_data = array(); 
     118                    // 項目間(テキストボックス)があいていたら詰めていく 
     119                    for( $j = 0; $j < count( $_POST["question"][$i]["option"] ); $j++ ) { 
     120                        if( strlen( $_POST["question"][$i]["option"][$j] ) > 0 ) $temp_data[] = mb_convert_kana( trim ( $_POST["question"][$i]["option"][$j]  ), "asKVn" ); 
     121                    } 
     122                    $_POST["question"][$i]["option"] = $temp_data; 
     123                } else { 
     124                    $_POST["question"][$i]["option"] = NULL; 
    112125                } 
    113126            } 
     
    294307            if( $_POST["question"][$i]["kind"] == 3 || $_POST["question"][$i]["kind"] == 4  ) { 
    295308 
    296                 $temp_data = array(); 
    297309                for( $j = 0; $j < count( $_POST["question"][$i]["option"] ); $j++ ) { 
    298  
    299                     // 項目間(テキストボックス)があいていたら詰めていく 
    300                     if( strlen( $_POST["question"][$i]["option"][$j] ) > 0 ) $temp_data[] = mb_convert_kana( trim ( $_POST["question"][$i]["option"][$j]  ), "asKVn" ); 
    301  
    302                 } 
    303  
    304                 $_POST["question"][$i]["option"] = $temp_data; 
     310                    // 同じ回答がないかチェック 
     311                    if (strlen($_POST["question"][$i]["option"][$j]) > 0) { 
     312                        $checkArray = $_POST["question"][$i]["option"]; 
     313                        // 自身の値をunset 
     314                        unset($checkArray[$j]); 
     315                        if (in_array($_POST["question"][$i]["option"][$j], $checkArray)) { 
     316                            $objErr->arrErr["question"][$i]["option"][$j] = "同じ質問に同じ回答は設定出来ません。"; 
     317                        } 
     318                    } 
     319                } 
    305320 
    306321                if( ( strlen( $_POST["question"][$i] ["option"][0] ) == 0 ) || ( strlen( $_POST["question"][$i] ["option"][0] ) > 0 
    307322                                                                                 && strlen( $_POST["question"][$i] ["option"][1] ) == 0 ) ) $objErr->arrErr["question"][$i]['kind'] = "下記の2つ以上の項目に記入してください。"; 
     323 
    308324            } 
    309325        } 
Note: See TracChangeset for help on using the changeset viewer.