<%@language="vbscript" codepage="936" %>
<%path="../basedata"%>
<!--#include file="../inc/function.asp"-->
<%call Loginpower%>
<%call legalpower%>
<!--#include file="../conn/conn_data.asp"-->
<!--#include file="function.asp"-->
<%
		dim sql,rs
		dim i,lists
		lists=""
		i=0
		sql="Select * from class order by class_order asc"
	set rs=server.createobject("adodb.recordset")
		rs.open sql,conn_data,1,1
		if rs.bof and rs.eof then
		rs.close
		set rs=nothing
		conn_data.close
		set conn_data=nothing
		response.write errorback("没有发现数据可生成")
		response.end
		else
		do while not rs.eof
		i=i+1
		if i=1 then
		lists=lists&rs("class_id")&".xml?{rd}"
		else
		lists=lists&","&rs("class_id")&".xml?{rd}"
		end if

		rs.movenext
		loop
		end if
		rs.close
		set rs=nothing



	'------------------------------------------- 读出全局数据 -------------------------------------------
		dim skins
		sql="Select * from setglobal"
	set rs=server.createobject("adodb.recordset")
		rs.open sql,conn_data,1,1
		if rs("global_skins")<>"" then skins=rs("global_skins")&","
		'--------------------- reab mb ---------------------
		dim content_all
		content_all=read_mb("../readXML/config.xml","utf-8")
		content_all=replace(content_all,"$counter$",rs("global_counter")&"")
		content_all=replace(content_all,"$javascript$",rs("global_javascript")&"")
		content_all=replace(content_all,"$name$",rs("global_name")&"")
		content_all=replace(content_all,"$link$",rs("global_link")&"")
		content_all=replace(content_all,"$link_target$",rs("global_link_target")&"")
		content_all=replace(content_all,"$description$",rs("global_description")&"")
		content_all=replace(content_all,"$logo$",rs("global_logo")&"")
		content_all=replace(content_all,"$logo_alpha$",rs("global_logo_alpha")&"")
		content_all=replace(content_all,"$skins$",skins&"")
		content_all=replace(content_all,"$bgcolor$",rs("global_bgcolor")&"")
		content_all=replace(content_all,"$backgrounds$",rs("global_backgrounds")&"")
		content_all=replace(content_all,"$lists$",lists&"")
		content_all=replace(content_all,"$volume$",rs("global_volume")&"")
		content_all=replace(content_all,"$play_mode$",rs("global_play_mode")&"")
		content_all=replace(content_all,"$play_id$",rs("global_play_id")&"")
		content_all=replace(content_all,"$auto_play$",rs("global_auto_play")&"")
		content_all=replace(content_all,"$timeout$",rs("global_timeout")&"")
		content_all=replace(content_all,"$buffer_time$",rs("global_buffer_time")&"")
		content_all=replace(content_all,"$buffer_next$",rs("global_buffer_next")&"")
		content_all=replace(content_all,"$lrc_max$",rs("global_lrc_max")&"")
		content_all=replace(content_all,"$lrc_scale$",rs("global_lrc_scale")&"")
		content_all=replace(content_all,"$context_menu$",rs("global_context_menu")&"")
		call save_html("../../config.xml",content_all,"utf-8")
		'--------------------/ save html ---------------------

		rs.close
	set rs=nothing

		conn_data.close
	set conn_data=nothing

		'--------------------------------------------/ 读出全局数据 --------------------------------------------


%>
<script language="javascript">
alert("成功生成");
window.location.href="manager.asp";
</script>

