Example #1
0
              </div>
              <?php 
        } else {
            if (count($post) > post_per_page) {
                ?>
                <div class='next-page'>
                  <div style='float: right;'>
                    <button class='button' onclick='location.href="./index.php?order='.post_per_page.'"'>NEXT PAGE</button>
                  </div>
                </div>
                <?php 
            }
        }
    }
} else {
    $post_id = $post_inst->get_post_by_id($db, $_GET['id']);
    if ($post_id) {
        ?>
            <title><?php 
        echo htmlentities($post_id['Title'] . " - " . $title['Value']);
        ?>
</title>
            <div class="formhead post-id post-id-font">
                <?php 
        echo htmlentities($post_id['Title']);
        ?>
                <div class='post-head-view'>
                  [ <?php 
        echo $post_id['View'];
        ?>
 ViEWS ]
Example #2
0
            if (isset($_GET['edit-post']) && !empty($_GET['edit-post'])) {
                if (isset($_POST['submit-edit-post']) && !empty($_POST['submit-edit-post']) && $admcl->check_key_from_id($db, $id, $_POST['auth_key'])) {
                    $ret = $post->update_post($db, $_GET['edit-post'], $_POST['edit_post_title'], $_POST['edit_post_content']);
                    if ($ret) {
                        if (isset($_GET['return']) && $_GET['return'] == 'main') {
                            $htmlinst->change_location('./index.php');
                        } elseif (isset($_GET['return']) && $_GET['return'] == 'mainid') {
                            $htmlinst->change_location('./index.php?id=' . htmlentities($_GET['edit-post']));
                        } else {
                            $htmlinst->admin_inform_ok_url(array('P0ST SUCCESSFULLY UPDATED!'), 'G0 BACK', '?list-post');
                        }
                    } else {
                        $htmlinst->error_admin_url(array('P0ST UPDATE FAiLED', 'TRY AGAiN'), 'G0 BACK', '?list-post');
                    }
                } else {
                    $r_post = $post->get_post_by_id($db, $_GET['edit-post']);
                    ?>
              <form method='post'>
                <div class="formhead post-box post-head">EDiT P0ST</div>
                <div class="formwrap post-title">
                  <input type='text' name='edit_post_title' value='<?php 
                    echo htmlentities($r_post['Title']);
                    ?>
' id='title-new-post' class='post-title-box' />
                </div>
                <div class="formwrap post-box">
                  <textarea onkeydown="return insertTab(event,this);"
                            onkeyup="return insertTab(event,this);"
                            onkeypress="return insertTab(event,this);"
                  name='edit_post_content' id='textarea-new-post' class='textarea'><?php 
                    echo htmlentities($r_post['Value']);