I'm not database orentated so could someone please give me a clue about
this.
Do I need SQL installed for this to work?
KW
<%
' Set the variables below to match your mail server configuration
Domain = "themallshop.net"
Alias = "mail.themallshop.net"
UserDir = "c:\accounts"
IMailServerURL = "http://themallshop.net:8080"
AccessMDB = "c:\db\imail.mdb"
SQLConnect="DSN=IMAIL"
Maxsize = 5242880
MaxMsgs = 1000
Flags = 128
AcctType = 0
ErrorHandler = Request("ErrorHandler")
UserID = Replace(Replace(Request("UserID"),"'",""),"@","")
UserID = LCASE(UserID)
Password = Replace(Request("Password"),"'","")
Password2 = Replace(Request("Password2"),"'","")
FullName = Replace(Request("FullName"),"'","`")
MailAddr = UserID&"@"&Alias
UserDir = UserDir&"\"&UserID
IPAddress = Request.ServerVariables("REMOTE_ADDR")
Table = Replace(Domain,".","_")
If Not Password = Password2 Then ErrorHandler2 = 1
If UserID = "" or Password = "" or FullName = "" or ErrorHandler2 = 1 Then
If ErrorHandler = 1 Then ErrorText = "<b><font color=red>Uwaga: Nazwa
Konta juz zajeta.</font> Spr�buj inna Nazwe Konta.</b>"
If ErrorHandler2 = 1 Then ErrorText2 = "<b><font color=red>Uwaga:
Hasla w rubrykach Haslo i Haslo Potwierdz nie sa indentyczne.</font> Spr�buj jeszcze
raz.</b>"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Formularz - Nowe Konto</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#3399FF" vlink="#3366CC" alink="#FF9900">
<!-- -->
<table width="710" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="133" valign="top"><!-- tabela boczna do nawigacji --> <table border="0"
width="125" cellspacing="0" cellpadding="2" bgcolor="#8080FF">
<!-- FFEE88 -->
<tr>
<td><b><font face="Helvetica, Arial,sans-serif" size="2"> <a
href="../default.htm"><font color="#000000">HOME</font></a></font></b></td>
</tr>
<tr>
<td><b><font face="Helvetica, Arial,sans-serif" size="2"> <a
href="http://mail.central.pl:8383"><font color="#000000">E-MAIL
</font></a></font></b></td>
</tr>
<tr>
<td bgcolor="#333399"><b><font face="Helvetica, Arial,sans-serif"
size="2"> <a href="NewAccount.asp"><font color="#FFFFFF">NEW
ACCOUNT</font></a></font></b></td>
</tr>
<tr>
<td><b><font face="Helvetica, Arial,sans-serif"
size="2"> FEEDBACK</font></b></td>
</tr>
<tr>
<td><b><font face="Helvetica, Arial,sans-serif" size="2"> <a
href="../news.htm"><font color="#000000">NEWS</font></a></font></b><a
href="../news.htm"><!-- koniec tabeli bocznej do nawigacji"#F9F0B0" --></a></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </td>
<td width="567" border="0" bgcolor="#FFFFFF"><font color="BLUE" face="Helvetica,
Arial,sans-serif" size="5"><b><u>New
Account Creation</u></b></font><p><font face="Arial">Enter the form by
filling in the Name & Surname, Account name and Password with
verification.</font></p>
<p><font face="Arial">If the account name is vacant, it will be active
immediately - You will be moved back to the main page from where you can hit
the E-MAIL link to log on to web mail.</font></p>
<p><font face="Arial">If the account name is not available, try again with a
different account name.</font></p>
<p><%=ErrorText%> <%=ErrorText2%> </p>
<form action="NewAccount.asp" method="POST" name="FrontPage_Form1">
<p><font face="Courier New" size="3">Name / Surname <!--webbot
bot="Validation" S-Data-Type="String" B-Allow-Letters="TRUE"
B-Allow-WhiteSpace="TRUE" S-Allow-Other-Chars="-" B-Value-Required="TRUE"
I-Minimum-Length="3" I-Maximum-Length="40" --><input type="text" name="FullName"
value="<%=FullName%>" size="33" maxlength="40"></font></p>
<p><font face="Courier New" size="3">Account Name:
<!--webbot bot="Validation" S-Data-Type="String" B-Allow-Letters="TRUE"
B-Allow-Digits="TRUE" S-Allow-Other-Chars="-_" B-Value-Required="TRUE"
I-Minimum-Length="3" I-Maximum-Length="30" --><input type="text" name="UserID"
value="<%=UserID%>" size="20" maxlength="30">@<%=Alias%></font></p>
<p><font face="Courier New" size="3">Password:
<!--webbot bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="4"
I-Maximum-Length="20" --><input type="password" name="Password" value size="20"
maxlength="20"></font></p>
<p><font face="Courier New" size="3">Verify Password: <!--webbot
bot="Validation" B-Value-Required="TRUE" I-Minimum-Length="4"
I-Maximum-Length="20" --><input type="password" name="Password2" value size="20"
maxlength="20"></font><font face="Helvetica, Arial,sans-serif"></p>
<p></font><input type="submit" value=" OK "><input type="reset" value="
Cancel "></p>
</form>
</td>
<td width="10"></td>
</tr>
</table>
<table>
<tr>
<td valign="top" align="center" border="0" bgcolor="#FFFFFF"><table
bgcolor="FFFFFF" border="0" width="150">
<tr>
<td align="center"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- koniec tabeli g�wnej -->
<hr width="60%">
<b><font face="Verdana, HELVETICA, ARIAL, sans-serif" size="1">
<p align="center">Webmaster: <a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a><br>
</font></p>
</b>
</body>
</html>
<%
ElseIf UserID <> "" and Password <> "" and FullName <> "" and UserDir <> ""
and MailAddr <> "" Then
' On Error Resume Next
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open SQLConnect
CheckExists = "SELECT UserID, MailAddr FROM "&Table&" WHERE UserID =
'"&UserID&"' OR MailAddr = '"&MailAddr&"'"
Set rs = Conn.Execute(CheckExists)
If rs.EOF Then
InsertMailUser = "INSERT INTO "&Table&" (UserID, Password,
FullName, UserDir, MailAddr, Maxsize, MaxMsgs, Flags, Type, IPAddress) "&_
"VALUES('"&UserID&"', '"&Password&"',
'"&FullName&"', '"&UserDir&"', '"&MailAddr&"', "&Maxsize&", "&MaxMsgs&", "&Flags&",
"&AcctType&", '"&IPAddress&"')"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open SQLConnect
Set rs = Conn.Execute(InsertMailUser)
Response.Redirect(IMailServerURL)
Else
Response.Redirect("NewAccount.asp?ErrorHandler=1&FullName="&FullName)
End If
Else
Response.Redirect("NewAccount.asp")
End If
%>