- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php
r22567 r22796 31 31 * @version $Id$ 32 32 */ 33 class LC_Page_Admin_Total extends LC_Page_Admin_Ex 34 { 33 class LC_Page_Admin_Total extends LC_Page_Admin_Ex { 35 34 36 35 // }}} … … 42 41 * @return void 43 42 */ 44 function init() 45 { 43 function init() { 46 44 parent::init(); 47 45 // GDライブラリのインストール判定 … … 93 91 * @return void 94 92 */ 95 function process() 96 { 93 function process() { 97 94 $this->action(); 98 95 $this->sendResponse(); … … 104 101 * @return void 105 102 */ 106 function action() 107 { 103 function action() { 108 104 109 105 if (isset($_GET['draw_image']) && $_GET['draw_image'] != '') { … … 174 170 * @return void 175 171 */ 176 function destroy() 177 { 172 function destroy() { 178 173 parent::destroy(); 179 174 } 180 175 181 176 /* デフォルト値の取得 */ 182 function lfGetDateDefault() 183 { 177 function lfGetDateDefault() { 184 178 $year = date('Y'); 185 179 $month = date('m'); … … 208 202 209 203 /* パラメーター情報の初期化 */ 210 function lfInitParam(&$objFormParam) 211 { 204 function lfInitParam(&$objFormParam) { 212 205 // デフォルト値の取得 213 206 $arrList = $this->lfGetDateDefault(); … … 232 225 233 226 /* 入力内容のチェック */ 234 function lfCheckError(&$objFormParam) 235 { 227 function lfCheckError(&$objFormParam) { 236 228 237 229 $objFormParam->convParam(); … … 259 251 260 252 /* サブナビを移動しても日付が残るようにセッションに入力期間を記録する */ 261 function lfSaveDateSession($session, $arrForm) 262 { 253 function lfSaveDateSession($session, $arrForm) { 263 254 264 255 // session の初期化をする … … 275 266 276 267 /* 日付の初期値 */ 277 function lfGetDateInit() 278 { 268 function lfGetDateInit() { 279 269 $search_startyear_m = $search_startyear = $search_endyear = date('Y'); 280 270 $search_startmonth_m = $search_startmonth = $search_endmonth = date('m'); … … 285 275 286 276 /* フォームで入力された日付を適切な形にする */ 287 function lfSetStartEndDate(&$objFormParam) 288 { 277 function lfSetStartEndDate(&$objFormParam) { 289 278 $arrRet = $objFormParam->getHashArray(); 290 279 … … 305 294 306 295 /* 折れ線グラフの作成 */ 307 function lfGetGraphLine($arrResults, $keyname, $type, $xtitle, $ytitle, $sdate, $edate, $xincline) 308 { 296 function lfGetGraphLine($arrResults, $keyname, $type, $xtitle, $ytitle, $sdate, $edate, $xincline) { 309 297 310 298 $ret_path = ''; … … 364 352 365 353 // 円グラフの作成 366 function lfGetGraphPie($arrResults, $keyname, $type, $title = '', $sdate = '', $edate = '') 367 { 354 function lfGetGraphPie($arrResults, $keyname, $type, $title = '', $sdate = '', $edate = '') { 368 355 369 356 $ret_path = ''; … … 409 396 410 397 // 棒グラフの作成 411 function lfGetGraphBar($arrResults, $keyname, $type, $xtitle, $ytitle, $sdate, $edate) 412 { 398 function lfGetGraphBar($arrResults, $keyname, $type, $xtitle, $ytitle, $sdate, $edate) { 413 399 $ret_path = ''; 414 400 … … 456 442 457 443 // グラフ用のPNGファイル名 458 function lfGetGraphPng($keyname) 459 { 444 function lfGetGraphPng($keyname) { 460 445 461 446 if ($_POST['search_startyear_m'] != '') { … … 468 453 469 454 // 会員、非会員集計のWHERE分の作成 470 function lfGetWhereMember($col_date, $sdate, $edate, $type, $col_member = 'customer_id') 471 { 455 function lfGetWhereMember($col_date, $sdate, $edate, $type, $col_member = 'customer_id') { 472 456 $where = ''; 473 457 // 取得日付の指定 … … 512 496 513 497 /** 会員別集計 **/ 514 function lfGetOrderMember($type, $sdate, $edate) 515 { 498 function lfGetOrderMember($type, $sdate, $edate) { 516 499 $objQuery = SC_Query_Ex::getSingletonInstance(); 517 500 … … 554 537 555 538 /** 商品別集計 **/ 556 function lfGetOrderProducts($type, $sdate, $edate) 557 { 539 function lfGetOrderProducts($type, $sdate, $edate) { 558 540 $objQuery = SC_Query_Ex::getSingletonInstance(); 559 541 … … 592 574 593 575 /** 職業別集計 **/ 594 function lfGetOrderJob($type, $sdate, $edate) 595 { 576 function lfGetOrderJob($type, $sdate, $edate) { 596 577 $objQuery = SC_Query_Ex::getSingletonInstance(); 597 578 list($where, $arrWhereVal) = $this->lfGetWhereMember('dtb_order.create_date', $sdate, $edate, $type); … … 629 610 630 611 /** 年代別集計 **/ 631 function lfGetOrderAge($type, $sdate, $edate) 632 { 612 function lfGetOrderAge($type, $sdate, $edate) { 633 613 634 614 $objQuery = SC_Query_Ex::getSingletonInstance(); … … 668 648 /** 期間別集計 **/ 669 649 // todo あいだの日付埋める 670 function lfGetOrderTerm($type, $sdate, $edate) 671 { 650 function lfGetOrderTerm($type, $sdate, $edate) { 672 651 $objQuery = SC_Query_Ex::getSingletonInstance(); 673 652 … … 725 704 * 期間中の日付を埋める 726 705 */ 727 function lfAddBlankLine($arrResults, $type, $st, $ed) 728 { 706 function lfAddBlankLine($arrResults, $type, $st, $ed) { 729 707 730 708 $arrDateList = $this->lfDateTimeArray($type, $st, $ed); … … 752 730 * 753 731 */ 754 function lfDateTimeArray($type, $st, $ed) 755 { 732 function lfDateTimeArray($type, $st, $ed) { 756 733 switch ($type) { 757 734 case 'month': … … 794 771 * 合計を付与する 795 772 */ 796 function lfAddTotalLine($arrResults) 797 { 773 function lfAddTotalLine($arrResults) { 798 774 // 検索結果が0でない場合 799 775 if (count($arrResults) > 0) { … … 814 790 815 791 // 必要なカラムのみ抽出する(CSVデータで取得する) 816 function lfGetDataColCSV($arrData, $arrDataCol) 817 { 792 function lfGetDataColCSV($arrData, $arrDataCol) { 818 793 $max = count($arrData); 819 794 $csv_data = ''; 820 795 for ($i = 0; $i < $max; $i++) { 821 796 foreach ($arrDataCol as $val) { 822 $arrRet[$i][$val] = ($arrData[$i][$val]) ? $arrData[$i][$val] : "0";797 $arrRet[$i][$val] = $arrData[$i][$val]; 823 798 } 824 799 // 期間別集計の合計行の「期間」項目に不要な値が表示されてしまわない様、'合計'と表示する … … 831 806 } 832 807 833 function lfGetCSVColum($page) 834 { 808 function lfGetCSVColum($page) { 835 809 switch ($page) { 836 810 // 商品別集計
Note: See TracChangeset
for help on using the changeset viewer.