<%@ Language=VBScript %>

<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canadmidc")="" 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="admidc.asp"><font color="#FFFFFF"><strong>IDC管理</strong></font></a></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="93">
	  
	  <table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="60" align="center" valign="middle" background="img/r3.jpg"  onClick="table1.style.display='none';table2.style.display='none';table3.style.display='';" id="tableTop2" style="Cursor:hand"><font color="#FFFFFF"><a href="admidcrepair.asp"><font color="#FFFFFF"><strong>维护记录</strong></font></a><br>
            </font> </td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table>
	  
	  </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="462" align="center" vAlign=top background="contopa.gif" bgcolor="#FFFFFF"><%
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")

	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_IDC_repair where 1=1 order by id desc"
if Request("op")="notfinish" then Sql="Select * from FreeHost.FreeHost_Product_IDC_repair where status<>'处理完成' order by id desc"
if Request("op")="haveaws" then Sql="Select * from FreeHost.FreeHost_Product_IDC_repair where status='等待处理' order by id desc"
if Request("op")="finish" then Sql="Select * from FreeHost.FreeHost_Product_IDC_repair where status='处理完成' order by id desc"
if Request("op")="new" then Sql="Select * from FreeHost.FreeHost_Product_IDC_repair where status='联络用户中' order by id desc"
if Request("repairid")<>"" And IsNumeric(Request("repairid")) then Sql="Select * from FreeHost.FreeHost_Product_IDC_repair where PDID='"&Request("repairid")&"' order by id desc"

if Request("idctype")<>"" and Request("idctype")<>"全部类型" Then sql=replace(sql,"order by id desc"," and idctype='"&Request("idctype")&"' order by id desc")
'response.write sql
	dsph.PageSize = 15
	dsph.Open Sql,conn,1,1

if dsph.Eof then
%>
          <br>
  数据库中不存在相关的记录。
  <%
else
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

type1=Request("type1")
%>
  <form action="" method="get" name="acttype">
    分　类：
      <select name="idctype" id="idctype">
	          <option value="全部类型" <%if idctype="全部类型" then%>selected<%end if%>>全部类型</option>
        <option value="服务器重启" <%if idctype="服务器重启" then%>selected<%end if%>>服务器重启</option>
        <option value="重装操作系统" <%if idctype="重装操作系统" then%>selected<%end if%>>重装操作系统</option>
        <option value="服务器软件设置" <%if idctype="服务器软件设置" then%>selected<%end if%>>服务器软件设置</option>
        <option value="服务器安全检查" <%if idctype="服务器安全检查" then%>selected<%end if%>>服务器安全检查</option>
        <option value="服务器其他类" <%if idctype="服务器其他类" then%>selected<%end if%>>服务器其他类</option>
        <option value="网络维护" <%if idctype="网络维护" then%>selected<%end if%>>网络维护</option>
        <option value="攻击类维护" <%if idctype="攻击类维护" then%>selected<%end if%>>攻击类维护</option>
        <option value="交换机维护" <%if idctype="交换机维护" then%>selected<%end if%>>交换机维护</option>
        <option value="路由器维护" <%if idctype="路由器维护" then%>selected<%end if%>>路由器维护</option>
      </select>
    　<a href="javascript:location.href='admidcrepair.asp?'+'idctype='+document.acttype.idctype.value">全部问题</a>　<a href="javascript:location.href='admidcrepair.asp?op=notfinish'+'&idctype='+document.acttype.idctype.value">所有未完成</a>　 <a href="javascript:location.href='admidcrepair.asp?op=haveaws'+'&idctype='+document.acttype.idctype.value">等待处理</a>　 <a href="javascript:location.href='admidcrepair.asp?op=new'+'&idctype='+document.acttype.idctype.value">联络用户中</a>　<a href="javascript:location.href='admidcrepair.asp?op=finish'+'&idctype='+document.acttype.idctype.value">处理完成</a><br>
  </form>
  <%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%>"><font color="#000000">上一页</font></a>
  <%End If%>
  |
  <%If Clng(pn)<dsph.PageCount Then%>
  <a href="?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
  <%End If%>
  <DIV class="tableborder" id=t1>
    <table width="100%"  border="0" cellspacing="1">
      <tr bgcolor="#CCCCCC">
        <td width="7%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">编号</font></td>
        <td width="18%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">IP</font></td>
        <td width="18%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">标题</font></td>
        <td width="9%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">用户</font></td>
        <td width="20%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">时间</font></td>
        <td width="10%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">状态</font></td>
        <td width="10%" align="center" background="img/tablebg.gif" bgcolor="#CCCCCC"><font color="#FFFFFF">分类</font></td>
        <td width="8%" align="center" background="img/tablebg.gif"><font color="#FFFFFF">操作</font></td>
      </tr>
      <%
For N=1 To dsph.PageSize 
					If dsph.RecordCount=0 Then Exit For
					On Error Resume next
%>
      <tr bgcolor="#E4EAF2">
        <td align="center"><%=dsph("id")%></td>
        <td align="center"><a href="aws.asp?id=<%=dsph("id")%>"></a><a href="handidc1.asp?username=<%=dsph("username")%>&id=<%=dsph("id")%>">
          <%
	Set dsidc = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_product_IDC where ID="&dsph("pdid")
		dsidc.Open Sql,conn,1,1
If Not dsidc.eof then		
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCIP where PDID="&dsidc("id")
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
IP尚未分配
<%else
while not dsX.eof
%>
<%=dsX("IP")%> <br>
<%
dsX.movenext
wend
end If
End if
%>
        </a> </td>
        <td align="center"><a href="handidc1.asp?username=<%=dsidc("username")%>&id=<%=dsidc("id")%>&repairid=<%=dsph("id")%>"><font color="#000000"><%=dsph("idctitle")%></font></a></td>
        <td align="center"><a href="<%if isnull(dsph("agent2")) then%>searchuser.asp<%else%>searchagent.asp<%end if%>?username=<%=dsph("username")%>" target="_blank"><%=dsph("username")%></a></td>
        <td align="center"><%=dsph("addtime")%><br>
        </td>
        <td align="center"><%if dsph("status")="等待处理" then%><font color=red><%=dsph("status")%></font><%else%><%=dsph("status")%><%end if%></td>
        <td align="center"><%=dsph("idctype")%></td>
        <td align="center"><a href="handidc1.asp?username=<%=dsidc("username")%>&id=<%=dsidc("id")%>&repairid=<%=dsph("id")%>"><font color="#000000">修改</font></a></td>
      </tr>
      <%dsidc.close
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>
  <%end if
dsph.close
set dsph=nothing%>
</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%>
