Ignore:
Timestamp:
2007/08/30 10:29:02 (17 years ago)
Author:
nanasess
Message:

暫定 commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/inquiry/LC_Page_Inquiry.php

    r15090 r15443  
    1010 
    1111/** 
    12  * XXX のページクラス. 
     12 * アンケート のページクラス. 
    1313 * 
    1414 * @package Page 
     
    1818class LC_Page_Inquiry extends LC_Page { 
    1919 
    20     // {{{ properties 
    21  
    22     // TODO 
    23     var $errmsg; 
    24     var $arrPref; 
    25  
    26     var $QUESTION; 
    27     var $question_id; 
    28  
    2920    // }}} 
    3021    // {{{ functions 
     
    5445 
    5546        // 都道府県プルダウン用配列 
    56         $objPage->arrPref = $arrPref; 
     47        $masterData = new SC_DB_MasterData_Ex(); 
     48        $this->arrPrfef = $masterData->getMasterData("mtb_pref", 
     49                                  array("pref_id", "pref_name", "rank")); 
    5750 
    5851        // CSV保存項目 
     
    8578        $sql = "SELECT question_id, question FROM dtb_question WHERE question_id = ?"; 
    8679        $result = $conn->getAll( $sql, array($_REQUEST['question_id']) ); 
    87         $objPage->QUESTION = lfGetArrInput( unserialize( $result[0]['question'] ) ); 
    88  
    89         $objPage->question_id = $_REQUEST['question_id']; 
    90  
    91         $objPage->arrHidden = sfMakeHiddenArray($_POST); 
    92         unset($objPage->arrHidden['mode']); 
    93  
    94         if ( (int)$objPage->QUESTION["delete"] !== 0 ){ 
     80        $this->QUESTION = $this->lfGetArrInput( unserialize( $result[0]['question'] ) ); 
     81 
     82        $this->question_id = $_REQUEST['question_id']; 
     83 
     84        $this->arrHidden = SC_Utils_Ex::sfMakeHiddenArray($_POST); 
     85        unset($this->arrHidden['mode']); 
     86 
     87        if ( (int)$this->QUESTION["delete"] !== 0 ){ 
    9588 
    9689            $objPage->tpl_mainpage = "inquiry/closed.tpl"; 
     
    9992 
    10093            //-- 入力エラーチェック 
    101             $objPage->arrForm = $_POST; 
    102             $objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn); 
    103             $objPage->arrErr = lfErrorCheck($objPage->arrForm); 
    104             $objPage->arrErr = lfGetArrInput($objPage->arrErr); 
    105  
    106             if( ! $objPage->arrErr ) { 
    107                 $objPage->tpl_mainpage = "inquiry/confirm.tpl"; 
     94            $this->arrForm = $_POST; 
     95            $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn); 
     96            $this->arrErr = $this->lfErrorCheck($this->arrForm); 
     97            $this->arrErr = $this->lfGetArrInput($this->arrErr); 
     98 
     99            if( ! $this->arrErr ) { 
     100                $this->tpl_mainpage = "inquiry/confirm.tpl"; 
    108101            } 
    109102 
    110103 
    111104        }elseif( $_POST['mode'] == "return"){ 
    112             $objPage->arrForm = $_POST; 
     105            $this->arrForm = $_POST; 
    113106 
    114107        }elseif( $_POST['mode'] == "regist" )  { 
    115108 
    116109            //-- 入力文字・変換&エラーチェック 
    117             $objPage->arrForm = $_POST; 
    118             $objPage->arrForm = lfConvertParam($objPage->arrForm, $arrRegistColumn); 
    119             $objPage->arrErr = lfErrorCheck($objPage->arrForm); 
    120             $objPage->arrErr = lfGetArrInput($objPage->arrErr); 
    121  
    122  
    123             if( ! $objPage->arrErr ) { 
     110            $this->arrForm = $_POST; 
     111            $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn); 
     112            $this->arrErr = $this->lfErrorCheck($this->arrForm); 
     113            $this->arrErr = $this->GGlfGetArrInput($this->arrErr); 
     114 
     115 
     116            if( ! $this->arrErr ) { 
    124117 
    125118                //完了画面 
    126                 $objPage->tpl_mainpage = "inquiry/complete.tpl"; 
     119                $this->tpl_mainpage = "inquiry/complete.tpl"; 
    127120 
    128121 
     
    130123 
    131124                    // テーブルに入れるように整形する 
    132                     $arrOption = $objPage->arrForm['option']; 
    133                     unset ($objPage->arrForm['email02']); 
    134                     $objPage->arrForm['mail01'] = $objPage->arrForm['email']; 
    135                     unset ($objPage->arrForm['email']); 
    136                     unset ($objPage->arrForm['option']); 
    137                     $objPage->arrForm['question_id'] = $objPage->question_id; 
    138                     $objPage->arrForm['question_name'] = $objPage->QUESTION['title']; 
     125                    $arrOption = $this->arrForm['option']; 
     126                    unset ($this->arrForm['email02']); 
     127                    $this->arrForm['mail01'] = $this->arrForm['email']; 
     128                    unset ($this->arrForm['email']); 
     129                    unset ($this->arrForm['option']); 
     130                    $this->arrForm['question_id'] = $this->question_id; 
     131                    $this->arrForm['question_name'] = $this->QUESTION['title']; 
    139132                    for ( $i=0; $i<(count($arrOption)); $i++ ){ 
    140133                        $tmp = ""; 
     
    144137                                $tmp .= $arrOption[$i][$j]; 
    145138                            } 
    146                             $objPage->arrForm['question0'.($i+1)] = $tmp; 
     139                            $this->arrForm['question0'.($i+1)] = $tmp; 
    147140                        } else { 
    148                             $objPage->arrForm['question0'.($i+1)] = $arrOption[$i]; 
     141                            $this->arrForm['question0'.($i+1)] = $arrOption[$i]; 
    149142                        } 
    150143                    } 
    151                     $objPage->arrForm['create_date'] = "now()"; 
     144                    $this->arrForm['create_date'] = "now()"; 
    152145                    // DB登録 
    153146                    $objQuery = new SC_Query(); 
    154                     $objQuery->insert("dtb_question_result", $objPage->arrForm ); 
     147                    $objQuery->insert("dtb_question_result", $this->arrForm ); 
    155148 
    156149                //--------- ▲ SQL ---------// 
     
    159152        } 
    160153 
    161         $objPage->cnt_question = 6; 
    162         $objPage->arrActive = $arrActive; 
    163         $objPage->arrQuestion = $arrQuestion; 
     154        $this->cnt_question = 6; 
     155        $this->arrActive = $arrActive; 
     156        $this->arrQuestion = $arrQuestion; 
    164157 
    165158 
    166159        //---- ページ表示 
    167160        $objView->_smarty->register_function("lfArray_Search_key_Smarty","lfArray_Search_key_Smarty"); 
    168         $objView->assignobj($objPage); 
    169         $objView->display($objPage->tpl_mainpage); 
     161        $objView->assignobj($this); 
     162        $objView->display($this->tpl_mainpage); 
    170163    } 
    171164 
Note: See TracChangeset for help on using the changeset viewer.