<?php $this->extend('block_unsearchable'); ?>

<?php $this->block('content'); ?>

<?php //if (in_array($this->reg_startTime, $_SESSION['reg_startTime'])): ?>
	<?php //$this->canRegister = false; ?>
	<?php //$_SESSION['reg_fall'] = true; ?>
<?php //endif; ?>

  <?php if (!$this->canRegister): ?>
  
	<?php if (isset($_SESSION['reg_fall']) && $_SESSION['reg_fall']): ?>
		<h3 class="fail"><?=$_SESSION['reg_message'] ?><h3>
	<?php else: ?>
    	<p class="cannot-register"><?= $this->trans('cannot_register', [], 'im_contao_event_registration') ?></p>
    <?php endif; ?>
  <?php else: ?>
    <?= $this->registrationForm ?>
  <?php endif; ?>

<?php $this->endblock(); ?>
