c-innovacion2/resoft/field_manager_new/process/menu/insert_b.jsp

146 lines
5.0 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/field_manager/include/manager_head.jsp"%>
<%
String c_up_no = r_call(request.getParameter("c_up_no"));
String c_home = r_call(request.getParameter("c_home"));
String c_maker = r_call(request.getParameter("c_maker"));
if(c_up_no.equals("")){
%>
<script>
alert("잘못 된 접속입니다")
</script>
<%
}else{
String up_name = "";
String sql = "select c_name from tbl_menu where c_no = " + c_up_no + "";
ResultSet rs = stmt.executeQuery(sql);
if(rs.next()){
up_name = rs.getString("c_name");
}
rs.close();
%>
<script>
var IMG_FORMAT = "\\.(bmp|gif|jpg|jpeg|png|hwp|doc|docx|xls|xlsx|ppt|pptx|txt|zip|)$";
function go(){
if(document.kku.c_name.value==""){
alert("메뉴명을 입력해 주세요")
}else{
document.kku.action = "insert_ok.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>";
document.kku.submit();
}
}
function chk(flag){
if(flag ==0 ){
document.getElementById("ct").innerHTML = "Up Menu "
}
if(flag ==1 ){
document.getElementById("ct").innerHTML = "Contents 파일"
}
if(flag ==2 ){
document.getElementById("ct").innerHTML = "Process 종류"
}
if(flag ==3 ){
document.getElementById("ct").innerHTML = "외부 LINK"
}
document.getElementById("ct0").style.display = "none"
document.getElementById("ct1").style.display = "none"
document.getElementById("ct3").style.display = "none"
document.getElementById("ct2").style.display = "none"
document.getElementById("ct"+flag).style.display = "block"
}
</script>
<h1 class="txt01">메뉴 등록</h1>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabRsv3">
<form name="kku" method="post" encType="multipart/form-data">
<input name="c_up_no" value="<%=c_up_no%>" type="hidden">
<tr>
<th width=15% style="text-align:center"> 상위메뉴 </th>
<td width=85%> <%=up_name%> </td>
</tr>
<tr>
<th width=15% style="text-align:center"> 명칭 </th>
<td width=85%> <input type="text" name="c_name" id="" style="width:258px" /> </td>
</tr>
<tr>
<th width=15% style="text-align:center"> Type </th>
<td width=85%>
<input type="radio" name="c_type" value="0" onclick="chk(0)">UP Menu
&nbsp;&nbsp;
<input type="radio" name="c_type" value="1" onclick="chk(1)" checked>Contents
&nbsp;&nbsp;
<input type="radio" name="c_type" value="2" onclick="chk(2)">Process
&nbsp;&nbsp;
<input type="radio" name="c_type" value="3" onclick="chk(3)">외부 Link
</td>
</tr>
<tr>
<th width=15% style="text-align:center"> <div id="ct">Contents 파일</div> </th>
<td width=85%>
<div id="ct0" style="display:none">
* Up Menu의 경우 하위 메뉴를 반드시 만들어 주시기 바랍니다.
</div>
<div id="ct1">
<input name="c_content1" type="file" id="" style="width:400px;height:30px" />
<br>* jsp 파일, 영문파일명 이용, Char. type을 상단에 utf-8 넣어주어야합니다.
</div>
<div id="ct2" style="display:none">
<select name="c_content2">
<option value="board">일반게시판</option>
<option value="faq">FAQ게시판</option>
<option value="news">뉴스게시판</option>
<option value="photo">포토갤러리</option>
<option value="free">질의응답형</option>
</select>
</div>
<div id="ct3" style="display:none">
<input type="text" name="c_content3" id="" style="width:500px" />
<br>* http:// 를 꼭 포함하세요.
</div>
</td>
</tr>
<tr>
<th width=15% style="text-align:center">안내문구 </th>
<td width=85%>
<input type="text" name="c_exp" id="" style="width:600px" />
</td>
</tr>
<tr>
<th width=15% style="text-align:center">상단이미지 </th>
<td width=85%>
<input name="c_image" type="file" id="" style="width:400px;height:30px" />
<br>* 높이는 95px 너비는 350px 이하로 영문 파일명으로 해 주세요.
</td>
</tr>
<tr>
<th width=15% style="text-align:center">상단이미지 링크 </th>
<td width=85%>
<input type="text" name="c_image_linc" id="" style="width:600px" />
</td>
</tr>
<tr>
<th width=15% style="text-align:center">사용여부 </th>
<td width=85%>
<input type="radio" name="c_use" value="0">예
&nbsp;&nbsp;
<input type="radio" name="c_use" value="1" checked>아니오
</td>
</tr>
</table>
<table width="100%">
<tr>
<td height="35" align="center" colspan="5" style="padding-bottom:10px;padding-top:10px">
<a href="#none" onclick="go()" style="width: 98px; line-height: 30px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #555; border-radius: 5px; color: #ffffff;">메뉴등록</a>
<a href="list.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>" style="width: 98px; line-height: 30px; text-align: center;display: inline-block; background: #ededed; border: 1px solid #555; border-radius: 5px; color: #000000;">취소</a>
</td>
</tr>
</table>
<%
}
%>
<%@ include file="/field_manager/include/manager_bottom.jsp"%>