<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("VPSAUID")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf not IsNumeric(session("VPSAUID"))  Then
	ef=True
	ec="osid应该是数字！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_VPS where id='"&session("VPSAUID")&"'"
	dsph.Open Sql,conn,1,3
if dsph.Eof then
	ef=True
	ec="不存在的产品ID！"
end if
end If

if not ef then
	Set dsVPSip = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_VPS_IP where VPSID='"&session("VPSAUID")&"'"
	dsVPSip.Open Sql,conn,1,1
if dsVPSip.Eof then
	ef=True
	ec="不存在的IP或IP没分配！"
end if
end If

if not ef then
	Set dsVPSpdlist = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_VPSProductlist where VPStype='"&dsph("VPStype")&"'"
	if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsVPSpdlist.Open Sql,conn,1,1
if dsVPSpdlist.Eof then
	ef=True
	ec="产品不存在！"
end if
end if

if not ef then
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ServerVPSlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
if dsserver.Eof then
	ef=True
	ec="服务器不存在！"
else
isONEip=dsserver("isONEip")	
end if
end If

if not ef then
if isONEip=true then
	Set dsCDNserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ServerCDNlist where id='"&dsserver ("usecdn1")&"'"
	dsCDNserver.Open Sql,conn,1,1
if dsCDNserver.Eof then
	ef=True
	ec="CDN服务器不存在！"
end if
end if
end If

if not ef Then
if isONEip=true then
	Set dsPORTserver = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_ServerPORTlist where id='"&dsserver("useportserver")&"'"
		dsPORTserver.Open Sql,conn,1,3
If dsPORTserver.Eof Then
	ef=True
	ec="PORT服务器不存在。"
end If
end If
end if


if not ef Then




%>
<!--#include virtual="/inc-freehost-function/template-vpsadm-top.asp"-->
　云服务器自助管理

<br>
<form action="cdnop2.asp" method="post" name="modhostname" id="modhostname">
  <TABLE width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
    <TBODY>
      <TR align="center">
        <TD height="35" vAlign=middle bgColor=#494949>&nbsp; <font color="#FFFFFF">
          <input name="id" type="hidden" value="<%=Request("id")%>">
        您的云服务器端口信息：</font></TD>
      </TR>
      <TR>
        <TD height="35" align="center" vAlign=middle bgColor=#FFFFFF><%if isnull(dsPORTserver("cname")) then%>您的公网IP是：<%=dsPORTserver("ip")%><%else%>您的连接域名是：<%=dsPORTserver("cname")%><%end if%></TD>
      </TR>
      <TR>
        <TD height="35" align="center" vAlign=middle bgColor=#FFFFFF>Windows远程桌面端口(当您装了windows操作系统时)：<%=dsVPSip("portstart")%></TD>
      </TR>
      <TR>
        <TD height="35" align="center" vAlign=middle bgColor=#FFFFFF>Linux SSH连接端口(当您装了Linux操作系统时)：<%=dsVPSip("portstart")+1%></TD>
      </TR>
      <TR>
        <TD height="35" align="center" vAlign=middle bgColor=#FFFFFF>FTP端口：<%=dsVPSip("portstart")+3%></TD>
      </TR>
      <TR>
        <TD height="50" align="center" vAlign=middle bgColor=#FFFFFF>其他程序可以用的端口段：<%=dsVPSip("portstart")+4%>-<%=dsVPSip("portstart")+dsPORTserver("portperip")-1%><br>
          (您可以使用这些端口段来设置FTP的PASV端口或SQL的远程连接端口)</TD>
      </TR>
    </TBODY>
  </TABLE>
<input name="id" type="hidden" value="<%=Request("id")%>">
</form>

<br>


　<a href="selfVPSmodify.asp?id=<%=Request("id")%>"><font color="#000000">[返回上一页]</font></a>
<!--#include virtual="/inc-freehost-function/template-vpsadm-end.asp"-->
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
