<%@ page contentType="text/html; charset=GBK"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="gbase.init.*,gbase.db.*,java.sql.*,gbase.util.*,java.text.*,java.util.*"%>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr><td>
<%
String web_account=request.getParameter("web_account")==null?"":request.getParameter("web_account");
SimpleDateFormat now_timeformat = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date now_date1 = Calendar.getInstance().getTime();
String now_date = now_timeformat.format(now_date1).toString();
String sql="select link_name,link_url,open_method from web_link where link_state='启用' and dis_location='首页' and start_date<='"+now_date+"' and end_date>='"+now_date+"' and web_account='"+web_account+"'";
DBOperation theDBOperation=new DBOperation();
ResultSet rs=theDBOperation.getResultSet(sql);
int i_top=0;
while(rs.next()){
if(i_top!=0)
out.print("&nbsp;|&nbsp;");
i_top++;
if(rs.getString("open_method").equals("新窗口"))
{%>
<A href="<%=rs.getString("link_url")%>" target='_blank'><%=rs.getString("link_name")%></A>
<%} else {%>
<A href="<%=rs.getString("link_url")%>"><%=rs.getString("link_name")%></A>
<%}%>
<%}
if(i_top!=0)
out.print("&nbsp;|&nbsp;");
%>
<A href="friend_link/"  target='_blank'>更多链接</A>
</td></tr></table>
