<!--#include file="../../../conn/conn4.asp" -->
<!--#include file="../../../conn/function.asp" -->
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<content>
    <settings>
        <logo X="<%=C_logox%>" Y="<%=C_logoy%>">media/<%=C_logo%></logo>
        <footer><![CDATA[<%=C_foot%>]]></footer>
        <menu X="180"/>
    </settings>
    <nav>
	<%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from menu1 where U_sub=0 and U_hide=0 order by U_order"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof

Set rs1= Server.CreateObject("ADODB.RecordSet")
sql1="select * from menu1 where U_sub="&rs("U_id")&" and U_hide=0 order by U_order"
rs1.open sql1,conn,1,1
if not rs1.eof then
Do while Not rs1.eof

select case rs1("U_type")
case "slideshow"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Ssort where S_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "photo"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Psort where S_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "text"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from text1 where T_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("T_module")
rs2.close
set rs2=nothing

case "news"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Nsort where S_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "video"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Vsort where S_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "music"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Msort where S_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "html"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from html where H_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("H_module")
rs2.close
set rs2=nothing

case "buy"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Bsort where S_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "form"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from F_form where F_id="&rs1("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("F_module")
rs2.close
set rs2=nothing

case "contact"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from contact"
rs2.open sql2,conn,1,1
module=rs2("C_module")
rs2.close
set rs2=nothing
end select
if rs1("U_type")="link" then
submenu=submenu&"<sub Name='"&rs1("U_title")&"' Link='"&rs1("U_bg")&"' toLoad='"&rs1("U_bg")&"'/>"
else
submenu=submenu&"<sub Name='"&rs1("U_title")&"' Link='module/module.swf?module="&module&"&typeid="&rs1("U_typeid")&"&type="&rs1("U_type")&"' bg='"&rs1("U_bg")&"' />"
end if
rs1.movenext
		loop
	end if
set rs1=nothing

if rs("U_type")<>"sub" then

select case rs("U_type")
case "slideshow"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Ssort where S_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "photo"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Psort where S_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "text"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from text1 where T_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("T_module")
rs2.close
set rs2=nothing

case "news"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Nsort where S_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "video"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Vsort where S_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "music"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Msort where S_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "html"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from html where H_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("H_module")
rs2.close
set rs2=nothing

case "buy"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from Bsort where S_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("S_module")
rs2.close
set rs2=nothing

case "form"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from F_form where F_id="&rs("U_typeid")
rs2.open sql2,conn,1,1
module=rs2("F_module")
rs2.close
set rs2=nothing

case "contact"
Set rs2= Server.CreateObject("ADODB.RecordSet")
sql2="select * from contact"
rs2.open sql2,conn,1,1
module=rs2("C_module")
rs2.close
set rs2=nothing
end select

response.Write "<main Name='"&rs("U_title")&"' Link='module/module.swf?module="&module&"&typeid="&rs("U_typeid")&"&type="&rs("U_type")&"' bg='"&rs("U_bg")&"'/>"
else
if rs("U_type")="link" then
response.Write "<main Name='"&rs("U_title")&"' Link='"&rs("U_bg")&"' toLoad='"&rs("U_bg")&"'/>"
else
response.Write "<main Name='"&rs("U_title")&"'>"&submenu&"</main>"
end if
end if

submenu=""
rs.movenext
		loop
	end if
set rs=nothing
	%>
    </nav>
</content>



