<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cancheckmoney")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if
if not ef then%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="113"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="90" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="admorder.asp"><font color="#FFFFFF"><strong>订单管理</strong></font></a></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="93">&nbsp;	  </TD>
      <TD width="113">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF">

<%
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")

	Set dsph = Server.CreateObject("ADODB.Recordset")
SQL="Select * from FreeHost.FreeHost_Order where "
if Request.QueryString ("username")<>"" then Sql=Sql+"username= '"&trim(Request.QueryString ("username"))&"' and "
if Request.QueryString ("hostname")<>"" then Sql=Sql+"hostname like '%"&replace(Request.QueryString ("hostname"),"http://","")&"%' and "
if Request.QueryString ("ftpname")<>"" then Sql=Sql+"ftpname like '%"&trim(Request.QueryString ("ftpname"))&"%' and "
if Request.QueryString ("ServerlistID")<>"" then Sql=Sql+"ServerlistID = '"&trim(Request.QueryString ("ServerlistID"))&"' and "
if Request.QueryString ("Hosttype")<>"" then Sql=Sql+"Hosttype = '"&trim(Request.QueryString ("Hosttype"))&"' and "
if Request.QueryString ("VPStype")<>"" then Sql=Sql+"Hosttype = '"&trim(Request.QueryString ("VPStype"))&"' and "

if Request.QueryString ("status")<>"" then
Sql=Sql+" status = '"&trim(Request.QueryString ("status"))&"' and "
end if

if Request.QueryString ("starttime2") <>"" then  Sql=Sql+" starttime>'"&Request.QUERYSTRING ("starttime1")&"' and starttime<'"&Request.QUERYSTRING ("starttime2")&"' and "
if Request.QueryString ("endtime2") <>"" then  Sql=Sql+" endtime>'"&Request.QUERYSTRING ("endtime1")&"' and endtime<'"&Request.QUERYSTRING ("endtime2")&"' and "
if Request.QueryString ("starttime") <>"" then  Sql=Sql+" starttime>'"&Request.QUERYSTRING ("starttime")&"' and "
if Request.QueryString ("endtime") <>"" then  Sql=Sql+" and endtime<'"&Request.QUERYSTRING ("endtime")&"' and "
if right(sql,5)=" and " then sql=left(sql,len(sql)-5)&" order by id desc"
if right(SQL,6)="where " then  SQL="Select * from FreeHost.FreeHost_Order order by id desc"


'Response.Write sql
	if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsph.PageSize = 25
        dsph.Open Sql,conn,1,1
if not dsph.eof then
if Request.ServerVariables("QUERY_STRING")<>"" then
ask=Split(Request.ServerVariables("QUERY_STRING"), chr(38)&"pn")
else
ask=Split("freehost=1", "")
ask(0)="freehost=lsoft"
end if
	pn=1
if Request.QueryString ("pn")<>"" then pn=Request.QueryString ("pn")
If dsph.RecordCount <> 0 Then dsph.AbsolutePage = CLng(pn)  
    if clng(pn)<=10 then
    begini=1
      if dsph.PageCount<=10 then
       endini=dsph.PageCount 
       else
       endini=10
      end if
    end if
%>

<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="?<%=ask(0)%>&pn=1"><font color="#000000">最新[1]--[10]</font></a>　　现在是第<font color=red>[<%=pn%>]</font>页 
        　共<%=dsph.PageCount%>页　<%end if%><%If Clng(pn)>1 Then%><a href="?<%=ask(0)%>&pn=<%=pn-1%>">上一页</a><%End If%>|<%If Clng(pn)<dsph.PageCount Then%><a href="?<%=ask(0)%>&pn=<%=pn+1%>">下一页</a><%End If%>
<a href="admorder.asp?starttime=<%=formatdatetime(now,2)%>"><font color="#000000">今天新订单</font></a> | <a href="admorder.asp?starttime=<%=formatdatetime(dateadd("d",-7,now),2)%>"><font color="#000000">一周新订单</font></a> | 
<a href="admorder.asp?status=未处理&starttime=<%=formatdatetime(now,2)%>"><font color="#000000">一周未完成订单</font></a> | <a href="admorder.asp?status=未处理&starttime=<%=formatdatetime(dateadd("d",-7,now),2)%>"><font color="#000000">30天未完成订单</font></a>
<DIV class="tableborder">
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
  <tr bgcolor="#C1BFBF" align="center">
    <td width="40" height="24" background="img/tablebg.gif"><font color="#FFFFFF">编号</font></td>
    <td background="img/tablebg.gif"><font color="#FFFFFF">内容</font></td>
    <td width="50" height="24" background="img/tablebg.gif"><font color="#FFFFFF">用户名</font></td>
    <td height="24" background="img/tablebg.gif"><font color="#FFFFFF">用户提交的信息</font></td>
    <td width="80" height="24" background="img/tablebg.gif"><font color="#FFFFFF">时间</font></td>
    <td width="80" height="24" background="img/tablebg.gif"><font color="#FFFFFF">状态</font></td>
    <td width="80" height="24" background="img/tablebg.gif"><font color="#FFFFFF">操作</font></td>
    </tr>
<%
For N=1 To dsph.PageSize 
					If dsph.RecordCount=0 Then Exit For
%>
<%Hosttype=dsph("Hosttype")&dsph("Emailtype")&dsph("SQLtype")&dsph("Othertype")&dsph("IDCtype")&dsph("VPStype")%>
  <tr align="center" bgcolor="#E4EAF2" title="<%=dsph("site")%>：<%=dsph("regip")%> 用户信息：<%=replace(dsph("truename"),"""","“")%> 内部信息：<%=dsph("coreinfo")%>" onmouseover=this.bgColor='#cccccc'; onmouseout=this.bgColor='#E4EAF2';>
    <td width="40"><%=dsph("id")%></td>
    <td><%=Hosttype%></td>
    <td width="50" height="30"><a href="searchuser.asp?username=<%=dsph("username")%>" target="_blank"><%=dsph("username")%></a>
      <%if dsph("agent1")<>"n" then%>(<a href="searchagent.asp?username=<%=dsph("agent1")%>" target="_blank"><font color="blue"><%=dsph("agent1")%></font></a>)      <%end if%></td>
    <td><%=dsph("userremindinfo")%></td>
    <td width="80"><%=dsph("starttime")%></td>
    <td width="80"><%=dsph("status")%></td>
    <td width="80"><a href="handorder1.asp?username=<%=dsph("username")%>&id=<%=dsph("id")%>"><font color="#000000">管理</font></a></td>
    </tr>
<%
If clng(pn)=dsph.PageCount Then
I = dsph.RecordCount - (dsph.PageCount-1) * dsph.PageSize
If N=I Then Exit For
End If
dsph.movenext
Next%></table>
</div>

<%dsph.close
set dsph=nothing
else%>
<DIV class="tableborder"><br>
<br>
没有相关的记录。<br>
<br>
</div>
<%end if%><br>


</TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
            <%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
