%@ LANGUAGE="VBSCRIPT" %> <% ' ######## Check to make Sure they have logged in ########### if Session("logged") <> "true" then Response.Redirect "bottom.asp" %> <% accessdb="message" cn="driver={Microsoft Access Driver (*.mdb)};" cn=cn & "dbq=" & server.mappath(accessdb) set my_conn= Server.CreateObject("ADODB.Connection") my_Conn.Open cn fp_Sqry = "Select mem_name From user where (f_name = '" & Session("uname") & "')" set usrname=my_conn.Execute (fp_sqry) %> <% 'get Multiple email addresses from To dim contactstring, x, y, ptr, contactArray(25) contactstring = Request.Form("to") contactstring = contactstring & "," y = 0 'index of contactArray() ptr= 1 for x = 1 to len(contactstring) if mid(contactstring,x,1) = "," then contactArray(y) = Trim(mid(contactstring,ptr,x-ptr)) ptr= x +1 y = y + 1 end if next 'get Multiple email addresses from Cc dim ccArray(15) contactstring = Request.Form("cc") contactstring = contactstring & "," ccy = 0 'index of ccArray() ptr= 1 for x = 1 to len(contactstring) if mid(contactstring,x,1) = "," then ccArray(y) = Trim(mid(contactstring,ptr,x-ptr)) ptr= x +1 ccy = ccy + 1 end if next %> <% ' ####### Check to See if Cc Exsisits If Request.Form("cc") <> "" then for x = 0 to 10 if contactArray(x) <> "" then fp_Sqry = "Select mem_name From user where mem_name = '" & ccArray(x) & "'" set ccRS=my_conn.Execute (fp_sqry) If ccRS.BOF and ccRS.EOF then No_TOc = "true" Else No_TOc = "false" End If End if next End If ' ######## Check to See if Recipient Exsists for x = 0 to 25 if contactArray(x) <> "" then fp_Sqry = "Select mem_name From user where mem_name = '" & contactArray(x) & "'" set RS=my_conn.Execute (fp_sqry) If RS.BOF and RS.EOF then No_TO = "true" Else No_TO = "false" End If End if next ' ######## Check to See if class Exsists If Request.Form("class") <> "" then fp_Sqry = "Select class From user where (class = '" & Request.Form("class") & "')" set RS=my_conn.Execute (fp_sqry) If RS.BOF and RS.EOF then No_grp = "true" Else No_grp = "false" End If End If %>
Sorry! The
Recipient Was unknown.
Please use your browsers 'back' button to try again
Your Message has been Sent
What would you like to do:
1. Go to Inbox
<% End If %> <% ' ######## Close Database ############## Set RS = nothing set to_name=nothing %>