处理 SSI 文件时出错
domain forword
论坛交流
首页办公自动化| 网页制作| 平面设计| 动画制作| 数据库开发| 程序设计| 全部视频教程
应用视频: Windows | Word2007 | Excel2007 | PowerPoint2007 | Dreamweaver 8 | Fireworks 8 | Flash 8 | Photoshop cs | CorelDraw 12
编程视频: C语言视频教程 | HTML | Div+Css布局 | Javascript | Access数据库 | Asp | Sql Server数据库Asp.net  | Flash AS
当前位置 > 文字教程 > asp教程
Tag:入门,文摘,实例,技巧,iis,表单,对象,上传,数据库,记录集,session,cookies,存储过程,注入,分页,安全,优化,xmlhttp,fso,jmail,application,防盗链,stream,组件,md5,乱码,缓存,加密,验证码,算法,ubb,正则表达式,水印,,日志,压缩,url重写,控件,函数,破解,触发器,socket,ADO,初学,聊天室,留言本,视频教程

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

文章类别:asp | 发表日期:2008-10-5 20:42:16

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>

视频教程列表
文章教程搜索
 
Asp推荐教程
Asp热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058