中文虚拟域名实现(2) (环境:中文NT)

MODIFY。ASP


1@ LANGUAGE="VBSCRIPT" 
 1<html>
 2<head>
 3<title>domain forword</title>
 4<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
 5<style type="text/css">   
 6<!--   
 7.MMS { font-size: 11pt; text-decoration: none}   
 8.MMS1 { font-size: 10pt; text-decoration: none}   
 9\-->   
10</style></head>
11<body leftmargin="0" topmargin="10">
12<div align="center">   
13  

set rs=server.createobject("adodb.recordset")
sql="select * from info where user='"&amp;request("domain2")&amp;"' and password='"&amp;request("pass2")&amp;"'"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<br/><br/><br/><font color="black">此域名(http://msstudio.net/"&amp;request("domain2")&amp;")不存在或密码错误!</font><br/><br/><br/>"
rs.close
else
if request("newpass2")=request("newpassagain2") then
if request("newpass2")="" and request("email2")="" then
conn.execute("update info set target='"&amp;request("target2")&amp;"' where user ='"&amp;request("domain2")&amp;"'")
end if
if request("newpass2")="" and request("email2")&lt;&gt;"" then
conn.execute("update info set target='"&amp;request("target2")&amp;"',email='"&amp;request("email2")&amp;"' where user ='"&amp;request("domain2")&amp;"'")
end if
if request("newpass2")&lt;&gt;"" and request("email2")&lt;&gt;"" then
conn.execute("update info set target='"&amp;request("target2")&amp;"',email='"&amp;request("email2")&amp;"',password='"&amp;request("newpass2")&amp;"' where user ='"&amp;request("domain2")&amp;"'")
end if
if request("newpass2")&lt;&gt;"" and request("email2")="" then
conn.execute("update info set target='"&amp;request("target2")&amp;"',password='"&amp;request("newpass2")&amp;"' where user ='"&amp;request("domain2")&amp;"'")
end if

'foldername="d:\domain" &amp; request("domain2")
'Set fs = CreateObject("Scripting.FileSystemObject")
'fs.CreateFolder(foldername)
'set fs = nothing

m_mailinfo="<html><head>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<title>domain forword</title>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<meta charset="utf-8" content="" content-type""="" html;="" http-equiv="" text=""/>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<meta 0;url='http://"+request("target2")+"""' content="" http-equiv="" refresh""=""/>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<script ..="" javascript""="" language="" mss.js""="" src=""></script></head>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<body #ffffff""="" bgcolor="">loading...</body></html>"

whichfile="d:\domain" &amp; request("domain2")&amp; "\default.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.createTextFile(whichfile, True)
thisfile.Write m_mailinfo
thisfile.Close

response.write "<br/><br/><br/><font color="black">恭喜!域名(<a "&request("domain2")&"""="" href="" http:="" msstudio.net="">http://msstudio.net/"&amp;request("domain2")&amp;"</a>)修改成功!</font><br/><br/><br/>"

else
response.write "<br/><br/><br/><font color="black">密码错误!</font><br/><br/><br/>"
end if
end if

1</div>
2</body>
3</html>

ADD。ASP


1@ LANGUAGE="VBSCRIPT" 
 1<html>
 2<head>
 3<title>domain forword</title>
 4<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
 5<style type="text/css">   
 6<!--   
 7.MMS { font-size: 11pt; text-decoration: none}   
 8.MMS1 { font-size: 10pt; text-decoration: none}   
 9\-->   
10</style></head>
11<body leftmargin="0" topmargin="10">
12<div align="center">   
13  

set rs=server.createobject("adodb.recordset")
sql="select * from info where user='"&amp;request("domain")&amp;"'"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
response.write "<br/><br/><br/><font color="black">此域名(http://msstudio.net/"&amp;request("domain")&amp;")已经被占用!</font><br/><br/><br/>"
rs.close
else
if request("pass")=request("passagain") then
conn.execute("insert into info values('"&amp;request("domain")&amp;"','"&amp;request("email")&amp;"','"&amp;request("pass")&amp;"','"&amp;request("target")&amp;"')")
foldername="d:\domain" &amp; request("domain")
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CreateFolder(foldername)
set fs = nothing

m_mailinfo="<html><head>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<title>domain forword</title>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<meta charset="utf-8" content="" content-type""="" html;="" http-equiv="" text=""/>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<meta 0;url='http://"+request("target")+"""' content="" http-equiv="" refresh""=""/>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<script ..="" javascript""="" language="" mss.js""="" src=""></script></head>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<body #ffffff""="" bgcolor="">loading...</body></html>"

whichfile="d:\domain" &amp; request("domain")&amp; "\default.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.createTextFile(whichfile, True)
thisfile.Write m_mailinfo
thisfile.Close

response.write "<br/><br/><br/><font color="black">恭喜!域名(<a "&request("domain")&"""="" href="" http:="" msstudio.net="">http://msstudio.net/"&amp;request("domain")&amp;"</a>)已经开始起用!</font><br/><br/><br/>"

else
response.write "<br/><br/><br/><font color="black">密码错误!</font><br/><br/><br/>"
end if
end if

1</div>
2</body>
3</html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus