📄 productsort.asp
字号:
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>导航栏目列表</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<script language="javascript">
<!--
function setpic(){
var arr = showModalDialog("../Editor/customDialog/img.htm", "", "dialogWidth:30em; dialogHeight:26em; status:0;help=no");
if (arr ==null){
alert("系统提示:当前没有上传图片,界面预览图为空,用户可以重新上传图片!");
}
if (arr !=null){
FolderForm.Sortpic.value=arr;
}
}
function setbpic(){
var arr = showModalDialog("../Editor/customDialog/img.htm", "", "dialogWidth:30em; dialogHeight:26em; status:0;help=no");
if (arr ==null){
alert("系统提示:当前没有上传图片,界面预览图为空,用户可以重新上传图片!");
}
if (arr !=null){
editForm.BigPic.value=arr;
}
}
//-->
</script>
<BODY>
<%
Dim quanxian
quanxian=trim(Request.ServerVariables(name))
if Instr(session("AdminPurview"),"|11,")=0 then
response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
response.end
end if
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<th>产品检索及分类查看:添加,修改,删除产品信息</th>
</tr>
<tr>
<td height="24" align="center" nowrap="nowrap" class="forumrow"><a href="ProductEdit.asp?Result=Add" onclick='changeAdminFlag("添加产品信息")'>添加产品信息</a><font color="#0000FF"> | </font><a href="ProductList.asp" onclick='changeAdminFlag("产品列表")'>查看所有产品信息</a> | </font><a href="ProductSort.asp?Action=Add&ParentID=0" onclick='changeAdminFlag("产品列表")'>添加产品类别</a> | </font><a href="OrderList.asp" onclick='changeAdminFlag("产品列表")'>查看订单信息</a><font color="#0000FF"> | </font><a href="Admin_htmlsort.asp" onclick='changeAdminFlag("生成其他信息分类页面")'>生成产品分类页面</a><font color="#0000FF"> | </font><a href="Admin_htmlpro.asp" onclick='changeAdminFlag("生成其他信息详细页面")'>生成产品详细页面</a></td>
</tr>
</table><%
Dim Action
Action=request.QueryString("Action")
Select Case Action
Case "Add"
addFolder
CallFolderView()
Case "Del"
Dim rs,sql,SortPath
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From LiangJingCMS_ProductSort where ID="&request.QueryString("id")
rs.open sql,conn,1,1
SortPath=rs("SortPath")
conn.execute("delete from LiangJingCMS_ProductSort where Instr(SortPath,'"&SortPath&"')>0")
conn.execute("delete from LiangJingCMS_Products where Instr(SortPath,'"&SortPath&"')>0")
response.write ("<script language='javascript'>alert('成功删除本类、子类及所有下属信息条目!');location.replace('ProductSort.asp');</script>")
Case "Save"
saveFolder ()
Case "Edit"
editFolder
CallFolderView()
Case "Move"
moveFolderForm ()
CallFolderView()
Case "MoveSave"
saveMoveFolder ()
Case Else
CallFolderView()
End Select
%>
<%Function CallFolderView()%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<th height="22">【管理产品类别】</th>
</tr>
<tr>
<td align="center" nowrap class="forumRow"><a href="ProductSort.asp?Action=Add&ParentID=0">添加一级分类</a> | <a href="ProductList.asp">查看所有产品</a></td>
</tr>
<tr>
<td nowrap class="forumRow"><%Folder(0)%></td>
</tr>
</table>
<%
End Function
Function Folder(id)
Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From LiangJingCMS_ProductSort where ParentID="&id&" order by id"
rs.open sql,conn,1,1
if id=0 and rs.recordcount=0 then
response.write ("<center>暂无产品分类</center>")
response.end
end if
i=1
response.write("<table border='0' cellspacing='0' cellpadding='0'>")
while not rs.eof
ChildCount=conn.execute("select count(*) from LiangJingCMS_ProductSort where ParentID="&rs("id"))(0)
if ChildCount=0 then
if i=rs.recordcount then
FolderType="SortFileEnd"
else
FolderType="SortFile"
end if
FolderName=rs("SortNameCH")
onMouseUp=""
else
if i=rs.recordcount then
FolderType="SortEndFolderClose"
ListType="SortEndListline"
onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
else
FolderType="SortFolderClose"
ListType="SortListline"
onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
end if
FolderName=rs("SortNameCH")
end If
datafrom="LiangJingCMS_ProductSort"
response.write("<tr>")
response.write("<td nowrap id='b"&rs("id")&"' class='"&FolderType&"'></td><td nowrap>"&FolderName&" ")
if rs("ViewFlagCH") then
Response.Write "<a href=""Conversion.asp?id="&rs("ID")&"&LX="&datafrom&"&Operation=downCH"" title=""点击更改显示状态""><font color='green'>√</font></a>"
else
Response.Write "<a href=""Conversion.asp?id="&rs("ID")&"&LX="&datafrom&"&Operation=upCH"" title=""点击更改显示状态""><font color='red'>×</font></a>"
end if
if rs("ViewFlagEN") then
Response.Write "<a href=""Conversion.asp?id="&rs("ID")&"&LX="&datafrom&"&Operation=downEN"" title=""点击更改显示状态""><font color='green'>√</font></a>"
else
Response.Write "<a href=""Conversion.asp?id="&rs("ID")&"&LX="&datafrom&"&Operation=upEN"" title=""点击更改显示状态""><font color='red'>×</font></a>"
end if
response.write(" <font color='red'>操作:</font>")
'If rs("ParentID") < 1 Then
response.write("<a href='ProductSort.asp?Action=Add&ParentID="&rs("id")&"'>添加</a> | ")
'End If
response.write("<a href='ProductSort.asp?Action=Edit&ID="&rs("id")&"'>修改</a>")
response.write(" | <a href='ProductSort.asp?Action=Move&ID="&rs("id")&"&ParentID="&rs("Parentid")&"&SortNameCH="&rs("SortNameCH")&"&SortPath="&rs("SortPath")&"'>移</a>")
response.write("→<a href='#' onclick='SortFromTo.rows[4].cells[0].innerHTML=""→ "&rs("SortNameCH")&""";MoveForm.toID.value="&rs("ID")&";MoveForm.toParentID.value="&rs("ParentID")&";MoveForm.toSortPath.value="""&rs("SortPath")&""";'>至</a>")
response.write(" | <a href=javascript:ConfirmDelSort('ProductSort',"&rs("id")&")>删除</a>")
response.write(" <font color='red'>产品:</font><a href='ProductEdit.asp?Result=Add'>添加</a>")
response.write(" | <a href='ProductList.asp?SortID="&rs("ID")&"&SortPath="&rs("SortPath")&"'>列表</a>")
response.write("</td></tr>")
if ChildCount>0 then
%>
<tr id="a<%= rs("id")%>" style="display:yes">
<td class="<%= ListType%>" nowrap></td>
<td ><% Folder(rs("id")) %></td>
</tr>
<%
end if
rs.movenext
i=i+1
wend
response.write("</table>")
rs.close
set rs=nothing
end Function
Function addFolder()
Dim ParentID
ParentID=request.QueryString("ParentID")
addFolderForm ParentID
end Function
Function addFolderForm(ParentID)
Dim ParentPath,SortTextPath,rs,sql
if ParentID=0 then
ParentPath="0,"
SortTextPath=""
else
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From LiangJingCMS_ProductSort where ID="&ParentID
rs.open sql,conn,1,1
ParentPath=rs("SortPath")
end if
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
<form name="FolderForm" method="post" action="ProductSort.asp?Action=Save&From=Add">
<tr>
<th height="22">【添加产品类别】</th>
</tr>
<tr>
<td class="forumRow">| 根类 → <% if ParentID<>0 then TextPath(ParentID)%></td>
</tr>
<tr>
<td class="forumRow">中文:
<input name="SortNameCH" type="text" id="SortNameCH" size="28">
显示:
<input name="ViewFlagCH" type="radio" value="1" checked="checked" />
是
<input name="ViewFlagCH" type="radio" value="0" />
否 父类ID:
<input readonly name="ParentID" type="text" id="ParentID" size="6" value="<%=ParentID %>">
父类数字路径:
<input readonly name="ParentPath" type="text" id="ParentPath" size="18" value="<%=ParentPath%>"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -