Changeset 11147 for temp/branches


Ignore:
Timestamp:
2006/12/23 19:41:45 (20 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/branches/ec-cube-beta/html/campaign/default/index.php

    r11138 r11147  
    3535 
    3636// ¥­¥ã¥ó¥Ú¡¼¥ó¤¬³«ºÅÃæ¤«¤ò¥Á¥§¥Ã¥¯ 
    37 if(lfCheckLimitDate($dir_name)) { 
     37if(lfCheckActive($dir_name)) { 
    3838    $status = CAMPAIGN_TEMPLATE_ACTIVE; 
    3939} else { 
     
    8686//--------------------------------------------------------------------------------------------------------------------------------------------------------- 
    8787/*  
    88  * ´Ø¿ô̾¡§lfCheckLimitDate() 
     88 * ´Ø¿ô̾¡§lfCheckActive() 
    8989 * °ú¿ô1 ¡§¥Ç¥£¥ì¥¯¥È¥ê̾ 
    9090 * ÀâÌÀ¡¡¡§¥­¥ã¥ó¥Ú¡¼¥óÃæ¤«¥Á¥§¥Ã¥¯ 
    9191 * Ìá¤êÃÍ¡§¥­¥ã¥ó¥Ú¡¼¥óÃæ¤Ê¤é true ½ªÎ»¤Ê¤é false 
    9292 */ 
    93 function lfCheckLimitDate($directory_name) { 
     93function lfCheckActive($directory_name) { 
    9494     
    9595    global $objQuery; 
    96      
    97     $col = "start_date,end_date"; 
     96    $is_active = false; 
     97     
     98    $col = "limit_count, total_count, start_date, end_date"; 
    9899    $arrRet = $objQuery->select($col, "dtb_campaign", "directory_name = ? AND del_flg = 0", array($directory_name)); 
    99100 
     
    103104    $now_date = (date("YmdHis")); 
    104105 
    105     // ¥­¥ã¥ó¥Ú¡¼¥ó¤¬³«ºÅÃæ¤«¥Á¥§¥Ã¥¯ 
    106     if($now_date > $start_date && $now_date < $end_date) { 
    107         return true; 
    108     } 
    109          
    110     return false; 
     106    // ¥­¥ã¥ó¥Ú¡¼¥ó¤¬³«ºÅ´ü´Ö¤Ç¡¢¤«¤Ä¿½¹þÀ©¸ÂÆâ¤Ç¤¢¤ë 
     107    if($now_date > $start_date && $now_date < $end_date 
     108            && $arrRet[0]['limit_count'] > 0 && $arrRet[0]['limit_count'] > $arrRet[0]['total_count']) { 
     109        $is_active = true; 
     110    } 
     111         
     112    return $is_active; 
    111113} 
    112114 
Note: See TracChangeset for help on using the changeset viewer.