Trainings events

Trainings events

[insert_php] $search_news = array( array( ‘key’ => ’18’, ‘value’ => ‘Training’ ) ); $sorting_news = array(‘key’ => ’77’, ‘direction’ => ‘DESC’ ); $paging_news = array( ‘offset’ => 0, ‘page_size’ => 20 ); $entries_news_desc = GFAPI::get_entries( ‘8’,$search_news, $sorting_news,$paging_news); $entries_news=array_reverse( $entries_news_desc); echo “UPCOMING TRAININGS
“; foreach ($entries_news as $entry_news) { $string = strtolower($entry_news[18]).”-“.strtolower(str_replace(‘ ‘, ‘-‘,str_replace(‘\”, ”,str_replace(‘/’, ”,str_replace(‘é’, ‘e’,$entry_news[23]))))); $now = date(‘Y-m-d’); $news_date_start = $entry_news[77]; $news_date_end = $entry_news[78]; $now = new DateTime( $now ); $now = $now->format(‘Ymd’); $news_date_start = new DateTime( $news_date_start); $news_date_end = new DateTime( $news_date_end); $news_date_start = $news_date_start->format(‘Ymd’); $news_date_end = $news_date_end->format(‘Ymd’); $threeweeks=date(“Ymd”, strtotime(“$news_date_start +3 weeks”)); if(($now < $news_date_start) || ($now < $news_date_end)){ if ($entry_news[18] == 'Training'){ echo "
Training
“.”Starting “.date(“D j M Y”, strtotime($entry_news[77])).” at “.$entry_news[79].”, “.$entry_news[‘81.3’].” “.$entry_news[‘81.6’].” will organize “.$entry_news[23].”
“; echo “
“.$entry_news[24].”
“; } } } [/insert_php]