⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_sort.asp

📁 电子商城代码
💻 ASP
📖 第 1 页 / 共 3 页
字号:
%>

<tr class=classtd>
<td height="22" align=center><%if trim(rs("sort_pic"))<>"" then response.write"<img src=""../"&rs("sort_pic")&""" border=""0"" height=""25"" width=""25"">" end if%>
</td>
<td height="22">&nbsp;<img src="images/1.gif">&nbsp;<%=rs("sort_name")%>  [<a href="?action=csortadd&sort_id=<%=rs("sort_id")%>&sort_name=<%=server.urlencode(rs("sort_name"))%>"><font color=red>添加二级分类</font></a>]</td>
<td align="center"><%=rs("paixu")%></td>
<td align="center"><input type="button" name="Submit2" value="向上" onClick="location.href='?edit=up1&sort_id=<%=rs("sort_id")%>&paixu=<%=rs("paixu")%>'" class="button">&nbsp;<input type="button" name="Submit2" value="向下" onClick="location.href='?edit=down1&sort_id=<%=rs("sort_id")%>&paixu=<%=rs("paixu")%>'" class="button"></td>
<td align="center"><a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?action=sortdel&delsort=<%=server.urlencode(rs("sort_name"))%>&sort_id=<%=rs("sort_id")%>">删除</a></td>
 <td align="center"><a href="?action=sortmodi&modisort=<%=server.urlencode(rs("sort_name"))%>&paixu=<%=rs("paixu")%>&sort_id=<%=rs("sort_id")%>">修改</a></td>
 <td align="center"><a href="?action=sorthb&unitesort=<%=server.urlencode(rs("sort_name"))%>&paixu=<%=rs("paixu")%>&sort_id=<%=rs("sort_id")%>">合并</a></td>
</tr>
<%
if request("sort_id")<>"" then
set rscsort=server.CreateObject("adodb.recordset")
if request("csort_id")<>"" then
rscsort.open "Select sort_id,csort_id,csort_name,paixu From [56770_csort] Where sort_id=" & request("sort_id") & " and csort_id=" & request("csort_id") & " order by paixu desc", conn, 1, 1
else
rscsort.open "Select sort_id,csort_id,csort_name,paixu From [56770_csort] Where sort_id=" & request("sort_id") & " order by paixu desc", conn, 1, 1
end if
if not(rscsort.bof and rscsort.eof)then
        do while not rscsort.eof
if request("edit")="up2" then
conn.execute "update [56770_csort] set paixu="&request("paixu")&"+1 where csort_id=" &request("csort_id")
response.redirect "Admin_sort.asp?sort_id="&request("sort_id")&""
end if
if request("edit")="down2" then
conn.execute "update [56770_csort] set paixu="&request("paixu")&"-1 where csort_id=" &request("csort_id")
'conn.execute "update [56770_csort] set paixu="&request("paixu")&"+1 where paixu=" &request("paixu")
response.redirect "Admin_sort.asp?sort_id="&request("sort_id")&""
end if
%>
<tr bgcolor="#D5DDEE">
<td height="25" ></td>
<td height="22">&nbsp;&nbsp;<img src="images/2.gif">&nbsp;<%=rscsort("csort_name")%> [<a href="?action=cxsortadd&sort_id=<%=rscsort("sort_id")%>&csort_id=<%=rscsort("csort_id")%>&csort_name=<%=server.urlencode(rscsort("csort_name"))%>&sort_name=<%=server.urlencode(rs("sort_name"))%>"><font color=red>添加三级分类</font></a>] </td>
<td align="center"><%=rscsort("paixu")%></td>
<td align="center"><input type="button" name="Submit2" value="向上" onClick="location.href='?edit=up2&sort_id=<%=rscsort("sort_id")%>&csort_id=<%=rscsort("csort_id")%>&paixu=<%=rscsort("paixu")%>'" class="button">&nbsp;<input type="button" name="Submit2" value="向下" onClick="location.href='?edit=down2&sort_id=<%=rscsort("sort_id")%>&csort_id=<%=rscsort("csort_id")%>&paixu=<%=rscsort("paixu")%>'" class="button"></td>
 <td align="center"><a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?action=csortdel&delcsort=<%=server.urlencode(rscsort("csort_name"))%>&sort_id=<%=rscsort("sort_id")%>&csort_id=<%=rscsort("csort_id")%>&">删除</a></td>
 <td align="center"><a href="?action=csortmodi&modicsort=<%=server.urlencode(rscsort("csort_name"))%>&sort_id=<%=rscsort("sort_id")%>&csort_id=<%=rscsort("csort_id")%>&paixu=<%=rscsort("paixu")%>">修改</a></td>
 <td align="center"><a href="?action=csorthb&unitecsort=<%=server.urlencode(rscsort("csort_name"))%>&sort_id=<%=rscsort("sort_id")%>&csort_id=<%=rscsort("csort_id")%>&paixu=<%=rscsort("paixu")%>">合并</a></td>
</tr>

<%
set rscxsort=server.CreateObject("adodb.recordset")
'if request("csort_id")<>"" then
rscxsort.open "Select sort_id,csort_id,cxsort_id,cxsort_name,paixu From [56770_cxsort] Where sort_id=" & request("sort_id") & " and csort_id=" & rscsort("csort_id") & " order by paixu desc", conn, 1, 1
'end if
if not(rscxsort.bof and rscxsort.eof)then
        do while not rscxsort.eof
if request("edit")="up3" then
conn.execute "update [56770_cxsort] set paixu="&request("paixu")&"+1 where cxsort_id=" &request("cxsort_id")
response.redirect "Admin_sort.asp?sort_id="&request("sort_id")&"&csort_id="&request("csort_id")&""
end if
if request("edit")="down3" then
conn.execute "update [56770_cxsort] set paixu="&request("paixu")&"-1 where cxsort_id=" &request("cxsort_id")
'conn.execute "update [56770_cxsort] set paixu="&request("paixu")&"+1 where paixu=" &request("paixu")
response.redirect "Admin_sort.asp?sort_id="&request("sort_id")&"&csort_id="&request("csort_id")&""
end if
%>

<tr bgcolor="#E3E8F4">
<td height="25" ></td>
<td height="22">&nbsp;&nbsp;&nbsp;<img src="images/3.gif">&nbsp;<%=rscxsort("cxsort_name")%></td>
<td align="center"><%=rscxsort("paixu")%></td>
<td align="center"><input type="button" name="Submit2" value="向上" onClick="location.href='?edit=up3&sort_id=<%=request("sort_id")%>&csort_id=<%=request("csort_id")%>&cxsort_id=<%=rscxsort("cxsort_id")%>&paixu=<%=rscxsort("paixu")%>'" class="button">&nbsp;<input type="button" name="Submit2" value="向下" onClick="location.href='?edit=down3&sort_id=<%=request("sort_id")%>&csort_id=<%=request("csort_id")%>&cxsort_id=<%=rscxsort("cxsort_id")%>&paixu=<%=rscxsort("paixu")%>'" class="button"></td>
 <td align="center"><a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?action=cxsortdel&delcxsort=<%=rscxsort("cxsort_name")%>&sort_id=<%=rscxsort("sort_id")%>&csort_id=<%=rscxsort("csort_id")%>&cxsort_id=<%=rscxsort("cxsort_id")%>">删除</a></td>
    <td align="center"><a href="?action=cxsortmodi&modicxsort=<%=server.urlencode(rscxsort("cxsort_name"))%>&sort_id=<%=rscxsort("sort_id")%>&csort_id=<%=rscxsort("csort_id")%>&cxsort_id=<%=rscxsort("cxsort_id")%>&paixu=<%=rscxsort("paixu")%>">修改</a></td>
    <td align="center"><a href="?action=cxsorthb&unitecxsort=<%=server.urlencode(rscxsort("cxsort_name"))%>&sort_id=<%=rscxsort("sort_id")%>&csort_id=<%=rscxsort("csort_id")%>&cxsort_id=<%=rscxsort("cxsort_id")%>&paixu=<%=rscxsort("paixu")%>">合并</a></td>
</tr>
<%
rscxsort.movenext
loop
end if
rscxsort.close
set rscxsort=nothing
rscsort.movenext
loop
end if
rscsort.close
set rscsort=nothing
end if
rs.movenext
loop
rs.close
set rs=nothing
response.write"</table></td></tr></table>"
end sub
%>

<%sub sortadd%>
       <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
        <tr>
         <td>
           <table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" cellpadding="0">
               <tr>
                 <td class="classtop" height="27" align="center" colspan="2">添加一级分类</td>
                </tr>
<form name="addsort" method="post" action="?action=addsort">
<%
sql="select top 1 paixu from [56770_sort] order by sort_id desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql, conn, 1, 1
if rs.eof or rs.bof then
        paixu="1"
else
        paixu=rs("paixu")+1
end if
rs.close
set rs=nothing
%>
<tr class=classtd>
<td align="right" width="25%">分类名:</td>
<td>
<input type="text" name="addsort" class="form">
</td>
</tr>

<tr class=classtd>
<td align="right">序号:</td>
<td>
<input type="text" name="paixu" class="form" value="<%=paixu%>" size="5">
</td>
</tr>
<tr class=classtd>
<td align="right">分类图标:</td>
<td height=30>
<input type="text" name="sort_pic" class="form"> <iframe name="Upload" frameborder="0" width="400" height="20" scrolling="no" src="../upfile/up_sortpic.asp"></iframe>
</td>
</tr>
<tr>
<td colspan="2" align="center" height="30" class="classfooter">
<input type="submit" name="Submit" value="添 加" class="button">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%end sub%>
<%sub sortdel%>
       <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
        <tr>
         <td>
           <table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" cellpadding="0">
               <tr>
                 <td class="classtop" height="27" align="center" colspan="2">删除一级类</td>
                </tr>
<form name="delsort" method="post" action="?action=delsort">
<%
if request("delsort")<>"" then
        %>
<tr class=classtd>
<td align="right" width="25%">分类名:</td>
<td>
<input type="text" name="delsort" class="form" value="<%=request("delsort")%>">
</td>
</tr>
<%else%> <%end if%>
<tr class=classtd>
<td colspan="2" align="center" height="30" class="classfooter">
<input type="submit" name="Submit2" value="删 除" class="button">
<input type="hidden" name="sort_id" value="<%=request("sort_id")%>">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%end sub%>
<%sub sortmodi%>
       <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
        <tr>
         <td>
           <table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" cellpadding="0">
               <tr>
                 <td class="classtop" height="27" align="center" colspan="2">修改一级类</td>
                </tr>
<form name="addsort" method="post" action="?action=modisort">
<%
sql="select * from [56770_sort] where sort_id="&request("sort_id")&""
set rs=server.createobject("ADODB.Recordset")
rs.open sql, conn, 1, 1
sort_name=rs("sort_name")
sort_name_lan1=rs("sort_name_lan1")
sort_pic=rs("sort_pic")
rs.close
set rs=nothing

if request("modisort")<>"" then
%>
<tr class=classtd>
<td align="right" width="25%">分类名:</td>
<td>
<input type="text" name="modisort" class="form" value="<%=sort_name%>" readonly>
</td>
</tr>
<%end if%>
<tr class=classtd>
<td align="right">修改为:</td>
<td>
<input type="text" name="sort_name" class="form">
</td>
</tr>

<tr class=classtd>
<td align="right">序号:</td>
<td>
<input type="text" name="paixu" class="form" value="<%=paixu%>" size="5">
</td>
</tr>
<tr class=classtd>
<td align="right">分类图标:</td>
<td height=30> 
<input type="text" name="sort_pic" class="form" value="<%=sort_pic%>"> <iframe name="Upload" frameborder="0" width="400" height="20" scrolling="no" src="../upfile/up_sortpic.asp"></iframe>
</td>
</tr>
<tr>
<td colspan="2" align="center" height="30" class="classfooter">
<input type="submit" name="Submit22" value="修 改" class="button">
<input type="hidden" name="sort_id" value="<%=request("sort_id")%>">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%end sub%>
<%sub sorthb%>
       <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
        <tr>
         <td>
           <table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" cellpadding="0">
               <tr>
                 <td class="classtop" height="27" align="center" colspan="2">合并一级分类</td>
                </tr>
<form name="unitesort" method="post" action="?action=hbsort">
<tr class=classtd>
<td align="right" width="25%" class=classtd>分类名:</td>
<td class=classtd>
<input type="text" name="unitesort1" class="form" value=<%=request("unitesort")%>>
</td>
</tr>
<tr class=classtd>
<td align="right" class=classtd>分类名:</td>
<td class=classtd>
<select name="unitesort2">
<option value="" selected>请选择一级分类(2)</option>
<%
sql="select * from [56770_sort] where sort_name<>'"&request("unitesort")&"'"
set rs=server.createobject("ADODB.Recordset")
rs.open sql, conn, 1, 1
while not rs.eof
%>
<option value="<%=rs("sort_name")%>"><%=rs("sort_name")%></option>
<%
rs.movenext
wend
rs.Close()
set rs=nothing
%>
</select>
</td>
</tr>
<tr class=classtd>
<td align="right" class=classtd>合并为:</td>
<td class=classtd>
<input type="text" name="unitesortto" class="form">
</td>
</tr>
<tr class=classtd>
<td align="right">序号:</td>
<td>
<input type="text" name="paixu" class="form" size="5">
</td>
</tr>
<tr>
<td colspan="2" align="center" height="30" class="classfooter">
<input type="submit" name="Submit222" value="合 并" class="button">
<input type="hidden" name="sort_id" value="<%=request("sort_id")%>">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%end sub%>

<%sub csortadd%>
       <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
        <tr>
         <td>
           <table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" cellpadding="0">
               <tr>
                 <td class="classtop" height="27" align="center" colspan="2">在 <%=request("sort_name")%> 下添加二级分类</td>
                </tr>
<form name="addcsort" method="post" action="?action=addcsort">
<%
sql="select * from [56770_csort] order by csort_id desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql, conn, 1, 1
if rs.eof or rs.bof then
        paixu="1"
else
        paixu=rs("paixu")+1
end if
rs.close
set rs=nothing
%>
<tr class=classtd>
<td align="right" width="25%" class=classtd>分类名:</td>
<td>
<input type="text" name="csort_name" class="form">
</td>
</tr>
<tr class=classtd>
<td align="right">序号:</td>
<td>
<input type="text" name="paixu" class="form" value="<%=paixu%>" size="5">
</td>
</tr>
<tr>
<td colspan="2" align="center" height="30" class="classfooter">
<input type="submit" name="Submit" value="添 加" class="button">
<input type="hidden" name="sort_id" value="<%=request("sort_id")%>">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%end sub%>
<%sub csortdel%>
       <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
        <tr>
         <td>
           <table width="100%" border="0" cellspacing="1" bgcolor="#FFFFFF" cellpadding="0">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -