my_collection.asp
来自「一个诚信信息港门户网 功能: 系统设置 企业会员 个人」· ASP 代码 · 共 188 行
ASP
188 行
<!--#include file="top.asp"--><%usertopview%>
<%if userflag26=0 then
response.redirect"ok.asp?action=flag"
end if
if request("action")="save" then
%><!--#include file="../buy.htm"--><%
'==============================================
elseif request("action")="del" then
%><!--#include file="../buy.htm"--><%
'=============================================
elseif request("action")="px" then
%><!--#include file="../buy.htm"--><%
end if
%>
<script language="JavaScript">
<!--
function checkdata() {
if( addform.SMT_name.value =="") {
alert("\操作错误,下面是产生错误的可能原因:\n\n·请输入收藏名称")
return false;
}
if( addform.SMT_collection.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="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<form name="addform" method="post" action="my_collection.asp?action=save" onSubmit="return checkdata()">
<tr>
<td align=center height=30><select name="SMT_sortid">
<option value=0 selected>不分类</option>
<%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
do while not rs.eof%>
<option value=<%=rs("SMT_id")%>><%=rs("SMT_collection_sort")%></option>
<%rs.movenext
loop
rs.close
set rs=nothing%></select> <a href=my_collection_sort.asp class=red>新分类</a> 收藏名称 <input name="SMT_name" type="text" size="10" maxlength="50"> 地址 <input name="SMT_collection" type="text" size="15" maxlength="50" value="http://"> <input type="submit" name="Submit" value="添加" class="input1"></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 colspan=2 style="border:1px #6c94d1 solid"> <font color=white>收藏管理</font></td>
</tr>
<tr>
<td width="19%" valign=top bgcolor="#ffffff">
<!--======-->
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr><td height=2></td></tr>
<tr><td align="center" bgcolor=#efefef style="border-bottom:2px #999999 solid"><a href=my_collection.asp class=red>全部收藏</a></td></tr>
<tr><td height=2></td></tr>
<tr><td align="center" bgcolor=#efefef style="border-bottom:2px #999999 solid"><a href=my_collection.asp?sortid=0>未分类</a></td></tr>
<%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
do while not rs.eof%>
<tr><td height=2></td></tr>
<tr><td align="center" bgcolor=#efefef style="border-bottom:2px #999999 solid"><a href=my_collection.asp?sortid=<%=rs("SMT_id")%>><%=rs("SMT_collection_sort")%></a></td></tr>
<%rs.movenext
loop
rs.close
set rs=nothing%>
<tr><td height=10></td></tr>
</table>
<!--======-->
</td>
<td width="81%" bgcolor=#ffffff valign=top>
<!--======-->
<table width="100%" border="0" cellspacing="0" cellpadding="5" align=center>
<%set rs=Server.CreateObject("Adodb.Recordset")
if request("sortid")<>"" then
sql="select * from SMT_collection where SMT_yp_id="&session("id")&" and SMT_sortid="&request("sortid")&" order by SMT_date desc"
else
sql="select * from SMT_collection where SMT_yp_id="&session("id")&" order by SMT_date desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td height=194 colspan=6 align=center bgcolor=#ffffff>暂无内容</td></tr>"
else
'分页的实现
listnum=20
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
do while not rs.eof and i<listnum%>
<tr>
<td width="80%"><a href=<%=rs("SMT_collection")%> target=_blank><%=rs("SMT_name")%></a></td>
<td width="10%" align=center><a href=my_collection.asp?id=<%=rs("SMT_id")%>&action=px&sortid=<%=request("sortid")%>&page=<%=request("page")%>>排序</a></td>
<td width="10%" align=center><a href=my_collection.asp?id=<%=rs("SMT_id")%>&action=del&sortid=<%=request("sortid")%>&page=<%=request("page")%>>删除</a></td>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop%>
<%filename="my_collection.asp?sortid="&request("sortid")&""%>
<tr><td colspan=3 align=right bgcolor=#efefef height=20>共 <%=Rs.pagecount%> 页
<% if page=1 then %>
<%else%>
<a href=<%=filename%>>|<<</a>
<a href=<%=filename%>&page=<%=page-1%>><<</a>
<a href=<%=filename%>&page=<%=page-1%>>[<%=page-1%>]</a>
<%end if%><% if Rs.pagecount=1 then %>
<%else%>[<%=page%>]
<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=<%=filename%>&page=<%=page+1%>>[<%=page+1%>]</a>
<a href=<%=filename%>&page=<%=page+1%>>>></a>
<a href=<%=filename%>&page=<%=Rs.pagecount%>>>>|</a>
<%end if%></td>
<%end if%></tr>
</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 + =
减小字号Ctrl + -
显示快捷键?