<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<div class="space">
<form method="post" action="admincp.php?action=<?=$action?>&file=<?=$file?>&">
    <div class="subtitle">符合要求的商铺数: <?=$total['count']?></div>
    <table class="maintable" border="0" cellspacing="0" cellpadding="0">
        <tr class="altbg2"><th colspan="10">
            <ul class="subtab">
              <?foreach($_panels as $key=>$val) {?>
                <li<?=$key==substr($search['classcode'],0,2)?' class="current"':''?>><a href="admincp.php?action=<?=$action?>&file=<?=$file?>&<?=urlencode('search[classcode]')?>=<?=$key?>"><?=$val?></a></li>
              <?}?>
            </ul>
        </th></tr>
        <tr class="altbg1">
            <td width="5%">[<a href="javascript:;" onclick="checkbox_checked('shopids[]');">选</a>]</td>
            <td width="*">商铺名</td>
            <td width="10%">推荐度</td>
            <td width="10%">板块</td>
            <td width="12%">分类</td>
            <td width="10%">地区</td>
            <td width="8%">点评数</td>
            <td width="8%">图片数</td>
            <td width="8%">状态</td>
            <td width="8%">编辑</td>
        </tr>
        <? if($shops) { foreach($shops as $shop) { ?>
        <tr>
            <input type="hidden" name="shop[<?=$shop['sid']?>][shopid]" value="<?=$shop['sid']?>" />
            <td><input type="checkbox" name="shopids[]" value="<?=$shop['sid']?>" /></td>
            <td><a href="<?=$MOD['url'].'shop.php?shopid='.$shop['sid']?>" target="_blank"><?=$shop['shopname'].$shop['subname']?></a></td>
            <td><input type="text" name="finer[<?=$shop['sid']?>]" value="<?=$shop['finer']?>" class="txtbox5" /></td>
            <td><?=$shop['panelname']?></td>
            <td><?=$shop['classname']?></td>
            <td><?=$shop['areaname']?></td>
            <td><?=$shop['reviews']?></td>
            <td><?=$shop['pictures']?></td>
            <td><?=$shop['statusname']?></td>
            <td><a href="<?="admincp.php?action=$action&file=edititem&shopid={$shop['sid']}"?>">编辑</a></td>
        </tr>
        <?}?>
        <tr class="altbg1">
            <td colspan="10">
                <input type="radio" name="operation" value="finer" />推荐&nbsp;
                <input type="radio" name="operation" value="unfiner" />取消推荐&nbsp;
                <input type="radio" name="operation" value="rebulid" />重建数据&nbsp;
                <input type="radio" name="operation" value="delete" />删除
                <input type="checkbox" name="delete_subpoint" value="1" checked="checked" />不减添加用户的积分
            </td>
        </tr>
        <?} else {?>
        <tr><td colspan="10">暂无信息。</td></tr>
        <? } ?>
    </table>
    <?if($shops){?>
    <div class="multipage"><?=$multipage?></div>
    <center><input type="submit" name="dosubmit" value=" 提交 " class="btn" /></center>
    <?}?>
</form>
</div>
<div class="space">
<form method="get" name="manage" action="admincp.php">
    <input type="hidden" name="action" value="<?=$action?>" />
    <input type="hidden" name="file" value="<?=$file?>" />
    <div class="space">
        <div class="subtitle">搜索符合条件的商铺</div>
        <table class="maintable" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td class="altbg1" width="45%">板块</td>
                <td><select name="search[classcode]" id="search_classcode" size="6" style="width:300px">
                    <? foreach($_classcode_option as $key=>$val) { ?>
                        <option value="<?=$key?>" style="color:#CC0000;">===<?=$_classcodes[$key]['classname']?>===</option>
                        <?=$val?>
                    <? } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="altbg1">地区</td>
                <td><select name="search[areacode]" id="search_areacode" style="width:300px">
                    <option value="">===选择地区===</option>
                    <?=$_areacode_option[$city]?>
                </select></td>
            </tr>
            <tr>
                <td class="altbg1">关键字</td>
                <td><input type="text" name="search[keyword]" class="txtbox" value="<?=$search['keyword']?>" /></td>
            </tr>
            <tr>
                <td class="altbg1">排序</td>
                <td>
                    <select name="search[orderby]">
                        <option value="addtime"<?if($search['orderby']=='addtime')echo' selected';?>>登记时间</option>
                        <option value="reviews"<?if($search['orderby']=='reviews')echo' selected';?>>点评量</option>
                        <option value="pageviews"<?if($search['orderby']=='pageviews')echo' selected';?>>浏览量</option>
                        <option value="finer"<?if($search['orderby']=='finer')echo' selected';?>>推荐度</option>
                    </select>
                    <select name="search[ordertype]">
                        <option value="DESC"<?if($search['orderby']=='DESC')echo' selected';?>>倒序</option>
                        <option value="ASC"<?if($search['orderby']=='ASC')echo' selected';?>>顺序</option>
                    </select>
                </td>
            </tr>
        </table>
        <center><input type="submit" value=" 搜索 " class="btn" /></center>
    </div>
</form>
</div>
</div>