<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<form method="post" action="admincp.php?action=<?=$action?>&file=<?=$file?>">
    <div class="space">
        <div class="subtitle">分类管理</div>
        <table class="maintable" border="0" cellspacing="0" cellpadding="0">
            <tr class="altbg1">
                <td width="30">ID</td>
                <td width="*">名称</td>
                <td width="150">排序</td>
                <td width="100">新闻数量</td>
                <td width="100">操作</td>
            </tr>
            <?if($total > 0) { 
            while($val = $db->fetch_array($query)) { ?>
            <tr>
                <td><?=$val['classid']?></td>
                <td><input type="text" name="articleclass_my[<?=$val['classid']?>][classname]" value="<?=$val['classname']?>" class="txtbox2" /></td>  
                <td><input type="text" name="articleclass_my[<?=$val['classid']?>][displayorder]" value="<?=$val['displayorder']?>" class="txtbox5" /></td>             
                <td><?=$val['articlenum']?></td>
                <td><?if($val['classid']>1){?><a href="admincp.php?action=article&file=class&op=delete&classid=<?=$val['classid']?>" onclick="return confirm('本操作将删除本分类下的所有新闻，您确定删除吗？');">删除</a>&nbsp;<?}?><a href="admincp.php?action=article&file=article_add&classid=<?=$val['classid']?>">添加新闻</a></td>
            </tr>
            <? } ?>
            <? $db->free_result($query); ?>
            <? } else { ?>
            <tr>
                <td colspan="6">暂无信息</td>
            </tr>
            <? } ?>
            <tr>
                <td class="altbg1" colspan="6">
                    增加：&nbsp;<input type="text" name="newclassname" class="txtbox2" />
                </td>
            </tr>
        </table>
        <center><button type="submit" name="dosubmit" value="yes" class="btn" /> 提交 </button></center>
    </div>
</form>
</div>