116 lines
4.3 KiB
Plaintext
116 lines
4.3 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/include.jsp"%>
|
|
<%@include file="/include/head.jsp"%>
|
|
<%@include file="/cms_for_bcb/show_top.jsp"%>
|
|
<%
|
|
String nowPage = r_call(request.getParameter("nowPage"));
|
|
String c_no = r_call(request.getParameter("c_no"));
|
|
if(c_no.equals("")){
|
|
|
|
}else{
|
|
String sql1 = " select a.* ";
|
|
sql1 = sql1 + ", (select count(c_no) from tbl_board_to where c_board_no = a.c_no and c_group_type=0 and c_group_no = 0 ) as c1_no ";
|
|
sql1 = sql1 + ", (select count(c_no) from tbl_board_to where c_board_no = a.c_no and c_group_type=0 and c_group_no = 1 ) as c2_no ";
|
|
sql1 = sql1 + ", (select count(c_no) from tbl_board_to where c_board_no = a.c_no and c_group_type=0 and c_group_no = 2 ) as c3_no ";
|
|
sql1 = sql1 + ", (select count(c_no) from tbl_board_to where c_board_no = a.c_no and c_group_type=0 and c_group_no = 3 ) as c4_no ";
|
|
sql1 = sql1 + " from tbl_board a where a.c_no = " + c_no;
|
|
ResultSet rst = stmt.executeQuery(sql1);
|
|
if (rst.next()) {
|
|
if(rst.getString("c_member_no").equals(session.getAttribute("member_no") ) && !session.getAttribute("member_type").equals("0")){
|
|
%>
|
|
<script>
|
|
function go(){
|
|
if(document.bcb.c_title.value == ""){
|
|
alert("Insert Title.")
|
|
document.bcb.c_title.focus()
|
|
}else if(document.bcb.c_content.value == ""){
|
|
alert("Insert Content.")
|
|
document.bcb.c_content.focus()
|
|
|
|
|
|
}else{
|
|
document.bcb.method = "post"
|
|
document.bcb.target = "exec"
|
|
document.bcb.action = "edit_ok.jsp?<%=para_t%>"
|
|
document.bcb.submit()
|
|
}
|
|
}
|
|
function check_check(){
|
|
if(document.bcb.c_type_0.checked == true){
|
|
for(i = 0; i < document.bcb.c_team.length; i = i +1){
|
|
document.bcb.c_team[i].checked = true;
|
|
}
|
|
}else{
|
|
for(i = 0; i < document.bcb.c_team.length; i = i +1){
|
|
document.bcb.c_team[i].checked = false;
|
|
}
|
|
}
|
|
}
|
|
function check_check2(){
|
|
check_no = 0
|
|
for(i = 0; i < document.bcb.c_team.length; i = i +1){
|
|
if(document.bcb.c_team[i].checked == false){
|
|
check_no = 1
|
|
}
|
|
}
|
|
if(check_no == 0){
|
|
document.bcb.c_type_0.checked = true
|
|
}else{
|
|
document.bcb.c_type_0.checked = false
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
<form name="bcb" encType="multipart/form-data">
|
|
<input name="c_no" value="<%=c_no%>" type="hidden">
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12" style=" padding:0px 15px;">
|
|
<div class="col-lg-12 col-md-12" style="border-bottom: 1px solid #ccc; padding:10px ">
|
|
<input name="c_title" value="<%=rst.getString("c_title")%>" style="width:100%;height:30px" placeholder="Insert Title.">
|
|
</div>
|
|
<div class="col-lg-12 col-md-12" style="border-bottom: 1px solid #ccc; padding:10px ">
|
|
<div class="col-lg-4 col-md-4" >
|
|
Name. <%=rst.getString("c_name")%></b>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-12 col-md-12" style="min-height:100px;border-bottom: 1px solid #ccc; padding:10px ">
|
|
<textarea name="c_content" style="width:100%;height:200px"><%=rst.getString("c_content")%></textarea>
|
|
</div>
|
|
<div class="col-lg-12 col-md-12" style="border-bottom: 1px solid #ccc; padding:10px ">
|
|
File. <%=rst.getString("c_file")%>
|
|
<input name="o_file_name" value="<%=rst.getString("c_file")%>" type="hidden">
|
|
<%if(!rst.getString("c_file").equals("")){%>
|
|
<input name="o_file" value="y" type="checkbox">del</b>
|
|
<%}%>
|
|
<br>
|
|
<input name="c_file" type="file" style="width:100%;height:30px" placeholder="Choose File.">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12 col-md-12" style="text-align:center;padding-top:20px">
|
|
<%if(rst.getString("c_member_no").equals(session.getAttribute("member_no") ) && !session.getAttribute("member_type").equals("0")){%>
|
|
<a href="#none" onclick="go()" 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="view.jsp?<%=para_t%>&c_no=<%=c_no%>" style="width: 80px; line-height: 26px; text-align: center;display: inline-block; background: #989898; border: 1px solid #555; border-radius: 5px; color: #ffffff;">View</a>
|
|
|
|
</div>
|
|
</form>
|
|
<%
|
|
}else{
|
|
%>
|
|
<script>
|
|
alert("Login.")
|
|
location.href="/"
|
|
</script>
|
|
<%
|
|
}
|
|
}
|
|
rst.close();
|
|
}
|
|
%>
|
|
<%@include file="/cms_for_bcb/show_bottom.jsp"%>
|
|
<%@include file="/include/bottom.jsp"%>
|
|
<%@include file="/include/include_b.jsp"%>
|