<!--#include virtual="inc/General.inc.asp"-->
<%
set rst = server.createobject("adodb.recordset")
set rs1 = server.createobject("adodb.recordset")
set rs = server.createobject("adodb.recordset")
MenuCode = replace(Request.QueryString("code"),"'","''")
rst.open "select * from Menu where MenuCode='" & MenuCode & "'",conn,1,1
if rst.eof or rst.bof then Response.Redirect "/default.asp"
if rst("SubKey")&""="1" then Response.Redirect "list.asp?code=" & MenuCode & "01"
'if rst("IsStop")&""="1" then Response.Redirect "list.asp?code=" & MenuCode
%>

<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="../css/info.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/yzqm.js.asp"></script>
</HEAD>

<BODY BGCOLOR=#600000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include virtual="IncludeFile/Header.inc.html"--></td>
  </tr>
  <tr>
    <td><script language="javascript">ShowMenu("<%=GetAddressByCode(MenuCode)%> &gt; <%=rst("MenuName")%>");</script></td>
  </tr>
  <tr>
    <td><!--#include virtual="IncludeFile/AD02.inc.asp"--></td>
  </tr>
  <tr>
    <td>
	  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
		  <td width="5" bgcolor="9E0B0E"><img src="" width="5" height="0"></td>
		  <td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr> 
				<td width="175" valign="top" bgcolor="<%if left(menucode,2)="02" then%>E1CBB0<%else%>F3DDC2<%end if%>">
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr> 
					  <td height="22" background="/images/L_0.gif"><div align="center"></div></td>
					</tr>
					<tr><td height="10"></td></tr>
					<tr>
					  <td>
						<script language="javascript">ShowSameLeaderMenu("<%=MenuCode%>");</script>
					  </td>
					</tr>
					<%If Left(MenuCode,2) = "02" Then%>
					<tr>
					  <td align="center" style="padding-top:5;padding-bottom:10"><a href="clist.asp" target="_blank"><img src="../images/zpz01.gif" border="0"></a></td>
					</tr>
					<tr>
					  <td align="center"><!--#include virtual="IncludeFile/Service2.inc.asp"--></td>
					</tr>
					<%End If%>
				  </table>
				</td>
				<td width="590" valign="top" bgcolor="F8EDD1">
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
					  <td height="22" background="/images/bg.gif">
						<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
						  <tr>
							<td><strong><font color="#996600"><%=rst("MenuName")%></font></strong></td>
						  </tr>
						</table>
					  </td>
					</tr>
					<tr>
					  <td height="300" valign="top">
						<table width="99%" height="100%" border="0" align="center" cellpadding="20" cellspacing="0" bgcolor="FFF7E3">
						  <%p = cint("0" & Request.QueryString("p"))
						  if p <= 0 then p = 1
						  select case rst("ListType")&""%>
						  <%case "1":%>
						  <%rs1.open "select top 1 * from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 order by AddDateTime desc",conn,1,1
						  if not rs1.eof then%>
						  <tr>
							<td style="line-height:200%;height:320" valign="top">
							  <%=rs1("Content")%>
							</td>
						  </tr>
						  <%end if
						  rs1.cancel:rs1.close%>
						  <%case "2":%>
						  <%rs1.open "select count(id) from [Content] where MenuCode='" & MenuCode & "' and IsStop=0",conn,1,1
						  totalCount = cdbl("0" & rs1(0))
						  pagesize = 20
						  pageCount = totalCount \ pagesize
						  if totalCount mod pagesize > 0 then pageCount = pageCount + 1
						  if cint(p)>pageCount then p = pageCount
						  rs1.cancel:rs1.close
						  if cint("0" & p)<=1 then
							strsql = "select top " & pagesize & " id,Title,AddDateTime from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 order by AddDateTime desc"
						  else
							strsql = "select top " & pagesize & " id,Title,AddDateTime from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 and id not in (select top " & (pagesize * (cint("0"&p)-1)) & " id from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 order by AddDateTime desc) order by AddDateTime desc"
						  end if
						  rs1.open strsql,conn,1,1
						  rs_index = 0
						  if not rs1.eof then%>
                          <tr> 
                            <td valign="top">
							  <table width="95%" border="0" align="center" cellpadding="2" cellspacing="0">
								<tr> 
								  <td style="line-height:200%" class="tyb">
									<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
									  <tr> 
										<td nowrap height="30" width="40%" align="left"><font color="#666666"> &nbsp;&nbsp;</font>共 <b><font color="#990000"><%=totalCount%></font></b> 条，显示 <%=pagesize * (cint("0"&p)-1) + 1%> - <%=pagesize * cint("0"&p)%>条</td>
										<td align="right" height="20" width="60%"><%if cint("0"&p)>1 then%>[ <a href="list.asp?code=<%=MenuCode%>&p=1">首 页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)-1%>">上一页</a> ]<%end if%> <%if cint("0"&p)<pageCount then%>[ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)+1%>">下一页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=pageCount%>">末 页</a> ]<%end if%></td>
									  </tr>
									</table>
								  </td>
								</tr>
								<tr> 
								  <td class="tyb">
									<TABLE width="100%" align="center" cellpadding="1" cellSpacing=1>
									  <%while not rs1.eof and rs_index < pagesize
									  rs_index = rs_index + 1%>
									  <TR> 
										<TD height="22">·<A class="white_bg" href="show.asp?id=<%=rs1("id")%>" target="_blank"><%=rs1("Title")%></A></TD>
									  <TR> 
									  <%rs1.movenext
									  wend%>
									</table>
								  </td>
								</tr>
								<tr> 
								  <td>
									<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
									  <tr> 
										<td nowrap height="30" width="40%" align="left"><font color="#666666"> &nbsp;&nbsp;</font>共 <b><font color="#990000"><%=totalCount%></font></b> 条，显示 <%=pagesize * (cint("0"&p)-1) + 1%> - <%=pagesize * cint("0"&p)%>条</td>
										<td align="right" height="20" width="60%"><%if cint("0"&p)>1 then%>[ <a href="list.asp?code=<%=MenuCode%>&p=1">首 页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)-1%>">上一页</a> ]<%end if%> <%if cint("0"&p)<pageCount then%>[ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)+1%>">下一页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=pageCount%>">末 页</a> ]<%end if%></td>
									  </tr>
									</table>
								  </td>
								</tr>
							  </table>
							</td>
						  </tr>
						  <%end if
						  rs1.cancel:rs1.close%>
						  <%case "3":%>
						  <%rs1.open "select count(id) from [Content] where MenuCode='" & MenuCode & "' and IsStop=0",conn,1,1
						  totalCount = cdbl("0" & rs1(0))
						  pagesize = 4
						  pageCount = totalCount \ pagesize
						  if totalCount mod pagesize > 0 then pageCount = pageCount + 1
						  if cint(p)>pageCount then p = pageCount
						  rs1.cancel:rs1.close
						  if cint("0" & p)<=1 then
							strsql = "select top " & pagesize & " id,Title,SmallPicture from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 order by AddDateTime desc"
						  else
							strsql = "select top " & pagesize & " id,Title,SmallPicture from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 and id not in (select top " & (pagesize * (cint("0"&p)-1)) & " id from [Content] where MenuCode='" & MenuCode & "' and IsStop=0 order by AddDateTime desc) order by AddDateTime desc"
						  end if
						  rs1.open strsql,conn,1,1
						  rs_index = 0
						  if not rs1.eof then%>
                          <tr> 
                            <td>
							  <table width="95%" border="0" align="center" cellpadding="2" cellspacing="0">
								<tr> 
								  <td style="line-height:200%" class="tyb">

				  <%if left(menucode,2)="02" and len(menucode)=4 then%>
				  <%=GLB_MenuItemDisposition(cint(right(menucode,1)))%>
				  <%else%>
									<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
									  <tr> 
										<td nowrap height="30" width="40%" align="left"><font color="#666666"> &nbsp;&nbsp;</font>共 <b><font color="#990000"><%=totalCount%></font></b> 条，显示 <%=pagesize * (cint("0"&p)-1) + 1%> - <%=pagesize * cint("0"&p)%>条</td>
										<td align="right" height="20" width="60%"><%if cint("0"&p)>1 then%>[ <a href="list.asp?code=<%=MenuCode%>&p=1">首 页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)-1%>">上一页</a> ]<%end if%> <%if cint("0"&p)<pageCount then%>[ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)+1%>">下一页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=pageCount%>">末 页</a> ]<%end if%></td>
									  </tr>
									</table>
				  <%end if%>
								  </td>
								</tr>
								<tr> 
								  <td class="tyb">
									<TABLE width="100%" align="center" cellpadding="1" cellSpacing=1>
									  <tr>
										<td colspan="3" height="10"></td>
									  </tr>
									  <%while not rs1.eof and rs_index < pagesize
									  rs_index = rs_index + 1%>
									  <%if rs_index mod 2 = 1 then%><TR><%end if%>
										<td width="45%" align="center"> 
										  <table width="216" height="166" border="0" align="center" cellpadding="0" cellspacing="0">
											<tr> 
											  <td width="10"><img src="../images/h_0.gif" width="8" height="8"></td>
											  <td background="../images/h_t.gif"></td>
											  <td width="10"><img src="../images/h_1.gif" width="8" height="8"></td>
											</tr>
											<tr> 
											  <td background="../images/h_r.gif"></td>
											  <td><%=ShowPicture(rs1("SmallPicture")&"",200,150," border=0")%></td>
											  <td background="../images/h_l.gif"></td>
											</tr>
											<tr> 
											  <td><img src="../images/h_3.gif" width="8" height="8"></td>
											  <td background="../images/h_d.gif"></td>
											  <td><img src="../images/h_2.gif" width="8" height="8"></td>
											</tr>
											<tr>
											  <td colspan="3" height="25" align="center"><%=rs1("Title")%></td>
											</tr>
											<tr>
											  <td colspan="3" height="10"></td>
											</tr>
										  </table>
										</td>
										<%if rs_index mod 2 = 1 then%><td width="10%">&nbsp;</td><%end if%>
									  <%if rs_index mod 2 = 0 then%></TR><%end if%>
									  <%rs1.movenext
									  wend%>
									</table>
								  </td>
								</tr>
								<tr> 
								  <td>
									<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
									  <tr> 
										<td nowrap height="30" width="40%" align="left"><font color="#666666"> &nbsp;&nbsp;</font>共 <b><font color="#990000"><%=totalCount%></font></b> 条，显示 <%=pagesize * (cint("0"&p)-1) + 1%> - <%=pagesize * cint("0"&p)%>条</td>
										<td align="right" height="20" width="60%"><%if cint("0"&p)>1 then%>[ <a href="list.asp?code=<%=MenuCode%>&p=1">首 页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)-1%>">上一页</a> ]<%end if%> <%if cint("0"&p)<pageCount then%>[ <a href="list.asp?code=<%=MenuCode%>&p=<%=cint("0"&p)+1%>">下一页</a> ] [ <a href="list.asp?code=<%=MenuCode%>&p=<%=pageCount%>">末 页</a> ]<%end if%></td>
									  </tr>
									</table>
								  </td>
								</tr>
							  </table>
							</td>
						  </tr>
						  <%end if
						  rs1.cancel:rs1.close%>
						  <%end select%>
						</table>
					  </td>
					</tr>
					<tr>
					  <td height="4"></td>
					</tr>
				  </table> 
				</td>
			  </tr>
			</table>
			<script language="javascript">ShowFooter();</script>
		  </td>
		  <td width="5" bgcolor="9E0B0E"><img src="" width="5" height="0"></td>
		</tr>
	  </table>
	</td>
  </tr>
</table>
</BODY>
</HTML>
<%
rst.cancel:rst.close
set rs = nothing
set rst = nothing
set rs1 = nothing
CloseConnection()%>