%@ codepage=65001 %>
<%
'Response.CacheControl = "no-cache"
'Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Response.buffer = True
pagefrom = trim(Request.QueryString)
If pagefrom = "" Then pagefrom = Request.ServerVariables ("HTTP_REFERER")
%>
<%
errMsg = ""
Set rs = Server.CreateObject ("adodb.recordset")
GBookENAME = ""
SNAME = ""
Online = False
Do
If IsEmpty(GuestBookID) Then
errMsg = "留言版無效"
Exit Do
End If
If Check_PartanValue(Global_validnum, GuestBookID) = False Then
errMsg = "留言版無效"
Exit do
End If
'sql = "SELECT ENAME, SNAME, AdmID, AdmPWD, Online FROM tbl_b011 WHERE (SID = 1)"
sql = "SELECT ENAME, SNAME, Online FROM tbl_b011 WHERE (SID = " & GuestBookID & ")"
With rs
.Open sql, conn, 3, 1
If .EOF Then
errMsg = "留言版無效"
Else
GBookENAME = .Fields ("ENAME").Value
SNAME = .Fields ("SNAME").Value
'AdmID = .Fields ("AdmID").Value
'AdmPWD = .Fields ("AdmPWD").Value
Online = .Fields ("Online").Value
End If
.Close
End With
If errMsg <> "" Then Exit Do
If Online = False Then
errMsg = "留言版沒有開放哦~~~"
Exit Do
End If
strPageTitle = SNAME
Exit Do
Loop
%>
<%
Set rs = Nothing
Function main()
If errMsg <> "" Then
%>
<% Exit function
End If
If Session("Admin_" & GBookENAME) = "Y" Then
%>
<% Exit Function
End If
mainpage
End function
Function mainpage() %>
<% End Function %>