<?php require view('theme/header'); ?>



<div class="container">

	<div class="row">

		<?php if(!route(1)): ?>

			<?php if(!$blogs): ?>

				<div class="col-md-8 col-md-offset-2">

					<div class="alert alert-dismissible alert-danger">

						<b>Opps!</b>

						<p style="margin:0">{BLOG_NOT_FOUND}</p>

					</div>

				</div>

			<?php else: ?>

				<?php foreach($blogs as $row): ?>

				<div class="col-md-8 col-md-offset-2">

					<div class="panel panel-default">

						<div class="panel-heading"><b><?=$row['blog_title']?></b></div>

						<div class="panel-body">

							<?=substr(htmlspecialchars_decode($row['blog_content']), 0, 250) . "...";?>

						</div>

						<div class="panel-footer">

							<a href="<?=site($siteLinks['blog']['url'].'/'.$row['blog_url'])?>" class="btn btn-primary">Devamını Oku</a>

							<small style="margin-left:10px;"><?=str_date($row['blog_date'])?></small>

						</div>

					</div>

				</div>

				<?php endforeach; ?>

			<?php endif; ?>

		<?php else: ?>

		<div class="col-md-8 col-md-offset-2">

			<div class="panel panel-default">

				<div class="panel-heading"><?=$title?></div>

				<div class="panel-body">

					<?= htmlspecialchars_decode($blog_content) ?>

				</div>

				<div class="panel-footer">

					<?=str_date($blog_date)?>

				</div>

			</div>

		</div>

		<?php endif; ?>

	</div>

</div>

<?php require view('theme/footer'); ?>