Location: PHPKode > scripts > WH Board > wh_board/admin/posts.php
<?php require('management/admin_functions/session.php'); ?>
<?php require('management/admin_layout/header.php'); ?>

    <ul id="breadcrumbs">
        <li><a href="index.php"><?php echo $lang['main_navigation']; ?></a></li>
        <li><a href="posts.php" class="actual"><?php echo $lang['manage_posts']; ?></a></li>
    </ul>

    <div class="clear_blog"></div>

    <?php

    $count = mysql_query("SELECT post_id FROM posts");
    include('../framework/navigation.php');

    $query = "SELECT * FROM posts ORDER BY post_id DESC LIMIT $start,$entries";
    $result = mysql_query($query) OR die(mysql_error());

    if($result) {

    echo '<table width="100%" class="tables">
    <tr>
    <td width="5%"><strong>ID</strong></td>
    <td width="50%"><strong>' . $lang['one_post'] . '</strong></td>
    <td width="15%"><strong>' . $lang['date'] . '</strong></td>
    <td width="10%"><strong>Topic-ID</strong></td>
    <td width="10%"><strong>User-ID</strong></td>
    <td width="10%" align="center"><strong>' . $lang['blank_delete'] . '</strong></td>
    </tr>';

    while ($row = mysql_fetch_assoc($result)) {

        echo '<tr>
        <td width="5%">' . (int)$row['post_id'] . '</td>
        <td width="50%">' . ((strlen($row['post_content'])<6) ? $row['post_content'] : substr($row['post_content'],0,70).'...') . '</td>
        <td width="15%">' . date('d.m.Y', strtotime($row['post_date'])) . '</td>
        <td width="10%">' . htmlentities($row['post_topic'], ENT_QUOTES) . '</td>
        <td width="10%">' . htmlentities($row['post_by'], ENT_QUOTES) . '</td>
        <td width="10%" align="center"><a href="posts_delete.php?post_id=' . (int)$row['post_id'] . '"><img src="../style/images/admin/icons/delete.png" alt="' . $lang['blank_delete'] . '" title="' . $lang['blank_delete'] . '" border="0"></a></td>
        </tr>';
        }

    echo '</table>
    <div class="cleaning"></div>';

    }else{

    echo '<p class="false">' . $lang['admin_no_posts'] . '</p>';
    }

    echo '<div id="navigation">
    <span class="pages">' . $lang['page'] . ' ' . $page . ' ' . $lang['of'] . ' ' . $allsites . '</span>';
    echo $link_string;
    echo '</div>
    <div class="clear_navi"></div>';

    ?>

<?php require('management/admin_layout/footer.php'); ?>
Return current item: WH Board