<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>积分商城后台</title>
    <link rel="icon" href="${ctx}/resources/house365/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="${ctx}/resources/house365/css/reset.css">
    <link rel="stylesheet" href="${ctx}/resources/house365/css/style.css">
    <link rel="stylesheet" href="${ctx}/resources/house365/iconfont/iconfont.css">
    <link href="${ctx}/resources/script/jquery-ui-1.11.4.custom/jquery-ui.css" type="text/css" rel="stylesheet"/>

    <script type="text/javascript" src="${ctx}/resources/house365/login/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="${ctx}/resources/script/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>

</head>
<body>

<div class="top clearfix">
    <div class="fl clearfix">
        <a href="" class="logo mt25 ml25 fl"></a>
        <h3 class="fl f20 mt30 pl10 ml10">积分商城后台</h3>
    </div>
    <div class="fr mt25 mr25">
			<span class="guanliyuan mr15"><i class="iconfont">&#xe601;</i>欢迎

			</span>
        <span class="tuichu">
            <i class="iconfont">&#xe602;</i>
            <i style="cursor: pointer;" onclick="loginOut()">退出</i>
        </span>
    </div>
</div>

<table width="100%" class="container" border="none" cellpadding="0" cellspacing="0">
    <tr>
        <td width="160">

            <div id="accordion">
                <h3>商品管理</h3>
                <div>
                    <ul class="slide_left">
                        <li><a href="${ctx}/cmcreditgoods" target="ifra">
                            <span>商品管理</span>
                        </a></li>

                        <li><a href="${ctx}/cmproductstat" target="ifra">
                            <span>上架商品统计</span>
                        </a></li>
                    </ul>
                </div>
                <h3>楼盘管理</h3>
                <div>
                    <ul class="slide_left">
                        <li><a href="${ctx}/cmbrokerlabel" target="ifra">
                            <span>标签管理</span>
                        </a></li>

                        <li><a href="${ctx}/cmhousecomment" target="ifra">
                            <span>楼盘点评</span>
                        </a></li>

                        <li><a href="${ctx}/cmhousecommentreply" target="ifra">
                            <span>楼盘回复</span>
                        </a></li>
                        <li><a href="${ctx}/cmbrokercomment" target="ifra">
                            <span>经纪人评价</span>
                        </a></li>
                        <li><a href="${ctx}/cmcommentreport" target="ifra">
                            <span>举报审核</span>
                        </a></li>
                        <li><a href="${ctx}/cmcreditrecord/statistics?search_EQ_ruleId=8" target="ifra">
                            <span>推荐统计查询</span>
                        </a></li>
                    </ul>
                </div>
                <h3>订单积分管理</h3>
                <div>
                    <ul class="slide_left">
                        <li><a href="${ctx}/cmorder" target="ifra">
                            <span>订单管理</span>
                        </a></li>
                        <li><a href="${ctx}/cmcreditrule" target="ifra">
                            <span>积分规则管理</span>
                        </a></li>
                        <li><a href="${ctx}/cmlotteryrule" target="ifra">
                            <span>大转盘规则管理</span>
                        </a></li>
                        <li><a href="${ctx}/cmorder/totalQueryList" target="ifra">
                            <span>积分兑换查询</span>
                        </a></li>
                        <li><a href="${ctx}/cmcreditrecord" target="ifra">
                            <span>积分明细查询</span>
                        </a></li>
                        <li><a href="${ctx}/cmuser/remainingCreditsList" target="ifra">
                            <span>积分余额查询</span>
                        </a></li>
                        <li><a href="${ctx}/cminviterecord" target="ifra">
                            <span>邀请记录</span>
                        </a></li>
                        <li>
                            <a href="${ctx}/invitereport/list" target="ifra">
                                <span>邀请记录报表</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <h3>系统配置</h3>
                <div>
                    <ul class="slide_left">
                        <li><a href="${ctx}/cmdictionary" target="ifra">
                            <span>系统配置</span>
                        </a></li>
                    </ul>
                </div>
            </div>

        </td>
        <td>
            <iframe src="${ctx}/cmcreditgoods" width="100%" name="ifra" frameborder="0" id="ifra"></iframe>
        </td>
    </tr>
</table>
<script type="text/javascript">

    //内嵌处理，iframe页，顶层window跳转至登陆页
    if (window.top != window) {
        window.top.location = window.location;
    }

    function iframeHeight() {
        var wh = $(window).height() - 89;
        $('#ifra').attr('height', wh);
    }


    $(function () {
        iframeHeight();
        $(window).resize(function () {
            iframeHeight()
        });

        $(".slide_left li").click(function () {

            var ifraURL = $('#ifra').contents()[0].URL;
            if (ifraURL.endsWith("create") || ifraURL.endsWith("edit")) {
                var bool = window.confirm("确认离开编辑页面?");
                if (bool) {
                    $("#ifra").attr("src", $(this).find("a:first").attr("ahref"))
                    $(".slide_left li a").removeClass("on");
                    $(this).find("a").addClass("on");
                }
                return;
            }
            $("#ifra").attr("src", $(this).find("a:first").attr("ahref"))
            $(".slide_left li a").removeClass("on");
            $(this).find("a").addClass("on");
        });

        $("#accordion").accordion();

    });

    //去除空格
    String.prototype.trimStr = function () {
        return this.replace(/(^\s*)|(\s*$)/g, '');
    };
    //End with
    String.prototype.endsWith = function (suffix) {
        return this.indexOf(suffix, this.length - suffix.length) !== -1;
    };
    function loginOut() {
        window.location.replace("${ctx}/loginOut");
    }

</script>
</body>
</html>
