<?php include("../elemetns_web/header.php") ?>
<div class="container_post">
    <?php
    include("../../assets/script/other/postget.php");
    ?>
    <article class="post">
        <div class="content">
            <img src="../../assets/img<?php echo $img ?>" alt="" class="img_post">
            </img>
            <h2 class="post_title"><?php echo $title ?></h2>
            <p class="post_data">data utworzenia:<?php echo $data_create ?></p>
            <?php if ($data_update != $data_create) { ?>
                <p class="post_data">data edycji:<?php echo $data_update ?></p>
            <?php } ?>
            <p class="post_autor">autor:<?php echo $autor ?></p>
            <p class="post_content"><?php echo $content ?></p>
        </div>
        <div class="nav_article">
            <?php
            if ($user_data != 0) {
                if ($user_data["user_id"] == $user_id || $user_data["rola"] == "admin") {
            ?>
                    <div class="admin_post">
                        <form method="post" action="../manipulation/postviewsman.php">
                            <input type="hidden" name="dell" value="<?php echo $ids ?>">
                            <button class="red" name="dellone">usuń</button>
                        </form>
                        <form method="post" action="../manipulation/manipulationpost.php">
                            <input type="hidden" name="edit" value="<?php echo $ids ?>">
                            <button class="green" name="editpostview">edytuj</button>
                        </form>
                    </div>

            <?php
                }
            }
            ?>
            <button><a class="nav-aricle" href="../other/post.php?numer=<?php echo $idsprv ?>">poprzedni</a></button>
            <button><a class="nav-aricle" href="../other/post.php?numer=<?php echo $idsnext ?>">nastepny</a></button>
        </div>

    </article>
    <?php include("../elemetns_web/aside.php") ?>
</div>

<script src="../assets/js/validation.js"></script>
<?php include("../elemetns_web/footer.php") ?>