Search |
|
|
|
|
|
|
<%
If Request("name") = "" and Request("em") = "" then
%>
Welcome to www.rainwaterharvesting.org, a comprehensive knowledge gateway to the people, technologies and issues concerning rainwater harvesting.
|
Please take a few minutes to tell us a little about yourself. After you fill this form and click submit, you will be taken to CSE’s Rainwater Harvesting site.
Have you registered with us before? Just enter your E-mail and click submit.
|
|
<%
End if
If Request("name") <> "" then
set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open application("ConnectionString")
strTitle = Request("radio1")
strName = Request("name")
strEmail = Request("email")
strOccupation = Request("occupation")
strOther = Request("other")
strOrganisation = Request("organisation")
strAddType = Request("radio2")
strAddress = Request("add")
strTelephone = Request("tel")
str = "Name: " &strTitle& " " &strName
str = str & vbCr
str = str & "E-mail address: " &strEmail
str = str & vbCr
If Request("occupation") <> "" then
str = str & "Occupation: " &strOccupation
else
str = str & "Occupation: " &strOther
End if
str = str &vbCr
str = str &"Name of organisation: " &strOrganisation
str = str &vbCr
str = str &strAddType &" Address: "& strAddress
str = str &vbCr
str = str &"Telephone: " &strTelephone
Set rsInsert = Server.CreateObject("ADODB.RecordSet")
If lcase(strAddType) = "office" then
rsInsert.open "Insert into user_registration(title,name,email,occupation,organisation_name,office_address,telephone,date) values('" &strTitle& "','" &strName& "','" &strEmail& "','" &strOccupation& "','" &strOrganisation& "','" &strAddress& "','" &strTelephone& "','" &date& "')",objConn,3,3
Else
rsInsert.open "Insert into user_registration(title,name,email,occupation,organisation_name,residential_address,telephone,date) values('" &strTitle& "','" &strName& "','" &strEmail& "','" &strOccupation& "','" &strOrganisation& "','" &strAddress& "','" &strTelephone& "','" &date& "')",objConn,3,3
End if
Dim MyCDONTSMail
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= strEmail
MyCDONTSMail.To= "cse@cseindia.org"
MyCDONTSMail.Cc= "database@cseindia.org,water@cseindia.org"
MyCDONTSMail.Subject="Rainwater Harvesting Feedback"
MyCDONTSMail.Body = str
MyCDONTSMail.Send
set MyCDONTSMail=nothing
' Set Mail1 = Server.CreateObject("SMTPsvg.Mailer")
' Mail1.RemoteHost = "203.200.89.160" '"216.198.217.27" '"216.198.217.40"
' Mail1.FromAddress = strEmail
' Mail1.AddRecipient "cse","cse@cseindia.org"
' Mail1.AddRecipient "database","database@cseindia.org"
' Mail1.AddRecipient "water","water@cseindia.org"
' Mail1.Subject = "Rainwater Harvesting Registration"
'Mail.ContentType = "text/html"
' Mail1.BodyText = str
' Mail1.SendMail
'Set Mail2 = Server.CreateObject("SMTPsvg.Mailer")
'Mail2.RemoteHost = "203.200.89.160" '"216.198.217.27" '"216.198.217.40"
'Mail2.FromAddress = strEmail
'Mail2.AddRecipient "database","database@cseindia.org"
'Mail2.Subject = "Rainwater Harvesting Registration"
'Mail.ContentType = "text/html"
'Mail2.BodyText = str
'Mail2.SendMail
'Set Mail3 = Server.CreateObject("SMTPsvg.Mailer")
'Mail3.RemoteHost = "203.200.89.160" '"216.198.217.27" '"216.198.217.40"
'Mail3.FromAddress = strEmail
'Mail3.AddRecipient "water","water@cseindia.org"
'Mail3.Subject = "Rainwater Harvesting Registration"
'Mail.ContentType = "text/html"
'Mail3.BodyText = str
'Mail3.SendMail
dim url
url = "http://www.rainwaterharvesting.org/" &Request("url")
response.redirect Request("url")
End if
If Request("em") <> "" then
set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open application("ConnectionString")
strEmail = Request("em")
Set rsCheck = Server.CreateObject("ADODB.RecordSet")
sql = "Select count(*) as coun from user_registration where lower(email)='" &lcase(strEmail)& "'"
' response.write sql
RScheck.open sql,ObjConn,3,3
If rsCheck("coun") > 0 Then
dim urlnew
urlnew = "http://www.rainwaterharvesting.org/" &Request("url")
response.redirect urlnew
else
response.write ""
End if
End if
%>
|