在线实时开通FTP&WEB
发布时间:2023-02-17 09:34:58 所属栏目:Asp 来源:互联网
导读:程序利用FSO+SERV-U(2.x版本)实现: 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 = ABCDEF
程序利用FSO+SERV-U(2.x版本)实现: 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; οnresize=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">宁波科宇网——个人网页申请</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>用户名称:</b> <input type="text" name="name" size="10" class="form"> * 注意:用户名只能由英文字母(a-z、A-Z),数字(0-9)构成,不能有空格。 <b>密 码:</b> <input type="password" name="pass" size="10" class="form"> *</p> <p><b>确认密码:</b> <input type="password" name="rpass" size="10" class="form"> *(确认上面的密码)</p> <p><b>您的MAIL:</b> <input type="text" name="email" size="20" class="form">*(请正确填写) </p> <p> <input type="submit" name="Submit" value="提交" onClick ="java script:return checkSubmit()"> <input type="reset" name="Submit2" value="重写"> 其中*号项目为必填项目!</p> </form> </td> </tr> </table> <p align="center"><font color="#FF0000">注意:本空间可以安装BBS论坛,严格禁止江湖、聊天室等严重占用资源的程序运行。 一经发现,删除全部程序及FTP帐号,并不于通知!</font></p> <p align="center"> </p> <p align="center">-==<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:clubperson.htm") afile.copy "e:club"&vname&"index.htm" (编辑:十堰站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |