<?php
/*
 * ----------------------------------------------------
 * 程序名称: 牛叉广告管理系统(NiuXams)
 * 程序功能: 实现专业的广告投放、管理和统计等管理系统！
 * 程序开发: 牛叉软件(NiuXSoft.com)
 * 版权所有: [NiuXams] (C)2013-2099 NiuXSoft.com
 * 官方网站: www.niuxsoft.com  Email: niuxsoft@163.com
 * ----------------------------------------------------
 * 使用条款:
 * 1.为构建创新型经济社会,请尊重保护知识产权！
 * 2.该软件个人非商业用途免费使用.
 * 3.免费使用禁止修改版权信息和官方推广链接.
 * 4.禁止任何衍生版本.禁止任何非法修改源代码贩卖.
 * ----------------------------------------------------
 */

defined('NIUX_INCLUDED') or exit('Access Denied.');
$title = '后台管理';
require './mo_head.php';
?>
<style>
    #head {
        position: relative;
        width: 100%;
        height: 30px;
        z-index: 10;
        border-right-width: 0px;
        border-left-width: 0px;
        min-width: 1200px;
    }
    #logo {
        height: 30px;
        width: 120px;
        text-align: center;
    }

    #allMenu{
        position: relative;
        z-index: 10;
    }
    .menu li a{
        display: block;
    }
    .ui-menu {
        min-width: 100px;
    }

    #content {
        position: absolute;
        overflow: hidden;
        z-index: 8;
        left: 0px;
        top: 32px;
        right: 0px;
        bottom: 0px;
        min-width: 1200px;
    }
    #mainFrame {
        height: 100%;
        width: 100%;
    }
</style>
<script>
    $(function () {
        var is_show = false;
        $("#gg").button({
            icons: {
                primary: "ui-icon-comment",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#ggMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#ggMenu", this);
            return false;
        });
        $("#ggcl").button({
            icons: {
                primary: "ui-icon-shuffle",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#ggclMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#ggclMenu", this);
            return false;
        });
        $("#ggw").button({
            icons: {
                primary: "ui-icon-flag",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#ggwMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#ggwMenu", this);
            return false;
        });
        $("#ggws").button({
            icons: {
                primary: "ui-icon-script",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#ggwsMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#ggwsMenu", this);
            return false;
        });
        $("#statistics").button({
            icons: {
                primary: "ui-icon-signal",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#statisticsMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#statisticsMenu", this);
            return false;
        });
        $("#setup").button({
            icons: {
                primary: "ui-icon-gear",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#setupMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#setupMenu", this);
            return false;
        });
        $("#theme").button({
            icons: {
                primary: "ui-icon-heart",
                secondary: "ui-icon-triangle-1-s"
            }
        }).mouseenter(function () {
            is_show && showMenu("#themesMenu", this);
        }).click(function () {
            is_show = true;
            showMenu("#themesMenu", this);
            return false;
        });
        $(".themesItem").click(function () {
            var theme = $(this).text();
            $("#themes").attr('href', 'css/' + theme + '/ui.css');
            $("iframe").contents().find("#themes").attr('href', 'css/' + theme + '/ui.css');
            $("iframe").contents().find("iframe").contents().find("#themes").attr('href', 'css/' + theme + '/ui.css');
            setCoo('niuxams_theme', theme, 120);
            $(this).siblings().removeClass("ui-state-disabled");
            $(this).addClass("ui-state-disabled");
        });
        $("#help").button({
            icons: {
                primary: "ui-icon-help"
            }
        });
        $("#logout").button({
            icons: {
                primary: "ui-icon-power"
            }
        });
        $("#nav").button({
            icons: {
                primary: "ui-icon-arrowthick-1-w"
            },
            text: false
        }).click(function () {
            history.go(-1);
        }).next().button({
            icons: {
                primary: "ui-icon-arrowthick-1-e"
            },
            text: false
        }).click(function () {
            history.go(1);
        }).next().button({
            icons: {
                primary: "ui-icon-arrowrefresh-1-e"
            },
            text: false
        }).click(function () {
            window.frames["main"].document.location.reload(true);
        }).next().button({
            icons: {
                primary: "ui-icon-home"
            },
            text: false
        }).click(function () {
            window.frames["main"].document.location = 'main.php';
        });
        $.get('main.php?menu=ck');
        function showMenu(menuObj, buttonObj) {
            var menu = $(menuObj).show().position({
                my: "left top",
                at: "left bottom",
                of: buttonObj
            });
            $(document).one("click", function () {
                menu.hide();
                is_show = false;
            });
            $(window.frames["main"].document).one("click", function () {
                menu.hide();
                is_show = false;
            });
        }
    });
</script>

<div id="head" class="ui-widget-header">
    <div id="logo" class="fl">
        <a href="http://www.niuxsoft.com" target="_blank" title="欢迎使用 牛叉广告管理系统(NiuXams) www.niuxsoft.com"><img src="image/niuxamslogo.png" width="120" height="30" alt="牛叉广告管理系统(NiuXams)"></a>
    </div>
    <div id="menuBar" class="fl">
        <a id="gg">广告</a>
        <a id="ggcl">广告策略</a>
        <a id="ggw">广告位</a>
        <a id="ggws">二段式代码</a>
        <a id="statistics">统计</a>
        <a id="setup">设置</a>
        <a id="theme">主题</a>
        <a id="help" title="访问官网 获取最新帮助" href="http://www.niuxsoft.com/niuxams/" target="_blank">帮助</a>
        <a id="logout" title="清除登录痕迹 安全退出系统" href="logout.php">注销</a>
        <span id="nav">点击可后退</span><span>点击可前进</span><span>重新载入此页</span><span>返回系统主页</span>
    </div>
    <div class="clear"></div>
</div>

<div id="allMenu">
    <ul id="ggMenu" class="menu hide absPos">
        <li class="ui-widget-header">新建</li>
        <li><a target="main" href="gg_edit.php">新建广告</a></li>
        <li><a target="main" href="gg_template_edit.php">新建广告模板</a></li>
        <li><a target="main" href="leizu_edit.php?type=1&leizu=lei">新建广告分类</a></li>
        <li><a target="main" href="leizu_edit.php?type=1&leizu=zu">新建广告分组</a></li>
        <li class="ui-widget-header">列表</li>
        <li><a target="main" href="gg_list.php">广告</a></li>
        <li><a target="main" href="gg_template_list.php">广告模板</a></li>
        <li><a target="main" href="upload_list.php">广告上传素材</a></li>
        <li><a target="main" href="leizu_list.php?type=1&leizu=lei">广告分类</a></li>
        <li><a target="main" href="leizu_list.php?type=1&leizu=zu">广告分组</a></li>
        <li><a target="main" href="gg_recycle_list.php">广告回收站</a></li>
    </ul>
    <ul id="ggclMenu" class="menu hide absPos">
        <li class="ui-widget-header">新建</li>
        <li><a target="main" href="ggcl_edit.php">新建广告策略</a></li>
        <li><a target="main" href="leizu_edit.php?type=2&leizu=lei">新建广告策略分类</a></li>
        <li><a target="main" href="leizu_edit.php?type=2&leizu=zu">新建广告策略分组</a></li>
        <li class="ui-widget-header">列表</li>
        <li><a target="main" href="ggcl_list.php">广告策略</a></li>
        <li><a target="main" href="leizu_list.php?type=2&leizu=lei">广告策略分类</a></li>
        <li><a target="main" href="leizu_list.php?type=2&leizu=zu">广告策略分组</a></li>
        <li><a target="main" href="ggcl_recycle_list.php">广告策略回收站</a></li>
    </ul>
    <ul id="ggwMenu" class="menu hide absPos">
        <li class="ui-widget-header">新建</li>
        <li><a target="main" href="ggw_edit.php">新建广告位</a></li>
        <li><a target="main" href="leizu_edit.php?type=3&leizu=lei">新建广告位分类</a></li>
        <li><a target="main" href="leizu_edit.php?type=3&leizu=zu">新建广告位分组</a></li>
        <li class="ui-widget-header">列表</li>
        <li><a target="main" href="ggw_list.php">广告位</a></li>
        <li><a target="main" href="leizu_list.php?type=3&leizu=lei">广告位分类</a></li>
        <li><a target="main" href="leizu_list.php?type=3&leizu=zu">广告位分组</a></li>
        <li><a target="main" href="ggw_recycle_list.php">广告位回收站</a></li>
    </ul>
    <ul id="ggwsMenu" class="menu hide absPos">
        <li class="ui-widget-header">新建</li>
        <li><a target="main" href="ggws_edit.php">新建二段式代码</a></li>
        <li><a target="main" href="leizu_edit.php?type=4&leizu=lei">新建二段式代码分类</a></li>
        <li><a target="main" href="leizu_edit.php?type=4&leizu=zu">新建二段式代码分组</a></li>
        <li class="ui-widget-header">列表</li>
        <li><a target="main" href="ggws_list.php">二段式代码</a></li>
        <li><a target="main" href="leizu_list.php?type=4&leizu=lei">二段式代码分类</a></li>
        <li><a target="main" href="leizu_list.php?type=4&leizu=zu">二段式代码分组</a></li>
        <li><a target="main" href="ggws_recycle_list.php">二段式代码回收站</a></li>
    </ul>
    <ul id="statisticsMenu" class="menu hide absPos">
        <li class="ui-widget-header">广告投放</li>
        <li><a target="main" href="tj_gg_log.php">广告日志</a></li>
        <li><a target="main" href="tj_gg_today.php">今日统计</a></li>
        <li><a target="main" href="tj_gg_history.php">历史统计</a></li>
        <li class="ui-widget-header">系统操作</li>
        <li><a target="main" href="tj_op_log.php">操作日志</a></li>
    </ul>
    <ul id="setupMenu" class="menu hide absPos">
        <li class="ui-widget-header">系统用户</li>
        <li><a target="main" href="sz_admin_list.php">用户管理</a></li>
        <li><a target="main" href="sz_admin_power.php">权限管理</a></li>
        <li><a target="main" href="sz_admin_lbs.php">群管理</a></li>
        <li class="ui-widget-header">系统参数</li>
        <li><a target="main" href="sz_cs_base.php">基本参数</a></li>
        <li><a target="main" href="sz_cs_gg.php">广告参数</a></li>
        <li><a target="main" href="sz_cs_tj.php">统计参数</a></li>
        <li><a target="main" href="sz_cs_upload.php">上传参数</a></li>
    </ul>
    <ul id="themesMenu" class="menu hide absPos"><?php echo $themesMenu ?></ul>
</div>

<div id="content">
    <div id="mainFrame">
        <iframe id="main" name="main" frameborder="0" scrolling="auto" height="100%" width="100%" src="main.php"></iframe>
    </div>
</div>

</div>
</body>
</html>
