From 49e25053e0580ee1a37f533d18c3efb38b695328 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Mon, 24 Oct 2016 01:07:26 +0300 Subject: [PATCH] use the new style program --- page-schedule.php | 76 ++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 40 deletions(-) diff --git a/page-schedule.php b/page-schedule.php index fe7dce4..43adda0 100644 --- a/page-schedule.php +++ b/page-schedule.php @@ -3,58 +3,54 @@ get_header(); wp_nav_menu( array( 'theme_location' => 'footer-schedule', 'container_class' => 'content subnav cf' ) ); -require("schedule-config.php"); -// REENABLE! -if (!(($year=='2016') && (preg_match('/^workshop/', $pagename)))) $content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR . 'parse.php'; -//var_dump($data); + +$requirePath = __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR; +require $requirePath . 'class.SmartCurl.php'; +require $requirePath . 'config.php'; +require $requirePath . 'load.php'; +require $requirePath . 'parse.php'; +$sched_config = getSchedConfig(date('Y')); +$data = loadData($sched_config); + +if ( preg_match('/^workshop/', $pagename) ) { + $sched_config['filterEventType'] = "workshop"; +} else { + $sched_config['filterEventType'] = "lecture"; +} +$content = parseData($sched_config, $data); + + ?>

- - - - - - + + +
+
 
+ - - - + +
+
- - -
- - - - -
- +
+ - -