<% '*********************************************************************** '******* XcInfoBase Copyright 2000 XCENT www.xcent.com ************** '*********************************************************************** sCMD = UCase(Trim(RequestValue("CMD"))) sName = Trim(RequestValue("NAME")) sEmail = Trim(RequestValue("EMAIL")) If Len(Trim(sEmail)) = 0 Then sEmail = Trim(Request.Cookies("XcentEmail")) End If sErr = "" Select Case sCMD Case "ADD": If Len(sName) = 0 Then sErr = sErr & "Your name is required. " End If If Len(sEmail) = 0 Then sErr = sErr & "Your email address is required. " End If If Len(Trim(sErr)) = 0 Then SendForm Else AddForm End If Case Else AddForm End Select Sub SendForm OpenDBConn sSQL = "SELECT * FROM tblIBNotify WHERE notEmail = " & SQLStr(sEmail) Set rsEmail = gobjConn.Execute(sSQL) If Not rsEmail.Eof Then sAction = "Removed" sSQL = "DELETE FROM tblIBNotify WHERE notEmail = " & SQLStr(sEmail) gobjConn.Execute sSQL Else sAction = "Added" sSQL = "INSERT INTO tblIBNotify (notEmail, notName) VALUES (" & _ SQLStr(sEmail) & ", " & _ SQLStr(sName) & ") " gobjConn.Execute sSQL End If rsEmail.Close Set rsEmail = Nothing sBaseName = "Notifications for " DoPageHeader Response.Write("
") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
" & sBaseName & gsInfoBaseName & "
") ShowHTMLFile "XcIBRegNotify" & sAction & ".htm" Response.Write("
Email Address:" & sEmail & "
") ShowNavigationBar Response.Write("
") DoPageFooter Response.Flush CloseDBConn End Sub Sub AddForm DoPageHeader sRootNav = "" sBaseName = "Notifications for " Response.Write("
") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") If Len(Trim(sErr)) > 0 Then Response.Write("") End If Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
" & sRootNav & "
" & sBaseName & gsInfoBaseName & "
") ShowHTMLFile "XcIBRegNotify.htm" Response.Write("
" & sErr & "
Your Name: 
Your Email: 
  
") ShowNavigationBar Response.Write("
") DoPageFooter sCrLf = Chr(13) & Chr(10) Response.Write(sCrLf & "" & sCrLf ) End Sub %>