<%@ page contentType="text/html; charset=GBK"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="gbase.init.*,gbase.db.*,java.sql.*,gbase.util.*,gbase.init.*"%>
<%
//参数:网站账号web_account
String web_account=request.getParameter("web_account")==null?"":request.getParameter("web_account");

//参数:栏目类型bar_type
String bar_type=request.getParameter("bar_type")==null?"":request.getParameter("bar_type");

//参数:栏目编号bar_id
String bar_id=request.getParameter("bar_id")==null?"":request.getParameter("bar_id");

//参数:打开方式　与html中<a>的target属性相同
String target=request.getParameter("target")==null?"_blank":request.getParameter("target");
%>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<%
DBOperation theDBOperation=new DBOperation();
String sql="";
if(bar_type.equals("2"))
sql="select id,name,menu_type,content_type from bar_menu where parent_id in  (select parent_id from bar_menu where id='"+bar_id+"' and web_account='"+web_account+"') and web_account='"+web_account+"' order by order_id asc ";
else
sql="select id,name,menu_type,content_type from bar_menu where parent_id='"+bar_id+"' and web_account='"+web_account+"' order by order_id asc ";
ResultSet rs=theDBOperation.getResultSet(sql);
while(rs.next()){
String top_url="";
if(rs.getString("menu_type").equals("3"))
top_url="/";
else if(rs.getString("content_type").equals("1") || rs.getString("content_type").equals("4"))
top_url="/bar"+rs.getString("id")+"/";
else
top_url="/bar"+rs.getString("id")+"_1/";
%>
<tr>
  <td height=25 align="left">
   <FONT color=red>·</FONT> 
   <A href="<%=top_url%>" target="<%=target%>"><B><%=rs.getString("name")%></B></A>
  </td>
</tr>
<%}%>
</table>
