Ignore:
Timestamp:
2007/09/06 20:18:34 (17 years ago)
Author:
nanasess
Message:

bugfix

  • 画像が出力されない問題修正
  • 未定義変数の修正
Location:
branches/feature-module-update/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/graph/SC_GraphBase.php

    r15598 r15636  
    261261            imagefilledrectangle($this->image, $left - 2, $top - 2, $left + $text_width + 2, $top + $font_size + 2, $this->labelbg_color); 
    262262        } 
    263         //$text = mb_convert_encoding($text, "UTF-8", CHAR_CODE); 
    264         $text = mb_convert_encoding($text, CHAR_CODE); 
     263        /* 
     264         * XXX EUC-JP にしないと Warning がでる. 
     265         *     --enable-gd-jis-conv も関係していそうだが, このオプションを 
     266         *     つけなくても出る. 
     267         * 
     268         *     Warning: imagettftext() [function.imagettftext]: 
     269         *     any2eucjp(): something happen in 
     270         * 
     271         *     http://www.php.net/imagettftext を見ると, UTF-8 にしろと 
     272         *     書いてあるのに何故? 
     273         */ 
     274        $text = mb_convert_encoding($text, "EUC-JP", CHAR_CODE); 
     275        //$text = mb_convert_encoding($text, CHAR_CODE); 
    265276        if($color != NULL) { 
    266277            ImageTTFText($this->image, $font_size, $angle, $left, $top + $font_size, $color, FONT_PATH, $text); 
  • branches/feature-module-update/data/class/pages/admin/total/LC_Page_Admin_Total.php

    r15626 r15636  
    5555        $this->cashtime = time(); 
    5656        $this->objBatch = new SC_Batch_Daily_Ex(); 
     57 
     58        // TODO エレガントじゃない... 
     59        if (!isset($_POST['search_startyear'])) $_POST['search_startyear'] = ""; 
     60        if (!isset($_POST['search_startmonth'])) $_POST['search_startmonth'] = ""; 
     61        if (!isset($_POST['search_startday'])) $_POST['search_startday'] = ""; 
     62        if (!isset($_POST['search_endyear'])) $_POST['search_endyear'] = ""; 
     63        if (!isset($_POST['search_endmonth'])) $_POST['search_endmonth'] = ""; 
     64        if (!isset($_POST['search_endday'])) $_POST['search_endday'] = ""; 
     65 
     66        if (!isset($_POST['search_startyear_m'])) $_POST['search_startyear_m'] = ""; 
    5767    } 
    5868 
     
    101111            $this->arrErr = $this->lfCheckError(); 
    102112            $arrRet = $this->objFormParam->getHashArray(); 
    103  
    104113            // 入力エラーなし 
    105             if (count($this->arrErr) == 0) { 
     114            if (empty($this->arrErr)) { 
    106115                foreach ($arrRet as $key => $val) { 
    107116                    if($val == "") { 
     
    122131                    } 
    123132                } 
    124  
    125133                if($this->objFormParam->getValue('type') != "") { 
    126134                    $type = $this->objFormParam->getValue('type'); 
     135                } else { 
     136                    $type = ""; 
    127137                } 
    128138 
     
    233243        } 
    234244 
    235  
    236  
    237245        // 登録・更新日検索用 
    238246        $objDate = new SC_Date(); 
     
    246254 
    247255        $this->tpl_subtitle = $this->arrTitle[$this->objFormParam->getValue('page')]; 
    248  
    249256        $objView->assignobj($this); 
    250257        $objView->display(MAIN_FRAME); 
     
    464471 
    465472        $ret_path = ""; 
    466  
    467473        // 結果が0行以上ある場合のみグラフを生成する。 
    468474        if(count($arrResults) > 0) { 
    469475            // グラフの生成 
    470             $arrList = sfArrKeyValue($arrResults, $keyname, "total", GRAPH_PIE_MAX, GRAPH_LABEL_MAX); 
     476            $arrList = SC_Utils_Ex::sfArrKeyValue($arrResults, $keyname, 
     477                                                  "total", GRAPH_PIE_MAX, 
     478                                                  GRAPH_LABEL_MAX); 
    471479 
    472480            // 一時ファイル名の取得 
     
    516524        if(count($arrResults) > 0) { 
    517525            // グラフの生成 
    518             $arrList = sfArrKeyValue($arrResults, $keyname, "total", GRAPH_PIE_MAX, GRAPH_LABEL_MAX); 
     526            $arrList = SC_Utils_Ex::sfArrKeyValue($arrResults, $keyname, "total", GRAPH_PIE_MAX, GRAPH_LABEL_MAX); 
    519527 
    520528            // 一時ファイル名の取得 
     
    557565    // グラフ用のPNGファイル名 
    558566    function lfGetGraphPng($keyname) { 
    559         if (!isset($_POST['search_startyear_m'])) $_POST['search_startyear_m'] = ""; 
     567 
    560568        if($_POST['search_startyear_m'] != "") { 
    561569            $pngname = sprintf("%s_%02d%02d.png", $keyname, substr($_POST['search_startyear_m'],2), $_POST['search_startmonth_m']); 
     
    568576    // 会員、非会員集計のWHERE分の作成 
    569577    function lfGetWhereMember($col_date, $sdate, $edate, $type, $col_member = "customer_id") { 
     578        $where = ""; 
    570579        // 取得日付の指定 
    571580        if($sdate != "") { 
     
    605614        } 
    606615 
    607         return array($where, $arrval); 
     616        return array($where, array()); 
    608617    } 
    609618 
     
    703712        if($graph) { 
    704713            $image_key = "job_" . $type; 
    705             $objPage->tpl_image = lfGetGraphPie($objPage->arrResults, "job_name", $image_key, "(売上比率)", $sdate, $edate); 
     714            $objPage->tpl_image = $this->lfGetGraphPie($objPage->arrResults, "job_name", $image_key, "(売上比率)", $sdate, $edate); 
    706715        } 
    707716    } 
Note: See TracChangeset for help on using the changeset viewer.