c-innovacion2/apply/board/insert.jsp

124 lines
3.6 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"%>
<script src="/ckeditor/ckeditor.js"></script>
<%
String c_home = r_call(request.getParameter("c_home"));
String c_maker = r_call(request.getParameter("c_maker"));
String board_no = r_call(request.getParameter("board_no"));
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>
<script>
function go(){
if(document.bcb.c_title.value == ""){
alert("Please enter the subject.")
document.bcb.c_title.focus()
//}else if(document.bcb.c_content.value == ""){
// alert("내용을 입력해 주세요.")
// document.bcb.c_content.focus()
}else{
document.bcb.method = "post"
document.bcb.target = "exec"
document.bcb.action = "insert_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">
<table width="800" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr><td height="30">
<input name="c_title" style="width:100%;height:30px" placeholder="Please enter the subject.">
</td></tr>
<tr><td height="30">
Name :
<input name="c_name" value="" style="width:150px">
</td></tr>
<tr><td>
<textarea name="c_content" class="ckeditor" style="width:100%;height:200px"></textarea>
</td></tr>
<tr><td height="30">
<input name="c_file" type="file" style="width:100%;height:30px" placeholder="Please select a file.">
</td></tr>
<tr><td height="40" align=center>
<a href="#none" onclick="go()" style="width: 80px; line-height: 40px; text-align: center;display: inline-block; background: #5E9ECA; border: 1px solid #ffffff;border-radius: 20px; color: #ffffff;font-weight:400;font-size: 13px;">Insert</a>
<a href="list.jsp?<%=para_t%>" style="width: 80px; line-height: 40px; text-align: center;display: inline-block; background: #787878; border: 1px solid #ffffff; border-radius: 20px; color: #ffffff;font-weight:400;font-size: 13px;">Cancel</a>
</td></tr>
</table>
</form>
<iframe name="exec" id="exec" src="" width=0 height="0"></iframe>
<%}%>
<%@include file="/include/db/db_close.jsp"%>