002

留言管理部分代码 留言本制作过程(3)

003if request.QueryString("action")="admin" then
if session("admin_name")<>"" then

IF Request("absh")="del" Then
sql="delete * from book where id="&Request("id")&""
Conn.execute(sql)
Response.Redirect "index.asp?admin=1"
End IF

IF Request("absh")="absh" Then
sql="update book set bsh=1 where id="&Request("id")&""
Conn.execute(sql)
Response.Redirect "index.asp?admin=1"
End IF


if Request("bhfly")="add" then
set rs=server.createobject("adodb.recordset")
sql="select * from book where id="&Request("id")&""
rs.open sql,conn,1,2
rs("bcontent") =Request("bcontent")
rs("bhcontent") =Request("bhcontent")
rs.update '更新数据表记录
rs.close
set rs=nothing
Response.Redirect "index.asp?admin=1"
End IF


if Request("bhf")="edit" then
set rs=server.createobject("adodb.recordset")
sql="select * from book where id="&Request("id")&""
rs.open sql,conn,1,1


Response.Write vbCrlf
Response.Write "<html>" & vbCrlf
Response.Write "<head>" & vbCrlf
Response.Write "<TITLE>GOODTEXT.ORG留言本</TITLE>" & vbCrlf
Response.Write "<META http-equiv=Content-Type content=""text/html; charset=gb2312"">" & vbCrlf
Response.Write "<META http-equiv=Content-Language content=gb2312>" & vbCrlf
Response.Write "<STYLE type=text/css>" & vbCrlf
Response.Write "BODY TABLE TD {FONT-SIZE: 9pt; COLOR: #842b00; LINE-HEIGHT: 16pt; FONT-FAMILY:

""Tahoma"", ""宋体""; TEXT-DECORATION: none}" & vbCrlf
Response.Write "A {FONT-SIZE: 9pt; COLOR: #842b00; LINE-HEIGHT: 16pt; FONT-FAMILY: ""Tahoma"",

""宋体""; TEXT-DECORATION: none}" & vbCrlf
Response.Write "A:hover {FONT-SIZE: 9pt; COLOR: #0188d2; LINE-HEIGHT: 16pt; FONT-FAMILY:

""Tahoma"", ""宋体""; TEXT-DECORATION: underline}" & vbCrlf
Response.Write "H1 {FONT-SIZE: 9pt; FONT-FAMILY: ""Tahoma"", ""宋体""}" & vbCrlf
Response.Write "span {color: #ff0000}" & vbCrlf
Response.Write "</STYLE>" & vbCrlf
%>
<script LANGUAGE="JavaScript">
function check()
{

Tags:HTML  函数  网页  设计  网站  

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。