<div id="table_list">
    <h3>栏目</h3>
    <table class="table">
        <thead>
        <tr>
            <td>栏目名称</td>
            <td>上级栏目</td>
            <td>操作</td>
        </tr>
        </thead>
        <form action="admin?action=newsmenuadd" method="post">
            <tbody>
            <tr>
                <td><input type="text" value="" name="menu_name"/></td>
                <td><?php echo $prv_menu; ?></td>
                <td><input type="submit" value="增加"/></td>
            </tr>
            </tbody>
        </form>
    </table>

    <table class="table">
        <thead>
        <tr>
            <td>编号</td>
            <td>栏目名称</td>
            <td>上级栏目</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <?php
        if ($menu_list) {
            foreach ($menu_list as $row) {
                ?>
                <form action="admin?action=newsmenuedit&menu_id=<?php echo $row['menu_id']; ?>" method="post">
                    <tr>
                        <td><?php echo $row['menu_id']; ?></td>
                        <td><input type="text" value="<?php echo $row['menu_name']; ?>" name="menu_name"/></td>
                        <td><?php echo $admin->getPrvmenu($row['prv_menu_id']); ?></td>
                        <td><input type="submit" value="编辑"/></td>
                    </tr>
                </form>
            <?php }
        } ?>
        </tbody>
    </table>
</div>
