<% 'check for a cookie dim admin admin = Request.Cookies("admin") if Len(admin) <> 0 Then admin = true else response.redirect("login.asp?invalid=1") end if %> Delete Email Addresses from Database <% q = request.form("eaddy") q = trim(q) if len(q) > 1 then q = split(q, vbcrlf) counter = 0 for each emailAddress in q if len(emailAddress) > 5 then removeEaddy emailAddress end if next else %>

Remove Email Addresses



<% end if sub removeEaddy(eaddy) Dim q,phys,dbpath,testing phys = Request.ServerVariables("APPL_PHYSICAL_PATH") if testing = 0 then dbPath = phys & "cgi-bin\cubensis.mdb" else dbPath = phys & "offworld\cubensis\site\newsletter\cube.mdb" end if Dim objConn, objRS thedate = date() Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath Set objRS = Server.CreateObject("ADODB.Recordset") set objRS = objConn.Execute("select eaddy from signups where eaddy like '" & eaddy & "'") if not objRS.eof then set objRS = objConn.Execute("delete * from signups where eaddy like '" & eaddy & "'") response.write eaddy & " - Deleted...
" else response.write eaddy & " - Address Not Found
" end if end sub %>