%
if request("liuyan")<>"" then
If Trim(Request.Form("validatecode"))=Empty Or Trim(Session("cnbruce.com_ValidateCode"))<>Trim(Request.Form("validatecode")) Then
response.Write ""
response.end
end if
end if
%>
<%
response.expires=0
response.expiresabsolute=Now()-1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.CacheControl="no-cache"
if len(Request.querystring("shuyu"))=0 then
shuyu1="内科"
else
shuyu1=Request.querystring("shuyu")
end if
name=Request.form("name")
tel=Request.form("tel")
email=Request.form("email")
content=Request.form("content")
Dim CONN_STRING
CONN_STRING = Server.MapPath("..\myfile\database\table.mdb")
CONN_STRING = "driver={Microsoft Access Driver (*.mdb)};dbq=" & CONN_STRING
set conn=server.createobject("ADODB.connection")
set rs=server.createobject("ADODB.recordset")
conn.open CONN_STRING
if len(name)<>0 then
conn.execute "insert into message (姓名,留言,mydate,shuyu) values ('" & name & "-" & tel & "-" & email & "','" & content & "','" & now & "','" & shuyu1 & "')"
name=""
tel=""
email=""
content=""
end if
function keepformat(content)
if typename(content)="Null" then
keepformat=""
else
str=replace(content," "," ")
keepformat=replace(str,chr(13)+chr(10)," ")
end if
end function
sql = "select * from message where shuyu='"& shuyu1 &"'order by mydate DESC"
rs.Open sql,conn,1,1
i=0
do while not rs.eof
i=i+1
redim preserve list1(i)
list1(i)=rs("姓名")
redim preserve list2(i)
list2(i)=rs("留言")
redim preserve list3(i)
list3(i)=rs("mydate")
redim preserve list4(i)
list4(i)=rs("shuyu")
redim preserve list5(i)
list5(i)=rs("zhuti")
redim preserve list6(i)
list6(i)=rs("id")
redim preserve list7(i)
list7(i)=rs("reid")
rs.movenext
loop
rs.close
set rs=nothing
if i=0 then
%>
<%
else
epage=3
if Request.querystring("p")="" then
p=1
else
p=int(Request.querystring("p"))
end if
if Request.querystring("p")="0" then
p=1
end if
if (i/epage)-(i\epage) > 0 then
pages= i\epage + 1
else
pages= i\epage
end if
if p > pages then
p=pages
sp = (p - 1) * epage + 1
ep = sp + epage - 1
if ep > i then ep=i
%>
武汉市中心医院--就医向导-求医问药