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

📄 list.asp

📁 本实例为一个完整的网上购物商城的完整例子程序,里面有所以的源代码.希望对大家学习有用.
💻 ASP
字号:
<!--#include file="top.asp"-->
<%owen=request("id")%>
<style type="text/css">
.content 
{ 
        font-size: 11pt;
}
td
{
        word-break:break-all
}
</style>
<SCRIPT language=JavaScript>
var currentpos, timer;
function initialize()
{
        timer=setInterval("scrollwindow()", 50);
}
function sc()
{
        clearInterval(timer);
}
function scrollwindow()
{
        currentpos=document.body.scrollTop;
        window.scroll(0, ++currentpos);
        if(currentpos != document.body.scrollTop)
                sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</SCRIPT>
<%
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&cstr(request("id"))
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql, conn, 1, 1
title=rsnews("title")
if rsnews.eof and rsnews.bof then
        response.Write("数据库出错")
else
        %>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td width="180" rowspan="2" align="center" valign="top" bgcolor="#EFEFEF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" align="center" bgcolor="#9999CC" style="border-bottom: 1 solid #000000"><strong><font color="#FFFFFF"></font></strong></td>
</tr>
</table></td>
<td width="580" align="right" valign="top" bgcolor="#F3F3F3">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="1">
<tr>
<% sqlt="select * from bigclass order by BigClassID desc"
set rst=server.createobject("ADODB.Recordset")
rst.open sqlt, conn, 1, 1
do while not rst.eof
%>
<td height="25" align="center"  onmouseover="this.bgColor='#FFFFFF';"onmouseout="this.bgColor='#CCCCCC'; "bgColor=#CCCCCC><a href="sort.asp?owen1=<%=rst("BigClassName")%>"><%=rst("BigClassName")%></a></td>
<%
rst.movenext
loop
rst.Close
set rst=nothing
%>
</tr>
</table></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="50" colspan="2" align="center" class="tit"><%= rsnews("title")%></td>
</tr>
<tr>
<td width="40%" height="30" style="border-top: 1 solid #666666;border-bottom: 1 solid #666666">双击自动滚屏</td>
<td width="60%" align="center" style="border-top: 1 solid #666666;border-bottom: 1 solid #666666">发布者:<%= rsnews("user")%>
发布时间:<%=rsnews("infotime")%>阅读:<fontcolor="#FF0000"><%=rsnews("hits")%></font>次</td>
</tr>
<tr>
<td colspan="2"><br><div style='font-size:10.5pt'><%=rsnews("content")%></div></td>
</tr>
<tr align="right">
<td colspan="2">&nbsp; </td>
</tr>
<tr align="right">
<td colspan="2">&nbsp; </td>
</tr>
<%
end if
rsnews.close
set rsnews=nothing
%>
<tr> <TD colspan="2" width="95%" align="right">
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select title,id from news where id="&request("id")-1
rs.open sql, conn, 1, 1
if rs.eof and rs.bof then
        %><p><li>上篇:已经没有了
<%else%>
<p><li>上篇:<a href="list.asp?id=<%=rs("id")%>"><%=rs("title")%></a>
<%end if%>
<BR>
<%	rs.close
sql="select title,id from news where id="&request("id")+1
rs.open sql, conn, 1, 1
if rs.eof and rs.bof then
        %><li>下篇:已经没有了
<%else%>
<li>下篇:<a href="list.asp?id=<%=rs("id")%>"><%=rs("title")%></a>
<%end if%>
<%
rs.close
set rs=nothing
%>
</td></tr>
</table>
</td>
</tr>

<tr>
<td height="40" align="right" bgcolor="#F3F3F3">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="right"> <img src="images/printer.gif" width="16" height="14" align="absmiddle">
<a href="javascript:window.print()">打印本页</a> | <img src="images/close.gif" width="14" height="14" align="absmiddle">
<a href="javascript:window.close()">关闭窗口</a></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

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