⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chkemail.asp

📁 很强大的一款医药管理软件很强大的一款医药管理软件很强大的一款医药管理软件很强大的一款医药管理软件很强大的一款医药管理软件
💻 ASP
字号:
<%
'#################################################################
'# 程序名称:随缘网络邮件订阅系统 V1.0
'# 授权方式:免费软件
'# 作者:随缘网络  QQ:84723090
'# 留言技术支持:http://www.115cn.cn/book
'# 发布时间:2007-9-25
'# 声明:本程序由随缘网络独立自主开发,保留所有版权。
'# 各种用途均可免费使用、自由传播,但必须保留程序代码中的版权信息。
'# 如果您需要更强大的功能可以与我们联系购买商业版!
'# 电话:0592-5983163 13400693163
'#################################################################
%>
<%
dim email
email=request.form("email")
if IsValidEmail(email) then
  if request("action")="取消订阅" then
    response.redirect "del_email.asp?email="&email
  else
    response.redirect "add_email.asp?email="&email
  end if
else
  response.write "无效的电子邮件格式,请按“后退”按钮,重填一个有效的Email"
end if


function IsValidEmail(email)

 dim names, name, i, c

 'Check for valid syntax in an email address.

 IsValidEmail = true
 names = Split(email, "@")
 if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
 end if
 for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
 next
 if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
 end if
 i = Len(names(1)) - InStrRev(names(1), ".")
 if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
 end if
 if InStr(email, "..") > 0 then
   IsValidEmail = false
 end if

end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -