快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

中文虚拟域名实现(2)

要害词:ASP

MODIFY。ASP
*******************************
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="dbdb/connmm.inc"-->

<html>
<head>
<title>domain forword</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.MMS { font-size: 11pt; text-decoration: none}
.MMS1 { font-size: 10pt; text-decoration: none}
-->
</style></head>

<body topmargin="10" leftmargin="0" >
<div align="center">

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



\\\'foldername="d:domain" & 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 http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<meta http-equiv=""refresh"" content=""0;URL=http://"+request("target2")+""">"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<script language=""JavaScript"" src=""../mss.js""></script></head>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<body bgcolor=""#FFFFFF"">loading...</body></html>"



whichfile="d:domain" & request("domain2")& "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 href=""http://msstudio.net/"&request("domain2")&""">http://msstudio.net/"& request("domain2")&"</a>)修改成功!</font><br>< br><br>"




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

ADD。ASP
*****************************************************

<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="dbdb/connmm.inc"-->

<html>
<head>
<title>domain forword</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.MMS { font-size: 11pt; text-decoration: none}
.MMS1 { font-size: 10pt; text-decoration: none}
-->
</style></head>

<body topmargin="10" leftmargin="0" >
<div align="center">

<% set rs=server.createobject("adodb.recordset")
sql="select * from info where user=\\\'"&request("domain")&"\\\'"
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/"&request("domain")&")已经被占用!</font><br><br><br>"
rs.close
else
if request("pass")=request("passagain") then
conn.execute("insert into info values(\\\'"&request("domain")&"\\\',\\\'"&request("email")&"\\\',\\\'"&request("pass")&"\\\',\\\'"&request("target")&"\\\')")
foldername="d:domain" & 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 http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<meta http-equiv=""refresh"" content=""0;URL=http://"+request("target")+""">"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<script language=""JavaScript"" src=""../mss.js""></script></head>"+chr(13)+CHR(10)
m_mailinfo=m_mailinfo+"<body bgcolor=""#FFFFFF"">loading...</body></html>"
whichfile="d:domain" & request("domain")& "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 href=""http://msstudio.net/"&request("domain")&""">http://msstudio.net/"& request("domain")&"</a>)已经开始起用!</font><br>< br><br>"
else
response.write "<br><br><br><font color=black>密码错误!</font><br><br><br>"
end if
end if
%>
</div>
</body>
</html>
返回类别: 教程
上一教程: GETROWS的用法详解
下一教程: ASP内置对象OBJECTCONTEXT详解

您可以阅读与"中文虚拟域名实现(2)"相关的教程:
· 中文虚拟域名实现(1) (环境:中文NT)
· 中文虚拟域名实现(1)
· 中文虚拟域名实现(3)
· 中文虚拟域名实现(3) (环境:中文NT)
· NT 下虚拟域名的实现
    微笑服务 优质保证 索取样品