在线实时开通WEB及FTP源程序
1、注册文件index.htm
<html>
<head>
<title>宁波科宇网——个人网页申请</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("请输入您要注册的用户名!");
document.form.name.focus();
return false;
}
if (!CheckIfEnglish(document.form.name.value )) {
alert("用户名不能输入中文及非法字符!");
document.form.name.focus();
return false;
}
if ((document.form.pass.value == "")&&(document.form.rpass.value == "")) {
alert("密码不能为空!");
document.form.pass.focus();
document.form.rpass.focus();
return false;
}
if ((document.form.pass.value)!=(document.form.rpass.value)) {
alert (''二次密码输入不一样!'');
document.form.pass.focus();
document.form.rpass.focus();
return false;
}
if (document.form.email.value == "") {
alert("请输入您的Email!");
document.form.email.focus();
return false;
}
if ((!EmailReg.test(document.form.email.value))&&(document.form.email.value!='''')) {
alert (''Email的格式不正确!'');
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> </p>
<p><b><font size="6" color="#333333">宁波科宇网——个人网页申请</font></b></p>
<p></p>
<table>
<tr>
<td>
<form method="post" action="page.asp">
<p><b>用户名称:</b>
<input type="text" size="10">
*
注意:用户名只能由英文字母(a-z、A-Z),数字(0-9)构成,不能有空格。
<b>密 码:</b>
<input type="password" size="10">
*</p>
<p><b>确认密码:</b>
<input type="password" size="10">
*(确认上面的密码)</p>
<p><b>您的MAIL:</b>
<input type="text" size="20">*(请正确填写)
</p>
<p>
<input type="submit" value="提交" onClick ="java script:return checkSubmit()">
<input type="reset" value="重写">
其中*号项目为必填项目!</p>
</form>
</td>
</tr>
</table>
<p><font color="#FF0000">注意:本空间可以安装BBS论坛,严格禁止江湖、聊天室等严重占用资源的程序运行。
一经发现,删除全部程序及FTP帐号,并不于通知!</font></p>
<p> </p>
<p>-==<a href="mailto:support@4email.vicp.net">宁波科宇网</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 "错误提示:请输入用户名!"
response.end
end if
if request.form("pass")="" then
response.write "错误提示:请输入口令!"
response.end
end if
if request.form("pass")<>request.form("rpass") then
response.write "错误提示:两次口令不相符!"
response.end
end if
if request.form("email")="" then
response.write "错误提示:必须输入你的正确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 用户名=''"&vname&"''"
set list=myconn.execute(sql)
%>
<% if list.eof then%>
<%
set rs=server.createobject("ADODB.RecordSet")
rs.Open "hostname", myconn, adOpenDynamic, 3
rs.addnew
rs("用户名")=vname
rs("密码")=vpass
rs("邮箱")=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\")
afile.copy "e:\club\"&vname&"\"
set afile=myfileobject.getfile("e:\club\bg11.gif")
afile.copy "e:\club\"&vname&"\bg11.gif"
set afile=myfileobject.getfile("e:\club\")
afile.copy "e:\club\"&vname&"\"
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>对不起,您的用户名<%=vname%>已被他人所用,请您换一个用户名申请<P><a href="./">返回申请页面</a></p></center>
<%end if%>
</body>
</html>
3、注册成功页面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><b><font color="#FF0000" size="7">恭喜您</font></b></p>
<p><img src="http://www.newasp.net/Article/asp/other/2005/line761.gif"></p>
<p></p>
<p>您已成功地申请了自己的个人主页</p>
<p></p><table>
<tr>
<td><b>请您阅读以下注意事项:</b></td>
</tr>
<tr>
<td>1、您的主页空间是20M,支持ASP,暂不支持CGI,请您及时上传您的主页,超过三周不上传者,我们将删除您的帐号!</td>
</tr>
<tr>
<td>2、本站支持FTP登录、支持断点续传,可以用各种FTP工具来上传您的文件。</td>
</tr>
<tr>
<td>3、本站个人主页的FTP地址为<b><font color="#FF0000">cn4e.vicp.net</font></b></td>
</tr>
<tr>
<td>4、访问路径是<b><font color="#FF0000">您的用户名</font></b></td>
</tr>
<tr>
<td>5、如有任何疑问,请致信<a href="mailto:support@4email.vicp.net">support@4email.vicp.net</a></td>
</tr>
</table>
<p><a href="http://www.kydn.com">宁波科宇网</a>
<p><a href="http://www.cuoxin.com/">返回首页</a></p>
<p><img src="http://www.newasp.net/Article/asp/other/2005/line738.gif"></p>
<p></p>
</body>
</html>
4、默认首页文件person.htm
<html>
<head>
<title>个人网站</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="bg11.gif">
<p> </p>
<p><b><font size="6">个人网页</font></b></p>
<p><img src="http://www.newasp.net/Article/asp/other/2005/c24.gif"></p>
<p>正在施工中。。。。。</p>
<p><img src="http://www.newasp.net/Article/asp/other/2005/line113.gif"></p>
<p>-==<a href="http://www.kydn.com">宁波科宇网</a>==-
CopyRight By KeYu Computer WorkRoom 2001-2002</p>
</body>
</html>
5、完整图片、数据库、ASP、HTM文件包下载:
6、serv-u 2.5k 免安装已注册版下载:
7、注意:serv-u默认安装位置为C:\Program Files\serv-u,虚拟站点目录位置为:e:/club,请根据各自情况进行修改。
8、演示: