Changeset 7247 for temp/trunk/html/admin


Ignore:
Timestamp:
2006/11/01 19:05:57 (20 years ago)
Author:
kakinaka
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/total/index.php

    r7246 r7247  
    7878    $arrRet = $objFormParam->getHashArray(); 
    7979     
    80 sfprintr($objFormParam->getHashArray()); 
    81 sfprintr($objPage); 
    82 exit(); 
    83      
    8480    // ÆþÎÏ¥¨¥é¡¼¤Ê¤· 
    8581    if (count($objPage->arrErr) == 0) { 
     
    9086            switch ($key) { 
    9187            case 'search_startyear': 
    92                 $sdate = $_POST['search_startyear'] . "/" . $_POST['search_startmonth'] . "/" . $_POST['search_startday']; 
     88                $sdate = $objFormParam->getValue('search_startyear') . "/" . $objFormParam->getValue('search_startmonth') . "/" . $objFormParam->getValue('search_startday'); 
    9389                break; 
    9490            case 'search_endyear': 
    95                 $edate = $_POST['search_endyear'] . "/" . $_POST['search_endmonth'] . "/" . $_POST['search_endday']; 
     91                $edate = $objFormParam->getValue('search_endyear') . "/" . $objFormParam->getValue('search_endmonth') . "/" . $objFormParam->getValue('search_endday'); 
    9692                break; 
    9793            case 'search_startyear_m': 
    98                 list($sdate, $edate) = sfTermMonth($_POST['search_startyear_m'], $_POST['search_startmonth_m'], CLOSE_DAY); 
     94                list($sdate, $edate) = sfTermMonth($objFormParam->getValue('search_startyear_m'), $objFormParam->getValue('search_startmonth_m'), CLOSE_DAY); 
    9995                break; 
    10096            default: 
     
    118114            lfRealTimeDailyTotal($sdate, $edate); 
    119115            // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    120             $objPage = lfGetOrderProducts($type, $sdate, $edate, $objPage); 
     116            $objPage = lfGetOrderProducts($type, $sdate, $edate, $objPage, true, $mode); 
    121117            break; 
    122118        // ¿¦¶ÈÊ̽¸·× 
     
    168164        } 
    169165 
    170         if($_POST['mode'] == 'csv') { 
     166        if($mode == 'csv') { 
    171167            // CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤Î¼èÆÀ 
    172168            list($arrTitleCol, $arrDataCol) = lfGetCSVColum($page, $objPage->keyname); 
     
    178174        } 
    179175         
    180         if($_POST['mode'] == 'pdf') { 
     176        if($mode == 'pdf') { 
    181177            // CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤Î¼èÆÀ 
    182178            list($arrTitleCol, $arrDataCol, $arrColSize, $arrAlign, $title) = lfGetPDFColum($page, $type, $objPage->keyname); 
     
    185181            // PDF½ÐÎÏÍÑ 
    186182            $graph_name = basename($objPage->tpl_image); 
    187             lfPDFDownload($graph_name, $head . $data, $arrColSize, $arrAlign, $sdate, $edate, $title); 
    188             exit;    
     183            lfPDFDownload($graph_name, $head . $data, $arrColSize, $arrAlign, $sdate, $edate, $title, $page); 
     184            exit; 
    189185        }    
    190186    } 
     
    218214//--------------------------------------------------------------------------------------------------------------------------- 
    219215/* PDF½ÐÎÏ */ 
    220 function lfPDFDownload($image, $table, $arrColSize, $arrAlign, $sdate, $edate, $title) { 
     216function lfPDFDownload($image, $table, $arrColSize, $arrAlign, $sdate, $edate, $title, $page = "") { 
    221217     
    222218    $objPdf = new SC_Pdf(); 
     
    253249        $objPdf->writeBlock(); 
    254250        // ºÇ½ª¥Ú¡¼¥¸¤Î¤ß¡¢¾¦ÉÊÊ̽¸·×¤Ï¹ç·×¤¬¤Ê¤¤¤Î¤ÇºÇ½ª¹Ô¤Î¿§¤òÊѹ¹¤·¤Ê¤¤¡£ 
    255         if($page == $page_max && $_POST['page'] != 'products') { 
     251        if($page == $page_max && $page != 'products') { 
    256252            $last_color_flg = true; 
    257253        } else { 
     
    602598 
    603599/** ¾¦ÉÊÊ̽¸·× **/ 
    604 function lfGetOrderProducts($type, $sdate, $edate, $objPage, $graph = true) { 
     600function lfGetOrderProducts($type, $sdate, $edate, $objPage, $graph = true, $mode = "") { 
    605601    list($where, $arrval) = lfGetWhereMember('create_date', $sdate, $edate, $type); 
    606602     
     
    616612    $sql.= "AS T1 LEFT JOIN dtb_products AS T2 USING (product_id) WHERE T2.name IS NOT NULL AND status = 1 ORDER BY T1.total DESC "; 
    617613     
    618     if($_POST['mode'] != "csv") { 
     614    if($mode != "csv") { 
    619615        $sql.= "LIMIT " . PRODUCTS_TOTAL_MAX; 
    620616    } 
Note: See TracChangeset for help on using the changeset viewer.