ASP前台链接后台的代码,看不懂。谁帮我翻一下,仔细点啊!

来源:百度知道 编辑:UC知道 时间:2024/05/13 05:08:27
<!--#include file="include/#888.asp"-->
<%
call aspsql()
id=request("id")
If not isNumeric(id) then
response.redirect "main.asp"
response.end
end if

title="title"&cstr(11)
body="body"&cstr(11)
Set rsp = conn.Execute("select * from page")
body=rsp(body)
title=rsp(title)
set rsp=nothing
if body="" then response.redirect "main.asp"
%>
<html><head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body oncontextmenu="return false" ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty()
onbeforecopy="return

<!--#include file="include/#888.asp"-->
<%
'********调用aspsql函数
call aspsql()
'********取得名为id的参数
id=request("id")
'********判断如果id不是数字
If not isNumeric(id) then
'********重新定向到main.asp,就是转到main.asp
response.redirect "main.asp"
'********结束,后面的代码不会继续执行
response.end
end if

'********把11转换成string型,与title链接,即为“title11”
title="title"&cstr(11)
'********定义一个recordset变量,存贮page表中查询出的结果
body="body"&cstr(11) ********同上
Set rsp = conn.Execute("select * from page")
'********取得数据库中body的值,不过我记得好像括号里的body应该带引号
body=rsp(body)
'********同上
title=rsp(title)
'********清空recordset
set rsp=nothing

if body="" then response.redirect "main.asp"
%>
<html><head>
<title><%=sitename%></titl