%
'----------------------- Variable defination -----------------------
'------------- common------------------
font1 = "font-family=tahoma;"
zfrom_email = ""
photopath="images"
appversion = "1.0"
Session.LCID = 1033 ' mm/dd/yy
zfontsize = session("zfontsize")
web_title = "Minamoto battery"
nu_events_list = 7
bgcolor_A = "#C8D3E6"
bgcolor_B = "#E0DFE3"
'------------- local dev------------------
%>
<%
'On Error Resume Next
'----------------------- database Connection -----------------------
'Dim MyConnSC, rsSC, sqlSC
connn = Server.Mappath("\db_\minamoto.mdb")
' Set MyConnSC = Server.CreateObject("ADODB.Connection")
' MyConnSC.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
' & "Data Source=" & connn & ";"
'----------------------- SQL -----------------------
Function SQLxx(data)
if data <> "" then
SQLxx = Replace( data, "'", "''")
SQLxx = "'" & Replace( SQLxx, """", "" ) & "'"
else
SQLxx = "''"
end if
End Function
'######## Mytime ####################
Function Mytime( Etime)
dteHour = hour(Etime)
dtemin = minute(Etime)
dtesec = second(Etime)
Mytime = dteHour & ":" & dtemin & ":" & dtesec
End Function
'######## MyDate ####################
Function MyDate( Edate )
if Edate <> "" and isdate(Edate) = true then
dteCurrent = Edate
dteDay = Day(dteCurrent)
dteMonth = left(Monthname(month(dteCurrent)),3)
'dteMonth = month(dteCurrent)
dteYear = Year(dteCurrent)
dteHour = hour(dteCurrent)
if len(dteHour)=1 then dteHour = "0"&dteHour
dtemin = minute(dteCurrent)
if len(dtemin)=1 then dtemin = "0"&dtemin
dtesec = second(dteCurrent)
if len(dtesec)=1 then dtesec = "0"&dtesec
'MyDate = dteMonth & "/" & dteDay & "/" & dteYear &" "& dteHour & ":" & dtemin & ":" & dtesec
'MyDate = dteDay & "/" & dteMonth & "/" & dteYear &" "& dteHour & ":" & dtemin & ":" & dtesec
MyDate = dteMonth & "/" & dteDay & "/" & dteYear &" "& dteHour & ":" & dtemin & ":" & dtesec
else
end if
End Function
'######## MyDate1 ####################
Function MyDate1( Edate )
if Edate <> "" and isdate(Edate) = true then
dteCurrent = Edate
dteDay = Day(dteCurrent)
'dteMonth = left(Monthname(month(dteCurrent)),3)
dteMonth = Monthname(month(dteCurrent))
dteYear = Year(dteCurrent)
'MyDate1 = dteMonth & "/" & dteDay & "/" & dteYear
MyDate1 = dteDay & " " & left(dteMonth,3) & ", " & dteYear
'MyDate1 = month(dteCurrent) & " " & dteDay & "," & dteYear
else
end if
End Function
'######## MyDate2 ####################
Function MyDate2( Edate )
if Edate <> "" and isdate(Edate) = true then
dteCurrent = Edate
dteDay = Day(dteCurrent)
dteMonth = left(Monthname(month(dteCurrent)),3)
'dteMonth = Monthname(month(dteCurrent))
dteYear = Year(dteCurrent)
'MyDate1 = dteMonth & "/" & dteDay & "/" & dteYear
MyDate2 = dteDay & "-" & dteMonth & "-" & dteYear
else
end if
End Function
'############## goback ################
Function goback()
'Go Back
'Response.Write ""
Response.Write "
"
End Function
'############## goback
'------------ display error message --------- start
Function showerrormsg(data)
showerrormsg = "
"& replace(email_header,vbcrlf,"
") &"
| " strBody = strBody & " | "& event_title strBody = strBody & " |
| Event Date: " strBody = strBody & " | "& mydate2(event_date) strBody = strBody & " |
| Registration Date: " strBody = strBody & " | "& mydate2(this_reg_date) if this_this_join = "yes" then strBody = strBody & " |
| Yes, I want to join this event;"
if this_no_of_member_children <> "" or this_no_of_member_children = 0 then strBody = strBody & " "& this_no_of_member_children &" children will join" if this_no_of_spouse <> "" then strBody = strBody & " My spouse will join" if this_no_of_guest <> "" then strBody = strBody & " "& this_no_of_guest &" guest will join" if this_no_of_guest_children <> "" then strBody = strBody & " "& this_no_of_guest_children &" guest children will join" else strBody = strBody & " | |
| No, I regret I cannot attend." end if strBody = strBody & " |
"& replace(email_footer,vbcrlf,"
") &"
"& rnd(12345678) &"
" sqlto1="Select * from tbl_members where memberid ="&session("clientid")&"" Set rsto1=MyConnSC.Execute(sqlto1) If rsto1.eof = false then zto = rsto1("email") else zto = session("clientid") end if zfrom = zfrom_email zsubject = "Confirmation of "& web_title &" event - "& event_title zbody = strBody '@ 'response.Write zsubject '----------- for Win XP ----------- Set objCDOMail = CreateObject("CDO.Message") '----------- for Win 2000 ----------- 'Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = zfrom objCDOMail.To = zto objCDOMail.Cc = zcc objCDOMail.bCc = zbcc objCDOMail.Subject = zsubject '----------- for Win XP ----------- objCDOMail.HTMLBody = zbody '----------- for Win 2000 ----------- 'objCDOMail.body = zbody 'if zto <> "" then objCDOMail.Send 'else 'end if Set objCDOMail = Nothing '@ 'response.Write "