c-innovacion2/resoft/cms_for_bcb/process/notice/insert.jsp

137 lines
4.4 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"%>
<select id="language_select" onchange="setLanguage(this.value)">
<option value="en" <%= (request.getLocale().toString().equals("en") ? "selected" : "") %>>English</option>
<option value="es_PE" <%= (request.getLocale().toString().equals("es_PE") ? "selected" : "") %>>Spanish (Peru)</option>
</select>
</p>
<%
if(session.getAttribute("member_type").equals("1") || session.getAttribute("member_type").equals("2") || session.getAttribute("member_type").equals("3") ){
%>
<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 = "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">
<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 ">
<label for="inputField" style="display: inline-block; margin-right: 10px;" id="a1">Title :</label>
<input name="c_title" style="width: calc(100% - 80px); height: 30px; box-sizing: border-box;" placeholder="Title.">
<!-- <input name="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 ">
<span id="a2"> Name</span> <%=session.getAttribute("member_name")%>
<input name="c_name" value="<%=session.getAttribute("member_name")%>" type="hidden">
</div>
<div class="col-lg-12 col-md-12" style="border-bottom: 1px solid #ccc; padding:10px ">
<textarea name="c_content" style="width:100%;height:200px"></textarea>
</div>
<div class="col-lg-12 col-md-12" style="border-bottom: 1px solid #ccc; padding:10px ">
<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">
<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;"><span id="a3">Insert</span></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;"><span id="a4">Cancel</span></a>
</div>
</form>
<%
}else{
%>
<script>
alert("You do not have permission")
location.href="/"
</script>
<%}%>
<script>
// 다국어 처리를 위한 i18n 객체
var i18n = {
en: {
a1: "Title.",
a2: "Name.",
a3: "Insert",
a4: "Cancel"
},
es_PE: {
a1: "Título.",
a2: "Nombre.",
a3: "Insertar",
a4: "Cancelar"
}
};
// 선택된 언어에 따라 다국어 텍스트 설정
function setLanguage(lang) {
var langData = i18n[lang];
document.getElementById("a1").innerText = langData.a1;
document.getElementById("a2").innerText = langData.a2;
document.getElementById("a3").innerText = langData.a3;
document.getElementById("a4").innerText = langData.a4;
}
</script>
<script>
setLanguage('<%= request.getLocale().toString() %>');
</script>
<%@include file="/cms_for_bcb/show_bottom.jsp"%>
<%@include file="/include/bottom.jsp"%>
<%@include file="/include/include_b.jsp"%>