📄 admin_email_notify_configure.asp
字号:
<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="admin_common.asp" -->
<%
'****************************************************************************************
'** Copyright Notice
'**
'** Web Wiz Forums(TM)
'** http://www.webwizforums.com
'**
'** Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved.
'**
'** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'**
'** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE
'** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'** AND DERIVATIVE WORKS IMMEDIATELY.
'**
'** If you have not received a copy of the license with this work then a copy of the latest
'** license contract can be found at:-
'**
'** http://www.webwizguide.com/license
'**
'** For more information about this software and for licensing information please contact
'** 'Web Wiz' at the address and website below:-
'**
'** Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'** http://www.webwizguide.com
'**
'** Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************
'*************************** SOFTWARE AND CODE MODIFICATIONS ****************************
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************
'Set the response buffer to true
Response.Buffer = True
'Dimension variables
Dim strMode 'Holds the mode of the page, set to true if changes are to be made to the database
Dim strAdminEmail 'Holds the forum adminsters email
Dim blnEmailNotify 'Set to true to turn email notify on
Dim blnMailActivate 'Set to true if the user wants membership to be activated by email
Dim blnEmailClient 'set to true if the email client is enalbed
'Initialise variables
blnEmailNotify = False
'Read in the details from the form
strMailComponent = Request.Form("component")
strMailServer = Request.Form("mailServer")
strMailServerUser = Request.Form("mailServerUser")
strMailServerPass = Request.Form("mailServerPass")
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"))
blnMemberApprove = Cbool(Request.Form("adminApp"))
'Initialise the SQL variable with an SQL statement to get the configuration details from the database
strSQL = "SELECT " & strDbTable & "Configuration.* From " & strDbTable & "Configuration WHERE " & strDbTable & "Configuration.ID=1;"
'Set the cursor type property of the record set to Dynamic so we can navigate through the record set
rsCommon.CursorType = 2
'Set the Lock Type for the records so that the record set is only locked when it is updated
rsCommon.LockType = 3
'Query the database
rsCommon.Open strSQL, adoCon
'If the user is changing the email setup then update the database
If Request.Form("postBack") Then
With rsCommon
'Update the recordset
If blnDemoMode = False Then
.Fields("mail_component") = strMailComponent
.Fields("mail_server") = strMailServer
.Fields("website_name") = strWebSiteName
.Fields("forum_path") = strForumPath
.Fields("forum_email_address") = strAdminEmail
.Fields("email_notify") = blnEmailNotify
.Fields("Email_post") = blnSendPost
.Fields("Email_activate") = blnMailActivate
.Fields("Email_sys") = blnEmailClient
.Fields("Mail_username") = strMailServerUser
.Fields("Mail_password") = strMailServerPass
.Fields("Member_approve") = blnMemberApprove
'Update the database with the new user's details
.Update
End If
'Re-run the query to read in the updated recordset from the database
.Requery
End With
'Update variables
Application(strAppPrefix & "strMailComponent") = strMailComponent
Application(strAppPrefix & "strMailServer") = strMailServer
Application(strAppPrefix & "strWebsiteName") = strWebSiteName
Application(strAppPrefix & "strForumPath") = strForumPath
Application(strAppPrefix & "strForumEmailAddress") = strAdminEmail
Application(strAppPrefix & "blnEmail") = blnEmailNotify
Application(strAppPrefix & "blnSendPost") = blnSendPost
Application(strAppPrefix & "blnEmailActivation") = blnMailActivate
Application(strAppPrefix & "blnEmailMessenger") = blnEmailClient
Application(strAppPrefix & "strMailServerUser") = strMailServerUser
Application(strAppPrefix & "strMailServerPass") = strMailServerPass
Application(strAppPrefix & "blnMemberApprove") = blnMemberApprove
'Empty the application level variable so that the changes made are seen in the main forum
Application(strAppPrefix & "blnConfigurationSet") = false
End If
'Read in the deatils from the database
If NOT rsCommon.EOF Then
'Read in the e-mail setup from the database
strMailComponent = rsCommon("mail_component")
strMailServer = rsCommon("mail_server")
strWebSiteName = rsCommon("website_name")
strForumPath = rsCommon("forum_path")
strAdminEmail = rsCommon("forum_email_address")
blnEmailNotify = CBool(rsCommon("email_notify"))
blnSendPost = CBool(rsCommon("Email_post"))
blnMailActivate = CBool(rsCommon("Email_activate"))
blnEmailClient = CBool(rsCommon("Email_sys"))
strMailServerUser = rsCommon("Mail_username")
strMailServerPass = rsCommon("Mail_password")
blnMemberApprove = CBool(rsCommon("Member_approve"))
End If
'Release Server Objects
rsCommon.Close
Call closeDatabase()
%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title>Email Settings</title>
<meta name="generator" content="Web Wiz Forums" />
<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write("<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->" & vbCrLf & vbCrLf)
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>
<!-- Check the from is filled in correctly before submitting -->
<script language="JavaScript" type="text/javascript">
//Function to check form is filled in correctly before submitting
function CheckForm () {
//Check for a mail server
if (((document.frmEmailsetup.component.value=="AspEmail") || (document.frmEmailsetup.component.value=="Jmail")) && (document.frmEmailsetup.mailServer.value=="")){
alert("Please enter an working incoming mail server \nWithout one the Jmail/AspEmail component will fail");
document.frmEmailsetup.mailServer.focus();
return false;
}
//Check for a website name
if (document.frmEmailsetup.siteName.value==""){
alert("Please enter your Website Name");
document.frmEmailsetup.siteName.focus();
return false;
}
//Check for a path to the forum
if (document.frmEmailsetup.forumPath.value==""){
alert("Please enter the Web Address path to the Forum");
document.frmEmailsetup.forumPath.focus();
return false;
}
//Check for an email address
if (document.frmEmailsetup.email.value==""){
alert("Please enter your E-mail Address");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -