<?php getHeaderCUSTOM(); $posts = new Posts(); $comments = new Comments(URI::getPageId()); $row = $posts->getPost(URI::getParams_single()['id']); $posts->handlePostViewsById(URI::getPageId()); ?> <?php include_once 'sidebar.php'; ?> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left"> <article class="post"> <a href="<?php echo $posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']); ?> "><h3 style="font-weight: bold;"><?php echo strip_tags($row['post_title']); ?> </h3></a> <span style="color: #808080;"><i style="vertical-align: middle;" class="mdi mdi-calendar"></i> <?php echo englishConvertDate($row['post_date']); ?> <i style="vertical-align: middle;" class="mdi mdi-file"></i> <?php echo getCategoryById(getPostCategories($row['ID'])[0]); ?> </span> <p><?php echo $row['post_excerpt']; ?> </p>
<script src="<?php echo THEME_BASE; ?> comment_submit.js"></script> <div id="comment_form"> <?php $a = commentFormCheck($comment_status); if ($a == 2 && getCurrentUser() == '') { ?> Log in to comment. <?php } elseif ($a == 1 || $a == 2 && getCurrentUser() != '') { ?> <form id="comment_form" action="comment_submit.php" method="POST"> <input name="post_id" type="hidden" value="<?php echo URI::getPageId(); ?> "> <input name="user_id" type="hidden" value="<?php echo getCurrentUser('id'); ?> "> <?php if (getCurrentUser() != '') { ?> <p>Comment as <strong><?php echo getCurrentUser('username'); ?> </strong>:</p> <?php }