<% DBPath = "c:\webdb\cmi_test.mdb" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&DBPath&";UID=admin;PWD=;" if request("do") = "logout" then Session("CMIuserid") = "" Session("CMIuser_key") = 0 Session("CMItype") = "" Session("CMIusertype") = "" Session("CMIusername") = "" Session("issues") = "" response.redirect("login.asp") end if if request("do") = "login" then if UCASE(trim(Request("id"))) = "CMI!" and UCASE(trim(Request("password"))) = "CMILOGIN" then Session("CMIuserid") = "cmilogin" Session("CMIuser_key") = 1 Session("CMItype") = "admin" Session("CMIusertype") = "a" Session("CMIusername") = "Administrator" Session("issues") = "hideclosed" Session("WSID") = "80FCD777FCBE" response.redirect("admin/admin_menu.asp") end if Set RS = Server.CreateObject("ADODB.RecordSet") str1 = "select * from user where userid = '"&UCASE(request.form("id"))&"'" RS.Open str1, Conn if RS.EOF then response.redirect("login2.htm") end if Set FS = Server.CreateObject("ADODB.RecordSet") str1 = "select user_key from quote where user_key = "&RS("user_key") FS.Open str1, Conn if UCASE(request.form("password")) = UCASE(RS("password")) then Session("CMIuserid") = UCASE(Request("id")) Session("CMIuser_key") = RS("user_key") Session("CMItype") = RS("type") Session("CMIusertype") = RS("usertype") Session("CMIusername") = RS("contact_name") Session("WSID") = RS("wsownerkey") Session("issues") = "hideclosed" if Session("CMIusertype") = "m" then response.redirect("managers/manager_menu.asp") if not FS.EOF then response.redirect("client_area/client_menu.asp") else response.redirect("client_area/quote.asp") end if else response.redirect("login2.htm") end if end if if UCASE(trim(request.form("T11"))) = "CMI!" then response.redirect("registration.asp?action=taken2&T1="&request("T1")&"&T2="&request("T2")&"&T3="&request("T3")&"&T4="&request("T4")&"&T5="&request("T5")&"&T6="&request("T6")&"&T7="&request("T7")&"&T8="&request("T8")&"&T9="&request("T9")&"&T10="&request("T10")&"&T13="&request("T13")&"T14="&request("T14")&"&type="&request("type")) Set DS = Server.CreateObject("ADODB.RecordSet") str1 = "select userid from user where userid = '"&UCASE(request.form("T11"))&"'" DS.Open str1, Conn if not DS.EOF then response.redirect("registration.asp?action=taken2&T1="&request("T1")&"&T2="&request("T2")&"&T3="&request("T3")&"&T4="&request("T4")&"&T5="&request("T5")&"&T6="&request("T6")&"&T7="&request("T7")&"&T8="&request("T8")&"&T9="&request("T9")&"&T10="&request("T10")&"&T13="&request("T13")&"T14="&request("T14")&"&type="&request("type")) end if RANDOMIZE password1 = INT((RND*8999)+1000) 'password1 = INT((RND*89999999)+10000000) if request.form("letter") = "true" then letter = true else letter = false qrystring = "insert into user (userid, password, company_name, contact_name, contact_title, address1, address2, city, state, zip, phone, fax, type, letter, email, altemail, usertype) VALUES ('" name1 = REPLACE(request.form("T11"),"'","'") qrystring = qrystring&UCASE(name1)&"', '" qrystring = qrystring&password1&"', '" name1 = REPLACE(request.form("T1"),"'","'") qrystring = qrystring&name1&"', '" name1 = REPLACE(request.form("T2"),"'","'") qrystring = qrystring&name1&"', '" name1 = REPLACE(request.form("T13"),"'","'") qrystring = qrystring&name1&"', '" name1 = REPLACE(request.form("T3"),"'","'") qrystring = qrystring&name1&"', '" name1 = REPLACE(request.form("T4"),"'","'") qrystring = qrystring&name1&"', '" name1 = REPLACE(request.form("T5"),"'","'") qrystring = qrystring&name1&"', '" qrystring = qrystring&request.form("T6")&"', '" qrystring = qrystring&request.form("T7")&"', '" qrystring = qrystring&request.form("T8")&"', '" qrystring = qrystring&request.form("T9")&"', '" qrystring = qrystring&request.form("type")&"', " qrystring = qrystring&letter&", '" qrystring = qrystring&request.form("T10")&"', '" qrystring = qrystring&request.form("T14")&"', 'l')" Conn.Execute qrystring Set JMail=Server.CreateObject("JMail.Message") JMail.MailServerPassword = "jmailsend" JMail.MailServerUserName = "webmaster@compliancemanagers.com" JMail.From = "webmaster@compliancemanagers.com" 'JMail.ContentType = "text/html" JMail.Silent = true JMail.ReplyTo = "webmaster@compliancemanagers.com" JMail.Subject = "Confirmation of Registration at ComplianceManagers.com" JMail.Priority = 3 JMail.AddRecipient request.form("T10") contentId = jmail.AddAttachment("c:\webs\cmi\Secure\compliancemanagers_02.gif") JMail.AppendHTML ""&vbcrlf JMail.AppendHTML "

" JMail.AppendHTML "Thank you for registering with ComplianceManagers.com. You have taken the first step to improving your company's ability to comply with your chosen standards. Your information will be shared only between Compliance Managers LLC and yourself. The next step is to determine the cost of Compliance Managers LLC to manage your ISO system. In order to do that, you'll need to log on again." JMail.AppendHTML "

"&vbcrlf&vbcrlf JMail.AppendHTML "http://www.compliancemanagers.com/login.asp

"&vbcrlf&vbcrlf JMail.AppendHTML "User ID: "&UCASE(request.form("T11"))&"
"&vbcrlf JMail.AppendHTML "Your temporary password is: "&password1&"

"&vbcrlf&vbcrlf JMail.AppendHTML "You'll be asked to immediately change your password just after you login. Thank you for considering Compliance Managers for your training and consulting resource regarding ISO services. Feel free to contact us at any time using the following contact information." JMail.AppendHTML "

"&vbcrlf&vbcrlf JMail.AppendHTML "Best Regards,

"&vbcrlf&vbcrlf JMail.AppendHTML "Russell Cromer
"&vbcrlf JMail.AppendHTML "Compliance Managers LLC
"&vbcrlf JMail.AppendHTML "rcromer@compliancemanagers.com
"&vbcrlf JMail.AppendHTML "Fax: 517.552.9498
"&vbcrlf JMail.AppendHTML "Phone: 734.634.4890
"&vbcrlf JMail.Send("mail.netdatum.net") Session("CMIuserid") = "" Session("CMIuser_key") = "" Session("CMItype") = "" Session("CMIusertype") = "" Session("CMIusername") = "" response.redirect("thankyou.htm") %>