📄 my_collection_sort.asp
字号:
<!--#include file="top.asp"--><%usertopview%>
<%if userflag26=0 then
response.redirect"ok.asp?action=flag"
end if
if request("action")="save" then
cpsort=trim(request("cpsort"))
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from SMT_collection_sort where SMT_yp_id="& session("id")
rs.open sql,conn,1,3
if userflag9<>0 then
if rs.recordcount >= cint(userflag9) then
errstyle="·您是"&vipshow&",只能上传最多 "&userflag9&" 个产品分类!"
scripterr
end if
else
errstyle="·对不起,此功能已对"&vipshow&"关闭!"
scripterr
end if
rs.addnew
rs("SMT_collection_sort")=cpsort
rs("SMT_yp_id")=session("id")
rs.update
rs.close
set rs=nothing
response.redirect"my_collection_sort.asp"
'==============================================
elseif request("action")="edit" then
cpsort=trim(request("cpsort"))
if cpsort="" then
errstyle="·对不起,产品分类不能为空"
scripterr
end if
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from SMT_collection_sort where SMT_id="&request("id")&" and SMT_yp_id="&session("id")
rs.open sql,conn,1,3
if userflag9=0 then
errstyle="·对不起,此功能已对"&vipshow&"关闭!"
scripterr
end if
rs("SMT_collection_sort")=cpsort
rs.update
rs.close
set rs=nothing
response.redirect"my_collection_sort.asp"
elseif request("action")="px" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from SMT_collection_sort where SMT_id="&request("id")&" and SMT_yp_id="&session("id")
rs.open sql,conn,1,3
rs("SMT_date")=now()
rs.update
rs.close
set rs=nothing
response.redirect"my_collection_sort.asp"
elseif request("action")="del" then
conn.execute("delete From SMT_collection Where SMT_sortid="&request("id")&" and SMT_yp_id="&session("id"))
conn.execute("delete From SMT_collection_sort Where SMT_ID="&request("id")&" and SMT_yp_id="&session("id"))
response.redirect"my_collection_sort.asp"
end if%>
<script language="JavaScript">
<!--
function checkdata() {
if( addform.cpsort.value =="") {
alert("\添加分类出错,下面是产生错误的可能原因:\n\n·请输入分类名称")
return false;
}
return true;
}
// -->
</script>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="160" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="600" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是:我的公文包 > 我的收藏</td></tr>
<tr>
<td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
<tr>
<td height=25 bgcolor=#6C94D1> <font color=white>添加收藏分类</font></td>
</tr>
<tr>
<td bgcolor=#ffffff height=25>
<!--======-->
<table width="90%" border="0" cellspacing="0" cellpadding="0" align=center>
<form name="addform" method="post" action="my_collection_sort.asp?action=save" onSubmit="return checkdata()">
<tr>
<td width="30%" align=center height=30>分类名称</td>
<td width="34%"><input name="cpsort" type="text" size="20" maxlength="20"></td>
<td width="36%"><input type="submit" name="Submit" value="添 加" class="input1"> <a href=my_collection.asp class=red>添加收藏</a></td>
</tr>
</form>
</table>
<!--======-->
</td>
</tr>
</table>
<!--####################################-->
</td>
</tr>
<tr>
<td height=10></td>
</tr>
<tr>
<td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
<tr>
<td height=25 bgcolor=#6C94D1 style="border:1px #6c94d1 solid"> <font color=white>收藏分类管理</font></td>
</tr>
<tr>
<td bgcolor=#ffffff height=25>
<!--======-->
<table width="64%" border="0" cellspacing="0" cellpadding="0" align=center>
<%set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from SMT_collection_sort where SMT_yp_id="&session("id")&" order by SMT_date desc"
rs.open sql,conn,1,1
if rs.eof then
response.write"<tr align=center><td height=30>暂无分类</td></tr>"
else
do while not rs.eof%>
<form name="addform1" method="post" action="my_collection_sort.asp?action=edit">
<input name="id" type="hidden" value="<%=rs("SMT_id")%>">
<tr align=center>
<td width="62%" height=30><input name="cpsort" type="text" size="20" maxlength="20" value="<%=rs("SMT_collection_sort")%>"></td>
<td width="38%"><input type="submit" name="Submit" value="修 改" class="input1"> <a href=my_collection_sort.asp?id=<%=rs("SMT_id")%>&action=px>排序</a> <a href=my_collection_sort.asp?id=<%=rs("SMT_id")%>&action=del>删除</a></td>
</tr>
</form>
<%rs.movenext
loop
end if
rs.close
set rs=nothing%>
</table>
<!--======-->
</td>
</tr>
</table>
<!--####################################-->
</td>
</tr>
</table>
<!--####################################-->
</td>
</tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<!--====== bottom ========-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor=#ffffff>
<tr><td height=2 bgcolor=#6C94D1></td></tr>
<tr>
<td align="center" height=80><%=citybottom%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -