<%@ 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");%>
<br>
  <div align="center">
    <form name="form1" method="post" action="user_project_select.jsp">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td width="85%" align="center"> 
	  <b>关键字</b>：&nbsp;&nbsp; 
	  <%
	  String list_key=request.getParameter("list_key")==null?"":request.getParameter("list_key");
	  String web_type=request.getParameter("web_type")==null?"":request.getParameter("web_type");
	  %>
	  <input type="text" name="list_key" value="<%=list_key%>" size=20> &nbsp;&nbsp;
	  
	  <input border="0" type="button" value="查  询" onclick = "document.form1.submit()">
	  </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="50%">
        <b>方案名称</b>
      </td>
      <td align="center" width="30%">
        <b>网站帐号</b>
      </td>
      <td align="center" width="20%">
        <b>操作</b>
      </td>
    </tr>
    <%
        String sql ="select b.* from web_project b where  b.flag=0 and (b.title like '%"+list_key+"%' or b.web_account  like '%"+list_key+"%')  order by b.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"><%=rs.getString("web_account")%></td>
    <td align="center">
      <a href="javascript:returnPath('<%=rs.getString("id")%>','<%=rs.getString("title")%>','<%=rs.getString("web_account")%>')">选择</a>
    </td>
  </tr>
 <%}%> 
</table>
 <br>
  <%
  request.setAttribute("OLD_URL","user_project_select.jsp?web_type="+web_type+"&list_key="+list_key);
  %>
<jsp:include page="../include/page.jsp" flush="true"/>  
</div>
</body>
<script language="javascript">
  function returnPath(web_project_id,web_project_name,web_account){
    var obj=window.opener.document.getElementById("web_project_id");
    var obj1=window.opener.document.getElementById("web_project_name");
    var obj2=window.opener.document.getElementById("web_account");
     if(obj!=null)
     {
      obj.value=web_project_id;	
     }
     if(obj1!=null)
     {
      obj1.value=web_project_name;	
     }
     if(obj2!=null)
     {
      obj2.value=web_account;	
     }
     window.close();
    }
</script>
</html>
