The program uses FSO + SERV-U (2. x) to achieve:
1、index.htm
<Html>
<Head>
<Title> Ningbo keyu network-personal webpage application </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Script language = "Javascript">
Function CheckIfEnglish (String)
{
Var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 -";
Var I;
Var c;
If (String. charAt (0) = ''''-'''')
Return false;
If (String. charAt (String. length-1) = ''''-'''')
Return false;
For (I = 0; I <String. length; I ++)
{
C = String. charAt (I );
If (Letters. indexOf (c) <0)
Return false;
}
Return true;
}
Function checkSubmit (){
Var EmailReg =/^ [_ a-z0-9] + @ ([_ a-z0-9] + \.) + [a-z0-9] {2, 3} $ /;
If (document. form. name. value = ""){
Alert ("Enter the user name you want to register! ");
Document. form. name. focus ();
Return false;
}
If (! CheckIfEnglish (document. form. name. value )){
Alert ("Chinese and illegal characters cannot be entered for the user name! ");
Document. form. name. focus ();
Return false;
}
If (document. form. pass. value = "") & (document. form. rpass. value = "")){
Alert ("the password cannot be blank! ");
Document. form. pass. focus ();
Document. form. rpass. focus ();
Return false;
}
If (document. form. pass. value )! = (Document. form. rpass. value )){
Alert (''' the second password is different! '''');
Document. form. pass. focus ();
Document. form. rpass. focus ();
Return false;
}
If (document. form. email. value = ""){
Alert ("Enter your Email! ");
Document. form. email. focus ();
Return false;
}
If ((! EmailReg. test (document. form. email. value) & (document. form. email. value! = '''''''')){
Alert (''' Email format is incorrect! '''');
Document. form. email. focus ();
Return false;
}
Return true;
}
</Script>
<Script language = "JavaScript">
<! --
Function MM_reloadPage (init) {// reloads the window if Nav4 resized
If (init = true) with (navigator) {if (appName = "Netscape") & (parseInt (appVersion) = 4 )){
Document. MM_pgW = innerWidth; document. MM_pgH = innerHeight; onresize = MM_reloadPage ;}}
Else if (innerWidth! = Document. MM_pgW | innerHeight! = Document. MM_pgH) location. reload ();
}
MM_reloadPage (true );
// -->
</Script>
</Head>
<Body bgcolor = "# FFFFFF" text = "#000000" background = "crystal.jpg">
<P align = "center"> </p>
<P align = "center"> <B> <font size = "6" color = "#333333"> Ningbo keyu network-personal webpage application </font> </B> </p>
<P align = "center"> </p>
<Table width = "65%" border = "0" align = "center">
<Tr>
<Td>
<Form name = "form" method = "post" action = "page. asp">
<P> <B> User name: </B>
<Input type = "text" name = "name" size = "10" class = "form">
*
Note: The user name can only consist of English letters (a-z, A-Z), numbers (0-9), cannot have spaces.
<B> password: </B>
<Input type = "password" name = "pass" size = "10" class = "form">
* </P>
<P> <B> confirm the password: </B>
<Input type = "password" name = "rpass" size = "10" class = "form">
* (Confirm the password above) </p>
<P> <B> your MAIL: </B>
<Input type = "text" name = "email" size = "20" class = "form"> * (correct)
</P>
<P>
<Input type = "submit" name = "Submit" value = "submit" onClick = "java script: return checkSubmit ()">
<Input type = "reset" name = "Submit2" value = "Rewrite">
Project * is required! </P>
</Form>
</Td>
</Tr>
</Table>
<P align = "center"> <font color = "# FF0000"> Note: BBS forums can be installed in this space. Programs that occupy resources such as rivers and lakes and chat rooms are strictly prohibited.
Once discovered, the deletion of all programs and FTP accounts is not notified! </Font> </p>
<P align = "center"> </p>
<P align = "center">-= <a href = "mailto: support@4email.vicp.net"> Ningbo keyu Network </a> =-
CopyRight By KeYu Computer WorkRoom 2001-2002 </p>
</Body>
</Html>
2. page. asp
<Html>
<Head>
<Title> Untitled Document </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
</Head>
<Body bgcolor = "# FFFFFF" text = "#000000">
<% Vname = request ("name ")
Vpass = request ("pass ")
Vrpass = request ("rpass ")
Vemail = request ("email ")
%>
<%
If request. form ("name") = "" then
Response. write "error message: Enter the user name! "
Response. end
End if
If request. form ("pass") = "" then
Response. write "error message: enter the password! "
Response. end
End if
If request. form ("pass") <> request. form ("rpass") then
Response. write "error message: the two passwords do not match! "
Response. end
End if
If request. form ("email") = "" then
Response. write "error prompt: You must enter your correct EMAIL! "
Response. end
End if
%>
<% Set myconn = server. createobject ("ADODB. CONNECTION ")
Dbpath = server. mappath ("db. mdb ")
Myconn. open "driver = {Microsoft access driver (*. mdb)}; dbq =" & dbpath
SQL = "select * from hostname where username = '''" & vname &"''''"
Set listpolicmyconn.exe cute (SQL)
%>
<% If list. eof then %>
<%
Set rs = server. createobject ("ADODB. RecordSet ")
Rs. Open "hostname", myconn, adOpenDynamic, 3
Rs. addnew
Rs ("username") = vname
Rs ("password") = vpass
Rs ("email") = vemail
Rs. update
Rs. close
Set myfileobject = server. createobject ("scripting. filesystemobject ")
Myfileobject. createfolder ("e: \ club \" & vname)
Set afile = myfileobject. getfile ("e: \ club \ person.htm ")
Afile. copy "e: \ club \" & vname & "\ index.htm"
Set afile = myfileobject. getfile ("e: \ club \ line113.gif ")
Afile. copy "e: \ club \" & vname & "\ line113.gif"
Set afile = myfileobject. getfile ("e: \ club \ bg11.gif ")
Afile. copy "e: \ club \" & vname & "\ bg11.gif"
Set afile = myfileobject. getfile ("e: \ club \ c24.gif ")
Afile. copy "e: \ club \" & vname & "\ c24.gif"
Set mytextfile = myfileobject. opentextfile ("C: \ Program Files \ serv-u \ Serv-u.ini", 8)
Mytextfile. writeline ("[USER =" & vname & "]")
Mytextfile. writeline ("password =" & vpass)
Mytextfile. writeline ("HomeDir = e: \ club \" & vname)
Mytextfile. writeline ("RelPaths = YES ")
Mytextfile. writeline ("ChangePassword = YES ")
Mytextfile. writeline ("SpeedLimit = 20480 ")
Mytextfile. writeline ("QuotaEnable = YES ")
Mytextfile. writeline ("QuotaMaxCurrent = 20971520,0 ")
Mytextfile. writeline ("TimeOut = 600 ")
Mytextfile. writeline ("Access1 = e: \ club \" & vname & ", RWAMCDLP ")
Response. Redirect "welcome.htm"
Response. end
%>
<% Else %>
<Center> sorry, your username <% = vname %> has been used by another user. Please apply for another username <P> <a href = ". /"> return to the application page </a> </p> </center>
<% End if %>
</Body>
</Html>
3、successful registration page welcome.htm
<Html>
<Head>
<Title> OK </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
</Head>
<Body bgcolor = "# FFFFFF" text = "#000000" background = "bg14.jpg">
<P align = "center"> <B> <font color = "# FF0000" size = "7"> congratulations </font> </B> </p>
<P align = "center"> </p>
<P align = "center"> </p>
<P align = "center"> you have successfully applied for your personal homepage. </p>
<P> </p> <table width = "451" border = "0" align = "center">
<Tr>
<Td width = "443"> <B> Please read the following precautions: </B> </td>
</Tr>
<Tr>
<Td width = "443"> 1. Your home page is 20 mb. It supports ASP and does not support CGI. please upload your home page in time. If you do not upload the page for more than three weeks, we will delete your account! </Td>
</Tr>
<Tr>
<Td width = "443"> 2. This site supports FTP logon and resumable data transfer. You can use various FTP tools to upload your files. </Td>
</Tr>
<Tr>
<Td width = "443"> 3. the FTP address on the personal homepage of this site is <B> <font color = "# FF0000"> cn4e.vicp.net </font> </B> </ td>
</Tr>
<Tr>
<Td width = "443"> 4. The access path is <B> <font color = "# FF0000"> http://cn4e.vicp.net/your username </font> </B> </td>
</Tr>
<Tr>
<Td width = "443"> 5. If you have any questions, please send a message <a href = "mailto: support@4email.vicp.net"> support@4email.vicp.net </a> </td>
</Tr>
</Table>
<P align = "center"> <a href = "http://www.kydn.com"> Ningbo keyu Network </a>
<P align = "center"> <a href = "/"> back to home </a> </p>
<P align = "center"> </p>
<P align = "center"> </p>
</Body>
</Html>
4、login first page file person.htm
<Html>
<Head>
<Title> personal website </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
</Head>
<Body bgcolor = "# FFFFFF" text = "#000000" background = "bg11.gif">
<P align = "center"> </p>
<P align = "center"> <B> <font size = "6"> personal webpage </font> </B> </p>
<P align = "center"> </p>
<P align = "center"> Construction in progress ..... </P>
<P align = "center"> </p>
<P align = "center">-= <a href = "http://www.kydn.com"> Ningbo keyu Network </a> =-
CopyRight By KeYu Computer WorkRoom 2001-2002 </p>
</Body>
</Html>