<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim oldPost, newSQL, adoCon, objCon, appVers %> <% Set objCon = Server.CreateObject("ADODB.Connection") ' database connection, Access database ' ------------------------------------ ' Be sure this is the path to the database, if you have ' just uploaded this guestbook then it will be in the data folder adoCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("./db/guestbook.mdb") objCon.Open adoCon ' SQL Fix function Function SQLFix(str) If Trim(str) = "" Then SQLFix = NULL Else SQLFix = Trim(str) End If End Function appVers = "1.01 Beta" %> <% ' Guestbook from Winn.ws ' Need help? Help is free from Winn.ws ' Just email me at greg@winn.ws let me know what version you have. ' ====================================== Dim strName, strEmail, strComments, strLocation, srtError, addPost, Access %> <% Set objCon = Server.CreateObject("ADODB.Connection") ' database connection, Access database ' ------------------------------------ ' Be sure this is the path to the database, if you have ' just uploaded this guestbook then it will be in the data folder adoCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("./db/guestbook.mdb") objCon.Open adoCon ' SQL Fix function Function SQLFix(str) If Trim(str) = "" Then SQLFix = NULL Else SQLFix = Trim(str) End If End Function appVers = "1.01 Beta" %> <% ' add new post to database If Request.ServerVariables("CONTENT_LENGTH") <> 0 Then ' Trim all the Post's strName = Trim(Request.Form("name")) strEmail = Trim(Request.Form("email")) strComments = Trim(Request.Form("comments")) strLocation = Trim(Request.Form("location")) ' Do checks If Len(strName) = 0 Then srtError = "Missing Name" End If If Len(strEmail) = 0 Then srtError = srtError & "
Missing email address" End If If Len(strComments) = 0 Then srtError = srtError & "
Missing comments" End If If Len(strLocation) = 0 Then srtError = srtError & "
Missing location" End If ' if all is good post to database else print the errors If Len(srtError) = 0 Then Set addPost = Server.CreateObject("ADODB.Recordset") Access = "SELECT * FROM comments" addPost.Open Access, objCon, 2, 3 addPost.AddNew addPost("name") = SQLFix(strName) addPost("email") = SQLFix(strEmail) addPost("comment") = SQLFix(strComments) addPost("location") = SQLFix(strLocation) addPost("status") = 1 addPost("date_entered") = Date() ' close the insert addPost.Update addPost.Close End If End If %> Features of the Sea Trek System
Logo Fun Underwater Experience  
Where to Sea Trek ButtonSea TrekFaqs ButtonSea TrekVideos ButtonSea TrekGallery ButtonSea TrekMore ButtonSea TrekGuestbook ButtonSea TrekContact ButtonSea TrekSpanish Button
Look Here
visit our family of companies
sub sea systems
snuba
fun cats
sharks!
Trekker
trekker

<% Set oldPost = Server.CreateObject("ADODB.Recordset") newSQL = "SELECT * FROM comments WHERE status='2' ORDER BY date_entered" oldPost.Open newSQL, objCon While Not oldPost.EOF Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
") Response.Write(oldPost("comment")) Response.Write("
") Response.Write(oldPost("name")) Response.Write("
") Response.Write("
My Sea Trek experience was at" & oldPost("location") & " " & "
") Response.Write("
") oldPost.MoveNext Wend oldPost.Close Set oldPost = Nothing %>

" method="post">
Name

 

E-Mail

 

Where did you experience Sea Trek?

 

Have your say...

 

 

Post will appear within 48 hours. Thank you!

 

 
 
Home · Where to SeaTrek · FAQs · Videos · More Info · Contact · Site Map · Privacy Policy
©2008 Sub Sea Systems® | Site Design catsprite studios