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

📄 other_news_register_err_lhl.jsp.svn-base

📁 用手机浏览的一个类似于聊天室 博克 homepage 等 对这方面有 兴趣的朋友 有所帮助的
💻 SVN-BASE
字号:
<%@ 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 = 0;//Integer.parseInt(request.getParameter("idxNsNewsRE"));
	Object idxNsNewsREObj = request.getParameter("idxNsNewsRE");
	if(idxNsNewsREObj != null) {
		idxNsNewsRE = Integer.parseInt(request.getParameter("idxNsNewsRE"));
		
	}
	
	String mphone = request.getParameter("mphone");
	String gphone = request.getParameter("gphone");
	String text = "";
	Object textObj = request.getParameter("text");
		text = (String)textObj;
		text = java.net.URLDecoder.decode(makeKOR(text));
	
	String url = "other_news_view_top_lhl.jsp?idxNsNews=" + idxNsNews + "&mphone=" + mphone + "&gphone=" + gphone + "&text" + text;
	//String url = "other_news_view_lhl.jsp?idxNsNews=" + idxNsNews + "&mphone=" + mphone + "&gphone=" + gphone + "&text" + text;
	//String url = "other_news_view_modify_top_lhl.jsp?idxNsNews=" + idxNsNews + "&mphone=" + mphone + "&gphone=" + gphone + "&text" + text;
	
	
	Connection con = null;
	PreparedStatement pstmt	= null;
	Statement stmt = null;
	ResultSet rs = null;
	
	String bgColor = "";

%>
	<%@ include file="../getConnection.jsp"%>
	  <%@ include file="bgColor.jsp"%>
<%

	try {
		String gnickname = "No Name";
		String mnickname = "No Name";
		
		String queryGString = "SELECT nickname FROM GT_user_info WITH (READUNCOMMITTED) WHERE phonenum=?";
		pstmt = con.prepareStatement(queryGString);
		pstmt.setString(1, getStr(gphone));
		rs = pstmt.executeQuery();
		while(rs.next())
		{
			gnickname = rs.getString("nickname");
		}
		
		String queryMString = "SELECT nickname FROM GT_user_info WITH (READUNCOMMITTED)  WHERE phonenum=?";
		pstmt = con.prepareStatement(queryMString);
		pstmt.setString(1, getStr(mphone));
		rs = pstmt.executeQuery();
		while(rs.next())
		{
			mnickname = rs.getString("nickname");
		}
		

		if(text.length()<=800 && text.length() > 0) {

		
			if(idxNsNewsRE == 0) {
				String insertString = "insert into GT_NsNewsRE (phonenum,nickname,text,ref_idx,takeFlag) values(?,?,?,?,?)";
				pstmt = con.prepareStatement(insertString);
				pstmt.setLong(1, getLong(mphone));
				pstmt.setString(2, mnickname);
				pstmt.setString(3, text);
				pstmt.setInt(4,	idxNsNews);
				pstmt.setInt(5, 0);
				pstmt.executeUpdate();
			}
			else {
				String queryNsNewsREString = "UPDATE gt_nsnewsre SET text= ? WHERE idx= ?";
				pstmt = con.prepareStatement(queryNsNewsREString);
				pstmt.setString(1, text);
				pstmt.setInt(2, idxNsNewsRE);
				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();
			
			rs.close();
			pstmt.close();
			con.close();
			
			request.getRequestDispatcher(url).forward(request,response);
		} else {

%>

<html>
<head>
<title>Other 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?idxNsNews=<%=idxNsNews%>&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%>"><%=gnickname%>丛狼 迄乔</a>&gt;<a href="<%=step3%>">春胶</a>&gt;舅覆芒
					</td>
					<td width="8" bgcolor="#BBC7C8"></td>
				</tr>
			</table>
		</td>
	</tr>
	<!--版肺钎矫 场-->
</table>
<%
		}
	} catch(Exception e) {
			e.printStackTrace();
	}

 %>
<%@ include file="../newbottom.jsp"%>
</body>
</html>


<%!

	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 + -