%@ Language=VBScript %>
<%
errjmeno = "0"
errprijmeni = "0"
errptelefon = "0"
erradresa = "0"
errtelefon = "0"
errmesto = "0"
errpsc = "0"
errptel2 = "0"
errtel2 = "0"
sending = Request.Form("sending")
if sending <> "" then
jmeno = Request.Form("jmeno")
prijmeni = Request.Form("prijmeni")
adresa = Request.Form("adresa")
email = Request.Form("email")
pozns = Request.Form("pozns")
OK = true
if (jmeno = "") then
OK = false
chyba = "Enter your first name, please."
errjmeno = "1"
end if
if (OK = true) AND (prijmeni = "") then
OK = false
chyba = "Enter your surname, please."
errprijmeni = "1a"
end if
if (OK = true) AND (email = "") then
OK = false
chyba = "Enter your e-mail address, please."
erradresa = "1"
end if
end if
%>
PRAGUE SEGWAY TOUR
<% if (OK = false) then %>
<%= chyba %>
<% end if %>
<% if (OK = false) OR (sending = "") then%>Fields with mark are mandatory.<% end if%>
<% if (OK = true) AND (sending <> "") then
Set objNewMail = CreateObject("CDONTS.NewMail") ' creating of the new mail object
If Err <> 0 Then
Response.Write("
ERROR
Problem with mail subject.
")
Response.End
Else
m = "Dotaz na PRAGUE CITY TOUR" & vbNewLine
m = m + "----------------------------------------------------" & vbNewLine
m = m & "Dotaz na PRAGUE CITY TOUR." & vbNewLine
m = m & "----------------------------------------------------" & vbNewLine
m = m & "Jméno: " & jmeno & vbNewLine
m = m & "Příjmení: " & prijmeni & vbNewLine
m = m & "Ulice, číslo: " & email & " " & cp & vbNewLine
if pozns <> "" then
m = m & vbNewLine & "Dotaz: " & vbNewLine & pozns & vbNewLine
end if
objNewMail.From="citytour@segway-cz.com" ' E-mail odesilatele
objNewMail.To="citytour@segway-cz.com" ' E-mail prijemce
objNewMail.Subject="Dotaz na PRAGUE CITY TOUR" ' Subject
objNewMail.BodyFormat = 1 ' Format tela dopisu (0 = HTML, 1 = text)
objNewMail.MailFormat = 1 ' Forma mailu (0 = MIME, 1 = text)
objNewMail.Importance = 2 ' (0 = low, 1 = normal, 2 = high)
objNewMail.Body = m ' Text zpravy
End If
On Error Resume Next
objNewMail.send ' Odeslani mailu
If Err <> 0 Then
Response.Write("
ERROR
Problem with sending your message. Sorry. Try it later.
")
Response.End
End If
Set objNewMail = Nothing
%>