<%@ page contentType="text/html;charset=GBK" %>
<%@ include file="../checkLogin.jsp" %>
<%@ page import="gbase.db.*,java.util.*,gbase.util.*,java.text.*"%>
<%
	
	String message="操作失败";
	String action = request.getParameter("action")==null?"":request.getParameter("action");
	ConvertSql theConvertSql=new ConvertSql();
	
	String id=request.getParameter("id")==null?"":request.getParameter("id");
	String titlepage_url=request.getParameter("titlepage_url")==null?"":request.getParameter("titlepage_url");
        String title_start_str=request.getParameter("title_start_str")==null?"":request.getParameter("title_start_str");
        title_start_str=theConvertSql.convertSqlValue(title_start_str); 
        String title_end_str=request.getParameter("title_end_str")==null?"":request.getParameter("title_end_str");   
        title_end_str=theConvertSql.convertSqlValue(title_end_str);
        String content_start_str=request.getParameter("content_start_str")==null?"":request.getParameter("content_start_str");    
        content_start_str=theConvertSql.convertSqlValue(content_start_str);
        String content_end_str=request.getParameter("content_end_str")==null?"":request.getParameter("content_end_str"); 
        content_end_str=theConvertSql.convertSqlValue(content_end_str);
        String content_page_type=request.getParameter("content_page_type")==null?"0":request.getParameter("content_page_type");    
        String next_page_start_str=request.getParameter("next_page_start_str")==null?"":request.getParameter("next_page_start_str");    
        next_page_start_str=theConvertSql.convertSqlValue(next_page_start_str);
        String next_page_end_str=request.getParameter("next_page_end_str")==null?"":request.getParameter("next_page_end_str");  
        next_page_end_str=theConvertSql.convertSqlValue(next_page_end_str);
        String page_start_str=request.getParameter("page_start_str")==null?"":request.getParameter("page_start_str");
        page_start_str=theConvertSql.convertSqlValue(page_start_str);
        String page_end_str=request.getParameter("page_end_str")==null?"":request.getParameter("page_end_str"); 
        page_end_str=theConvertSql.convertSqlValue(page_end_str);
        String page_url_start_str=request.getParameter("page_url_start_str")==null?"":request.getParameter("page_url_start_str");
        page_url_start_str=theConvertSql.convertSqlValue(page_url_start_str);
        String page_url_end_str=request.getParameter("page_url_end_str")==null?"":request.getParameter("page_url_end_str"); 
        page_url_end_str=theConvertSql.convertSqlValue(page_url_end_str);
        
        
        String url="web_collection_content4.jsp?id="+id+"&action="+action+"&titlepage_url="+titlepage_url;
           
	SimpleDateFormat timeformat = new SimpleDateFormat("yyyy-MM-dd");
        java.util.Date date = Calendar.getInstance().getTime();
        String create_date = timeformat.format(date).toString();
        
        String sql="";
        DBOperation theDBOperation = new DBOperation();
        sql="update web_collection set title_start_str='"+title_start_str+"',title_end_str='"+title_end_str+"',content_start_str='"+content_start_str+"',content_end_str='"+content_end_str+"',content_page_type="+content_page_type+",next_page_start_str='"+next_page_start_str+"',next_page_end_str='"+next_page_end_str+"',page_start_str='"+page_start_str+"',page_end_str='"+page_end_str+"',page_url_start_str='"+page_url_start_str+"',page_url_end_str='"+page_url_end_str+"' where id="+id+"";
	//out.println(sql);
	
        try {
        int i=theDBOperation.executeSql(sql);
        if(i>0)
          {
          message = "操作成功!";
          }
        else
          message = "操作失败!";
      }
      catch (Exception ex) {
        message = "操作失败!";
      }
	
%>
<script language="javascript">
	function process ( message,url){
		//alert(message);
		self.location = url;
	}
</script>
<html>
	<head>
		<title></title>
	</head>
	<body onload="javascript: process('<%=message%>','<%=url%>');">
	</body>
</html>