<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_Left, QianboCMS" EnableEventValidation="false" %>
<%@ Import Namespace="Qianbo.Common" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />
    <link href="AdminDefaultTheme/MasterPage.css" type="text/css" rel="stylesheet" />
    <link href="AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
    <title>管理导航菜单</title>
    <style type="text/css">
        #dvModel ul li { padding-left: 8px; }
        .tree td div { height: 20px !important; }
    </style>
    <script type="text/javascript">
		function Switch(obj) {
			obj.className = (obj.className == "guideexpand") ? "guidecollapse" : "guideexpand";
			var nextDiv;
			if (obj.nextSibling) {
				if (obj.nextSibling.nodeName == "DIV") {
					nextDiv = obj.nextSibling;
				}
				else {
					if (obj.nextSibling.nextSibling) {
						if (obj.nextSibling.nextSibling.nodeName == "DIV") {
							nextDiv = obj.nextSibling.nextSibling;
						}
					}
				}
				if (nextDiv) {
					nextDiv.style.display = (nextDiv.style.display != "") ? "" : "none";
				}
			}
		}
		function ShowMenuModel() {
			document.getElementById("dvModel").innerHTML = "";
			var event = arguments[0] || window.event;
			var obj = event.target || event.srcElement;
			var objTitle = obj.title;
			if (objTitle == null || objTitle == "") {
				document.getElementById("dvModel").style.display = "none";
				return false;
			}
			paramArray = objTitle.split("$");
			var rightedge = document.body.clientWidth - event.clientX;
			var bottomedge = document.body.clientHeight - event.clientY;
			if (rightedge < document.getElementById("dvModel").offsetWidth)
				document.getElementById("dvModel").style.left = document.body.scrollLeft + event.clientX - document.getElementById("dvModel").offsetWidth + "px";
			else
				document.getElementById("dvModel").style.left = document.body.scrollLeft + event.clientX + "px";
			if (bottomedge < document.getElementById("dvModel").offsetHeight)
				document.getElementById("dvModel").style.top = document.body.scrollTop + event.clientY - document.getElementById("dvModel").offsetHeight + "px";
			else
				document.getElementById("dvModel").style.top = document.body.scrollTop + event.clientY + "px";
			if (paramArray[0] == "分类右键操作") {
				GetChTypeOper(paramArray[1]);
			}
			else if (paramArray[0] == "频道右键操作") {
				GetChannelOper(paramArray[1], paramArray[2]);
			}
			else if (paramArray[0] == "栏目右键操作") {
				GetColumnOper(paramArray[1], paramArray[2])
			}
			document.getElementById("dvModel").style.display = "";
			return false;
		}
		function HiddenMenuModel(evt) {
			document.getElementById("dvModel").style.display = "none";
		}
		function GetChTypeOper(val) {
			document.getElementById("dvModel").innerHTML += "<ul><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"Info/SetChannel.aspx?chtype=" + val + "\" target=\"main_right\">添加频道</a></li></ul>";
		}
		function AddInfo(val, val2) {
			System_Left.GetInfoUrl(val, val2, Callback_GetInfoUrl);
		}
		function Callback_GetInfoUrl(result) {
			window.parent.main_right.location.href = result.value;
		}
		function GetChannelOper(val, val2) {
			document.getElementById("dvModel").innerHTML += "<ul><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"javascript:AddInfo('" + val + "','0')\">添加内容</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"Info/SetChannel.aspx?ChId=" + val + "&ChType=" + val2 + "\" target=\"main_right\">修改频道</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"Info/SetColumn.aspx?ChId=" + val + "\" target=\"main_right\">添加栏目</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"javascript:CreateChannel('" + val + "')\">生成频道</a></li></ul>";
		}
		function GetColumnOper(val, val2) {
			document.getElementById("dvModel").innerHTML += "<ul><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"javascript:AddInfo('" + val2 + "','" + val + "')\">添加内容</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"Info/SetColumn.aspx?ColId=" + val + "&ChId=" + val2 + "\" target=\"main_right\">修改栏目</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"javascript:CreateColumn('" + val + "')\">生成栏目</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href=\"javascript:CreateInfoByColId('" + val + "')\">生成内容</a></li><li onmouseover=this.style.backgroundColor='#c2cfe5' onmouseout=this.style.removeAttribute('backgroundColor')><a href='InfoModel/ExtendFieldList.aspx?ColId=" + val + "' target=\"main_right\">扩展字段</li></ul>";
		}
		function CreateChannel(val) {
			System_Left.CreateChannel(val, Callback_CreateChannel)
		}
		function Callback_CreateChannel(result) {
			var paramArray = result.value.split("$")
			if (paramArray[0] != "succ") {
				alert(paramArray[1]);
			}
			else {
				window.parent.main_right.location.href = "Create/Createing.aspx?type=channel";
			}
		}
		function CreateColumn(val) {
			System_Left.CreateColumn(val, Callback_CreateColumn)
		}
		function Callback_CreateColumn(result) {
			var paramArray = result.value.split("$")
			if (paramArray[0] != "succ") {
				alert(paramArray[1]);
			}
			else {
				window.parent.main_right.location.href = "Create/Createing.aspx?type=column";
			}
		}
		function CreateInfoByColId(val) {
			System_Left.CreateInfoByColId(val, Callback_CreateInfoByColId)
		}
		function Callback_CreateInfoByColId(result) {
			var paramArray = result.value.split("$")
			if (paramArray[0] != "succ") {
				alert(paramArray[1]);
			}
			else {
				window.parent.main_right.location.href = "Create/Createing.aspx?type=infocolumn&modelId=" + paramArray[1];
			}
		}
    </script>
</head>

<body id="Guidebody">
    <form id="Form1" runat="server">
        <div id="Guide_back">
            <ul>
                <li id="Guide_top">
                    <div id="Guide_toptext">快捷导航<asp:Literal ID="SubSiteName" runat="server"></asp:Literal></div>
                </li>
                <li id="Guide_main">
                    <div id="Guide_box">
                        <%String LeftId = Request["ID"];%>
                        <%
                            if (LeftId == "1")
                            {
                        %>
                        <div class="guideexpand" onclick="Switch(this)">系统参数</div>
                        <div class="guide">
                            <ul id="SetSite">
                                <li><a href="WebSite/SetSiteInfo.aspx" target="main_right">全站参数设置</a></li>
                                <li><a href="WebSite/SetController.aspx" target="main_right">我的控制台设置</a></li>
                                <li runat="server" id="SQLWebAdmin"><a href="SqlWebAdmin/BackupDataBase.aspx" target="main_right">备份网站数据库</a></li>
								<li runat="server" id="UrlRewriter"><a href="Other/URLRewriter.aspx" target="main_right">Url重写管理</a></li>
								<li><a href="Create/CreateNews.aspx" target="main_right">生成发布全站静态</a></li>
                            </ul>
                        </div>
                        <div class="guideexpand" onclick="Switch(this)">我的控制台</div>
                        <div class="guide">
                            <ul id="Navigation">
                                <asp:Literal ID="ltController" runat="server"></asp:Literal>
                            </ul>
                        </div>
                        <%}%>
                        <%
                            if (LeftId == "2")
                            {
                        %>
                        <div class="guideexpand" onclick="Switch(this)">内容管理</div>
                        <table style="text-align: left;">
                            <tr>
                                <td align="left">
                                    <div class="tree">
                                        <asp:TreeView ID="tvNav" runat="server" ExpandDepth="1" ShowLines="True" EnableViewState="false" NodeIndent="10"></asp:TreeView>
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <script language="javascript">document.getElementById("tvNav").oncontextmenu = ShowMenuModel; document.body.onclick = HiddenMenuModel</script>
                        <div class="guideexpand" onclick="Switch(this)">卖车估价信息</div>
                        <div class="guide">
                            <ul id="Contents">
                                <li><a href="InfoModel/CustomFormInfoList.aspx?CustomFormId=1" target="main_right">我要卖车</a></li>
                                <li><a href="InfoModel/CustomFormInfoList.aspx?CustomFormId=2" target="main_right">我要估价</a></li>
                            </ul>
                        </div>
                        <div class="guideexpand" onclick="Switch(this)">其他内容管理</div>
                        <div class="guide">
                            <ul id="Contents">
                                <li><a href="Info/SpecialList.aspx" target="main_right">专题管理</a></li>
                                <li><a href="Info/SinglePageList.aspx" target="main_right">单页管理</a></li>
                                <li><a href="Info/MoveExpireArticle.aspx" target="main_right">归档管理</a></li>
                                <li><a href="Info/RecycleChannel.aspx" target="main_right">回收站管理</a></li>
                                <li><a href="Property/PropertyManager.aspx" target="main_right">属性管理</a></li>
                                <li><a href="Flow/FlowList.aspx" target="main_right">工作流程</a></li>
                            </ul>
                        </div>
                        <%}%>
                        <%
                            if (LeftId == "3")
                            {
                        %>
                        <div class="guideexpand" onclick="Switch(this)">模型表单管理</div>
                        <div class="guide">
                            <ul id="SetSite">
                                <li><a href="InfoModel/ModelList.aspx" target="main_right">内容模型管理</a></li>
                                <li><a href="InfoModel/SetInfoModel.aspx" target="main_right">添加内容模型</a></li>
                                <li><a href="InfoModel/SearchStyleList.aspx" target="main_right">模型搜索列表样式</a></li>
                                <li><a href="InfoModel/CustomFormList.aspx" target="main_right">自定义表单管理</a></li>
                                <li><a href="InfoModel/CustomForm.aspx" target="main_right">添加自定义表单</a></li>
                            </ul>
                        </div>
                        <div class="guideexpand" onclick="Switch(this)">模板标签管理</div>
                        <div class="guide">
                            <ul id="Template">
                                <li><a href="Template/CreateFolder.aspx" target="main_right">模板管理</a></li>
                                <li><a href="Label/StyleManager.aspx" target="main_right">样式管理</a></li>
                                <li><a href="Label/LabelManager.aspx" target="main_right">标签管理</a></li>
                                <li><a href="Label/SuperLabelList.aspx" target="main_right">超级标签</a></li>
                                <li><a href="Info/ColumnToTemplate.aspx" target="main_right">模板批量设置</a></li>
                            </ul>
                        </div>
                        <%}%>
                        <%
                            if (LeftId == "4")
                            {
                        %>
                        <div class="guideexpand" onclick="Switch(this)">用户管理</div>
                        <div class="guide">
                            <ul id="Users">
                                <li runat="server" id="UserModel"><a href="UserGroupModel/UserGroupModelList.aspx" target="main_right">用户注册模型</a></li>
                                <li><a href="Other/NoticeList.aspx" target="main_right">用户公告管理</a></li>
                                <li runat="server" id="UserGroup"><a href="User/GroupList.aspx" target="main_right">用户组管理</a></li>
                                <asp:Repeater ID="RepUserGroupModel" runat="server">
                                    <ItemTemplate>
                                        <li><a href='User/UserList.aspx?TypeId=<%# Eval("Id") %>' target="main_right"><%# Eval("Name") %>管理</a></li>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <li><a href="WebMessage/WebMessageList.aspx" target="main_right">短消息管理</a></li>
                                <li runat="server" id="Card"><a href="User/Card.aspx" target="main_right">充值卡管理</a></li>
                            </ul>
                        </div>
                        <div class="guideexpand" onclick="Switch(this)">管理员管理</div>
                        <div class="guide">
                            <ul id="Users">
                                <li><a href="User/AdminGroupList.aspx" target="main_right">管理员组管理</a></li>
                                <li><a href="User/AdminList.aspx" target="main_right">管理员管理</a></li>
                                <li><a href="User/UpdateAdminPass.aspx" target="main_right">修改管理员密码</a></li>
                            </ul>
                        </div>
                        <%}%>
                        <%
                            if (LeftId == "5")
                            {
                        %>
                        <div class="guideexpand" onclick="Switch(this)">扩展功能</div>
                        <div class="guide">
                            <ul id="Users">
                                <li><a href="Collection/CollectionManager.aspx" target="main_right">数据采集管理</a></li>
                                <li id="InputData" runat="server"><a href="GetSubRecord/InputData.aspx" target="main_right">抽取数据</a></li>
                                <li><a href="User/LogList.aspx" target="main_right">系统日志管理</a></li>
                                <li><a href="Other/TagCategoryList.aspx" target="main_right">关键字类别管理</a></li>
                                <li><a href="Other/TagList.aspx" target="main_right">关键字管理</a></li>
                                <li><a href="WebSite/DictionaryList.aspx" target="main_right">数据字典</a></li>
                                <li><a href="Info/DownLoadServerList.aspx" target="main_right">镜像服务器管理</a></li>
                                <li><a href="Vote/Vote.aspx" target="main_right">投票系统</a></li>
                                <li><a href="Review/ReviewManage.aspx" target="main_right">用户评论管理</a></li>
                                <li runat="server" id="SiteCount"><a href="WebSite/SiteCount.aspx?type=year&filter=cur" target="main_right">数据统计系统</a></li>
                                <li><a href="User/ReportList.aspx" target="main_right">举报管理</a></li>
                                <li><a href="Other/LinkList.aspx" target="main_right">友情链接管理</a></li>
                                <li><a href="Other/PushInfoList.aspx" target="main_right">广告管理</a></li>
                                <li><a href="Other/FeedBackList.aspx" target="main_right">问答管理</a></li>
                            </ul>
                        </div>
                        <%}%>
                        <%
                            if (LeftId == "6")
                            {
                        %>
                        <div class="guideexpand" onclick="Switch(this)">分站管理</div>
                        <div class="guide">
                            <ul id="Users">
                                <li><a href="SubSite/SiteList.aspx" target="main_right">分站列表</a></li>
                                <li><a href="SubSite/SetSub.aspx" target="main_right">新增分站</a></li>
                                <li><a href="SubSite/AdminList.aspx" target="main_right">分站管理员列表</a></li>
                            </ul>
                        </div>
                        <div id="SubSite" runat="server">
                            <div class="guideexpand" onclick="Switch(this)">站群管理</div>
                            <table style="text-align: left;">
                                <tr>
                                    <td align="left">
                                        <div class="tree">
                                            <asp:TreeView ID="tvSubSite" runat="server" ExpandDepth="1" ShowLines="True" EnableViewState="false" NodeIndent="10"></asp:TreeView>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <%}%>
                    </div>
                </li>
                <li id="Guide_bottom"></li>
            </ul>
        </div>
    </form>
    <div id="dvModel" style="display: none; position: absolute; left: 0px; top: 0px; line-height: 200%; border: solid 1px #e6eff8; background-color: #f2f8fd; width: 80px;"></div>
</body>
</html>