| 103 | 104 | $range_date1=date("Y-m-d H:i",strtotime($ayb_tz,mktime(0, 0, 0, date("m")-$dmonth, date("d")-$dday, date("Y")-$dyear))); |
| 104 | 105 | $range_date2=date("Y-m-d H:i",strtotime($ayb_tz,mktime(23,59,59, date("m")-$dmonth, date("d")-$dday+$range, date("Y")-$dyear))); |
| 105 | | $month_day=substr($range_date1,4,7); |
| 106 | | |
| 107 | | //$q="SELECT ID, post_title, post_date FROM $wpdb->posts WHERE post_status='publish' AND post_password='' AND (post_date >= '".$range_date1."' AND post_date <= '".$range_date2."') ORDER BY post_date DESC"; |
| 108 | | $q="SELECT ID, post_title, post_date FROM $wpdb->posts WHERE post_status='publish' AND post_password='' AND (post_date LIKE '%".$month_day."%') ORDER BY post_date DESC"; |
| | 106 | $month_day=substr($range_date2,4,7); |
| | 107 | |
| | 108 | |
| | 109 | if($anniv==0) { |
| | 110 | $q="SELECT ID, post_title, post_date FROM $wpdb->posts WHERE post_status='publish' AND post_password='' AND (post_date >= '".$range_date1."' AND post_date <= '".$range_date2."') ORDER BY post_date DESC"; |
| | 111 | } else { |
| | 112 | $q="SELECT ID, post_title, post_date FROM $wpdb->posts WHERE post_status='publish' AND post_password='' AND post_date LIKE '%".$month_day."%' AND post_date<CURDATE() ORDER BY post_date DESC"; |
| | 113 | } |