📄 hostedit.asp
字号:
<%
WebID = Request("WebID")
if (WebID="") then Response.Redirect ("error.asp?id=001")
%>
<!--#include file="top.asp"-->
<!--#include file="checkpost.asp"-->
<table width="100%" align="center" bgcolor="#cccccc" border="0" cellpadding="0" cellspacing="1" style="font-size: 9pt; line-height: 100%">
<tr>
<td align=center bgcolor="#FFFFFF"><br>
<%
'此模块是进行空间基本信息修改查询
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from [Host_OK] where WebID=" & WebID & " and UserID=" & session("ID")
rs.open sql,conn,1,1
if rs.bof and rs.eof then Response.Redirect("error.asp?id=001")
HostName=rs("HostName")
HostId=rs("HostId")
HostSize=rs("HostSize")
Connections=rs("Connections")
HostIp=rs("HostIp")
Price=rs("Price")
Years=rs("Years")
FtpName=rs("FtpName")
FtpPass=rs("FtpPass")
FtpPath=rs("FtpPath")
WebState=rs("WebState")
WebScriptmaps=Lcase(rs("Scriptmaps"))
DefaultDoc=rs("DefaultDoc")
WebErrDoc=rs("ErrDoc")
WebLogs=rs("Logs")
BeginDate=rs("BeginDate")
EndDate=rs("EndDate")
rs.close
sql="select HostSize,Price" & Grade & " from [Host_List] where HostID=" & HostID
rs.open sql,conn,1,1
if rs.bof and rs.eof then Response.Redirect("error.asp?id=001")
OrSize=rs("HostSize")
Price=rs("Price" & Grade)
rs.close
if Connections<0 then Connections="不限"
if isnull(WebScriptmaps) or WebScriptmaps="" then
Scriptmaps="全能型"
else
ScrMap=Split(WebScriptmaps,",")
for ii=0 to Ubound(ScrMap)
if Scriptmaps="" then Scriptmaps="<img border=0 src=../images/"&ScrMap(ii)&".gif alt=空间支持"&ScrMap(ii)&">" else Scriptmaps=Scriptmaps&" "&"<img border=0 src=../images/"&ScrMap(ii)&".gif alt=空间支持"&ScrMap(ii)&">"
next
end if
sql="select DomainName from [Domain_OK] where WebID=" & WebID & " and UserID=" & session("ID") & " and DomainType=1"
rs.open sql,conn,1,1
if rs.bof and rs.eof then Response.Redirect("error.asp?id=001")
DomainName=rs("DomainName")
rs.close
'向服务器提交查询FTP使用空间大小
Set Autohost = Server.CreateObject("autohost.Createhost")
Autohost.HostIp=HostIp
Autohost.HostPort=Port
Autohost.Guid=Guid
Autohost.HostAction="info"
Autohost.Hostuser=FtpName
ReturnValue=Autohost.send
set Autohost=nothing
'以下是检查服务器的返回值,因为服务器返回值里有控制符,所以这个只对返回值进行查找过滤处理
if instr(ReturnValue,"BUSING") then
Response.Redirect("error.asp?ID=016")
'elseif instr(ReturnValue,"CLOSE") then
' Response.Redirect("error.asp?ID=017")
'elseif ReturnValue="" then
' Response.Redirect("error.asp?ID=017")
elseif ReturnValue="-1" then
Response.Redirect("error.asp?ID=011")
elseif instr(ReturnValue,"非法命令") then
Response.Redirect("error.asp?ID=019")
elseif instr(ReturnValue,"非法用户") then
Response.Redirect("error.asp?ID=020")
end if
if ReturnValue="" then ReturnValue=0
Session("ReturnValue")=ReturnValue
Set Autohost = nothing
%>
<table width=80% border="0" cellspacing="0" cellpadding="0" height="20" bordercolor="#FFFFFF" bordercolordark=#ffffff bordercolorlight=#cccccc>
<td colspan="2" height=1><img border=0 src=../images/state.gif> <b>虚拟主机信息</b></td>
</tr>
<tr>
<td width=10%> </td>
<td width=90%>
<table width=100%>
<tr>
<%
Set Autohost = Server.CreateObject("autohost.gethostip")
realip=Autohost.getip(HostIp)
Set Autohost = nothing
%>
<tr><td colspan="4">虚拟主机: 服务器 <font color=red><b><%=realip%></b></font></td></tr>
<td colspan="4">
产品名称: <%=HostName%> <%if WebState=0 then %>
<a href=HostBuyNow.asp?WebID=<%=WebID%>><font color=red>(试用中...我要正式购买)</font></a>
<%
else
%><a href=Hostpay.asp?WebID=<%=WebID%>><font color=red>[续费]</font></a>
<%end if
%>
</td>
</tr>
<tr><td colspan="4">空间类型: <%=Scriptmaps%></td></tr>
<tr>
<td colspan="4">
主机空间:
<%=formatNumber(HostSize,2,-1)%> MB 连接数 <%=Connections%>
</td>
</tr>
<tr>
<td colspan="4">
已用空间: <%=formatNumber(clng(Session("ReturnValue"))/(1024*1024),2,-1)%> MB (<%=FormatPercent(clng(Session("ReturnValue"))/(1024*1024)/HostSize,2,-1)%>)<%if clng(Session("ReturnValue"))/(1024*1024)/HostSize>0.8 then Response.write " <font color=red>请注意您的空间使用情况</font>" %>
</td>
</tr>
<tr>
<td width="10%">
空间图示:</td><td width="30">0 M</td><td width="250" align=left><table width="250" border="0" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#CCCCCC">
<img src="image/bk.gif" width="<%=(clng(Session("ReturnValue"))/(1024*1024)/HostSize)*250%>" height="7" border="0" bordercolor="#FFFFFF" alt="空间使用量为<%=FormatPercent(clng(Session("ReturnValue"))/(1024*1024)/HostSize,2,-1)%>"></td>
</tr>
</table>
</td><td><%=HostSize%> M</td>
</tr>
<tr>
<td colspan="4">开设日期: <%=BeginDate%>
</td>
</tr>
<tr>
<td colspan="4">到期日期: <%=EndDate%><%if Cdate(EndDate)<Date then Response.write " <font color=red>空间已到期,请续费</font>"%>
</td>
</tr>
<tr>
<td colspan="4">赠送域名: <a href="http://<%=DomainName%>" target="_blank"><%=DomainName%></a>
</td>
</tr>
<tr>
<td colspan="4">物理路径: <%=FtpPath%></a>
</td>
</tr>
</table>
</td>
</tr>
<%
if WebState>0 then
%>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/update.gif> <b>空间自主升级</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<tr>
<form name="form" method="post" action="HostEdit_Space.asp?WebID=<%=WebID%>">
<td>
增加空间: <input name="space" value=""> MB (只能是50的整数倍,价格 <%=formatNumber(Price/OrSize,2,-1)%>元/M)
<input type="hidden" name="Price" value="<%=(Price/OrSize)%>">
<input type="hidden" name="Years" value="<%=DateDiff("m",date,EndDate)%>">
<td align=right>
<input type="submit" value="升级" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
</td>
</form>
</tr>
<% if Connections<>"不限" then%>
<tr>
<form name="form" method="post" action="HostEdit_Connections.asp?WebID=<%=WebID%>">
<td>
增加连接: <input name="connections" value=""> 个 (只能是10的整数倍,价格 1元/IIS)
<input type="hidden" name="Years" value="<%=DateDiff("m",date,EndDate)%>">
</td>
<td align=right>
<input type="submit" value="升级" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
</td>
</form>
</tr>
<%end if%>
</table>
</td>
</tr>
<%end if%>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/ftp.gif> <b>FTP帐号管理</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<tr>
<td>
FTP地址: <input name="FTPIP" value="<%=realip%>" readonly=true>
</td>
<td align=right>
<a href="ftp://<%=FtpName%>@<%=realip%>/wwwroot/" target="_blank">WEB上传
</td>
</tr>
<form name="form" method="post" action="HostEdit_Ftp.asp?WebID=<%=WebID%>">
<tr>
<td>
FTP账号: <input name="FtpName" value="<%=FtpName%>" readonly="yes">
FTP密码: <input name="FtpPass" type=password value="">
</td>
<td align=right>
<input type="submit" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
</td>
</tr>
</form><tr><td><br>
文件上传推荐使用cuteFtp或leapFtp,文件传至wwwroot目录下,此目录也不能删除。
</td></tr>
</table>
</td>
</tr>
<%
if WebState>0 and Cdate(EndDate)>Date then
%>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/hosts.gif> <b>主机状态设置</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<form name="form" method="post" action="HostEdit_State.asp?WebID=<%=WebID%>">
<tr>
<td>主机状态:
<SELECT name=State>
<OPTION value="2"<%if WebState=2 then Response.write (" selected")%>>运行</OPTION>
<OPTION value="4"<%if WebState=4 then Response.write (" selected")%>>停止</OPTION>
<OPTION value="6"<%if WebState=6 then Response.write (" selected")%>>暂停</OPTION>
</SELECT>
</td>
<td align=right>
<%if Cdate(EndDate)>Date then%>
<input type="submit" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
<%else%>
<input type="button" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
<%end if%>
</td>
</tr>
</form>
</table>
</td>
</tr>
<%end if%>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/adddomain.gif> <b>域名绑定设置</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<%
sql="select DomainName from [Domain_OK] where WebID=" & WebID & " and UserID=" & session("ID") & " and DomainType=0"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
else
RECORDCOUNT=rs.RECORDCOUNT
DO WHILE NOT rs.EOF AND BindCount<RECORDCOUNT
BindCount=BindCount+1
%>
<form name="form" method="post" action="HostEdit_Domain.asp?WebID=<%=WebID%>">
<tr>
<td>绑定域名: http:// <input name="Domain" value="<%=rs("DomainName")%>" size=48 readonly=true></td>
<td align=right><input type="hidden" name="act" value="del"><input type="submit" value="删除" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'"></td>
</tr>
</form>
<%
rs.MoveNext
Loop
end if
rs.close
set rs = nothing
%>
<%if BindCount<FreeDomain then%>
<form name="form" method="post" action="HostEdit_Domain.asp?WebID=<%=Request("WebID")%>">
<tr>
<td>新增域名: http:// <input name="Domain" value="" size=48></td>
<td align=right><input type="hidden" name="act" value="add"><input type="submit" value="添加" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'"></td>
</tr>
</form>
<%end if%>
<tr><td>赠送域名: http:// <input name="Domain" value="<%=DomainName%>" size=48 readonly></td></tr>
<tr><td><br>
我们的虚拟主机免费赠送一个三级域名,主机一经申请立即生效,您可以自己绑定独立域名。<br>注意域名IP指向为:<font color=red><b><%=realip%></b></font>
</td></tr>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/docimg.gif> <b>默认首页设置</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<form name="form" method="post" action="HostEdit_Doc.asp?WebID=<%=Request("WebID")%>">
<tr>
<td>默认文档: <input name="DefaultDoc" value="<%=DefaultDoc%>" size=56></td>
<td align=right><input type="submit" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'"></td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/404.gif> <b>错误提示设置(404错误)</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<form name="form" method="post" action="HostEdit_404.asp?WebID=<%=Request("WebID")%>">
<tr>
<td>默认文档: <input name="DefaultErr" value="<%=WebErrDoc%>" size=56></td>
<td align=right><input type="submit" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'"></td>
</tr>
<tr><td><br>请先将您自定义的404错误提示网页文件传至wwwroot目录下或wwwroot目录下的其它目录下。如您的页面是err404.htm且传到wwwroot/errorpath/下,您只需在上面编辑框中输入errorpath/err404.htm按修改即可。错误提示网页只能为.htm、.html等纯网页文件。</td></tr>
</form>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2" height=1><img border=0 src=../images/hosts.gif> <b>日志状态设置</b></td>
</tr>
<tr>
<td> </td>
<td>
<table width=100%>
<form name="form" method="post" action="HostEdit_Log.asp?WebID=<%=WebID%>">
<tr>
<td>主机日记状态:
<SELECT name=log>
<OPTION value="0" <%if WebLogs=0 then Response.write (" selected")%>>停止</OPTION>
<OPTION value="1" <%if WebLogs=1 then Response.write (" selected")%>>记录</OPTION>
</SELECT>
(注意:日志文件占用主机空间)
</td>
<td align=right>
<%if Cdate(EndDate)>Date then%>
<input type="submit" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
<%else%>
<input type="button" value="修改" name="Submit" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'">
<%end if%>
</td>
</tr>
<tr><td><br>
我们为您的网站自动生成访问日志,存放在根目录\logfiles下面。可以通过FTP下载到本地。</td></tr>
</form>
</table>
</td>
</tr>
<tr>
<td height="22" colspan="2">
<hr size=1 color="E1E6EC">
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<li>如你在本站系统中有什么还不明白的地方,请使用<a href=NoteList.asp><font color=red>帮助留言</font></a>功能,我们的技术人员会给你答复。</li><br><br>
</td>
</tr>
</TD></TR></TABLE></TD></TR></TABLE>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -