![]() |
#2
tianyu1232007-12-03 12:20
换一下记录集对象的名称
|

<!--#include file="conn.asp"-->
<!--#include file="admin/ubbhtml.asp"-->
<%
id=request("id")
if id="" then
response.write "参数不足"
response.end
end if
%> <%
sql="select * from learning where articleid="&id
rs.open sql,conn,1,2
if rs.bof or rs.eof then
response.write "该内容已经不删除或者不存在"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
today=rs("today")
rs("todayhits")=rs("todayhits")+71
rs("hits")=rs("hits")+71
rs.update
if datediff("d",today,date)>=1 then
rs("today")=date()
rs("todayhits")=100
rs.update
end if
title=rs("title")
hits=rs("hits")
writer=rs("writer")
if writer="" then
writer=" if
url=rs("writer_url")
sort=rs("sort")
dateandtime=rs("dateandtime")
content=rs("content")
rs.close
response.write count
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www. saved from url=(0014)about:internet -->
<html xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">td img {display: block;}body {
margin-left: 0px;
margin-top: -1px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #1A85D7;
}
body,td,th {
font-size: 13px;
}
</style>
</head>
<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="spacer.gif" width="75" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="6" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="76" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="437" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="6" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5" background="img/show_b.jpg"></td>
<td><img src="spacer.gif" width="1" height="134" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="3" background="img/show_c.jpg"></td>
<td colspan="2" align="center" background="img/show_d.jpg"><b><%=title%></b></td>
<td><img src="spacer.gif" width="1" height="77" border="0" alt="" /></td>
</tr>
<tr>
<td background="img/show_e.jpg"></td>
<td background="img/show_f.jpg"></td>
<td height="281" colspan="2" valign="top" bgcolor="#FFFFFF" style="line-height: 20px;"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="279" colspan="2" valign="top"><span style="line-height: 20px;"><%=content%> </span></td>
</tr>
<tr>
<td width="23%" height="20"> 发表:<%=writer%></td>
<td width="77%" align="right">上篇:
<%
sql="select * from learning where syxs<>0 and articleid="&id-1
rs.open sql,conn,1,2
if rs.bof or rs.eof then
response.write "无"
else
response.write "<a href=show.asp?id="&id-1&">"&rs("title")&"</a>"
end if
rs.close
%>
下篇:
<%
sql="select * from learning where syxs<>0 and articleid="&id+1
rs.open sql,conn,1,2
if rs.bof or rs.eof then
response.write "无"
else
response.write "<a href=show.asp?id="&id+1&">"&rs("title")&"</a>"
end if
rs.close
%>
</td>
</tr>
<tr><td></td></tr>
</table></td>
<td background="img/show_h.jpg"></td>
<td><img src="spacer.gif" width="1" height="301" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5" background="img/show_i.jpg"></td>
<td><img src="spacer.gif" width="1" height="21" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5" background="img/show_j.jpg"></td>
<td><img src="spacer.gif" width="1" height="39" border="0" alt="" /></td>
</tr>
</table>
</body>
</html>
我怎么樣針下面這段代碼正確的加到上面的"<body>"的下面?(我直接加在下面就出錯!我想應該是几個查詢在一起有沖突,不知是不是這個原因)<!--#include file="admin/ubbhtml.asp"-->
<%
id=request("id")
if id="" then
response.write "参数不足"
response.end
end if
%> <%
sql="select * from learning where articleid="&id
rs.open sql,conn,1,2
if rs.bof or rs.eof then
response.write "该内容已经不删除或者不存在"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
today=rs("today")
rs("todayhits")=rs("todayhits")+71
rs("hits")=rs("hits")+71
rs.update
if datediff("d",today,date)>=1 then
rs("today")=date()
rs("todayhits")=100
rs.update
end if
title=rs("title")
hits=rs("hits")
writer=rs("writer")
if writer="" then
writer=" if
url=rs("writer_url")
sort=rs("sort")
dateandtime=rs("dateandtime")
content=rs("content")
rs.close
response.write count
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www. saved from url=(0014)about:internet -->
<html xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">td img {display: block;}body {
margin-left: 0px;
margin-top: -1px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #1A85D7;
}
body,td,th {
font-size: 13px;
}
</style>
</head>
<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="spacer.gif" width="75" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="6" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="76" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="437" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="6" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5" background="img/show_b.jpg"></td>
<td><img src="spacer.gif" width="1" height="134" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="3" background="img/show_c.jpg"></td>
<td colspan="2" align="center" background="img/show_d.jpg"><b><%=title%></b></td>
<td><img src="spacer.gif" width="1" height="77" border="0" alt="" /></td>
</tr>
<tr>
<td background="img/show_e.jpg"></td>
<td background="img/show_f.jpg"></td>
<td height="281" colspan="2" valign="top" bgcolor="#FFFFFF" style="line-height: 20px;"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="279" colspan="2" valign="top"><span style="line-height: 20px;"><%=content%> </span></td>
</tr>
<tr>
<td width="23%" height="20"> 发表:<%=writer%></td>
<td width="77%" align="right">上篇:
<%
sql="select * from learning where syxs<>0 and articleid="&id-1
rs.open sql,conn,1,2
if rs.bof or rs.eof then
response.write "无"
else
response.write "<a href=show.asp?id="&id-1&">"&rs("title")&"</a>"
end if
rs.close
%>
下篇:
<%
sql="select * from learning where syxs<>0 and articleid="&id+1
rs.open sql,conn,1,2
if rs.bof or rs.eof then
response.write "无"
else
response.write "<a href=show.asp?id="&id+1&">"&rs("title")&"</a>"
end if
rs.close
%>
</td>
</tr>
<tr><td></td></tr>
</table></td>
<td background="img/show_h.jpg"></td>
<td><img src="spacer.gif" width="1" height="301" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5" background="img/show_i.jpg"></td>
<td><img src="spacer.gif" width="1" height="21" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="5" background="img/show_j.jpg"></td>
<td><img src="spacer.gif" width="1" height="39" border="0" alt="" /></td>
</tr>
</table>
</body>
</html>

<%
bost =lcase(request.servervariables("HTTP_HOST"))
set rs=Server.CreateObject("adodb.recordset")
sql ="select * from PPst_User where [WebURL] ='" &"http://"&bost & "'"
rs.open sql,conn,1,1
if not rs.eof then
%>
<%=rs("Qianming")%>
<%end if%>
bost =lcase(request.servervariables("HTTP_HOST"))
set rs=Server.CreateObject("adodb.recordset")
sql ="select * from PPst_User where [WebURL] ='" &"http://"&bost & "'"
rs.open sql,conn,1,1
if not rs.eof then
%>
<%=rs("Qianming")%>
<%end if%>
[[italic] 本帖最后由 bxyl 于 2007-12-3 10:28 编辑 [/italic]]