Index: temp/branches/ec-cube-beta/html/campaign/default/application.php
===================================================================
--- temp/branches/ec-cube-beta/html/campaign/default/application.php	(revision 11164)
+++ temp/branches/ec-cube-beta/html/campaign/default/application.php	(revision 11166)
@@ -57,3 +57,31 @@
 
 //---------------------------------------------------------------------------------------------------------------------------------------------------------
+/* 
+ * ´Ø¿ôÌ¾¡§lfCheckActive()
+ * °ú¿ô1 ¡§¥Ç¥£¥ì¥¯¥È¥êÌ¾
+ * ÀâÌÀ¡¡¡§¥­¥ã¥ó¥Ú¡¼¥óÃæ¤«¥Á¥§¥Ã¥¯
+ * Ìá¤êÃÍ¡§¥­¥ã¥ó¥Ú¡¼¥óÃæ¤Ê¤é true ½ªÎ»¤Ê¤é false
+ */
+function lfCheckActive($directory_name) {
+	
+	global $objQuery;
+	$is_active = false;
+	
+	$col = "limit_count, total_count, 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 < $end_date
+			&& $arrRet[0]['limit_count'] > 0 && $arrRet[0]['limit_count'] > $arrRet[0]['total_count']) {
+		$is_active = true;
+	}
+		
+	return $is_active;
+}
+
 ?>
