<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.sql.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.*" %>

<%
    //相关的数据转码
    //即时消息，邮件，操作指南
    SzDataWriter dataWriter = null;
    SzDataReader dataReader = null;	
    try {
			dataReader = new SzDataReader();
			dataWriter = new SzDataWriter();
			//查询操作指南数据
			String id = "";
			String s = "";
			
			ResultSet rs = dataReader.readInfo("SZXT_CZZN","ZNID,ZNNR","1=1");
			while (rs != null && rs.next()) {
				id = rs.getString(1);
				s = rs.getString(2);
				
				s = s.replaceAll("&amp;","&");
			  s = s.replaceAll("‘", "'");		
				s = s.replaceAll("&lt;", "<");
				s = s.replaceAll("&gt;", ">");

				//s = SzConvert.
				dataWriter.update("update SZXT_CZZN set ZNNR = '" + s + "' WHERE ZNID=" + id);
			}
			dataReader.closeAll();
	
			dataWriter.close();
    }catch(Exception e) {
    	out.println(e);
    }
    out.println("<B>数飞OA，升级到v6.0.2后，部分数据需要转码</B>");
%>