Mapa
Oficina Azabache Ceramica Cuero Joyeria Madera Encuadernación y Arte Floral Lista de Artesanos Chat Foro Libro de Visitas Buscar
Libro
de
Visitas
 
Bienvenido
 
Libro de Visitas
 
SAAS
 
E-mail

<% Flag = request.form("Flag") If IsEmpty(Flag) or Flag = "" then %> Firma nuestro Libro de visitas
Atención: * Indica un campo necesario.

*Nombre:
*Ciudad:
*Provincia:
*País:
 Email:
 URL:
Comentarios:
 
 
<% End If If Flag = 1 then If IsEmpty(request.form("Name")) or request.form("Name")="" then response.write "

" response.write "


Debes escribir un Nombre.
" response.write "

" response.write "" response.write "
" response.end Else Name = request.form("Name") End If If IsEmpty(request.form("City")) or request.form("City")="" then response.write "
" response.write "


Debes escribir una Ciudad.
" response.write "

" response.write "" response.write "
" response.end Else City = request.form("City") End If If IsEmpty(request.form("State")) or request.form("State")="" then response.write "
" response.write "


Debes escribir una Provincia.
" response.write "

" response.write "" response.write "
" response.end Else State = request.form("State") End If If IsEmpty(request.form("Country")) or request.form("Country")="" then response.write "
" response.write "


Debes escribir un País." response.write "

" response.write "" response.write "
" response.end Else Country = request.form("Country") End If Email = request.form("Email") If request.form("URL")="http://" then URL = "" Else URL = request.form("URL") End If If IsEmpty(request.form("Comments")) or request.form("Comments")="" or request.form("Comments")=" " then response.write "
" response.write "


No olvides tus comentarios!" response.write "

" response.write "" response.write "
" response.end Else Comments = request.form("Comments") Comments = Replace(Comments, Chr(34), "''") Comments = Replace(Comments, vbCrLf, "
") End If Flag = request.form("Flag") %>

Aquí esta la información que estas enviando. Si quieres hacer cambios usa el botón apropiado abajo, o usa el otro botón para enviar esta entrada como está. 


Nombre: <%= Name %>
Ciudad: <%= City %>
Provincia: <%= State %>
Email: <%= Email %>
URL: <%= URL %>

Comentarios: <%= Comments %>

 
<% End If If Flag = 2 then Today = Now() Name = request.form("Name") Name = Replace(Name, "'", "''") Name = Replace(Name, Chr(34), "''") City = request.form("City") City = Replace(City, "'", "''") State = request.form("State") State = Replace(State, "'", "''") Country = request.form("Country") Country = Replace(Country, "'", "''") Email = request.form("Email") URL = request.form("URL") Comments = request.form("Comments") Comments = Replace(Comments, "'", "''") ' ok now we've got our data so let's ship it off to the database set conn = server.createobject("adodb.connection") ' **** change DSN name if you're using a DSN and you've named it differently 'conn.open "guestbook" ' **** DSN-less connection: comment out above line and uncomment the ' **** Code between "Begin" and "End" ' **** BEGIN DSN-LESS CONNECTION CODE DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=dsntemp & "DBQ=" & server.mappath("/guestbook/saas_Guestbook.mdb") conn.Open DSNtemp ' **** END OF DSN-LESS CONNECTION CODE ' **** Note: If using a DSN-less connection, make sure to change server.mappath above to ' **** reflect the actual location of the guestbook database file. ' **** The above will work if the database file is at the webserver root. ' **** See readme.txt for further information ' **** the following line would be used ONLY if you use a system DSN! ' conn.Open "guestbook" SQLstmt = "INSERT INTO Guestbook (Name,City,State,Country,Email,URL,Comments)" SQLstmt = SQLstmt & " VALUES (" SQLstmt = SQLstmt & "'" & Name & "'," SQLstmt = SQLstmt & "'" & City & "'," SQLstmt = SQLstmt & "'" & State & "'," SQLstmt = SQLstmt & "'" & Country & "'," SQLstmt = SQLstmt & "'" & Email & "'," SQLstmt = SQLstmt & "'" & URL & "'," SQLstmt = SQLstmt & "'" & Comments & "'" SQLstmt = SQLstmt & ")" Set RS = conn.execute(SQLstmt) If err.number>0 then response.write "VBScript Errors Occured:" & "

" response.write "Error Number=" & err.number & "

" response.write "Error Descr.=" & err.description & "

" response.write "Help Context=" & err.helpcontext & "

" response.write "Help Path=" & err.helppath & "

" response.write "Native Error=" & err.nativeerror & "

" response.write "Source=" & err.source & "

" response.write "SQLState=" & err.sqlstate & "

" end if IF conn.errors.count> 0 then response.write "Database Errors Occured" & "

" response.write SQLstmt & "

" for counter= 0 to conn.errors.count response.write "Error #" & conn.errors(counter).number & "

" response.write "Error desc. -> " & conn.errors(counter).description & "

" next else response.write "

" response.write "¡Gracias! Tu mensage ha sido añadido.

" response.write "" response.write "Ver el Libro de visitas" end if Conn.Close Set conn = nothing ' ***************************************************************** ' The following section of code sends email to the guestbook owner ' when somebody signs the guestbook. If you don't want this feature, ' just remove this block. Please note that this will ONLY work on ' NT SERVER with built-in SMTP!! On other systems, please see ' http://www.attitude.com/users/kathi/asp/tools.html for a list of ' components, including email components ' ****************************************************************** Set Mail = Server.CreateObject("Persits.MailSender") Mail.Host = "smtp.saasturias.com" 'next line is optional, default value is 25. Uncomment to enable 'Mail.Port = 25 ' get the sender's address, and if empty, put your own If request("Email")="" then Sender = "asociacion@saasturias.com" ' put your email address here Else Sender = request("Email") End If Mail.From = Sender Mail.AddAddress "asociacion@saasturias.com" ' put YOUR email address here Mail.Subject = "Alguien ha firmado tu Libro de Visitas" ' you can change this to whatever you'd like Msg = "Name: " & request("name") & Chr(10) Msg = Msg & "City: " & request("city") & Chr(10) Msg = Msg & "State: " & request("State") & Chr(10) Msg = Msg & "Country: " & request("Country") & Chr(10) Msg = Msg & "URL: " & URL & Chr(10) Msg = Msg & "Comments:" & Chr(10) Msg = Msg & request("Comments") Mail.Body = Msg On Error Resume Next Mail.Send If Err <> 0 Then Response.Write "Error encountered: " & Err.Description End If Set Mail = Nothing End If %>