<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<?if($action!='auditingreviews') {?>
<script type="text/javascript">
window.onload = function(){
    document.getElementById('status').value = "<?=$review['status']?>";
<?if($action=='reviewreport'){?>
    document.getElementById('reviewinfo').style.display = "none";
<?}?>
}

function display_review(action) {
    if(action == 'none') {
        document.getElementById('reviewinfo').style.display = "none";
    } else if(action == 'block') {
        document.getElementById('reviewinfo').style.display = "block";
    }
}
</script>
<? } ?>
<div id="body">
<form method="post" action="admincp.php?action=<?=$action?>&file=<?=$file?>&op=<?=$op?>&">
    <input type="hidden" name="reviewid" value="<?=$reviewid?>" />
    <?if($op=='reviewreport'){?>
    <input type="hidden" name="reportid" value="<?=$reportid?>" />
    <?}?>
    <div class="space">
        <?if($op=='reviewreport'){?>
        <div class="subtitle">不规范点评举报</div>
        <?}elseif($op=='checkreview'){?>
        <div class="subtitle">审核新增点评</div>
        <?}else{?>
        <div class="subtitle">编辑点评内容</div>
        <?}?>
        <?if($op=='reviewreport'){?>
        <table class="maintable" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="20%" class="altbg1">举报类型:</td>
                <td width="*"><strong><?=$review['reportsortname']?></strong>
                [<span class="font_1"><?if($review['disposal']==2)echo'未处理';else echo'已处理';?></span>]
                </td>
            </tr>
            <tr>
                <td class="altbg1" valign="top">补充内容:</td>
                <td><textarea name="reportcontent" class="txtarea" rows="5" cols="55"><?=$review['reportcontent']?></textarea><br />注意: 提交本表单，不会修改此处内容。</td>
            </tr>
            <tr>
                <td class="altbg1" valign="top">举报处理备注:<br />管理员处理本条信息的备注。</td>
                <td><textarea name="reportremark" class="txtarea"  rows="3" cols="55"><?=$review['reportremark']?></textarea></td>
            </tr>
            <?if($review['disposal']==2){?>
            <tr>
                <td class="altbg1">举报处理:</td>
                <td><input type="radio" name="report_action" value="delete" onclick="display_review('none');" />删除对应应点评&nbsp;<input type="radio" name="report_action" value="modify" onclick="display_review('block');" />修改对应点评内容</td>
            </tr>
            <?}?>
        </table>
        <?}?>
        <? if($review['rid'] && $review['shopid']) { ?>
        <table class="maintable" border="0" cellspacing="0" cellpadding="0" id="reviewinfo">
            <tr>
                <td width="20%" class="altbg1">商铺名:</td>
                <td width="80%"><?=$review['shopname']?>&nbsp;<?=$review['subname']?></td>
            </tr>
            <tr>
                <td class="altbg1">点评:</td>
                <td>
                    0:差 1:一般 2:还行 3:好 4:很好 5:非常好<br />
                    <?foreach($panelcfg['review'] as $key => $val) { ?>
                        <?=$val?>: <input type="text" class="txtbox5" name="<?=$key?>" value="<?=$review[$key]?>" />
                    <? } ?>
                </td>
            </tr>
            <tr>
                <td class="altbg1">人均消费:</td>
                <td><input type="text" class="txtbox4" name="avgprice" value="<?=$review['avgprice']?>" /> 元/人</td>
            </tr>
            <tr>
                <td class="altbg1">喜欢程度:</td>
                <td><input type="text" class="txtbox4" name="enjoy" value="<?=$review['enjoy']?>" />&nbsp;0:不喜欢 1:无所谓 2:喜欢 3:非常喜欢</td>
            </tr>
            <tr>
                <td class="altbg1">商铺标签:</td>
                <td><input type="text" class="txtbox" name="shoptags" value="<?=$review['shoptags']?>" /></td>
            </tr>
            <tr>
                <td class="altbg1">推荐产品:</td>
                <td><input type="text" class="txtbox" name="producttags" value="<?=$review['producttags']?>" /></td>
            </tr>
            <tr>
                <td class="altbg1">适合场所:</td>
                <td><input type="text" class="txtbox" name="suitplacetags" value="<?=$review['suitplacetags']?>" /></td>
            </tr>
            <?if($op!='checkreivew') {?>
            <tr>
                <td class="altbg1">点评状态:</td>
                <td><select name="status" id="status">
                    <option value="">--选择点评状态--</option>
                    <option value="1">正常(已审核)</option>
                    <option value="3">隐藏显示</option>
                </select></td>
            </tr>
            <?}?>
            <tr>
                <td class="altbg1" valign="top">点评内容:</td>
                <td><textarea name="content" rows="12" cols="75" class="txtarea"><?=$review['content']?></textarea></td>
            </tr>
        </table>
        <? } ?>
        <center>
            <button type="submit" name="dosubmit" value="yes" class="btn" /><?=($op=='checkreview'?'通过审核':'提交')?></button>&nbsp;&nbsp;
            <button type="button" onclick="history.go(-1);" class="btn" />返回</button>
        </center>
    </div>
</form>
</div>