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

📄 my_news_answer_err_lhl.jsp

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 JSP
字号:
<%@ page language="java" pageEncoding="EUC-KR"%>
<%@ page import="java.io.*,java.text.*,java.util.Date,java.util.Vector, java.sql.*, com.entaz.lib.db.*, com.entaz.relay.net.* "%>
<%@ include file="../imgpath.jsp"%>
<%@ include file="appConstants.jsp"%>
<%@ include file="formatUtil.jsp"%>
<%@ include file="../common_func.jsp"%>
<%@ include file="../makeKOR.jsp"%>

<%
	int idxNsNews = Integer.parseInt(request.getParameter("idxNsNews"));
	String gphone = request.getParameter("gphone");
	String mphone = request.getParameter("mphone");
	
	String text = java.net.URLDecoder.decode(makeKOR(request.getParameter("text")));
	
	String url = "my_news_view_lhl.jsp?idxNsNews="+idxNsNews+"&gphone="+gphone+"&mphone="+mphone;
	
	Connection con = null;
	PreparedStatement pstmt	= null;
	Statement stmt = null;
	ResultSet rs = null;
	
	String bgColor = "";
	String usernickname = "No name";
	
%>
<%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<%
	
	
	if(text.length()==0 || text.length()>800)
	{
%>

<html>
<head>
<title>My News Register Err</title>
<link rel="stylesheet" href="../mobile.css" type="text/css"></link>
</head>
<body>
	
<table width="176" border="0" cellspacing="0" cellpadding="0">
	<!-- 鸥捞撇 矫累 -->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr height="19">
					<td width="8" bgcolor="<%=mainBgColor%>"></td>
					<td bgcolor="<%=mainBgColor%>"><font color="#ffffff">舅覆芒</font></td>
				</tr>
			</table>
		</td>
	</tr>
	<!-- 鸥捞撇 场 -->

	<!-- 咯归 矫累 -->
	<tr height="8">
		<td></td>
	</tr>
	<!-- 咯归 场 -->

	<!-- 冠胶 矫累 -->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr height="3">
					<td colspan="3" bgcolor="#dae6e8"></td>
				</tr>
				<tr height="18">
					<td bgcolor="#dae6e8" width="3"></td>
					<td></td>
					<td bgcolor="#dae6e8" width="3"></td>
				</tr>
				<tr>
					<td bgcolor="#dae6e8" width="3"></td>
					<td align="center">
						涝仿俊 坷幅啊 乐嚼聪促.<br>
						促矫 涝仿秦林技夸.<br>
					</td>
					<td bgcolor="#dae6e8" width="3"></td>
				</tr>
				<tr height="18">
					<td bgcolor="#dae6e8" width="3"></td>
					<td></td>
					<td bgcolor="#dae6e8" width="3"></td>
				</tr>
				<tr height="3">
					<td colspan="3" bgcolor="#dae6e8"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!-- 冠胶 场 -->

	<!-- 咯归 矫累 -->
	<tr height="4">
		<td></td>
	</tr>
	<!-- 咯归 场 -->
	
	
	<!-- 滚瓢 矫累 -->
	<tr> 
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr height="16">
					<td></td>
					<td width="72" bgcolor=<%=mainBgColor%> align="center" ><a href="javascript:history.back();"><font color="#ffffff">犁涝仿</font></a></td>
					<td width="2"></td>
					<td width="72" bgcolor="<%=mainBgColor%>" align="center" ><a href="NewsMain.jsp?gphone=<%=gphone%>&mphone=<%=mphone%>"><font color="#ffffff">秒家</font></a></td>
					<td></td>
				</tr>
			</table>
		</td>
	</tr>
	<!-- 滚瓢 场 -->
	
	<!-- 咯归 矫累 -->
	<tr height="53">
		<td></td>
	</tr>
	<!-- 咯归 场 -->
<%
String step1=url_path+"/main.jsp?mphone="+mphone+"&gphone="+gphone;//权
String step2=url_path+"/mypage/my_confirm.jsp?mphone="+mphone+"&gphone="+gphone;
String step3=url_path+"/news/NewsMain.jsp?mphone="+mphone+"&gphone="+gphone;
%>
	<!--版肺钎矫 矫累-->
	<tr>
		<td>
			<table width="176" border="0" cellspacing="0" cellpadding="0">
				<tr height="15">
					<td width="8" bgcolor="#BBC7C8"></td>
					<td bgcolor="#DAE6E8">
						&nbsp;<a href="<%=step1%>">权</a>&gt;<a href="<%=step2%>"><%=usernickname%>丛狼 迄乔</a>&gt;<a href="<%=step3%>">春胶</a>&gt;舅覆芒
					</td>
					<td width="8" bgcolor="#BBC7C8"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--版肺钎矫 场-->
</table>
<%@ include file="../newbottom.jsp"%>
</body>
</html>
<%
	}
	else {
		try {
		
		
			String queryString = "SELECT * FROM gt_user_info WITH (READUNCOMMITTED) WHERE phonenum= ?";
			pstmt = con.prepareStatement(queryString);
			pstmt.setString(1, mphone);
			rs = pstmt.executeQuery();
			while(rs.next())
			{
				usernickname = rs.getString("nickname");
			}
			rs.close();
			pstmt.close();
			

			String insertString = "INSERT INTO gt_nsnewsre (phonenum,nickname,text,ref_idx,takeFlag,regdate) VALUES(?,?,?,?,?,?)";
			pstmt = con.prepareStatement(insertString);
			pstmt.setLong(1, getLong(mphone));
			pstmt.setString(2, usernickname);
			pstmt.setString(3, text);
			pstmt.setInt(4, idxNsNews);
			pstmt.setInt(5, 0);
			pstmt.setString(6, getTime());
			pstmt.executeUpdate();
			
			String updateNsNewsString = "UPDATE gt_nsnews SET reCnt=((select reCnt FROM gt_nsnews WITH (READUNCOMMITTED) where idx=?)+1) WHERE idx=?";
			pstmt = con.prepareStatement(updateNsNewsString);
			pstmt.setInt(1, idxNsNews);
			pstmt.setInt(2, idxNsNews);
			pstmt.executeUpdate();
			
			pstmt.close();
			con.close();
			
			//request.getRequestDispatcher(url).forward(request,response);
			response.sendRedirect(url);
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
%>
<%!
	public String getTime()
	{
		Calendar now=Calendar.getInstance();
		String time=now.get(Calendar.YEAR)+"-"+
			(now.get(Calendar.MONTH)+1)+"-"+
			now.get(Calendar.DAY_OF_MONTH)+" "+
			now.get(Calendar.HOUR_OF_DAY)+":"+
			now.get(Calendar.MINUTE)+":"+
			now.get(Calendar.SECOND);
		return time;
	}
%>

⌨️ 快捷键说明

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