<!--#include file="../Include/conig.asp"-->
<!--#include file="Admin_check.asp"-->
<%
response.expires = 0 
response.expiresabsolute = now() - 1 
response.addHeader "pragma","no-cache" 
response.addHeader "cache-control","private" 
Response.cachecontrol = "no-cache"
On Error Resume Next
Dim starttime: starttime = Timer()
'Dim Jurl: Jurl = Left(request.ServerVariables("URL"), InStrRev(request.ServerVariables("URL"), "/") - 1)
Dim Jurl: Jurl ="../images/"
Function leftshow(ByVal str, ByVal leftc)
  If Len(str) >= leftc Then
    leftshow = Left(str, leftc) & ".."
  Else
    leftshow = str
  End If
End Function

Function htmlencode(ByVal reString)
  Dim str
  str = reString
  str = Replace(str, "&", "&amp;")
  str = Replace(str, ">", "&gt;")
  str = Replace(str, "<", "&lt;")
  htmlencode = str
End Function

Sub client_alert(ByVal str, ByVal stype)
  response.Clear
  response.write "<html>" & vbCrLf
  response.write "<head>" & vbCrLf
  response.write "<meta http-equiv=""content-type"" content=""text/html; charset=gb2312"">" & vbCrLf
  response.write "<title>QQ在线咨询-提示信息</title>" & vbCrLf
  response.write "</head>" & vbCrLf
  response.write "<body>" & vbCrLf
  response.write "<script language=""javascript"">" & vbCrLf
  response.write "alert(""" & str & """)" & vbCrLf
  If IsNumeric(stype) Then
    response.write "history.go(" & stype & ")" & vbCrLf
  Else
    response.write "location.href=""" & stype & """" & vbCrLf
  End If
  response.write "</script>" & vbCrLf
  response.write "</body>" & vbCrLf
  response.write "</html>" & vbCrLf
  response.End
End Sub

Sub client_confirm(ByVal str, ByVal funy, ByVal funn)
  response.Clear
  response.write "<html>" & vbCrLf
  response.write "<head>" & vbCrLf
  response.write "<meta http-equiv=""content-type"" content=""text/html; charset=gb2312"">" & vbCrLf
  response.write "<title>QQ在线咨询-提示信息</title>" & vbCrLf
  response.write "</head>" & vbCrLf
  response.write "<body>" & vbCrLf
  response.write "<script language=""javascript"">" & vbCrLf
  response.write "if(confirm(""" & str & """))" & vbCrLf
  If IsNumeric(funy) Then
    response.write "history.go(" & funy & ")" & vbCrLf
  Else
    response.write "location.href=""" & funy & """" & vbCrLf
  End If
  response.write "else" & vbCrLf
  If IsNumeric(funn) Then
    response.write "history.go(" & funn & ")" & vbCrLf
  Else
    response.write "location.href=""" & funn & """" & vbCrLf
  End If
  response.write "</script>" & vbCrLf
  response.write "</body>" & vbCrLf
  response.write "</html>" & vbCrLf
  response.End
End Sub
Sub editsiteinfo()
  Dim infostrSourceFile, infoobjXML
  infostrSourceFile = Server.MapPath("../images/xml/info.xml")
  Set infoobjXML = Server.CreateObject("Microsoft.XMLDOM")
  infoobjXML.Load (infostrSourceFile)
  Dim infoobjNodes
  Set infoobjNodes = infoobjXML.selectSingleNode("xml/qqinfo/qqset[siteid ='1']")
  If Not IsNull(infoobjNodes) Then
    infoobjNodes.childNodes(0).Text = htmlencode(request.Form("sitename"))
    infoobjNodes.childNodes(1).Text = htmlencode(request.Form("siteskin"))
    infoobjNodes.childNodes(2).Text = htmlencode(request.Form("siteshowx"))
    infoobjNodes.childNodes(3).Text = htmlencode(request.Form("siteshowy"))
    infoobjNodes.childNodes(4).Text = htmlencode(request.Form("sitearea"))
    infoobjXML.save (infostrSourceFile)
    Set infoobjNodes = Nothing
    Set infoobjXML = Nothing
    Call client_alert("参数修改成功!", "?type=manage")
  Else
    Call client_alert("Xml文件 未成功打开!", -1)
  End If
End Sub

Sub addinfo()
  If Trim(request.Form("qq")) = "" Or Trim(request.Form("dis")) = "" Or Trim(request.Form("face")) = "" Then
    Call client_alert("您并没有填入必要的数据!", -1)
  End If
  Dim jtb_color
  If Trim(request.Form("color")) = "" Then
    jtb_color = "#000000"
  Else
    jtb_color = htmlencode(request.Form("color"))
  End If
  Dim strSourceFile, objXML, oListNode, oDetailsNode, AllNodesNum
  strSourceFile = Server.MapPath("../images/xml/qq.xml")
  Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  objXML.Load (strSourceFile)
  Dim objRootlist
  Set objRootlist = objXML.documentElement.selectSingleNode("qqlist")
  Dim id
  If objRootlist.hasChildNodes Then
    id = objRootlist.lastChild.lastChild.Text + 1
  Else
    id = 1
  End If
  Set objRootlist = Nothing
  Set oListNode = objXML.documentElement.selectSingleNode("qqlist").appendChild(objXML.createElement("qq"))
  Set oDetailsNode = oListNode.appendChild(objXML.createElement("qid"))
  oDetailsNode.Text = htmlencode(request.Form("qq"))
  Set oDetailsNode = oListNode.appendChild(objXML.createElement("dis"))
  oDetailsNode.Text = htmlencode(request.Form("dis"))
  Set oDetailsNode = oListNode.appendChild(objXML.createElement("face"))
  oDetailsNode.Text = htmlencode(request.Form("face"))
   Set oDetailsNode = oListNode.appendChild(objXML.createElement("qq1"))
  oDetailsNode.Text = htmlencode(request.Form("qq1"))
  Set oDetailsNode = oListNode.appendChild(objXML.createElement("id"))
  oDetailsNode.Text = id
  objXML.save (strSourceFile)
  Set objRootlist = Nothing
  Set oListNode = Nothing
  Set oDetailsNode = Nothing
  Set objXML = Nothing
  Call client_alert("添加新的QQ号成功!", "?type=manage")
End Sub

Sub editinfo()
  Dim editid: editid = request.querystring("id")
  If Not IsNumeric(editid) Or editid = "" Then
    Call client_alert("ID号必须为数字!", -1)
  Else
    editid = CLng(editid)
  End If
  If Trim(request.Form("qq")) = "" Or Trim(request.Form("dis")) = "" Or Trim(request.Form("face")) = "" Then
    Call client_alert("没有添入必要的数据!", -1)
  End If
  Dim strSourceFile, objXML
  strSourceFile = Server.MapPath("../images/xml/qq.xml")
  Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  objXML.Load (strSourceFile)
  Dim objNodes
  Set objNodes = objXML.selectSingleNode("xml/qqlist/qq[id ='" & editid & "']")
  If Not IsNull(objNodes) Then
    objNodes.childNodes(0).Text = htmlencode(request.Form("qq"))
    objNodes.childNodes(1).Text = htmlencode(request.Form("dis"))
    objNodes.childNodes(2).Text = htmlencode(request.Form("face"))
    objNodes.childNodes(3).Text = htmlencode(request.Form("qq1"))
    objXML.save (strSourceFile)
    Set objNodes = Nothing
    Set objXML = Nothing
    Call client_alert("修改成功!", "?type=manage")
  Else
    Call client_alert("修改失败!", "?type=manage")
  End If
End Sub

Sub delinfo()
  Dim delid
  delid = request.querystring("id")
  If Not IsNumeric(delid) Or delid = "" Then
    Call client_alert("ID号必须为数字!", "?type=manage")
  Else
    delid = CLng(delid)
  End If
  Dim strSourceFile, objXML
  strSourceFile = Server.MapPath("../images/xml/qq.xml")
  Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  objXML.Load (strSourceFile)
  Dim objNodes
  Set objNodes = objXML.selectSingleNode("xml/qqlist/qq[id ='" & delid & "']")
  If Not IsNull(objNodes) Then
    If request.querystring("yn") = "" Then
      Call client_confirm("确认要删除[" & objNodes.childNodes(0).Text & "]的信息吗?", "?type=manage&act=delete&id=" & delid & "&yn=1", -1)
    Else
      objNodes.parentNode.removeChild (objNodes)
      objXML.save (strSourceFile)
      Call client_alert("删除成功!", "?type=manage")
    End If
  Else
  Call client_alert("没有找到指定的条目!", "?type=manage")
  End If
  Set objNodes = Nothing
  Set objXML = Nothing
  response.End
End Sub

Sub fso_write(ByVal fpath, ByVal ftext)
  On Error Resume Next
  Dim fso, fout
  Set fso = Server.CreateObject("Scripting.FileSystemObject")
  Set fout = fso.CreateTextFile(Server.MapPath(fpath),,true)
  fout.write ftext
  fout.Close
  Set fout = Nothing
  Set fso = Nothing
  If Err Then
    Call client_alert("创建文件失败,可能是您的服务器不支持FSO权限而导致的!", "?type=manage")
  End If
End Sub

Sub create_js()
  Dim tmpstr
  tmpstr = ""
  tmpstr = tmpstr & "var online=new Array();" & vbCrLf
  tmpstr = tmpstr & "if (!document.layers)" & vbCrLf
  tmpstr = tmpstr & "document.write('<div id=divStayTopLeft style=position:absolute>');" & vbCrLf
  Call fso_write("../images/top.js", tmpstr)
  Dim strSourceFile, objXML, objRootsite, AllNodesNum
  strSourceFile = Server.MapPath("../images/xml/info.xml")
  Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  objXML.Load (strSourceFile)
  Set objRootsite = objXML.documentElement.selectSingleNode("qqinfo")
  Dim Sitename, Siteskin
  Sitename = objRootsite.childNodes.Item(0).childNodes.Item(0).Text
  Siteskin = objRootsite.childNodes.Item(0).childNodes.Item(1).Text
  Dim startX, startY, sarea
  startX = objRootsite.childNodes.Item(0).childNodes.Item(2).Text
  startY = objRootsite.childNodes.Item(0).childNodes.Item(3).Text
  sarea = objRootsite.childNodes.Item(0).childNodes.Item(4).Text
  If sarea = "1" Then
    If IsNumeric(startX) Then
      startX = CInt(startX) + 135
      startX = "screen.width-" & CStr(startX)
    End If
  End If
  Set objRootsite = Nothing
  Set objXML = Nothing
  strSourceFile = Server.MapPath("../images/xml/qq.xml")
  Set objXML = Server.CreateObject("Microsoft.FreeThreadedXMLDOM")
  objXML.Load (strSourceFile)
  Set objRootsite = objXML.documentElement.selectSingleNode("qqlist")
  AllNodesNum = objRootsite.childNodes.length - 1
  Dim iCount, iqCount, Qqnum
  For iqCount = 0 To AllNodesNum
    Qqnum = Qqnum & objRootsite.childNodes.Item(iqCount).childNodes.Item(0).Text & ":"
  Next
  tmpstr = ""
  tmpstr = tmpstr & "document.write('<script language=""javascript"" src=""" & Jurl & "/top.js""></script>');" & vbCrLf
   tmpstr = tmpstr & "document.write('<script src=""http://webpresence.qq.com/getonline?Type=1&"&Qqnum&"""></script>');" & vbCrLf
  tmpstr = tmpstr & "document.write('<script language=""javascript"" src=""" & Jurl & "/bottom.js""></script>');" & vbCrLf
  Call fso_write("../images/Ruiqq.js", tmpstr)

  tmpstr = ""
  tmpstr = tmpstr & "document.write('<table cellSpacing=""0"" cellPadding=""0"" width=""110"" border=""0"" id=""qqtab"">');" & vbCrLf
  tmpstr = tmpstr & "document.write('    <tr>');" & vbCrLf
  tmpstr = tmpstr & "document.write('      <td width=""110"" onclick=""if(document.all.qqtab.style.display==\'none\'){document.all.qqtab.style.display=\'\'} else {document.all.qqtab.style.display=\'none\'}""><img src=""" & Jurl & "/top.gif"" border=""0""></td>');" & vbCrLf
  tmpstr = tmpstr & "document.write('    </tr>');" & vbCrLf
  tmpstr = tmpstr & "document.write('    <tr id=""qqstab"">');" & vbCrLf
  tmpstr = tmpstr & "document.write('      <td valign=""middle"" align=""center"" background=""" & Jurl & "/middle.gif"">');" & vbCrLf
  tmpstr = tmpstr & "document.write('<table border=""0"" width=""80"" cellSpacing=""0"" cellPadding=""0"">');" & vbCrLf
  tmpstr = tmpstr & "document.write('  <tr>');" & vbCrLf
  tmpstr = tmpstr & "document.write('    <td width=""80"" height=""5"" border=""0"" colspan=""2""></td>');" & vbCrLf
  tmpstr = tmpstr & "document.write('  </tr>');" & vbCrLf
  For iCount = 0 To AllNodesNum
    tmpstr = tmpstr & "document.write('  <tr>');" & vbCrLf
    tmpstr = tmpstr & "if (online[" & iCount & "]==0)" & vbCrLf
    tmpstr = tmpstr & "  {" & vbCrLf
    tmpstr = tmpstr & "    document.write('    <td width=""25"" height=""22"" valign=""middle"" align=""center"">');" & vbCrLf
    tmpstr = tmpstr & "    document.write('<img src=""" & Jurl & "1_f.gif"" border=""0"">');" & vbCrLf
    tmpstr = tmpstr & "    document.write('    </td>');" & vbCrLf
    tmpstr = tmpstr & "    document.write('    <td width=""55"" height=""22"" valign=""middle"" align=""left"">');" & vbCrLf	
if len(objRootsite.childNodes.item(iCount).childNodes.item(3).text)<20 then
    tmpstr = tmpstr & "    document.write('<a href=""tencent://message/?uin="&objRootsite.childNodes.item(iCount).childNodes.item(0).text&"&amp;Site="&Sitename&"&amp;Menu=yes"" ><font style=""font-size:12px;TEXT-DECORATION:none;color:" & objRootsite.childNodes.Item(iCount).childNodes.Item(4).Text & ";"">" & objRootsite.childNodes.Item(iCount).childNodes.Item(1).Text & "</font></a><br>');" & vbCrLf	
else		
 tmpstr = tmpstr & " document.writeln('<a target=\""_blank\"" href=\""http:\/\/sighttp.qq.com\/authd?IDKEY="&objRootsite.childNodes.item(iCount).childNodes.item(3).text&"\""><font style=""font-size:12px;TEXT-DECORATION:none;color:" & objRootsite.childNodes.Item(iCount).childNodes.Item(4).Text & ";"">" & objRootsite.childNodes.Item(iCount).childNodes.Item(1).Text & "</font></a><\/a>');" & vbCrLf
end if		
    tmpstr = tmpstr & "    document.write('    </td>');" & vbCrLf
    tmpstr = tmpstr & "  }" & vbCrLf
    tmpstr = tmpstr & "else" & vbCrLf
    tmpstr = tmpstr & "  {" & vbCrLf
    tmpstr = tmpstr & "    document.write('    <td width=""25"" height=""22"" valign=""middle"" align=""center"">');" & vbCrLf
    tmpstr = tmpstr & "    document.write('<img src=""" & Jurl & "1_m.gif"" border=""0"">');" & vbCrLf
    tmpstr = tmpstr & "    document.write('    </td>');" & vbCrLf
    tmpstr = tmpstr & "    document.write('    <td width=""55"" height=""22"" valign=""middle"" align=""left"">');" & vbCrLf	
	if len(objRootsite.childNodes.item(iCount).childNodes.item(2).text)<20 then
    tmpstr = tmpstr & "    document.write('<a href=""tencent://message/?uin="&objRootsite.childNodes.item(iCount).childNodes.item(0).text&"&amp;Site="&Sitename&"&amp;Menu=yes"" ><font style=""font-size:12px;TEXT-DECORATION:none;color:" & objRootsite.childNodes.Item(iCount).childNodes.Item(4).Text & ";"">" & objRootsite.childNodes.Item(iCount).childNodes.Item(1).Text & "</font></a><br>');" & vbCrLf
  else
	  tmpstr = tmpstr & " document.writeln('<a target=\""_blank\"" href=\""http:\/\/sighttp.qq.com\/authd?IDKEY="&objRootsite.childNodes.item(iCount).childNodes.item(3).text&"\""><font style=""font-size:12px;TEXT-DECORATION:none;color:" & objRootsite.childNodes.Item(iCount).childNodes.Item(4).Text & ";"">" & objRootsite.childNodes.Item(iCount).childNodes.Item(1).Text & "</font></a><\/a>');" & vbCrLf
	end if
    tmpstr = tmpstr & "    document.write('    </td>');" & vbCrLf
    tmpstr = tmpstr & "  }" & vbCrLf
    tmpstr = tmpstr & "document.write('  </tr>');" & vbCrLf
  Next
  Set objRootsite = Nothing
  Set objXML = Nothing
  tmpstr = tmpstr & "document.write('</table>');" & vbCrLf
  tmpstr = tmpstr & "document.write('</td>');" & vbCrLf
  tmpstr = tmpstr & "document.write('    </tr>');" & vbCrLf
  tmpstr = tmpstr & "document.write('    <tr>');" & vbCrLf
  tmpstr = tmpstr & "document.write('      <td width=""110"" onclick=""if(document.all.qqstab.style.display==\'none\'){document.all.qqstab.style.display=\'\'} else {document.all.qqstab.style.display=\'none\'}""><img src=""" & Jurl & "/bottom.gif"" border=""0""></td>');" & vbCrLf
  tmpstr = tmpstr & "document.write('    </tr>');" & vbCrLf
  tmpstr = tmpstr & "document.write('</table>');" & vbCrLf
  tmpstr = tmpstr & "var verticalpos=""frombottom""" & vbCrLf
  tmpstr = tmpstr & "if (!document.layers)" & vbCrLf
  tmpstr = tmpstr & "document.write('</div>')" & vbCrLf
  tmpstr = tmpstr & "function JSFX_FloatTopDiv()" & vbCrLf
  tmpstr = tmpstr & "{" & vbCrLf
  tmpstr = tmpstr & "  var jqq_startX = " & startX & ";" & vbCrLf
  tmpstr = tmpstr & "  var jqq_startY = " & startY & ";" & vbCrLf
  tmpstr = tmpstr & "  var jqq_ns = (navigator.appName.indexOf(""Netscape"") != -1);" & vbCrLf
  tmpstr = tmpstr & "  var jqq_d = document;" & vbCrLf
  tmpstr = tmpstr & "  function jqq_ml(id)" & vbCrLf
  tmpstr = tmpstr & "  {" & vbCrLf
  tmpstr = tmpstr & "    var jqq_el=jqq_d.getElementById?jqq_d.getElementById(id):jqq_d.all?jqq_d.all[id]:jqq_d.layers[id];" & vbCrLf
  tmpstr = tmpstr & "    if(jqq_d.layers)jqq_el.style=jqq_el;" & vbCrLf
  tmpstr = tmpstr & "    jqq_el.sP=function(x,y){this.style.left=x;this.style.top=y;};" & vbCrLf
  tmpstr = tmpstr & "    jqq_el.x = jqq_startX;" & vbCrLf
  tmpstr = tmpstr & "    if (verticalpos==""fromtop"")" & vbCrLf
  tmpstr = tmpstr & "      jqq_el.y = jqq_startY;" & vbCrLf
  tmpstr = tmpstr & "    else{" & vbCrLf
  tmpstr = tmpstr & "      jqq_el.y = jqq_ns ? pageYOffset + innerHeight : document.documentElement.scrollTop + document.documentElement.clientHeight;" & vbCrLf
  tmpstr = tmpstr & "      jqq_el.y -= jqq_startY;" & vbCrLf
  tmpstr = tmpstr & "    }" & vbCrLf
  tmpstr = tmpstr & "    return jqq_el;" & vbCrLf
  tmpstr = tmpstr & "  }" & vbCrLf
  tmpstr = tmpstr & "  window.stayTopLeft=function()" & vbCrLf
  tmpstr = tmpstr & "  {" & vbCrLf
  tmpstr = tmpstr & "    if (verticalpos==""fromtop""){" & vbCrLf
  tmpstr = tmpstr & "      var jqq_pY = jqq_ns ? pageYOffset : document.documentElement.scrollTop;" & vbCrLf
  tmpstr = tmpstr & "      jqq_ftlObj.y += (jqq_pY + jqq_startY - jqq_ftlObj.y)/8;" & vbCrLf
  tmpstr = tmpstr & "    }" & vbCrLf
  tmpstr = tmpstr & "    else{" & vbCrLf
  tmpstr = tmpstr & "      var jqq_pY = jqq_ns ? pageYOffset + innerHeight : document.documentElement.scrollTop + document.documentElement.clientHeight;" & vbCrLf
  tmpstr = tmpstr & "      jqq_ftlObj.y += (jqq_pY - jqq_startY - jqq_ftlObj.y)/8;" & vbCrLf
  tmpstr = tmpstr & "    }" & vbCrLf
  tmpstr = tmpstr & "    jqq_ftlObj.sP(jqq_ftlObj.x, jqq_ftlObj.y);" & vbCrLf
  tmpstr = tmpstr & "    setTimeout(""stayTopLeft()"", 10);" & vbCrLf
  tmpstr = tmpstr & "  }" & vbCrLf
  tmpstr = tmpstr & "  jqq_ftlObj = jqq_ml(""divStayTopLeft"");" & vbCrLf
  tmpstr = tmpstr & "  stayTopLeft();" & vbCrLf
  tmpstr = tmpstr & "}" & vbCrLf
  tmpstr = tmpstr & "JSFX_FloatTopDiv();" & vbCrLf
  Call fso_write("../images/bottom.js", tmpstr)
  Call client_alert("在线客服文件创建成功!", "?type=manage")
End Sub

Select Case request.querystring("act")
  Case "cjs"
    Call create_js
  Case "editsiteinfo"
    Call editsiteinfo
  Case "add"
    Call addinfo
  Case "edit"
    Call editinfo
  Case "delete"
    Call delinfo
End Select
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>QQ在线咨询管理</title>
<link href="images/Admin_css.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.STYLE1 {font-weight: bold}
.STYLE2 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<body>
 <%
Sub slist()
%> 

 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EBF2F9">
  <tr>
    <td width="100%">
  <%
  Dim infostrSourceFile, infoobjXML
  infostrSourceFile = Server.MapPath("../images/xml/info.xml")
  Set infoobjXML = Server.CreateObject("Microsoft.XMLDOM")
  infoobjXML.Load (infostrSourceFile)
  Dim infoobjNodes
  Set infoobjNodes = infoobjXML.selectSingleNode("xml/qqinfo/qqset[siteid ='1']")
  If Not IsNull(infoobjNodes) Then
    %>
    <form method="post" action="?type=manage&act=editsiteinfo">
    <table border="0" width="100%">
      <tr>
        <td width="100%" height="30" background="images/skin/th_bg.gif">&nbsp;<span class="STYLE2">参数设置</span></td>
      </tr>
      <tr>
        <td width="100%" height="25">&nbsp;位置：<input type="radio" name="sitearea" value="0"<%if infoobjNodes.childNodes(4).text="0" then response.write " checked"%>>&nbsp;居左&nbsp;<input type="radio" name="sitearea" value="1"<%if infoobjNodes.childNodes(4).text="1" then response.write " checked"%>>&nbsp;居右</td>
      </tr>
      <tr>
        <td width="100%" height="25">&nbsp;网站名：<input name="sitename" type="text" class="textfield" value="<%=infoobjNodes.childNodes(0).text%>" size="15"> 
        <input type="hidden" name="siteskin" size="5" value="1"> </td>
      </tr>
      <tr>
        <td width="100%" height="25">&nbsp;X坐标：
          <input name="siteshowx" type="text" class="textfield" value="<%=infoobjNodes.childNodes(2).text%>" size="10">
        &nbsp;Y坐标：<input name="siteshowy" type="text" class="textfield" value="<%=infoobjNodes.childNodes(3).text%>" size="10">
        &nbsp;<input name="submit" type="submit" class="button" value="参数修改"></td>
      </tr>
      <tr>
        <td width="100%" height="10"></td>
      </tr>
    </table>
    </form>
    <%
    Set infoobjNodes = Nothing
    Set infoobjXML = Nothing
  Else
    Call client_alert("Xml文件 未成功打开!", "?type=manage")
  End If
%>
    <table border="0" width="100%">
      <tr>
        <td width="180" height="30" background="images/skin/th_bg.gif" class="STYLE2">&nbsp;QQ号</td>
        <td width="180" background="images/skin/th_bg.gif">&nbsp;<span class="STYLE2">描述</span></td>
        <td width="30" align="center" background="images/skin/th_bg.gif" class="STYLE2">编辑</td>
        <td width="30" align="center" background="images/skin/th_bg.gif" class="STYLE2">删除</td>
      </tr>
<%
  Dim strSourceFile, objXML, objRootsite, AllNodesNum
  strSourceFile = Server.MapPath("../images/xml/qq.xml")
  Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  objXML.Load (strSourceFile)
  Set objRootsite = objXML.documentElement.selectSingleNode("qqlist")
  AllNodesNum = objRootsite.childNodes.length - 1
  Dim iCount
  For iCount = 0 To AllNodesNum
    %>
      <tr>
        <td width="180" height="25">&nbsp;<%=left(objRootsite.childNodes.item(iCount).childNodes.item(0).text,20)%></td>
        <td width="180" height="25">&nbsp;<%=objRootsite.childNodes.item(iCount).childNodes.item(1).text%></td>
        <td width="30" align="center" height="25"><a href="?type=manage&mtype=edit&id=<%=objRootsite.childNodes.item(iCount).childNodes.item(4).text%>">编辑</a></td>
        <td width="30" align="center" height="25"><a href="?type=manage&act=delete&id=<%=objRootsite.childNodes.item(iCount).childNodes.item(4).text%>">删除</a></td>
      </tr>
    <%
  Next
  Set objRootsite = Nothing
  Set objXML = Nothing
%>
      <tr>
        <td height="25" colspan="5" align="right"><input type="button" class="button" onClick="location.href='?type=manage&act=cjs'" value="生成在线咨询">
        &nbsp;</td>
      </tr>
    </table>
    <form method="post" action="?type=manage&act=add">
    <table border="0" width="100%">
      <tr>
        <td width="100%" height="10"></td>
      </tr>
      <tr>
        <td width="100%" height="30" background="images/skin/th_bg.gif">&nbsp;<span class="STYLE2">添加客服</span></td>
      </tr>
      <tr>
        <td width="100%" height="4">&nbsp;QQ号：
          <input name="qq" type="text" class="textfield" value="" size="20"></td>
      </tr>
      <tr>
        <td height="1">&nbsp;QQ加密：
          <input name="qq1" type="text" class="textfield" id="qq1" value="" size="50">
          不加密留空 粘贴<span class="STYLE1">IDKEY</span>参数值&nbsp; 例如：IDKEY=XXX 那么参数值就是：XXX <a href="http://imis.qq.com/webpresence/code.shtml" target="_blank"><strong>点这里获得</strong></a> <span class="STYLE1">IDKEY</span></td>
      </tr>

      <tr></tr>
      <tr>
        <td width="100%" height="25">&nbsp;描述：<input name="dis" type="text" class="textfield" size="25">
        <input name="face" type="hidden" value="1" checked></td>
      </tr>
      <tr>
        <td width="100%" height="25">&nbsp;<input name="submit" type="submit" class="button" value="确定添加">
        &nbsp;<input name="reset" type="reset" class="button" value="取消重置"></td>
      </tr>
      <tr>
        <td width="100%" height="10"></td>
      </tr>
    </table>
    </form>
    </td>
  </tr>
</table>
<%
End Sub

Sub neditinfo()
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EBF2F9">
  <tr>
    <td width="100%">
    <%
  Dim neditid: neditid = request.querystring("id")
  If Not IsNumeric(neditid) Or neditid = "" Then
    Call client_alert("ID号必须是数字!", -1)
  Else
    neditid = CLng(neditid)
  End If
  Dim strSourceFile, objXML
  strSourceFile = Server.MapPath("../images/xml/qq.xml")
  Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  objXML.Load (strSourceFile)
  Dim objNodes
  Set objNodes = objXML.selectSingleNode("xml/qqlist/qq[id ='" & neditid & "']")
  If Not IsNull(objNodes) Then
    %>
    <form method="post" action="?type=manage&act=edit&id=<%=neditid%>">
    <table border="0" width="100%">
      <tr>
        <td width="100%" height="30" background="images/skin/th_bg.gif">&nbsp;<span class="STYLE2">修改客服</span></td>
      </tr>
      <tr>
        <td width="100%" height="11">&nbsp;QQ号：
          <input name="qq" type="text" class="textfield" value="<%=objNodes.childNodes(0).text%>" size="20">
         &nbsp;</td>
      </tr>
      <tr>
        <td height="5">&nbsp;QQ加密：
          <input name="qq1" type="text" class="textfield" id="qq1" value="<%=objNodes.childNodes(3).text%>" size="50">
不加密留空 粘贴<span class="STYLE1">IDKEY</span>参数值&nbsp; 例如：IDKEY=XXX 那么参数值就是：XXX <a href="http://imis.qq.com/webpresence/code.shtml" target="_blank"><strong>点这里获得</strong></a> <span class="STYLE1">IDKEY</span></td>
      </tr>
      <tr>
        <td width="500" height="25">&nbsp;描述：<input name="dis" type="text" class="textfield" value="<%=objNodes.childNodes(1).text%>" size="25"><input type="hidden" name="face" value="1"> </td>
      </tr>
      <tr>
        <td width="100%" height="25">&nbsp;<input name="submit" type="submit" class="button" value="确定修改">&nbsp;<input name="reset" type="reset" class="button" value="取消重置"></td>
      </tr>
      <tr>
        <td width="100%" height="10"></td>
      </tr>
    </table>
    </form>    </td>
  </tr>
</table>
    <%
    Set objNodes = Nothing
    Set objXML = Nothing
  Else
    Call client_alert("发生错误!", -1)
  End If
	End Sub
  Select Case request.querystring("mtype")
    Case "edit"
      Call neditinfo
    Case Else
      Call slist
  End Select
  Dim enddtime: enddtime = Timer()
  %>
</body>
</html>