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

📄 my_news_answer_modify_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"));
	int idxNsNewsRE = Integer.parseInt(request.getParameter("idxNsNewsRE"));
	String gphone = request.getParameter("gphone");
	String mphone = request.getParameter("mphone");
	
	String text = "";
	
	String dispatch = request.getParameter("dispatch");
	if(dispatch.equals("update")) {
		text = java.net.URLDecoder.decode(makeKOR( request.getParameter("text")));
	}

	
	String usernickname = "";
	
	String bgColor = "";
	
	Connection con = null;
	PreparedStatement pstmt	= null;
	Statement stmt = null;
	ResultSet rs = null;
	
	String url = "my_news_view_lhl.jsp?idxNsNews="+idxNsNews+"&gphone="+gphone+"&mphone="+mphone;

%>
<%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<%
	try {
		bgColor = mainBgColor;
	
		String queryString = "SELECT nickname FROM gt_user_info WITH (READUNCOMMITTED) WHERE phonenum=?";
		pstmt = con.prepareStatement(queryString);
		pstmt.setString(1, getStr(mphone));
		rs = pstmt.executeQuery();
		while(rs.next())
		{
			usernickname = rs.getString("nickname");
		}
	} catch(Exception e) {
		e.printStackTrace();
	}
	
	if(dispatch.equals("update"))
	{
		if(text.length()==0 || text.length()>800)
		{
%>
<html>
<head>
<title>My News Answer Modify 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="<%=bgColor%>"></td>
					<td bgcolor="<%=bgColor%>"><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="<%=bgColor%>" align="center" ><a href="javascript:history.back();"><font color="#ffffff">犁涝仿</font></a></td>
					<td width="2"></td>
					<td width="72" bgcolor="<%=bgColor%>" 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 updateString = "update gt_nsnewsre set text= ? WHERE idx= ?";
				pstmt = con.prepareStatement(updateString);
				pstmt.setString(1, text);
				pstmt.setInt(2, idxNsNewsRE);
				pstmt.executeUpdate();
				
				rs.close();
				pstmt.close();
				con.close();
				
				request.getRequestDispatcher(url).forward(request,response);
			} catch(Exception e) {
				e.printStackTrace();
			}
		}
	}
	else
	{
		String deleteString = "delete FROM gt_nsnewsre WHERE idx= ?";
		pstmt = con.prepareStatement(deleteString);
		pstmt.setInt(1, idxNsNewsRE);
		pstmt.executeUpdate();
		
		String updateNsNewsREreCntString = "update gt_nsnews set reCnt=((SELECT reCnt FROM gt_nsnews WITH (READUNCOMMITTED) WHERE idx=?)-1) WHERE idx=?";
		pstmt = con.prepareStatement(updateNsNewsREreCntString);
		pstmt.setInt(1, idxNsNews);
		pstmt.setInt(2, idxNsNews);
		pstmt.executeUpdate();
		
		pstmt.close();
		con.close();
		
		request.getRequestDispatcher(url).forward(request,response);
	}
 %>

⌨️ 快捷键说明

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