<%
dim email, pass
email = trim(" " + request.form("txtemail"))
pass = trim(" " + request.form("txtPass1"))
pass2 = trim(" " + request.form("txtPass2"))
if (email = "admin@icce.org" and pass = "iccedtvt") or (email = "diethelm@icce.org" and pass = "diethelm") then
session("email") = "admin@icce.org"
response.redirect("ListRegistrations.asp")
end if
if email = "icce2008@hut-icce.org" and pass = "tamthan" then
session("email") = "icce2008@hut-icce.org"
response.redirect("ListRegistrations.asp")
end if
dim error
error = ""
email = Replace(email,"'","")
pass = Replace(pass,"'","")
If len(email) > 1 Then %>
<%
Set rs = objConn.execute("SELECT * FROM REG_Main WHERE emailaddress='" + email + "';")
if not IsNull(rs) then
IF (rs.EOF) AND (rs.BOF) THEN
rs.close
sql = "INSERT INTO Reg_Main ( emailaddress, [password], fullname, title, Organization, nation, telephone, fax ) SELECT DISTINCT emailaddress, password, FirstName+' '+LastName, title, affiliation, country, phonenumber, faxnumber FROM authors WHERE emailaddress='" + email +"' AND Password='"+ pass+"';"
'response.write(sql)
objConn.execute sql,n
'response.write(n)
if n>0 then
pps = ""
Set rs = objConn.execute("SELECT * FROM FullPapers WHERE emailaddress='" + email + "' AND Status NOT IN ('Reject','Under review');")
if not IsNull(rs) then
IF (not rs.EOF) or (not rs.BOF) THEN
rs.movefirst
do while (not rs.EOF)
pps = pps + cstr(rs.fields("PaperID")) + ","
rs.movenext
loop
rs.close
objConn.execute("UPDATE Reg_Main Set Papers = '" + pps+ "' WHERE Emailaddress = '" + email + "';")
END IF
end if
end if
Set rs = objConn.execute("SELECT * FROM REG_Main WHERE emailaddress='" + email + "';")
END IF
end if
if not IsNull(rs) then
IF (NOT rs.EOF) or (NOT rs.BOF) THEN
rs.movefirst
dim pwd
pwd = rs.fields("password")
if pwd <> pass then
error = "You have provided invalid password. Please try again!"
end if
if error ="" then
if rs.fields("submit") then error = "submited."
end if
pass2 = ""
else
if pass2="" then
error= "You may register for the firstime or provide invalid password! If this is the first time registration, you must provide confirmation password."
else
end if
END IF
else
error= "You have provided invalid username or password. Please try again!"
end if
rs.close
set rs = nothing
if error = "" and pass2<>"" then
objConn.execute("INSERT INTO REG_Main (emailaddress, [password]) VALUES ('" + email + "','" + pass + "'); ")
end if
%>
<%
if error = "submited." then
session("email")=email
response.redirect("PrintReg.asp?mode=edit&email="+email )
end if
if error = "" then
session("email")=email
response.redirect("Registration1.asp?mode=edit&email="+email )
end if
end if
Function IIf(condition,value1,value2)
If condition Then IIf = value1 Else IIf = value2
End Function
%>