Index: temp/trunk/html/admin/total/index.php
===================================================================
--- temp/trunk/html/admin/total/index.php	(revision 7246)
+++ temp/trunk/html/admin/total/index.php	(revision 7247)
@@ -78,8 +78,4 @@
 	$arrRet = $objFormParam->getHashArray();
 	
-sfprintr($objFormParam->getHashArray());
-sfprintr($objPage);
-exit();
-	
 	// ÆþÎÏ¥¨¥é¡¼¤Ê¤·
 	if (count($objPage->arrErr) == 0) {
@@ -90,11 +86,11 @@
 			switch ($key) {
 			case 'search_startyear':
-				$sdate = $_POST['search_startyear'] . "/" . $_POST['search_startmonth'] . "/" . $_POST['search_startday'];
+				$sdate = $objFormParam->getValue('search_startyear') . "/" . $objFormParam->getValue('search_startmonth') . "/" . $objFormParam->getValue('search_startday');
 				break;
 			case 'search_endyear':
-				$edate = $_POST['search_endyear'] . "/" . $_POST['search_endmonth'] . "/" . $_POST['search_endday'];
+				$edate = $objFormParam->getValue('search_endyear') . "/" . $objFormParam->getValue('search_endmonth') . "/" . $objFormParam->getValue('search_endday');
 				break;
 			case 'search_startyear_m':
-				list($sdate, $edate) = sfTermMonth($_POST['search_startyear_m'], $_POST['search_startmonth_m'], CLOSE_DAY);
+				list($sdate, $edate) = sfTermMonth($objFormParam->getValue('search_startyear_m'), $objFormParam->getValue('search_startmonth_m'), CLOSE_DAY);
 				break;
 			default:
@@ -118,5 +114,5 @@
 			lfRealTimeDailyTotal($sdate, $edate);
 			// ¸¡º÷·ë²Ì¤Î¼èÆÀ
-			$objPage = lfGetOrderProducts($type, $sdate, $edate, $objPage);
+			$objPage = lfGetOrderProducts($type, $sdate, $edate, $objPage, true, $mode);
 			break;
 		// ¿¦¶ÈÊÌ½¸·×
@@ -168,5 +164,5 @@
 		}
 
-		if($_POST['mode'] == 'csv') {
+		if($mode == 'csv') {
 			// CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤Î¼èÆÀ
 			list($arrTitleCol, $arrDataCol) = lfGetCSVColum($page, $objPage->keyname);
@@ -178,5 +174,5 @@
 		}
 		
-		if($_POST['mode'] == 'pdf') {
+		if($mode == 'pdf') {
 			// CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤Î¼èÆÀ
 			list($arrTitleCol, $arrDataCol, $arrColSize, $arrAlign, $title) = lfGetPDFColum($page, $type, $objPage->keyname);
@@ -185,6 +181,6 @@
 			// PDF½ÐÎÏÍÑ
 			$graph_name = basename($objPage->tpl_image);
-			lfPDFDownload($graph_name, $head . $data, $arrColSize, $arrAlign, $sdate, $edate, $title);
-			exit;	
+			lfPDFDownload($graph_name, $head . $data, $arrColSize, $arrAlign, $sdate, $edate, $title, $page);
+			exit;
 		}	
 	}
@@ -218,5 +214,5 @@
 //---------------------------------------------------------------------------------------------------------------------------
 /* PDF½ÐÎÏ */
-function lfPDFDownload($image, $table, $arrColSize, $arrAlign, $sdate, $edate, $title) {
+function lfPDFDownload($image, $table, $arrColSize, $arrAlign, $sdate, $edate, $title, $page = "") {
 	
 	$objPdf = new SC_Pdf();
@@ -253,5 +249,5 @@
 		$objPdf->writeBlock();
 		// ºÇ½ª¥Ú¡¼¥¸¤Î¤ß¡¢¾¦ÉÊÊÌ½¸·×¤Ï¹ç·×¤¬¤Ê¤¤¤Î¤ÇºÇ½ª¹Ô¤Î¿§¤òÊÑ¹¹¤·¤Ê¤¤¡£
-		if($page == $page_max && $_POST['page'] != 'products') {
+		if($page == $page_max && $page != 'products') {
 			$last_color_flg = true;
 		} else {
@@ -602,5 +598,5 @@
 
 /** ¾¦ÉÊÊÌ½¸·× **/
-function lfGetOrderProducts($type, $sdate, $edate, $objPage, $graph = true) {
+function lfGetOrderProducts($type, $sdate, $edate, $objPage, $graph = true, $mode = "") {
 	list($where, $arrval) = lfGetWhereMember('create_date', $sdate, $edate, $type);
 	
@@ -616,5 +612,5 @@
 	$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 ";
 	
-	if($_POST['mode'] != "csv") {
+	if($mode != "csv") {
 		$sql.= "LIMIT " . PRODUCTS_TOTAL_MAX;
 	}
