<%@ LANGUAGE="VBScript" %> <% Set objSSData = Server.CreateObject("ADODataServer.clsADO20") DSN = "LAGB" If Len(Request.Form) > 0 then ' ONLY ALLOW GUESTBOOK ENTRIES ' Fill out the complete URL of the valid addguest.asp page for this website OnlyValidReferrer = "http://www.maggiemceleney.com/" strReferer = Request.ServerVariables("HTTP_REFERER") If instr(1, strReferer,OnlyValidReferrer) <=0 Then ' redirect to valid input page 'Response.Write "strReferer = " & strReferer & "
" & vbCrLf 'Response.Write "OnlyValidReferrer = " & OnlyValidReferrer & "
" & vbCrLf 'Response.End Response.Redirect OnlyValidReferrer End if guestname = SQLEncode(Request("guestname")) email = SQLEncode(Request("email")) url = SQLEncode(Request("url")) city= SQLEncode(Request("city")) state = SQLEncode(Request("state")) country= SQLEncode(Request("country")) comment = SQLEncode(Request("comment")) postdate = CDate(Now()) if Trim(url) = "http://www." then url = "" end if SQLStmt = "INSERT INTO ggguest_tb " SQLStmt = SQLStmt & "(name, email, url, city, state, country, comment, postdate) " SQLStmt = SQLStmt & "VALUES (" SQLStmt = SQLStmt & "'" & guestname & "', '" & email & "', '" & url & "', " SQLStmt = SQLStmt & "'" & city & "', '" & state & "', '" & country & "', " SQLStmt = SQLStmt & "'" & comment & "', '" & postdate & "');" %> <% vResult = objSSData.ProcessSQLExecuteStatement(DSN, SQLStmt) if vResult <> 0 then %> Error: <%= objSSData.ErrorCode %>
Desc: <%= objSSData.ErrorDescription %>
<% if DebugMsgVis = True then %> SQL: <% = SQL %>
<% end if %> <% elseif DebugMsgVis = True then %> SQL: <% = SQL %>
<% end if %> <% End if %> <% nameIdx = 0 emailIdx = 1 urlIdx = 2 cityIdx = 3 stateIdx = 4 countryIdx = 5 postdateIdx = 6 commentIdx = 7 SQLStmt = "SELECT name, email, url, city, state, country, postdate, comment FROM ggguest_tb order by postdate desc" vResult = objSSData.ProcessSQLSelectStatement(DSN, SQLStmt, vdata, vhdr, vrowcnt, vcolcnt, vremaining) %> <% if vResult <> 0 then %> Error: <%= objSSData.ErrorCode %>
Desc: <%= objSSData.ErrorDescription %>
<% if DebugMsgVis = True then %> SQL: <% = SQL %>
<% end if %> <% elseif DebugMsgVis = True then %> SQL: <% = SQL %>
Rows: <%= vrowcnt %>
Cols: <%= vcolcnt %>
<% end if %> Gallery Gorgon - Guestbook
Gallery Gorgon Guestbook
Leave a Message

<% For ii = o to vrowcnt-1 %>
<% = vdata(ii,commentIdx) %>
<% = vdata(ii,nameIdx) %> <% ML = vdata(ii,emailIdx) ML_Text = HyperPart(ML,1) ML_Link = HyperPart(ML,2) if Len(ML_Link) > 0 then %> <%= ML_Link %> <% end if %>
<% = vdata(ii, cityIdx) %> <% if Len(vdata(ii,stateIdx)) > 0 then %> <% if Len(vdata(ii,cityIdx)) > 0 then %> <% = ", " & vdata(ii,stateIdx) %> <% else %> <% = vdata(ii,stateIdx) %> <% end if %> <% end if %> <% if Len(vdata(ii,countryIdx)) > 0 then %> <% = vdata(ii,countryIdx) %> - <% end if %> <% = vdata(ii,postdateIdx) %>


<% Next %> Home