<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<section class="panel">
    <h3><?=$post['title']?></h3>
    <p><?=nl2br($post['description'])?></p>
    <i class="fa fa-comments-o"></i> <i><?=$post['comments']?> коментара</i>
</section>

<section class="panel">
    <h4>Коментари:</h4>

    <?php
    if (isset($commentResult) && $commentResult !== null) : ?>
        <div class="alert alert-danger"><?=$commentResult?></div>
    <?php endif; ?>

    <?=form_open()?>
    <?php if (!$_isLogged) : ?>
    <div class="form-group">
        <label for="form_author" class="required">Автор</label>
        <input type="text" id="form_author" name="author" required="required" class="form-control" placeholder="Автор" value="<?=set_value("author")?>" />
    </div>

    <div class="form-group">
        <label for="form_email">E-mail адрес</label>
        <input type="email" id="form_email" name="email" class="form-control" placeholder="E-mail адрес" value="<?=set_value("email")?>" />
    </div>
    <?php endif; ?>
    <div class="form-group">
        <label for="form_description" class="required">Съобщение</label>
        <textarea id="form_description" name="description" required="required" rows="5" class="form-control" placeholder="Съобщение"><?=set_value("description")?></textarea>
    </div>
    <div><button type="submit" id="form_save" name="post" class="btn btn-primary">Публикувай коментар</button></div>
    <?=form_close()?>
    <hr />
    <?php foreach ($comments as $comment) : ?>
    <div class="comment">
        <i class="fa fa-user-o"></i> <span class="author"><?=htmlspecialchars($comment['author'])?></span><commit_msg>Nothing special. :P<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<section class="panel">
    <h3><?=$post['title']?></h3>
    <p><?=nl2br($post['description'])?></p>
    <i class="fa fa-comments-o"></i> <i><?=$post['comments']?> коментара</i>
</section>

<section class="panel">
    <h4>Коментари:</h4>

    <?php if (isset($commentResult) && $commentResult !== null) : ?>
        <div class="alert alert-danger"><?=$commentResult?></div>
    <?php endif; ?>

    <?php if ($this->session->flashdata('newComment') !== null) : ?>
        <div class="alert alert-success"><?=$this->session->flashdata('newComment')?></div>
    <?php endif; ?>

    <?=form_open()?>
    <?php if (!$_isLogged) : ?>
    <div class="form-group">
        <label for="form_author" class="required">Автор</label>
        <input type="text" id="form_author" name="author" required="required" class="form-control" placeholder="Автор" value="<?=set_value("author")?>" />
    </div>

    <div class="form-group">
        <label for="form_email">E-mail адрес</label>
        <input type="email" id="form_email" name="email" class="form-control" placeholder="E-mail адрес" value="<?=set_value("email")?>" />
    </div>
    <?php endif; ?>
    <div class="form-group">
        <label for="form_description" class="required">Съобщение</label>
        <textarea id="form_description" name="description" required="required" rows="5" class="form-control" placeholder="Съобщение"><?=set_value("description")?></textarea>
    </div>
    <div><button type="submit" id="form_save" name="post" class="btn btn-primary">Публикувай коментар</button></div>
    <?=form_close()?>
    <hr />
    <?php foreach ($comments as $comment) : ?>
    <div class="comment">
        <i class="fa fa-user-o"></i> <span class="author"><?=($comment['user_id']) ? '<a href="'.site_url("profile/user/".$comment['author']).'">' : ''?><?=htmlspecialchars($comment['author'])?><?=($comment['user_id']) ? '</a>' : ''?></span>
{'fraction_non_alphanumeric': 0.23770714479760935, 'fraction_numerical': 0.0032599837000814994, 'mean_word_length': 4.673343605546996, 'pattern_counts': {'":': 0, '<': 126, '<?xml version=': 0, '>': 130, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '964062', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1241, 'n_words': 213}