Index: temp/branches/ec-cube-beta/html/admin/contents/campaign_csv.php
===================================================================
--- temp/branches/ec-cube-beta/html/admin/contents/campaign_csv.php	(revision 10810)
+++ temp/branches/ec-cube-beta/html/admin/contents/campaign_csv.php	(revision 10810)
@@ -0,0 +1,62 @@
+<?php
+/*
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ */
+require_once(DATA_PATH . "include/csv_output.inc");
+
+// CSV½ÐÎÏ¥Ç¡¼¥¿¤òºîÀ®¤¹¤ë¡£
+function lfGetCSV($from, $where, $option, $arrval, $arrCsvOutputCols = "") {
+	global $arrCVSCOL;
+
+	//$cols = sfGetCommaList($arrCVSCOL);
+	$cols = sfGetCommaList($arrCsvOutputCols);
+	
+	$objQuery = new SC_Query();
+	$objQuery->setoption($option);
+	
+	$list_data = $objQuery->select($cols, $from, $where, $arrval);	
+
+	$max = count($list_data);
+	for($i = 0; $i < $max; $i++) {
+		// ³Æ¹àÌÜ¤òCSV½ÐÎÏÍÑ¤ËÊÑ´¹¤¹¤ë¡£
+		$data .= lfMakeCSV($list_data[$i]);
+	}
+	return $data;
+}
+
+// ³Æ¹àÌÜ¤òCSV½ÐÎÏÍÑ¤ËÊÑ´¹¤¹¤ë¡£
+function lfMakeCSV($list) {
+	global $arrPref;
+	global $arrJob;
+	global $arrORDERSTATUS;
+	
+	$line = "";
+	
+	foreach($list as $key => $val) {
+		$tmp = "";
+		switch($key) {
+		case 'order_pref':
+			$tmp = $arrPref[$val];
+			break;
+		case 'order_job':
+			$tmp = $arrJob[$val];
+			break;
+		case 'status':
+			$tmp = $arrORDERSTATUS[$val];
+			break;
+		default:
+			$tmp = $val;
+			break;
+		}
+
+		$tmp = ereg_replace("[\",]", " ", $tmp);
+		$line .= "\"".$tmp."\",";
+	}
+	// Ê¸Ëö¤Î","¤òÊÑ´¹
+	$line = ereg_replace(",$", "\n", $line);
+	return $line;
+}
+
+?>
Index: temp/branches/ec-cube-beta/html/admin/contents/campaign.php
===================================================================
--- temp/branches/ec-cube-beta/html/admin/contents/campaign.php	(revision 10808)
+++ temp/branches/ec-cube-beta/html/admin/contents/campaign.php	(revision 10810)
@@ -6,4 +6,5 @@
  */
 require_once("../require.php");
+require_once("./campaign_csv.php");
 
 //---- Ç§¾Ú²ÄÈÝ¤ÎÈ½Äê
@@ -71,5 +72,5 @@
 	case 'csv':
 		// ¥ª¥×¥·¥ç¥ó¤Î»ØÄê
-		$option = "ORDER BY $order";
+		$option = "ORDER BY update_date DESC";
 			
 		// CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤ÎºîÀ®
@@ -81,5 +82,5 @@
 		$arrCsvOutputTitle = $arrCsvOutput['disp_name'];
 		$head = sfGetCSVList($arrCsvOutputTitle);
-		$data = lfGetCSV("dtb_order", $where, $option, $arrval, $arrCsvOutputCols);
+		$data = lfGetCSV("dtb_order", "campaign_id = ?", $option, array($campaign_id), $arrCsvOutputCols);
 			
 		// CSV¤òÁ÷¿®¤¹¤ë¡£
