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

📄 emailnotify.asp

📁 电子商务网络购物系统
💻 ASP
字号:
<% Option Explicit %>
<!--#include file="conn.asp" -->
<%
Dim strMode
Dim strMailComponent
Dim strMailServer
Dim strWebSiteName
Dim strForumPath 
Dim strAdminEmail 
Dim blnEmailNotify
Dim blnSendPost
Dim blnMailActivate
Dim blnEmailClient

blnEmailNotify = False

strMailComponent = Request.Form("component")
strMailServer = Request.Form("mailServer")
strWebSiteName = Request.Form("siteName")
strForumPath = Request.Form("forumPath")
strAdminEmail = Request.Form("email")
blnEmailNotify = CBool(Request.Form("userNotify"))
blnSendPost = CBool(Request.Form("sendPost"))
blnMailActivate = CBool(Request.Form("mailActvate"))
blnEmailClient = CBool(Request.Form("client"))
strMode = Request.Form("mode")

strSQL = "SELECT timescfg.* From timescfg;"
rsConn.CursorType = 2
rsConn.LockType = 3
rsConn.Open strSQL, adoCon
If strMode = "postBack" Then

	With rsConn
		.Fields("mailcomponent") = strMailComponent
		.Fields("smtpserver") = strMailServer
		.Fields("sitename") = strWebSiteName
		.Fields("bbspath") = strForumPath
		.Fields("masteremail") = strAdminEmail
		.Fields("enotify") = blnEmailNotify
		.Fields("mailpost") = blnSendPost
		.Fields("eactivate") = blnMailActivate
		.Fields("mailsys") = blnEmailClient
		.Update
		.Requery
	End With
End If

If NOT rsConn.EOF Then
	strMailComponent = rsConn("mailcomponent")
	strMailServer = rsConn("smtpserver")
	strWebSiteName = rsConn("sitename")
	strForumPath = rsConn("bbspath")
	strAdminEmail = rsConn("masteremail")
	blnEmailNotify = CBool(rsConn("enotify"))
	blnSendPost = CBool(rsConn("mailpost"))
	blnMailActivate = CBool(rsConn("eactivate"))
	blnEmailClient = CBool(rsConn("mailsys"))
End If
rsConn.Close
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
%>

<html>
<head>
<title>电子邮件通知设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script  language="JavaScript">
<!-- Hide from older browsers...

function CheckForm () {
	if (((document.frmEmailsetup.component.value=="AspEmail") || (document.frmEmailsetup.component.value=="Jmail")) && (document.frmEmailsetup.mailServer.value=="")){
		alert("请输入邮件服务器地址 \n否则 Jmail/AspEmail 组件无法工作");
		document.frmEmailsetup.mailServer.focus();
		return false;
	}
	if (document.frmEmailsetup.siteName.value==""){
		alert("请输入网站名称");
		document.frmEmailsetup.siteName.focus();
		return false;
	}
	if (document.frmEmailsetup.forumPath.value==""){
		alert("请输入网站地址");
		document.frmEmailsetup.forumPath.focus();
		return false;
	}
	if (document.frmEmailsetup.email.value==""){
		alert("请输入邮箱地址");
		document.frmEmailsetup.email.focus();
		return false;
	}
	if (document.frmEmailsetup.email.value.length>0&&(document.frmEmailsetup.email.value.indexOf("@",0)==-1||document.frmEmailsetup.email.value.indexOf(".",0)==-1)) {
		alert("请输入一个有效的邮箱地址\n否则邮件同志将不能使用");
		document.frmEmailsetup.email.focus();
		return false;
	}
	return true
}
// -->
</script>
<link href="includes/style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><span class="heading">电子邮件通知设置</span><br>
  <br />
  <a href="menu.asp" target="_self">返回到管理主菜单</a><br>
  <br />
 <br />
 <table width="96%" border="0" cellspacing="1" cellpadding="4" bgcolor="#000000">
  <tr> 
      <td align="center" bgcolor="#CCCCCC" class="lgText"> 注意!</td>
  </tr>
  <tr> 
   <td bgcolor="#EFEFEF"> <p class="text">要是用此项功能,你的服务器必须安装 <span class="bold">CDONTS</span>, 
          <span class="bold">CDOSYS</span>, <span class="bold">W3 JMail</span>, 
          <span class="bold">Persists AspEmail</span>, or <span class="bold">SeverObject 
          AspMail</span> 中的任何一种组件,请和你的空间商联系<br>
          <br />
        </p>
        </td>
  </tr>
 </table>
</div>
<form method="post" name="frmEmailsetup" action="emailnotify.asp" onSubmit="return CheckForm();">
 <table width="560" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#000000" height="277">
  <tr> 
   <td height="234" width="560"> <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1">
     <tr align="left" bgcolor="#CCCCCC"> 
            <td colspan="2" class="text">*必填项</td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">使用的邮件组件:<br>
            </td>
      <td width="41%" valign="top"> <select name="component">
        <option value="CDOSYS"<% If strMailComponent = "CDOSYS" Then Response.Write(" selected") %>>CDOSYS (Win2k/XP Pro)</option>
        <option value="CDONTS"<% If strMailComponent = "CDONTS" Then Response.Write(" selected") %>>CDONTS (NT4/Win2k)</option>
        <option value="Jmail"<% If strMailComponent = "Jmail" Then Response.Write(" selected") %>>JMail</option>
        <option value="AspEmail"<% If strMailComponent = "AspEmail" Then Response.Write(" selected") %>>AspEmail</option>
        <option value="AspMail"<% If strMailComponent = "AspMail" Then Response.Write(" selected") %>>AspMail</option>
       </select> </td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">SMTP邮件服务器 (<b>CDONTS不需要</b>):<br />
            </td>
      <td width="41%" valign="top"> <input type="text" name="mailServer" maxlength="50" value="<% = strMailServer %>" size="30" > <br /> <span class="text">(eg. mail.myweb.com)</span></td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">站点名称*<br>
              <span class="smText">eg.http://www.mywebsite.com </span><br />
            </td>
      <td width="41%" valign="top"> <input type="text" name="siteName" maxlength="50" value="<% = strWebsiteName %>" size="30" > </td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">论坛地址*<span class="smText"><br>
       eg. http://www.mywebsite.com/forum </span></td>
      <td width="41%" valign="top"> <input type="text" name="forumPath" maxlength="50" value="<% = strForumPath %>" size="30" > </td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">你的电子信箱* <br />
              <br /> </td>
      <td width="41%" valign="top"> <input type="text" name="email" maxlength="50" value="<% = strAdminEmail %>" size="30"> &nbsp;</td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">电子邮件通知<br />
              <span class="smText">允许有新回复时通知用户 </Span></td>
      <td width="41%" valign="top" class="text">On 
       <input type="radio" name="userNotify" value="True" <% If blnEmailNotify = True Then Response.Write "checked" %>> &nbsp;&nbsp;Off 
       <input type="radio" name="userNotify" value="False" <% If blnEmailNotify = False Then Response.Write "checked" %>> </td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">邮寄主题<br />
              <span class="smText">把整个主题发到你的信箱</span></td>
      <td width="41%" valign="top" class="text">On 
       <input type="radio" name="sendPost" value="True" <% If blnSendPost = True Then Response.Write "checked" %>> &nbsp;&nbsp;Off 
       <input type="radio" name="sendPost" value="False" <% If blnSendPost = False Then Response.Write "checked" %>> </td>
     </tr>
     <tr  bgcolor="#FFFFFF">
            <td align="left" class="text">邮件激活账号<br />
            </td>
      <td valign="top" class="text">On 
       <input type="radio" name="mailActvate" value="True" <% If blnMailActivate = True Then Response.Write "checked" %>> &nbsp;&nbsp;Off 
       <input type="radio" name="mailActvate" value="False" <% If blnMailActivate = False Then Response.Write "checked" %>></td>
     </tr>
     <tr  bgcolor="#FFFFFF"> 
            <td width="59%" align="left" class="text">内建邮件客户<br />
              <span class="smText">允许会员之间在论坛内部发送E-mail</span></td>
      <td width="41%" valign="top" class="text">On 
       <input type="radio" name="client" value="True" <% If blnEmailClient = True Then Response.Write "checked" %>> &nbsp;&nbsp;Off 
       <input type="radio" name="client" value="False" <% If blnEmailClient = False Then Response.Write "checked" %>> </td>
     </tr>
     <tr bgcolor="#FFFFFF" align="center"> 
      <td valign="top" colspan="2" > <p> 
        <input type="hidden" name="mode" value="postBack">
        <input type="submit" name="Submit" value="确定">
        <input type="reset" name="Reset" value="清除">
       </p></td>
     </tr>
    </table></td>
  </tr>
 </table>
</form>
<br />
</body>
</html>

⌨️ 快捷键说明

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