% 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 "