- Timestamp:
- 2006/12/18 18:47:22 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
temp/branches/ec-cube-beta/html/campaign/default/index.php
r10908 r10909 17 17 $objPage = new LC_Page(); 18 18 $objView = new SC_SiteView(false); 19 $objQuery = new SC_Query(); 19 20 20 21 // ¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¼èÆÀ … … 23 24 $dir_name = $arrDir[count($arrDir) -1]; 24 25 25 switch($_GET['status']) { 26 case 'active': 27 $status = CAMPAIGN_TEMPLATE_ACTIVE; 28 break; 29 case 'end': 30 $status = CAMPAIGN_TEMPLATE_END; 31 break; 32 default: 33 $status = CAMPAIGN_TEMPLATE_ACTIVE; 34 break; 26 if(lfCheckLimitDate($dir_name)) { 27 $status = CAMPAIGN_TEMPLATE_ACTIVE; 28 } else { 29 $status = CAMPAIGN_TEMPLATE_END; 35 30 } 36 31 … … 40 35 $objView->assignobj($objPage); 41 36 $objView->display($objPage->tpl_mainpage); 37 38 39 //--------------------------------------------------------------------------------------------------------------------------------------------------------- 40 /* 41 * ´Ø¿ô̾¡§lfCheckLimitDate() 42 * °ú¿ô1 ¡§¥Ç¥£¥ì¥¯¥È¥ê̾ 43 * ÀâÌÀ¡¡¡§¥¥ã¥ó¥Ú¡¼¥óÃæ¤«¥Á¥§¥Ã¥¯ 44 * Ìá¤êÃÍ¡§¥¥ã¥ó¥Ú¡¼¥óÃæ¤Ê¤é true ½ªÎ»¤Ê¤é false 45 */ 46 function lfCheckLimitDate($directory_name) { 47 48 global $objQuery; 49 50 $col = "start_date,end_date"; 51 $arrRet = $objQuery->select($col, "dtb_campaign", "directory_name = ? AND del_flg = 0", array($directory_name)); 52 53 // ³«»ÏÆü»þ¡¦Ää»ßÆü»þ¤òʬ²ò 54 $start_date = (date("YmdHis" , strtotime($arrRet[0]['start_date']))); 55 $end_date = (date("YmdHis" , strtotime($arrRet[0]['end_date']))); 56 $now_date = (date("YmdHis")); 57 58 // ¥¥ã¥ó¥Ú¡¼¥ó¤¬³«ºÅÃæ¤«¥Á¥§¥Ã¥¯ 59 if($now_date > $start_date && $now_date < $start_date) { 60 return true; 61 } 62 63 return false; 64 }
Note: See TracChangeset
for help on using the changeset viewer.
