<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.sql.*,gbase.db.*,gbase.util.*" %>
<%@ include file="../checkLogin.jsp" %>
<SCRIPT language="JavaScript" src="../js/util.js"></SCRIPT>
<LINK href="../css/css.css" rel=stylesheet>
<SCRIPT language=JavaScript>
 var openurl=0;
 function setFileFields(weburl){   
    if (openurl==0){
        str="<iframe id='IFrame1' marginwidth=0 marginheight=0 frameborder=0  width='785' height='400' src="+weburl+"></iframe>";
        objFiles.innerHTML=str;
        openurl=1
    }
 }
var tID=0;
function ShowTabs(ID){
  if(ID!=tID){
    TabTitle[tID].className='title5';
    TabTitle[ID].className='title6';
    Tabs[tID].style.display='none';
    Tabs[ID].style.display='';
    tID=ID;
  }
}
</SCRIPT>
<%
DBOperation theDBOperation = new DBOperation();

String id = request.getParameter("id") == null ? "" :request.getParameter("id");
String action = request.getParameter("action") == null ? "" :request.getParameter("action");
String titlepage_url = request.getParameter("titlepage_url") == null ? "" :request.getParameter("titlepage_url");
String title="";
String content="";

String web_encoding="GBK";
String title_start_str="";    
String title_end_str="";    
String content_start_str="";    
String content_end_str="";    
String content_page_type="0";    
String next_page_start_str="";    
String next_page_end_str="";    
String page_start_str="";    
String page_end_str="";    
String page_url_start_str="";    
String page_url_end_str="";   

if(action.equals("update") || action.equals("view"))
{
String sql = "select * from web_collection  where id="+id+"";
ResultSet rs =theDBOperation.getResultSet(sql);
if(rs.next())
{
web_encoding=rs.getString("web_encoding")==null?"":rs.getString("web_encoding");
title_start_str=rs.getString("title_start_str")==null?"":rs.getString("title_start_str"); 
title_end_str=rs.getString("title_end_str")==null?"":rs.getString("title_end_str");     
content_start_str=rs.getString("content_start_str")==null?"":rs.getString("content_start_str");     
content_end_str=rs.getString("content_end_str")==null?"":rs.getString("content_end_str");     
content_page_type=rs.getString("content_page_type")==null?"0":rs.getString("content_page_type");     
next_page_start_str=rs.getString("next_page_start_str")==null?"":rs.getString("next_page_start_str");     
next_page_end_str=rs.getString("next_page_end_str")==null?"":rs.getString("next_page_end_str");     
page_start_str=rs.getString("page_start_str")==null?"":rs.getString("page_start_str");     
page_end_str=rs.getString("page_end_str")==null?"":rs.getString("page_end_str");     
page_url_start_str=rs.getString("page_url_start_str")==null?"":rs.getString("page_url_start_str");     
page_url_end_str=rs.getString("page_url_end_str")==null?"":rs.getString("page_url_end_str");    
}
}
CollectionManager theCollectionManager=new CollectionManager();
String[] info=theCollectionManager.getContentInfo(titlepage_url,web_encoding,title_start_str,title_end_str,content_start_str,content_end_str,content_page_type,next_page_start_str,next_page_end_str,page_start_str,page_end_str,page_url_start_str,page_url_end_str);
title=info[0];
content=info[1];
%>
<html>
<head>
<title>
标题信息管理
</title>
</head>
<body leftmargin="0" topmargin="0">

<!--导航-->
    <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>
<!--标题-->
<BR>
&nbsp;&nbsp;采编项目设置步骤：
<A href="web_collection_content1.jsp?action=view&id=<%=id%>">基本设置</A>
&gt;&gt; <A href="web_collection_content2.jsp?action=view&id=<%=id%>">列表设置</A>
&gt;&gt; <A href="web_collection_content3.jsp?action=update&id=<%=id%>">正文设置</A>
&gt;&gt; <FONT color=red>采样测试</FONT> 
<%if(action.equals("update")){%> 
&gt;&gt; <A href="web_collection_content4.jsp?action=update&id=<%=id%>&titlepage_url=<%=titlepage_url%>"><FONT color=red>采样测试</FONT></A>
<%} else {%>
&gt;&gt; <A href="web_collection_content4.jsp?action=view&id=<%=id%>&titlepage_url=<%=titlepage_url%>"><FONT color=red>采样测试</FONT></A>
<%}%> 
&gt;&gt; 完成设置
<BR><BR>


<FORM name=form1 action="web_collection_save4.jsp" method=post>
<input name="action" type="hidden" value="<%=action%>">
<input name="id" type="hidden" value="<%=id%>">
<table width="90%" class="p1" border="0" cellSpacing="1" cellPadding="3" align="center">
        <TBODY>
         <TR>
             <TD align="center"><%=title%><BR>
        </TD>
        </TR>
        <TR>
           <TD align="center" width="100%" colSpan=2 height=400>
             <TEXTAREA style="WIDTH:100%; HEIGHT:400px" name=ListContent><%=content%></TEXTAREA>
            </TD>
        </TR>
        </TBODY>
  
  </TABLE><BR>
<CENTER>
<INPUT id=ItemID type=hidden value=2 name=ItemID> 
<INPUT id=NeedSave type=hidden value=True name=NeedSave> 
<INPUT id=Action type=hidden value=Step2 name=Action> 
<INPUT type=button value="上一步" name=prebutton onclick="window.location.href='web_collection_content3.jsp?action=view&id=<%=id%>'"></TD>&nbsp;&nbsp; 
<input type="button" value="重  填" onclick = "document.form1.reset();">&nbsp;&nbsp; 
<INPUT type=button   value="下一步" name=next1 onclick = "javascript: if(check_validate(this.form)){this.form.submit();}"></TD>
<INPUT type=button   value="运行采集" name=next1 onclick = "javascript:window.location='web_collection_save5.jsp?id=<%=id%>&action=<%=action%>'"></TD>  
</CENTER>
</FORM>
</body>
<Script Language="javaScript">
    function  check_validate(theForm) {
        return true;
    }
</Script>
</html>
