📄 my_news_register_err_lhl.jsp.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"%>
<%
String gphone = request.getParameter("gphone");
String mphone = request.getParameter("mphone");
int kind = Integer.parseInt(request.getParameter("kind"));
String title = java.net.URLDecoder.decode(makeKOR(request.getParameter("title")));
String text = java.net.URLDecoder.decode(makeKOR(request.getParameter("text")));
//System.out.println("gphone=" + gphone + "\nmphone=" + mphone + "\nkind=" + kind + "\ntitle=" + title + "\ntext=" + text);
Connection con = null;
PreparedStatement pstmt = null;
Statement stmt = null;
ResultSet rs = null;
String usernickname = "No name";
String bgColor = "";
String url = "my_news_register_view_lhl.jsp?gphone="+gphone+"&mphone="+mphone;
try {
%>
<%@ include file="../getConnection.jsp"%>
<%@ include file="bgColor.jsp"%>
<%
bgColor = mainBgColor;
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");
}
if(text.length() <= 800 && text.length() > 0 && title.length() < 60 && title.length() > 0)
{
String insertString = "INSERT INTO gt_nsnews (phonenum,nickname,kind,title,text,reCnt,seCnt,takeId,regdate) VALUES(?,?,?,?,?,?,?,?,?)";
pstmt = con.prepareStatement(insertString);
pstmt.setLong(1, getLong(mphone));
pstmt.setString(2, usernickname);
pstmt.setInt(3, kind);
pstmt.setString(4, title);
pstmt.setString(5, text);
pstmt.setInt(6, 0);
pstmt.setInt(7, 0);
pstmt.setInt(8, 0);
pstmt.setString(9, getTime());
pstmt.executeUpdate();
rs.close();
pstmt.close();
con.close();
request.getRequestDispatcher(url).forward(request,response);
}
else
{
%>
<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="<%=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="my_news_list_lhl.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">
<a href="<%=step1%>">权</a>><a href="<%=step2%>"><%=usernickname%>丛狼 迄乔</a>><a href="<%=step3%>">春胶</a>>舅覆芒
</td>
<td width="8" bgcolor="#BBC7C8"></td>
</tr>
</table>
</td>
</tr>
<!--版肺钎矫 场-->
</table>
<%@ include file="../newbottom.jsp"%>
</body>
</html>
<%
}
rs.close();
pstmt.close();
con.close();
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
if(rs != null) try{ rs.close(); }catch(Exception se){se.printStackTrace();}
if(pstmt != null) try{ pstmt.close(); }catch(Exception se){se.printStackTrace();}
if(stmt != null) try{ stmt.close(); }catch(Exception se){se.printStackTrace();}
if(con != null) try{ con.close(); }catch(Exception se){se.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 + -