选择显示字体大小

asp教程 - 在线实时开通web及ftp源程序 -

程序利用fso+serv-u(2.x版本)实现:
1、注册文件index.htm
<html>
<head>
<title>宁波科宇网——个人网页申请</title>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=gb2312&quot;>
<script language=&quot;javascript&quot;>
function checkifenglish( string )
{
var letters = &quot;abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz1234567890-&quot;;
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 == &quot;&quot;) {
alert(&quot;请输入您要注册的用户名!&quot;);
document.form.name.focus();
return false;
}

if (!checkifenglish(document.form.name.value )) {
alert(&quot;用户名不能输入中文及非法字符!&quot;);
document.form.name.focus();
return false;
}

if ((document.form.pass.value == &quot;&quot;)&&(document.form.rpass.value == &quot;&quot;)) {
alert(&quot;密码不能为空!&quot;);
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 == &quot;&quot;) {
alert(&quot;请输入您的email!&quot;);
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=&quot;javascript&quot;>
<!--
function mm_reloadpage(init) { //reloads the window if nav4 resized
if (init==true) with (navigator) {if ((appname==&quot.netscape&quot;)&&(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=&quot;#ffffff&quot; text=&quot;#000000&quot; background=&quot;crystal.jpg&quot;>
<p align=&quot;center&quot;> </p>
<p align=&quot;center&quot;><b><font size=&quot;6&quot; color=&quot;#333333&quot;>宁波科宇网——个人网页申请</font></b></p>
<p align=&quot;center&quot;></p>
<table width=&quot;65%&quot; border=&quot;0&quot; align=&quot;center&quot;>
<tr>
<td>
<form name=&quot;form&quot; method=&quot;post&quot; action=&quot;page.asp&quot;>
<p><b>用户名称:</b>
<input type=&quot;text&quot; name=&quot;name&quot; size=&quot;10&quot; class=&quot;form&quot;>
*

注意:用户名只能由英文字母(a-z、a-z),数字(0-9)构成,不能有空格。

<b>密  码:</b>
<input type=&quot;password&quot; name=&quot;pass&quot; size=&quot;10&quot; class=&quot;form&quot;>
*</p>
<p><b>确认密码:</b>
<input type=&quot;password&quot; name=&quot;rpass&quot; size=&quot;10&quot; class=&quot;form&quot;>
*(确认上面的密码)</p>
<p><b>您的mail:</b>
<input type=&quot;text&quot; name=&quot;email&quot; size=&quot;20&quot; class=&quot;form&quot;>*(请正确填写)
</p>
<p>
<input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;提交&quot; onclick =&quot;java script:return checksubmit()&quot;>
<input type=&quot;reset&quot; name=&quot;submit2&quot; value=&quot;重写&quot;>


其中*号项目为必填项目!</p>
</form>
</td>
</tr>
</table>
<p align=&quot;center&quot;><font color=&quot;#ff0000&quot;>注意:本空间可以安装bbs论坛,严格禁止江湖、聊天室等严重占用资源的程序运行。

一经发现,删除全部程序及ftp帐号,并不于通知!</font></p>
<p align=&quot;center&quot;> </p>
<p align=&quot;center&quot;>-==<a href=&quot;mailto:support@4email.vicp.net&quot;>宁波科宇网</a>==-

copyright by keyu computer workroom 2001-2002</p>
</body>
</html>

2、后台控制文件page.asp
<html>
<head>
<title>untitled document</title>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=gb2312&quot;>
</head>
<body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;>
<%vname=request(&quot;name&quot;)
vpass=request(&quot;pass&quot;)
vrpass=request(&quot;rpass&quot;)
vemail=request(&quot;email&quot;)
%>
<%
if request.form(&quot;name&quot;)=&quot;&quot; then
response.write &quot;错误提示:请输入用户名!&quot;
response.end
end if
if request.form(&quot;pass&quot;)=&quot;&quot; then
response.write &quot;错误提示:请输入口令!&quot;
response.end
end if
if request.form(&quot;pass&quot;)<>request.form(&quot;rpass&quot;) then
response.write &quot;错误提示:两次口令不相符!&quot;
response.end
end if
if request.form(&quot;email&quot;)=&quot;&quot; then
response.write &quot;错误提示:必须输入你的正确email!&quot;
response.end
end if
%>
<%set myconn=server.createobject(&quot;adodb.connection&quot;)
dbpath=server.mappath(&quot;db.mdb&quot;)
myconn.open &quot;driver={microsoft access driver (*.mdb)};dbq=&quot;&dbpath
sql=&quot;select * from hostname where 用户名=''&quot;&vname&&quot;''&quot;
set list=myconn.execute(sql)
%>
<% if list.eof then%>
<%
set rs=server.createobject(&quot;adodb.recordset&quot;)
rs.open &quot;hostname&quot;, myconn, adopendynamic, 3
rs.addnew
rs(&quot;用户名&quot;)=vname
rs(&quot;密码&quot;)=vpass
rs(&quot;邮箱&quot;)=vemail
rs.update
rs.close

set myfileobject=server.createobject(&quot;scripting.filesystemobject&quot;)
myfileobject.createfolder(&quot;e:\club\&quot;&vname)
set afile=myfileobject.getfile(&quot;e:\club\person.htm&quot;)
afile.copy &quot;e:\club\&quot;&vname&&quot;\index.htm&quot;

set afile=myfileobject.getfile(&quot;e:\club\line113.gif&quot;)
afile.copy &quot;e:\club\&quot;&vname&&quot;\line113.gif&quot;

set afile=myfileobject.getfile(&quot;e:\club\bg11.gif&quot;)
afile.copy &quot;e:\club\&quot;&vname&&quot;\bg11.gif&quot;

set afile=myfileobject.getfile(&quot;e:\club\c24.gif&quot;)
afile.copy &quot;e:\club\&quot;&vname&&quot;\c24.gif&quot;

set mytextfile=myfileobject.opentextfile(&quot;c:\program files\serv-u\serv-u.ini&quot;,8)
mytextfile.writeline(&quot;[user=&quot;&vname&&quot;]&quot;)
mytextfile.writeline(&quot;password=&quot;&vpass)
mytextfile.writeline(&quot;homedir=e:\club\&quot;&vname)
mytextfile.writeline(&quot;relpaths=yes&quot;)
mytextfile.writeline(&quot;changepassword=yes&quot;)
mytextfile.writeline(&quot;speedlimit=20480&quot;)
mytextfile.writeline(&quot;quotaenable=yes&quot;)
mytextfile.writeline(&quot;quotamaxcurrent=20971520,0&quot;)
mytextfile.writeline(&quot;timeout=600&quot;)
mytextfile.writeline(&quot;access1=e:\club\&quot;&vname&&quot;,rwamcdlp&quot;)
response.redirect &quot;welcome.htm&quot;
response.end
%>
<%else%>
<center>对不起,您的用户名<%=vname%>已被他人所用,请您换一个用户名申请<p><a href=&quot;./&quot;>返回申请页面</a></p></center>
<%end if%>
</body>
</html>

3、注册成功页面welcome.htm
<html>
<head>
<title>ok</title>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=gb2312&quot;>
</head>

<body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot; background=&quot;bg14.jpg&quot;>
<p align=&quot;center&quot;><b><font color=&quot;#ff0000&quot; size=&quot;7&quot;>恭喜您</font></b></p>
<p align=&quot;center&quot;><img border=&quot;0&quot; src=&quot;line761.gif&quot; width=&quot;560&quot; height=&quot;18&quot;></p>
<p align=&quot;center&quot;></p>
<p align=&quot;center&quot;>您已成功地申请了自己的个人主页</p>
<p></p><table width=&quot;451&quot; border=&quot;0&quot; align=&quot;center&quot;>
<tr>
<td width=&quot;443&quot;><b>请您阅读以下注意事项:</b></td>
</tr>
<tr>
<td width=&quot;443&quot;>1、您的主页空间是20m,支持asp,暂不支持cgi,请您及时上传您的主页,超过三周不上传者,我们将删除您的帐号!</td>
</tr>
<tr>
<td width=&quot;443&quot;>2、本站支持ftp登录、支持断点续传,可以用各种ftp工具来上传您的文件。</td>
</tr>
<tr>
<td width=&quot;443&quot;>3、本站个人主页的ftp地址为<b><font color=&quot;#ff0000&quot;>cn4e.vicp.net</font></b></td>
</tr>
<tr>
<td width=&quot;443&quot;>4、访问路径是<b><font color=&quot;#ff0000&quot;>http://cn4e.vicp.net/您的用户名</font></b></td>
</tr>
<tr>
<td width=&quot;443&quot;>5、如有任何疑问,请致信<a href=&quot;mailto:support@4email.vicp.net&quot;>support@4email.vicp.net</a></td>
</tr>
</table>
<p align=&quot;center&quot;><a href=&quot;http://www.kydn.com&quot;>宁波科宇网</a>

<p align=&quot;center&quot;><a href=&quot;/&quot;>返回首页</a></p>
<p align=&quot;center&quot;><img src=&quot;line738.gif&quot; width=&quot;500&quot; height=&quot;24&quot;></p>
<p align=&quot;center&quot;></p>
</body>
</html>

4、默认首页文件person.htm
<html>
<head>
<title>个人网站</title>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=gb2312&quot;>
</head>

<body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot; background=&quot;bg11.gif&quot;>
<p align=&quot;center&quot;> </p>
<p align=&quot;center&quot;><b><font size=&quot;6&quot;>个人网页</font></b></p>
<p align=&quot;center&quot;><img border=&quot;0&quot; src=&quot;c24.gif&quot; width=&quot;96&quot; height=&quot;66&quot;></p>
<p align=&quot;center&quot;>正在施工中。。。。。</p>
<p align=&quot;center&quot;><img border=&quot;0&quot; src=&quot;line113.gif&quot; width=&quot;420&quot; height=&quot;11&quot;></p>
<p align=&quot;center&quot;>-==<a href=&quot;http://www.kydn.com&quot;>宁波科宇网</a>==-

copyright by keyu computer workroom 2001-2002</p>
</body>
</html>

5、完整图片、数据库asp、htm文件包下载:
http://cn4e.vicp.net/bbs/uploadimag...12195174006.zip

6、serv-u 2.5k 免安装已注册版下载:
http://club.yydns.com/soft/servu25k.zip

7、注意:serv-u默认安装位置为c:\program files\serv-u,虚拟站点目录位置为:e:/club,请根据各自情况进行修改。

8、演示:http://cn4e.vicp.net/host 


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons