104 lines
3.4 KiB
Plaintext
104 lines
3.4 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/db/db_connect.jsp"%>
|
|
<%@include file="/include/function/function.jsp"%>
|
|
|
|
<%
|
|
|
|
String c_home = "0";
|
|
String c_maker = "0";
|
|
String board_no = "0";
|
|
|
|
if(board_no == null || board_no.equals("")){
|
|
%>
|
|
<script>
|
|
alert("Wrong connection.")
|
|
</script>
|
|
<%
|
|
}else{
|
|
|
|
%>
|
|
<center>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<table width="800" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<tr style="font-size:14px;">
|
|
<td height="60">
|
|
<%
|
|
int c_relation = 0;
|
|
int c_relation2 = 0;
|
|
String sql_ok2 = "select * from tbl_menu where c_no = " + board_no;
|
|
ResultSet rss = stmt.executeQuery(sql_ok2);
|
|
if(rss.next()){
|
|
c_relation= rss.getInt("c_relation");
|
|
c_relation2= rss.getInt("c_relation2");
|
|
%>
|
|
<b>[ <%=rss.getString("c_name")%> ] board management</b>
|
|
<%
|
|
}
|
|
rss.close();
|
|
c_relation = 0;
|
|
c_relation2 = 1;
|
|
|
|
String para_t = "c_home=" + c_home + "&c_maker=" + c_maker + "&board_no=" + board_no + "&c_relaton=" + c_relation + "&c_relation2=" + c_relation2;
|
|
%>
|
|
<br>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%
|
|
String nowPage = r_call(request.getParameter("nowPage"));
|
|
String c_no = r_call(request.getParameter("c_no"));
|
|
if(c_no.equals("")){
|
|
|
|
}else{
|
|
String sql_ok = "";
|
|
sql_ok = "update tbl_board set c_click = c_click + 1 where c_no = " + c_no;
|
|
|
|
stmt2.execute(sql_ok);
|
|
|
|
String sql1 = " select * from tbl_board where c_no = " + c_no;
|
|
ResultSet rst = stmt.executeQuery(sql1);
|
|
if (rst.next()) {
|
|
%>
|
|
<table width="800" cellSpacing="1" cellPadding="0" border="0" bgcolor=cdcdcd>
|
|
<tr bgcolor=ffffff><td height="30" style="padding:5px">
|
|
Title. <%=rst.getString("c_title")%></b>
|
|
</td></tr>
|
|
<tr bgcolor=ffffff><td height="30" style="padding:5px">
|
|
|
|
Name. <%=rst.getString("c_name")%></b>
|
|
/
|
|
Clicks <%=rst.getString("c_click")%></b>
|
|
/
|
|
date <%=rst.getString("c_date").substring(0,10)%></b>
|
|
|
|
</td></tr>
|
|
|
|
<tr bgcolor=ffffff><td height="220" valign=top style="padding:5px">
|
|
<%=rst.getString("c_content").replaceAll("\n\r","<br />")%></b>
|
|
</td></tr>
|
|
<tr bgcolor=ffffff><td height="30" style="padding:5px">
|
|
File. <a href="/upload/<%=rst.getString("c_file")%>"><%=rst.getString("c_file")%></a></b>
|
|
</td></tr>
|
|
</td></tr>
|
|
</table>
|
|
<table width="800" cellSpacing="1" cellPadding="0" border="0" bgcolor=ffffff>
|
|
<tr bgcolor=ffffff><td height="40" align=center style="padding:5px">
|
|
<!-- <a href="edit.jsp?<%=para_t%>&c_no=<%=c_no%>" style="width: 80px; line-height: 26px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #555; border-radius: 5px; color: #ffffff;">Edit</a>
|
|
<a href="#none" onclick="if(confirm('Are you sure you want to delete?')){location.href='delete_ok.jsp?<%=para_t%>&c_no=<%=c_no%>'}" style="width: 80px; line-height: 26px; text-align: center;display: inline-block; background: red; border: 1px solid #555; border-radius: 5px; color: #ffffff;">Delete</a>
|
|
-->
|
|
<a href="list.jsp?<%=para_t%>&nowPage=<%=nowPage%>" style="width: 80px; line-height: 26px; text-align: center;display: inline-block; background: #989898; border: 1px solid #555; border-radius: 5px; color: #ffffff;">List</a>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<%
|
|
|
|
}
|
|
rst.close();
|
|
}
|
|
%>
|
|
<%}%>
|
|
<%@include file="/include/db/db_close.jsp"%>
|