<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.sql.*,gbase.db.*" %>
<%@ include file="../checkLogin.jsp" %>
<html>
<head>
<title>
风格管理
</title>
</head>
<LINK href="../css/css.css" rel=stylesheet>
<body leftmargin="0" topmargin="0">
<%String user_id=(String)session.getAttribute("user_id");%>
<!--导航-->
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
       <tr>
		<td width="100%" height="20"  bgcolor="#eeeeee" class="p2">您当前所在的位置>>风格管理</td>
	   </tr>
       <tr>
          <td width="100%" height="2"> <img border="0" src="../images/spacer.gif" width="1" height="3"></td>
       </tr>
    </table>
<!--标题-->
  <div align="center">
   <table border="0" width="100%" cellspacing="0" cellpadding="0" height="34">
	<tr>
		<td width="159" background="../images/back_board2.gif" nowrap valign="bottom"><span class="title01">&nbsp;<span class="style1">风格管理列表</span></span></td>
		<td valign="bottom" align="right" width="642"></td>
	</tr>
	<tr>
		<td bgcolor="#2C9CC4" colspan="2"><img border="0" src="../images/bline_3.gif" width="1" height="2"></td>
	</tr>
</table>
</div><br>
<!--正文内容-->

  <div align="center">
    <form name="form1" method="post" action="web_css_list.jsp">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td width="70%" width="50%"  align="center"> 
	  <b>关键字</b>：&nbsp;&nbsp; 
	  <%
	  String list_key=request.getParameter("list_key")==null?"":request.getParameter("list_key");
	  %>
	  <input type="text" name="list_key" value="<%=list_key%>" size=30> &nbsp;&nbsp;&nbsp;&nbsp;
	  <input border="0" type="button" value="查  询" onclick = "document.form1.submit()">
	  </td>
          <td width="30%" align="center">
              <input border="0" type="button" value="新  增" onclick = "window.location='web_css_content.jsp'">
          </td>
        </tr>
   </table>
  </form>  
  
    <table width="95%" class="p1" border="0" cellSpacing="1" cellPadding="3" align="center" bgColor="#cccccc">
    
    <tr bgColor=#e9f0f4>
      <td align="center" width="55%">
        <b>风格名称</b>
      </td>
      <td align="center" width="15%">
        <b>是否默认</b>
      </td>
      <td align="center" width="30%">
        <b>操作</b>
      </td>
    </tr>
    <%
        String sql ="select a.* from web_css a where  a.title like '%"+list_key+"%' and a.web_account='"+web_account+"'  order by a.flag asc,a.id desc ";
        PageManager thePageManager = new PageManager();
        thePageManager.setPageSize(10);
        ResultSet rs = thePageManager.gePageData(request, sql);
        request.setAttribute("LIST_PageManager", thePageManager);
        request.setAttribute("LIST_PAGE", rs);
  while(rs.next()){
  %>
  <tr onmouseover='vbscript:me.bgcolor="#F5F5F5"' onmouseout='vbscript:me.bgcolor="#FFFFFF"' bgColor=#ffffff>
    <td height="21" align="center">
      <%=rs.getString("title")%>
    </td>
    <td align="center">
    <%
    if(rs.getInt("flag")==0)
      out.print("√");
    else
      out.print("&nbsp;");
    %>
    </td>
    <td align="center">
      <a href="web_css_content.jsp?id=<%=rs.getString("id")%>&web_account=<%=web_account%>&action=update&flag=<%=rs.getInt("flag")%>">修改</a>&nbsp;&nbsp;
      <a href='javascript:if(confirm("真的要删除这信息吗？"))window.location="web_css_save.jsp?id=<%=rs.getString("id")%>&web_account=<%=web_account%>&action=delete";'>删除</a>&nbsp;&nbsp;
      <a href="web_css_save.jsp?id=<%=rs.getString("id")%>&web_account=<%=web_account%>&action=set">设为默认</a>
    </td>
  </tr>
 <%}%> 
</table>
 <br>
  <%
  request.setAttribute("OLD_URL","web_css_list.jsp?list_key="+list_key);
  %>
<jsp:include page="../include/page.jsp" flush="true"/>  
</div>
</body>
</html>
