⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 answerupdaterepleaction.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:
<!-------------------------------------------------------------
* @ name: answerUpdateRepleAction.jsp
* @ Author : linaZhou 
* @ date :2008-06-27
-------------------------------------------------------------->
<%@ page import='java.io.*,java.text.*,java.util.Date,java.util.*, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.*' contentType='text/html;charset=euc-kr'%>
<%@ include file="../imgpath.jsp"%>
<%@ include file="formatUtil.jsp"%>
<%@ include file="../makeKOR.jsp"%>
<%! 	 
public static String isNull(String str) { 
	if (str == null) 
		return ""; 
	else 
		return str; 
} 	
%>
	<%
	/*------------------------------------------------------------------------------------------------------
	+	扁夯 颇扼固磐
	-------------------------------------------------------------------------------------------------------*/
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	if(mphone == null){
		mphone= "09900100081";
	}	
	if(gphone == null){
		gphone = mphone;
	}
	mphone = getStrPhone(getLong(mphone));
 	gphone = getStrPhone(getLong(gphone));
    /*------------------------------------------------------------------------------------------------------
	+	傈开 函荐
	-------------------------------------------------------------------------------------------------------*/	
	int reple_idx 		= 0;
	int ref_idx 		= 0;
	String repleContent = "";
	int stickerType 	= 0;	
	String redirectPage = "";
		
   	reple_idx = Integer.parseInt(request.getParameter("reple_idx"));
    ref_idx = Integer.parseInt(request.getParameter("idx"));
    repleContent = java.net.URLDecoder.decode(makeKOR(request.getParameter("repleContent")));
    stickerType = Integer.parseInt(request.getParameter("stickerType"));
    
	if(repleContent.trim().length()>800){
	  redirectPage="aRepleAddError.jsp?mphone="+mphone+"&gphone="+gphone;
	}else{   
		if(repleContent == null || repleContent.trim().equals("")){   
		    redirectPage="answerRepleAddError.jsp?mphone="+mphone+"&gphone="+gphone+"&idx="+ref_idx;
		}else{
	/*------------------------------------------------------------------------------------------------------
	+	DB 包访 函荐
	-------------------------------------------------------------------------------------------------------*/
	PreparedStatement pstmt = null;
	Connection con = null;
	Statement stmt = null;
	ResultSet rs = null;
	String query1 = null;
    String sql = null;
    int ret = -1;
	/*------------------------------------------------------------------------------------------------------
	+	朝楼 包访	
	-------------------------------------------------------------------------------------------------------*/
	Timestamp di_date = null;
	Date today = new Date();
	SimpleDateFormat timeform;
	timeform = new SimpleDateFormat("MM/dd HH:mm");
	try{
	/*------------------------------------------------------------------------------------------------
	 *		DB 目池记
	 -------------------------------------------------------------------------------------------------*/
	%>
	<%@ include file="../getConnection.jsp"%>
	<%	 
    /**************************************
			胶鸥客 嘎苗焊绰 矾宏款技!
	***************************************/
	stmt = con.createStatement(); 
	query1=" UPDATE GT_Ns30questionRe SET text=?,sticker=? WHERE idx = "+reple_idx;
	pstmt = con.prepareStatement(query1);
	int index = 4;
	pstmt.setString(1,repleContent);		
	pstmt.setInt(2,stickerType);
	
	ret = pstmt.executeUpdate();
	if(ret==-1){
		return;  
	}else{
		redirectPage="30q&a_repleList.jsp?mphone="+mphone+"&gphone="+gphone+"&idx="+ref_idx;
	}
    pstmt.close();
	        
	}catch(Exception e){
		System.out.println(e);
	}finally{
		if(rs != null) try{ rs.close(); }catch(Exception se){}
		if(pstmt != null) try{ pstmt.close(); }catch(Exception se){}
		if(stmt != null) try{ stmt.close(); }catch(Exception se){}
		if(con != null) try{ con.close(); }catch(Exception se){}
		}
	  }
	}
	response.sendRedirect(redirectPage);	
	%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -