<!--#include file="../../fy.Function.asp"-->
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>qq客服</title>
<link rel="stylesheet" type="text/css" href="../../css/base.css">
<link rel="stylesheet" type="text/css" href="../../css/content.css">
 <%
If Not fycms.fycms_QXYZ(0,"service","") Then   Call fycms.Alert("对不起，你没有操作权限！","") 
Dim Action,SelectedTheme
Action=Request.QueryString("act")
SelectedTheme=Request.QueryString("theme")
Dim ID,isset,QQ,content,wangwang,footlinks,footlink,ZipPathFile,display
Const Theme_URL="http://www.kefuzx.com/"
Dim XML,tel
Const SiteResolve = 5    'UNISON_SiteResolve(Msxml2.ServerXMLHTTP有效)域名分析超时(秒)推荐为"5"	'提示 1秒=1000毫秒
Const SiteConnect = 5    'UNISON_SiteConnect(Msxml2.ServerXMLHTTP有效)连接站点超时(秒)推荐为"5"
Const SiteSend = 4    'UNISON_SiteSend(Msxml2.ServerXMLHTTP有效)发送数据时间超时(秒)推荐为"4"
Const SiteReceive = 10    'UNISON_SiteReceive(Msxml2.ServerXMLHTTP有效)等待反馈时间超时(秒)推荐为"10"

 
%></head>
<body>
<div class="content"> 
	<div class="breadnav">当前位置：<a href="#">后台首页</a> >> qq客服</div>
   <%


If Action="save" Then
 	Dim Pack_Error,PageContent,apply
 	QQ=Trim(fycms.s("qq"))
	ID=Trim(fycms.s("id"))
	isset=Trim(fycms.s("isset"))
 	wangwang=Trim(fycms.s("wangwang"))
	footlinks=Trim(fycms.s("footlink"))
	content=Trim(fycms.s("content"))
	display=Trim(fycms.s("display"))
	
	tel=Trim(fycms.s("tel"))
 	Call 	CreateXml(isset,QQ,ID,tel,ZipPathFile,wangwang,footlinks,content,display)
	Call fycms.ActErr("帐号保存完成","Sys_fy/service/index.asp?theme="& Server.URLEncode(SelectedTheme) &"","")
 End If
If Action="" Then
	Call EditXMLPackInfo()
End If

%>


<%
 Sub EditXMLPackInfo()
 'On Error Resume Next
 	Dim fso,strXmlFile
	Set fso = CreateObject(fycms.FsoName)
 		strXmlFile = server.MapPath(fycms.actsys&"plus/service/service.xml")
		If fso.FileExists(strXmlFile) Then
     		Set XML=fycms.NoAppGetXMLFromFile(strXmlFile)
			If IsObject(XML) And XML.readyState=4 And XML.parseError.errorCode = 0 Then
 					QQ=XML.documentElement.selectSingleNode("QQ").text
 					isset=XML.documentElement.selectSingleNode("isset").text
  					tel=XML.documentElement.selectSingleNode("tel").text
 					content=XML.documentElement.selectSingleNode("content").text
 					wangwang=XML.documentElement.selectSingleNode("wangwang").text
 					footlink=XML.documentElement.selectSingleNode("footlink").Text
					display=XML.documentElement.selectSingleNode("display").Text
 					Set XML=Nothing
			End If
		Else 
			isset=fycms.acturl
 		End If
	Set fso = nothing
	Err.Clear
 %>

  <form method="post" action="?act=save&theme=<%=SelectedTheme%>">
    <div class="divtable"> 
        <dl>
            <dt>状态</dt>
            <dd>
             <input id="isset2" <% IF isset = "1" Then echo " checked=""checked""" %> type="radio" name="isset" value="1" /><label for="isset2">开启</label>
			 <input id="isset1" <% IF isset = "2" Then echo " checked=""checked""" %> type="radio" name="isset" value="2" /><label for="isset1">关闭</label>
             </dd>
         </dl>

        <dl>
            <dt>显示</dt>
            <dd>
             <input id="display2" <% IF display = "1" Then echo " checked=""checked""" %> type="radio" name="display" value="1" /><label for="display2">展开</label>
			 <input id="display1" <% IF display = "2" Then echo " checked=""checked""" %> type="radio" name="display" value="2" /><label for="display1">隐藏</label>
             </dd>
         </dl>
         
       <dl>
            <dt>电话</dt>
            <dd>
                <input  class="Ainput"   name="tel" type="text" size="50" value="<%=tel%>" />
			 </dd>
         </dl>  
 
        
        <dl>
            <dt>QQ</dt>
            <dd>
               <textarea name="QQ" id="QQ" cols="80" rows="10"><%=QQ%></textarea>每个QQ换行,如技术客服-5382862
             </dd>
         </dl>
 
        <dl>
            <dt>旺旺</dt>
            <dd>
               <textarea name="wangwang" id="wangwang" cols="80" rows="10"><%=wangwang%></textarea>每个帐号换行,如技术客服-5382862
             </dd>
         </dl>
 

		<dl>
            <dt>底部连接</dt>
            <dd>
               <input  class="Ainput"   name="footlink" type="text" size="50" value="<%=footlink%>" />
             </dd>
         </dl>
 
         
        
        <dl>
            <dt>调用代码</dt>
            <dd>
               <textarea name="content" id="content" cols="80" rows="10"><%=content%></textarea>
             </dd>
         </dl>
 
    
        
 
 
            <dl>
            <dt class="vhid"></dt>
            <dd>
			   <input type="submit" class="btn btn_primary"  name="Submit1" value="完成编辑并保存信息" />
            </dd>
         </dl>
        
    </div>
    </form>


</div>

<%	 

End Sub


'创建一个空的XML文件，为写入文件作准备
Sub CreateXml(Themeisset,ThemeQQ,ThemeID,Themetel,FilePath,wangwang,footlinks,content,display)
 'On Error Resume Next
		 Dim XMLStr
 		 XMLStr="<?xml version=""1.0"" encoding=""gb2312"" ?>" &vbcrlf
		 XMLStr=XMLStr&"<service>" &vbcrlf
		 XMLStr=XMLStr & "<isset><![CDATA[" & Themeisset &"]]></isset>" &vbcrlf
		 XMLStr=XMLStr & "<display><![CDATA[" & display &"]]></display>" &vbcrlf
 		 XMLStr=XMLStr & "<QQ><![CDATA[" & ThemeQQ &"]]></QQ>" &vbcrlf
		 XMLStr=XMLStr & "<tel><![CDATA[" & Themetel &"]]></tel>" &vbcrlf
		 XMLStr=XMLStr & "<wangwang><![CDATA[" & wangwang &"]]></wangwang>" &vbcrlf
		 XMLStr=XMLStr & "<footlink><![CDATA[" & footlinks &"]]></footlink>" &vbcrlf
		 XMLStr=XMLStr & "<content><![CDATA[" & content &"]]></content>" &vbcrlf
		 XMLStr=XMLStr&"</service>"
 		 Call  noSaveFile(XMLStr,fycms.actsys&"plus/service/service.xml")

 End Sub

 %></body>
</html>
