<!--#include file="include/conn.asp"-->
<%Call limsss(sQxa,"$$LstMenu$$")%>
<html>
<title>栏目管理</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/lst.css" rel="stylesheet" type="text/css" />
<script charset="utf-8" src="/Classeditor/kindeditor.js"></script>
<script charset="utf-8" src="/Classeditor/lang/zh_CN.js"></script>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<!----头文件---->

<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2"><tr><td height="31"><div class="titlebt">栏目管理</div></td></tr></table>

<table border="1" width="100%" cellpadding="2" style="border-collapse: collapse" bordercolor="#B5D0D9" bgcolor="#FFFFFF">
	<tr>
		<td>
		
		
<%if gaozhen<>"eddinfo" then%>	
<table border="1" width="100%" id="table4" cellspacing="0" style="border-collapse: collapse" bordercolor="#F6F6F6">
<tr>
<td height="30" bgcolor="#F6F6F6" align="center">菜单名称</td>
<td height="30" bgcolor="#F6F6F6" align="center">类型</td>
<td height="30" bgcolor="#F6F6F6" align="center">顺序</td>
<td height="30" bgcolor="#F6F6F6" align="center">链接地址</td>
<td height="30" bgcolor="#F6F6F6" align="center">菜单显示</td>
<td height="30" bgcolor="#F6F6F6" align="center">首页旅游</td>
<td height="30" bgcolor="#F6F6F6" align="center">首页资讯</td>
<td height="30" bgcolor="#F6F6F6" align="center">操作</td>
</tr>
<form action="?action=addclassbb" method=post>
<tr>
<script type="text/javascript">
function disheart(str) {
var freightDiv = document.getElementById("heartdiv");
if(str=="2" || str=="3" || str=="4") {   
freightDiv.style.display = "block";   
} else {   
freightDiv.style.display = "none";   
}   
}       
</script>
<td height="30" bgcolor="#FFFFFF" align="center"><input name="aaaa" size=5></td>
<td height="30" bgcolor="#FFFFFF" align="center">
<input name="bbbb" class="radio" onclick="disheart(this.value);" type="radio" value="0"> 单页
<input name="bbbb" class="radio" onclick="disheart(this.value);" type="radio" value="1" checked> 分级
<input name="bbbb" class="radio" onclick="disheart(this.value);" type="radio" value="2"> 链接
</td>
<td height="30" bgcolor="#FFFFFF" align="center"><input name="cccc" size=3 value=""></td>
<td height="30" bgcolor="#FFFFFF" align="center"><span id="heartdiv" style="display:none;"><input name="llll" size=16 value="0"></span></td>
<td height="30" bgcolor="#FFFFFF" align="center"><select name="dddd"><option value=0>不显示</option><option value=1>显示</option></select></td>
<td height="30" bgcolor="#FFFFFF" align="center"><select name="eeee"><option value=0>不显示</option><option value=1>显示</option></select></td>
<td height="30" bgcolor="#FFFFFF" align="center"><select name="gggg"><option value=0>不显示</option><option value=1>显示</option></select></td>
<td height="30" bgcolor="#FFFFFF" align="center"><input class="ed" type=image src="../images/ico/add.gif"></td>
</tr>
</form>
</table>
<br>
<table border="1" width="100%" id="table3" cellspacing="0" style="border-collapse: collapse" bordercolor="#F6F6F6" bgcolor="#FFFFFF">
<tr>
<td height="30" bgcolor="#F6F6F6" align="center">菜单名称</td>
<td height="30" bgcolor="#F6F6F6" align="center">类型</td>
<td height="30" bgcolor="#F6F6F6" align="center">顺序</td>
<td height="30" bgcolor="#F6F6F6" align="center">功能</td>
<td height="30" bgcolor="#F6F6F6" align="center">菜单显示</td>
<td height="30" bgcolor="#F6F6F6" align="center">首页旅游</td>
<td height="30" bgcolor="#F6F6F6" align="center">首页资讯</td>
<td height="30" bgcolor="#F6F6F6" align="center">更改</td>
<td height="30" bgcolor="#F6F6F6" align="center">操作</td>
<td height="30" align="center" bgcolor="#F6F6F6">静态</td>
</tr>
<%
Set oRs = Server.CreateObject("ADODB.Recordset")
sSql="select * from LstMenuBig order by MenuIndex asc, Id desc"
oRs.Open sSql, oconn, 1, 1
If oRs.eof and oRs.bof then
Response.Write ""
Else
Do While Not oRs.eof%>
<form action="?action=eddclassbb&Id=<%=oRs("Id")%>" method=post>
<tr>
<td height="30" align="center">[ID:<%=oRs("ID")%>]<input name="aaaa" size=5 value="<%=oRs("MenuTitle")%>"></td>
<td height="30" align="center">
<input name="bbbb" class="radio" type="radio" value="0" <%If oRs("MenuType")=0 Then%>checked<%End If%>> 单页
<input name="bbbb" class="radio" type="radio" value="1" <%If oRs("MenuType")=1 Then%>checked<%End If%>> 分级
<input name="bbbb" class="radio" type="radio" value="2" <%If oRs("MenuType")=2 Then%>checked<%End If%>> 链接
</td>
<td height="30" align="center"><input name="cccc" size=3 value="<%=oRs("MenuIndex")%>"></td>
<td height="30" align="center">
<%If oRs("MenuType")=0 Then%><input class="pp0" type="button" name="delete" onclick="{location.href='?gaozhen=eddinfo&Id=<%=oRs("Id")%>';}" value="  编辑信息  ">
<%ElseIf oRs("MenuType")=2 Then%><input class="pp2" name="llll" size=16 value="<%=oRs("MenuUrl")%>">
<%Else%><input class="pp1" type="button" name="delete" onclick="{location.href='LstMenuSmall.asp?TT=<%=oRs("Id")%>';}" value="  进入下级  ">
<%End If%></td>
<td height="30" bgcolor="#FFFFFF" align="center"><select name="dddd"><option value=<%=oRs("MenuLook")%>><%If oRs("MenuLook")=0 Then%>不显示<%else%>显示<%End If%></option><option value=0>不显示</option><option value=1>显示</option></select></td>
<td height="30" bgcolor="#FFFFFF" align="center">
<select name="eeee"><option value=<%=oRs("MenuHome")%>><%If oRs("MenuHome")=0 Then%>不显示<%else%>显示<%End If%></option><option value=0>不显示</option><option value=1>显示</option></select>
</td>
<td height="30" bgcolor="#FFFFFF" align="center">
<select name="gggg"><option value=<%=oRs("MenuNews")%>><%If oRs("MenuNews")=0 Then%>不显示<%else%>显示<%End If%></option><option value=0>不显示</option><option value=1>显示</option></select>
</td>
<td height="30" align="center"><input class="ed" type=image src="../images/ico/save.gif"></td>
<td height="30" align="center"><a href="?action=delclassbb&Id=<%=oRs("Id")%>"><img src=../images/ico/del.gif></a></td>
<td height="30" align="center"><a href="LstHtmlClass.asp?PBId=<%=oRs("Id")%>&NOPAGE=0"><img src=../images/ico/html.gif></a></td>
</tr>
</form>
<%
oRs.MoveNext
Loop
End If
%>
</table>	
<%End If%>
<%if gaozhen="eddinfo" then%>			
<%
Set oRs = server.CreateObject ("adodb.recordset")
sSql="select * from LstMenuBig where Id="& Id
oRs.open sSql,oConn,1,1
%>			
<form action="?action=eddclassbbinfo&Id=<%=oRs("Id")%>" method=post>			
<table border="1" width="100%" id="table3" cellspacing="3" cellpadding="3" style="border-collapse: collapse" bordercolor="#F6F6F6">
<tr>
<td height="30" align="right">名称：</td>
<td height="30"><input name="aaaa" value="<%=oRs("MenuTitle")%>" size="37"></td>
</tr>
<tr>
<td height="30" align="right">类型：</td>
<td height="30"><select name="bbbb"><option value=<%=oRs("MenuType")%>><%=MenuTT(oRs("MenuType"))%></option><option value=0>单页</option><option value=1>列表</option></select></td>
</tr>
<tr>
<td height="30" align="right">排序：</td>
<td height="30"><input name="cccc" value="<%=oRs("MenuIndex")%>" size="10"></td>
</tr>
<tr>
<td height="30" align="right">内容：
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('#dddd');
html = editor.html(); 
});
</script>
</td>
<td height="30">
<textarea class="input500" id="dddd" name="dddd" rows="27" cols="107"><%=oRs("MenuCont")%></textarea></td>
</tr>
<tr>
<td height="30" align="right">　</td>
<td height="30"><input type=submit value="编辑信息"></td>
</tr>
</table>
</form>	
<%end if%>		
		
		
		
		
		</td>
	</tr>
</table>

</body>
</html>
<%
'大类添加
If action="addclassbb" Then
if trim(request("aaaa"))="" then
	call alert("名称不能为空!","lstmenu.asp")
end if
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstMenuBig] where MenuTitle='"&trim(request("aaaa"))&"'"
	oRs.open sSql,oconn,1,3
	If not oRs.eof then
	Call Alert ("名称重复,返回重来.","-1")
	End If
		oRs.addnew
		oRs("MenuTitle")=trim(request("aaaa"))
		oRs("MenuType")=trim(request("bbbb"))
		oRs("MenuIndex")=trim(request("cccc"))
		oRs("MenuLook")=trim(request("dddd"))
		oRs("MenuHome")=trim(request("eeee"))
		oRs("MenuNews")=trim(request("gggg"))
		If trim(request("bbbb"))=2 Then
		oRs("MenuUrl")=trim(request("llll"))
		End If
		oRs.update
		oRs.close
		response.redirect "lstmenu.asp"
	Set oRs = Nothing
End If
'大类编辑
If action="eddclassbb" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstMenuBig] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("MenuTitle")=trim(request("aaaa"))
		oRs("MenuType")=trim(request("bbbb"))
		oRs("MenuIndex")=trim(request("cccc"))
		oRs("MenuLook")=trim(request("dddd"))
		oRs("MenuHome")=trim(request("eeee"))
		oRs("MenuNews")=trim(request("gggg"))
		If trim(request("bbbb"))=2 Then
			oRs("MenuUrl")=trim(request("llll"))
		End If
		oRs.update
		oRs.close
		call alert("编辑成功!","lstmenu.asp")
	Set oRs = Nothing
End If
'信息编辑
If action="eddclassbbinfo" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstMenuBig] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("MenuTitle")=trim(request("aaaa"))
		oRs("MenuType")=trim(request("bbbb"))
		oRs("MenuIndex")=trim(request("cccc"))
		oRs("MenuCont")=trim(request("dddd"))
		oRs.update
		oRs.close
		call alert("编辑成功!","lstmenu.asp")
	Set oRs = Nothing
End If
'删除大类
If action="delclassbb" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstMenuBig] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call alert("删除成功!","lstmenu.asp")
End if
%>
