<div class="bread semibold">
	<?php $a = 0; ?>
	<?php foreach ($this->breadcumbs as $breadcumb): ?>
		<?php if($breadcumb[1] == 1): ?>
			<a href="<?php echo $breadcumb[3]?>">
				<i class="fa fa-arrow-circle-right"></i>
				<?php echo $breadcumb[0]; ?>
			</a>
		<?php else: ?>
			<i class="fa fa-arrow-circle-right"></i>
			<?php echo $breadcumb[0]; ?>
		<?php endif; ?>
			
			<?php if($a): ?>
				<?php $a = 0; ?>
				<br />
			<?php endif; ?>
			<?php if($breadcumb[2]): ?>
				<?php $a = 1; ?>
			<?php endif; ?>
			
	<?php endforeach; ?>
</div>

<div class="static-content">
	<h1><?= $this->page->name ?></h1>
	<p class="cont">
<?= $this->page->content ?>
	<?php if($this->form ): ?>
		<h2><?= $this->form->name ?></h2>
		<?php if($this->form->description): ?>
			<?= $this->form->description ?>
		<?php endif; ?>
		<div id="formCustomMsgHolder"></div>
		<form class="custom-form" id="custom-form">
			<input type="hidden" value="<?= $this->form->id ?>" name="id">
			<?php foreach($this->fields as $filed): ?>
				<?php switch ($filed["inputname"]) {
					case 'fake': ?>
						<div class="label-input-required">
							<label><?= $filed["label"] ?>:</label>
							<input type="text" name="<?= $filed["id"] ?>;<?= $filed["required"] ?>;0" id="<?= $filed["fieldid"] ?>" value="" class="required">
						</div>
						<?php break;
					case 'text': ?>
						<div class="label-input">
							<label><?= $filed["label"] ?>:</label>
							<input type="text" name="<?= $filed["id"] ?>;<?= $filed["required"] ?>;0" id="<?= $filed["fieldid"] ?>" value="" class="">
						</div>
						<?php break;
					case 'textarea': ?>
						<div class="label-input">
							<label class="textarea-label"><?= $filed["label"] ?>:</label>
							<textarea name="<?= $filed["id"] ?>;<?= $filed["required"] ?>;0" id="<?= $filed["fieldid"] ?>" rows="24" cols="80" class=""></textarea>
						</div>
			
						<?php break;
					case 'checkbox': ?>
						<div class="label-input" style="margin-bottom: 20px">
							<input type="checkbox" name="<?= $filed["id"] ?>;<?= $filed["required"] ?>;1" id="<?= $filed["fieldid"] ?>" value="" class="checkbox-element <?= ($filed["required"])? 'req' : ''; ?>">
							<label style="width: 585px;"><?= $filed["label"] ?></label>
							<div class="val">Pole jest wymagane</div>
						</div>
						<?php break;
					case 'submit': ?>
						<div class="button semibold" id="submit-form">
							<?= $filed["label"]?>
						</div>
						<div class="clear"></div>
						<?php break;
					case 'file': ?>
						<div class="label-input">
							<label><?= $filed["label"] ?>:</label>
							<input type="file" name="<?= $filed["id"] ?>;<?= $filed["required"] ?>;0" id="FileInput" value="" class="<?= ($filed["required"])? 'req' : ''; ?>">
						</div>
						<div class="clear"></div>
						<?php break;
					}?>
			<?php endforeach; ?>
			
		</form>
	<?php endif; ?>
	</p>
</div>
