Index: /temp/branches/ec-cube-beta/html/campaign/default/index.php
===================================================================
--- /temp/branches/ec-cube-beta/html/campaign/default/index.php	(revision 10908)
+++ /temp/branches/ec-cube-beta/html/campaign/default/index.php	(revision 10909)
@@ -17,4 +17,5 @@
 $objPage = new LC_Page();
 $objView = new SC_SiteView(false);
+$objQuery = new SC_Query();
 
 // ¥Ç¥£¥ì¥¯¥È¥êÌ¾¤ò¼èÆÀ
@@ -23,14 +24,8 @@
 $dir_name = $arrDir[count($arrDir) -1];
 
-switch($_GET['status']) {
-	case 'active':
-		$status = CAMPAIGN_TEMPLATE_ACTIVE;
-		break;
-	case 'end':
-		$status = CAMPAIGN_TEMPLATE_END;
-		break;
-	default:
-		$status = CAMPAIGN_TEMPLATE_ACTIVE;
-		break;
+if(lfCheckLimitDate($dir_name)) {
+	$status = CAMPAIGN_TEMPLATE_ACTIVE;
+} else {
+	$status = CAMPAIGN_TEMPLATE_END;
 }
 
@@ -40,2 +35,30 @@
 $objView->assignobj($objPage);
 $objView->display($objPage->tpl_mainpage);
+
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------
+/* 
+ * ´Ø¿ôÌ¾¡§lfCheckLimitDate()
+ * °ú¿ô1 ¡§¥Ç¥£¥ì¥¯¥È¥êÌ¾
+ * ÀâÌÀ¡¡¡§¥­¥ã¥ó¥Ú¡¼¥óÃæ¤«¥Á¥§¥Ã¥¯
+ * Ìá¤êÃÍ¡§¥­¥ã¥ó¥Ú¡¼¥óÃæ¤Ê¤é true ½ªÎ»¤Ê¤é false
+ */
+function lfCheckLimitDate($directory_name) {
+	
+	global $objQuery;
+	
+	$col = "start_date,end_date";
+	$arrRet = $objQuery->select($col, "dtb_campaign", "directory_name = ? AND del_flg = 0", array($directory_name));
+
+	// ³«»ÏÆü»þ¡¦Ää»ßÆü»þ¤òÊ¬²ò
+	$start_date = (date("YmdHis" , strtotime($arrRet[0]['start_date'])));
+	$end_date = (date("YmdHis" , strtotime($arrRet[0]['end_date'])));
+	$now_date = (date("YmdHis"));
+	
+	// ¥­¥ã¥ó¥Ú¡¼¥ó¤¬³«ºÅÃæ¤«¥Á¥§¥Ã¥¯
+	if($now_date > $start_date && $now_date < $start_date) {
+		return true;
+	}
+		
+	return false;
+}
