⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userhostedit.asp

📁 一个非常优秀的自动建站程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
WebID = Request("WebID")
if (WebID="") then Response.Redirect ("error.asp?id=001")
%>
<!--#include file="top.asp"-->
<table width="100%" align="center" bgcolor="#cccccc" border="0" cellpadding="0" cellspacing="1" style="font-size: 9pt; line-height: 200%">
<tr>
<td align=center bgcolor="#FFFFFF"><br>
<%
'此模块是进行空间基本信息修改查询
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from [Host_OK] where WebID=" & WebID
rs.open sql,conn,1,1
if rs.bof and rs.eof then Response.Redirect("error.asp?id=001")
UserId=rs("UserId")
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=ucase(rs("Scriptmaps"))
DefaultDoc=rs("DefaultDoc")
WebErrDoc=rs("ErrDoc")
WebLogs=rs("Logs")
BeginDate=rs("BeginDate")
EndDate=rs("EndDate")
rs.close
sql="select Userid,Name,Grade from [Agent_User] where ID=" & UserID
rs.open sql,conn,1,1
Grade=rs("Grade")
user=rs("userid")
Name=rs("name")
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=" & UserID & " 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" bgcolor="#ffffff" height=1><img border=0 src=../images/state.gif>  <b>主机信息</b></td>
 </tr>
 <tr>
<td width=10%>&nbsp;</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">此主机IP: <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>
<%
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>
<tr> 
<td height="22" colspan="2"> 
<hr size=1 color="E1E6EC">
</td>
</tr>
 <tr>
<td colspan="2" bgcolor="#ffffff" height=1><img border=0 src=../images/ftp.gif>  <b>所属会员</b></td>
 </tr>
 <tr>
<td>&nbsp;</td>
<td>
<table width=100%>
<form name="form" method="post" action="HostEdit_User.asp?WebID=<%=Request("WebID")%>">
<tr>
<td>所属会员: <input name="userid" value="<%=userid%>"> 会员号:<%=user%> <%if name<>"" then%>姓名:<%=name%><%end if%></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" bgcolor="#ffffff" height=1><img border=0 src=../images/404.gif>  <b>空间类型</b></td>
 </tr>
 <tr>
<td>&nbsp;</td>
<td>
<table width=100%>
<form name="form" method="post" action="HostEdit_Type.asp?WebID=<%=Request("WebID")%>">
<tr>
<td>空间类型: <input name="ScriptMaps" value="<%=WebScriptmaps%>"></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" bgcolor="#ffffff" height=1><img border=0 src=../images/update.gif>  <b>空间升级</b></td>
 </tr>
 <tr>
<td>&nbsp;</td>
<td>
<table width=100%>
<tr>
<form name="form" method="post" action="HostEdit_Space.asp?WebID=<%=WebID%>">
<td>
增加空间: <input name="space" value=""> MB  (只能是50的整数倍)
<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的整数倍)
</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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -