|
|
|
@ -17,50 +17,38 @@
|
|
|
|
|
<script src="../js/jquery.min.js"></script>
|
|
|
|
|
<script src="../js/bootstrap.min.js"></script>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" id="templatecss" type="text/css"
|
|
|
|
|
href="../public/css/message.css">
|
|
|
|
|
<link rel="stylesheet" id="templatecss" type="text/css" href="../public/css/message.css">
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
.text-dark{
|
|
|
|
|
color:black;
|
|
|
|
|
font-family:YouYuan;
|
|
|
|
|
}
|
|
|
|
|
body{
|
|
|
|
|
background-color:#fff;
|
|
|
|
|
font-size:16px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<jsp:useBean id="msg" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
|
|
|
|
<%
|
|
|
|
|
DateTime date=new DateTime();
|
|
|
|
|
//out.println(date.show());
|
|
|
|
|
String time = date.show();
|
|
|
|
|
<div align="center"><h3 style="color:#F08080;">☆★留言板★☆</h3></div>
|
|
|
|
|
<%
|
|
|
|
|
String sql = "select CARD_ID,DETAIL,PUBLIC_DATE from message";
|
|
|
|
|
|
|
|
|
|
String mes = request.getParameter("msg");
|
|
|
|
|
ResultSet rs = msg.executeQuery(sql);
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
String card = session.getAttribute("reader").toString();
|
|
|
|
|
String sql = "select detail,public_date from message where card_id='"+ card + "');";
|
|
|
|
|
|
|
|
|
|
int i = msg.executeUpdate(sql);
|
|
|
|
|
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
%>
|
|
|
|
|
<script>
|
|
|
|
|
alert('留言成功!');
|
|
|
|
|
window.location.href = "13message.jsp";
|
|
|
|
|
</script>
|
|
|
|
|
<%
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
%>
|
|
|
|
|
<script>
|
|
|
|
|
alert('留言未成功!');
|
|
|
|
|
window.location.href = "13message.jsp";
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<%
|
|
|
|
|
}
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
%>
|
|
|
|
|
<script>
|
|
|
|
|
alert('留言未成功!请先登录!');
|
|
|
|
|
window.location.href = "13message.jsp";
|
|
|
|
|
</script>
|
|
|
|
|
<%
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-default" style="width:60%;height:80%; margin-left:20%;">
|
|
|
|
|
<div class="panel-body" align="center">
|
|
|
|
|
<p class="bg-info text-dark"><%=rs.getString("CARD_ID")%></p>
|
|
|
|
|
<div style="word-wrap:break-word;"><p class="bg-warning text-dark"><%=rs.getString("DETAIL")%></p></div>
|
|
|
|
|
<p class="bg-danger text-dark"><%=rs.getString("PUBLIC_DATE")%></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<%
|
|
|
|
|
}
|
|
|
|
|
%>
|
|
|
|
|
%>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|