2015-10-19 02:04:49 +03:00
|
|
|
<?php
|
|
|
|
/* Template Name: Schedule */
|
|
|
|
get_header();
|
2015-10-19 21:14:48 +03:00
|
|
|
|
|
|
|
$lang = pll_current_language('slug');
|
|
|
|
|
|
|
|
/*
|
|
|
|
* There is no better way to get where the speakers are
|
|
|
|
*/
|
|
|
|
|
|
|
|
if ('en' === $lang) {
|
|
|
|
$s_slug = 'speakers';
|
|
|
|
} else {
|
|
|
|
$s_slug = 'lektori';
|
|
|
|
}
|
|
|
|
|
|
|
|
$args = array(
|
|
|
|
'name' => $s_slug,
|
|
|
|
'post_type' => 'page',
|
|
|
|
'numberposts' => 1
|
|
|
|
);
|
|
|
|
|
|
|
|
$url = '';
|
|
|
|
|
|
|
|
$my_posts = get_posts($args);
|
|
|
|
if( $my_posts ) {
|
|
|
|
$url = get_permalink( $my_posts[0]->ID );
|
|
|
|
}
|
|
|
|
|
2015-10-19 02:04:49 +03:00
|
|
|
$content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR . 'parse.php';
|
|
|
|
//var_dump($data);
|
|
|
|
?>
|
2015-10-19 12:04:20 +03:00
|
|
|
<section class="content grid">
|
|
|
|
<div class="col-left">
|
2015-10-19 02:04:49 +03:00
|
|
|
<h1>Програма</h1>
|
2015-10-19 12:04:20 +03:00
|
|
|
|
|
|
|
|
2015-10-19 11:50:48 +03:00
|
|
|
<table cellpadding="0" cellspacing="0" style="text-align: center;" class="schedule">
|
2015-10-19 02:04:49 +03:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<?php
|
|
|
|
foreach ($content['halls'] as $hall_name) {
|
|
|
|
?>
|
2015-10-20 10:27:25 +03:00
|
|
|
<td><?php echo htmlspecialchars($hall_name[$lang]); ?></td>
|
2015-10-19 02:04:49 +03:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
foreach ($content['lines'] as $line) {
|
2015-10-19 21:14:48 +03:00
|
|
|
echo str_replace('SPKURL', $url, $line), PHP_EOL;
|
2015-10-19 02:04:49 +03:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="separator"></div>
|
2015-10-20 01:14:42 +03:00
|
|
|
<table cellpadding="0" cellspacing="0" class="schedule schedule-legend">
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
foreach ($content['legend'] as $line) {
|
|
|
|
echo $line, PHP_EOL;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2015-10-19 02:04:49 +03:00
|
|
|
<?php
|
|
|
|
foreach ($content['fulltalks'] as $line) {
|
|
|
|
echo $line, PHP_EOL;
|
|
|
|
}
|
2015-10-19 12:04:20 +03:00
|
|
|
/*
|
2015-10-19 02:04:49 +03:00
|
|
|
foreach ($content['gspk'] as $line) {
|
|
|
|
echo $line, PHP_EOL;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($content['fspk'] as $line) {
|
|
|
|
echo $line, PHP_EOL;
|
2015-10-19 12:04:20 +03:00
|
|
|
}*/
|
2015-10-19 02:04:49 +03:00
|
|
|
?>
|
|
|
|
</div>
|
2015-10-19 12:04:20 +03:00
|
|
|
<?php get_sidebar(); ?>
|
2015-10-19 02:04:49 +03:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<?php echo do_shortcode( '[transport]' ); ?>
|
|
|
|
|
|
|
|
<?php get_footer(); ?>
|