<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<form method="get" action="admincp.php">
<input type="hidden" name="action" value="<?=$action?>" />
<input type="hidden" name="file" value="<?=$file?>" />
<div class="space">
    <table class="maintable" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="altbg1">
                分类：<select name="search[classid]">
                        <option value="">=全部=</option>
                        <?foreach($articleclass as $key => $val) { ?>
                        <option value="<?=$key?>"<?if($search['classid']==$key)echo' selected';?>><?=$val['classname']?></option>
                        <? } ?>
                    </select>&nbsp;
                状态：<select name="search[status]">
                        <option value="">=全部=</option>
                        <option value="1"<?if($search['status']==1)echo' selected';?>>已审核</option>
                        <option value="2"<?if($search['status']==2)echo' selected';?>>未审核</option>
                    </select>&nbsp;
                关键字：<input type="text" name="search[keyword]" value="<?=$search[keyword]?>" class="txtbox4" />&nbsp;
                att：<input type="text" name="search[att]" value="<?=$search[att]?>" class="txtbox5" />&nbsp;
                shopid：<input type="text" name="search[shopid]" value="<?=$search[shopid]?>" class="txtbox5" />&nbsp;
                排序：<select name="search[order]">
                        <option value="dateline"<?if($search['order']=='dateline')echo' selected';?>>发布时间</option>
                        <option value="pageview"<?if($search['order']=='pageview')echo' selected';?>>浏览量</option>
                        <option value="articleid"<?if($search['order']=='articleid')echo' selected';?>>文章ID</option>
                        <option value="digg"<?if($search['order']=='digg')echo' selected';?>>顶一下</option>
                    </select>&nbsp;<select name="search[ordertype]">
                        <option value="DESC"<?if($search['ordertype']=='DESC')echo' selected';?>>倒序</option>
                        <option value="ASC"<?if($search['ordertype']=='ASC')echo' selected';?>>顺序</option>
                    </select>&nbsp;
                    <button type="submit" class="btn2">查询</button>
            </td>
        </tr>
    </table>
</div>
</form>
<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="25">选</td>
            <td width="25">ID</td>
            <td width="*">标题</td>
            <td width="80">所属类别</td>
            <td width="70">作者</td>
            <td width="30">att</td>
            <td width="30">PV</td>
            <td width="30">顶</td>
            <td width="80">发布时间</td>
            <td width="50">状态</td>
            <td width="60">操作</td>
        </tr>
            <?if($total > 0) { 
            while($val = $db->fetch_array($query)) { ?>
            <tr>
                <td><input type="checkbox" name="articleids[]" value="<?=$val['articleid']?>" /></td>
                <td><?=$val['articleid']?></td>
                <td><?=$val['subject']?></td>
                <td><?=$articleclass[$val['classid']]['classname']?></td>
                <td><?=$val['author']?></td>
                <td><?=$val['att']?></td>
                <td><?=$val['pageview']?></td>
                <td><?=$val['digg']?></td>
                <td><?=date('Y-m-d H:i',$val['dateline'])?></td>
                <td><?if($val['status']==1)echo'<span class="font_3">已审核</span>';elseif($val['status']==2)echo'<span class="font_1">未审核</span>';?></td>
                <td>
                    <?if($val['status']==2){?><a href="admincp.php?action=article&file=list&op=check&articleid=<?=$val['articleid']?>&dosubmit=yes">通过审核</a><?}?>
                    <a href="admincp.php?action=article&file=article_edit&articleid=<?=$val['articleid']?>">编辑</a>
                    <a href="admincp.php?action=article&file=list&op=delete&articleid=<?=$val['articleid']?>&dosubmit=yes">删除</a>
                </td>
            </tr>
            <? } ?>
            <? $db->free_result($query); ?>
            <tr>
                <td colspan="11" class="altbg1">
                    <button class="btn2" onclick="checkbox_checked('articleids[]');">全选</button>&nbsp;
                    <input type="radio" name="op" id="op_delete" value="delete" checked /><label for="op_delete">批量删除</label>
                    <?if($search['status']==2){?>
                    <input type="radio" name="op" id="op_check" value="check" checked /><label for="op_check">批量审核</label>
                    <? } ?>
                    <input type="radio" name="op" id="op_att" value="att" checked /><label for="op_att">批量设置属性 att=<input type="text" name="att" value="1" class="txtbox6" /></label>
                    <?=$multipage?>
                </td>
            </tr>
            <? } else { ?>
            <tr>
                <td colspan="11">暂无信息</td>
            </tr>
            <? } ?>
    </table>
    <center>
        <button type="submit" name="dosubmit" value="yes" class="btn"> 提交操作 </button>
    </center>
</div>
</form>
</div>