380 lines
14 KiB
Plaintext
380 lines
14 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%request.setCharacterEncoding("utf-8");%>
|
|
<%@include file="/include/include.jsp"%>
|
|
<%
|
|
login_tag = 1;
|
|
%>
|
|
<%@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>
|
|
<%
|
|
String para_t = "show_no="+ show_no +"&check_no="+ check_no + "&c_relation=" + c_relation + "&c_relation2=" + c_relation2;
|
|
String c_no = r_call(request.getParameter("c_no"));
|
|
%>
|
|
<%
|
|
if(c_no.equals("")){
|
|
%>
|
|
<script>
|
|
alert("Conexión incorrecta")
|
|
location.href ="/"
|
|
</script>
|
|
<% }else{
|
|
String c_board_no = "";
|
|
String master_no = "";
|
|
int my_now = -1;
|
|
String sql_c = "select a.* , b.c_name as m_name, b.c_id as m_id ";
|
|
sql_c = sql_c + ", (select c_now as my_now from tbl_community_member where c_community_no = a.c_no and c_use = 0 and c_now in (0,1) and c_member_no = "+ session.getAttribute("member_no") +" ) as my_now ";
|
|
sql_c = sql_c + ", (select count(c_no) as m_number from tbl_community_member where c_community_no = a.c_no and c_use = 0 and c_now in (0,1) ) as m_number ";
|
|
sql_c = sql_c + " from tbl_community a ";
|
|
sql_c = sql_c + " inner join tbl_member b on b.c_no = a.c_member_no ";
|
|
sql_c = sql_c + " where a.c_no = "+ c_no +" and a.c_use = 0 and a.c_home = "+ c_home +" ";
|
|
ResultSet rs_c = stmt.executeQuery(sql_c);
|
|
if (rs_c.next()) {
|
|
master_no = rs_c.getString("c_member_no");
|
|
if(rs_c.getString("my_now") != null){
|
|
my_now = rs_c.getInt("my_now");
|
|
}
|
|
%>
|
|
<form name="ss">
|
|
<input name="c_home" value="<%=c_home%>" type="hidden">
|
|
<input name="c_no" value="<%=c_no%>" type="hidden">
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="">
|
|
<div style="padding-bottom:10px">
|
|
<b id="a1">◎ Community information</b>
|
|
</div>
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="border:1px solid #cdcdcd;padding:10px;padding-left:20px;padding-right:20px">
|
|
<table style="width:100%">
|
|
<tr><td style="width:10%;text-align:right;height:30px;padding-right:10px">
|
|
<span id="a2">Name</span>
|
|
</td><td style="width:90%;text-align:left;padding-left:10px;background:#efefef">
|
|
<b><%=rs_c.getString("c_name")%></b>
|
|
</td></tr>
|
|
<tr><td style="text-align:right;height:30px;padding-right:10px">
|
|
<span id="a3">Target</span>
|
|
</td><td style="\text-align:left;padding-left:10px;background:#efefef">
|
|
<b><%=rs_c.getString("c_target")%></b>
|
|
</td></tr>
|
|
<tr><td style="text-align:right;height:30px;padding-right:10px">
|
|
<span id="a4">Date</span>
|
|
</td><td style="\text-align:left;padding-left:10px;background:#efefef">
|
|
<b><%=rs_c.getString("c_date").substring(0,10)%></b>
|
|
</td></tr>
|
|
<tr><td style="text-align:right;height:30px;padding-right:10px">
|
|
<span id="a5">Master</span>
|
|
</td><td style="\text-align:left;padding-left:10px;background:#efefef">
|
|
<b><%=rs_c.getString("m_name")%></b> / <%=rs_c.getString("m_id")%>
|
|
</td></tr>
|
|
<tr><td style="text-align:right;height:30px;padding-right:10px">
|
|
<span id="a6">Boards</span>
|
|
</td><td style="\text-align:left;padding-left:10px;background:#efefef">
|
|
<%
|
|
String sql_b = "select * from tbl_community_board where c_community_no = "+ c_no +" and c_use = 0 and c_view = 0 order by c_order asc ";
|
|
ResultSet rs_b = stmt.executeQuery(sql_b);
|
|
int b_no = 0;
|
|
while (rs_b.next()) {
|
|
b_no = b_no + 1;
|
|
%>
|
|
<%if(b_no > 1){
|
|
c_board_no = c_board_no + ",";
|
|
%>
|
|
/
|
|
<%}
|
|
c_board_no = c_board_no + rs_b.getInt("c_no");
|
|
%>
|
|
<b><%=rs_b.getString("c_name")%></b>
|
|
<%}
|
|
rs_b.close();
|
|
%>
|
|
</td></tr>
|
|
<tr><td colspan=2 style="text-align:right;height:10px;padding-right:10px">
|
|
</td></tr>
|
|
<tr><td colspan=2 style="text-align:left;padding:20px;background:#efefef">
|
|
<%=rs_c.getString("c_exp").replaceAll("\n","<br />")%>
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-top:20px">
|
|
<div style="padding-bottom:10px">
|
|
<b id="a7">◎ Community Members</b>
|
|
( Total :</span> <%=rs_c.getInt("m_number") + 1%> <span id="a9">Members )</span>
|
|
</div>
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="border:1px solid #cdcdcd;padding:10px;padding-left:20px;padding-right:20px">
|
|
<table style="width:100%">
|
|
<tr><td colspan=2 style="text-align:left;padding:10px;background:#efefef;vertical-align:top">
|
|
<div style="<%if(rs_c.getInt("m_number") > 5){%>height:200px;<%}else{%>height:80px;<%}%>overflow:auto;">
|
|
<%if(rs_c.getString("c_member_no").equals(session.getAttribute("member_no"))){%>
|
|
<font color=Blue>
|
|
<%}%>
|
|
<b><%=rs_c.getString("m_name")%></b> / <%=rs_c.getString("m_id")%>
|
|
<%if(rs_c.getString("c_member_no").equals(session.getAttribute("member_no"))){%>
|
|
</font> / <span style="color: red;"><b>I'm ..</b></span>
|
|
<%}%>
|
|
/ Master
|
|
<%
|
|
String sql_m = " select b.c_no, b.c_name, b.c_id, a.c_now ";
|
|
sql_m = sql_m + " from tbl_community_member a ";
|
|
sql_m = sql_m + " inner join tbl_member b on b.c_no = a.c_member_no and b.c_use = 0 ";
|
|
sql_m = sql_m + " where a.c_community_no = "+ c_no + " and a.c_use = 0 and a.c_now in(0,1) ";
|
|
sql_m = sql_m + " order by a.c_now desc ";
|
|
|
|
ResultSet rs_m = stmt.executeQuery(sql_m);
|
|
while (rs_m.next()) {
|
|
%>
|
|
<br />
|
|
<%if(rs_m.getString("c_no").equals(session.getAttribute("member_no"))){%>
|
|
<font color=Blue>
|
|
<%}%>
|
|
<b><%=rs_m.getString("c_name")%></b> / <%=rs_m.getString("c_id")%>
|
|
<%if(rs_m.getString("c_no").equals(session.getAttribute("member_no"))){%>
|
|
</font> / <font color=red><b>I'm ..</b></font>
|
|
<%}%>
|
|
|
|
/
|
|
<%if(rs_m.getInt("c_now") == 0){%>
|
|
Waiting..
|
|
<%}else{%>
|
|
Member
|
|
<%}%>
|
|
<%}
|
|
rs_m.close();
|
|
%>
|
|
</div>
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-top:20px">
|
|
<div style="padding-bottom:10px">
|
|
<b id="a10"> ◎ New post in this community</b>
|
|
</div>
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="border:1px solid #cdcdcd;padding:10px;padding-left:20px;padding-right:20px">
|
|
<table style="width:100%">
|
|
<tr>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
<span id="a11">Board type</span>
|
|
</td>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
<span id="a12">Title</span>
|
|
</td>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
<span id="a13">Writer</span>
|
|
</td>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
<span id="a14">Date</span>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
if(!c_board_no.equals("")){
|
|
String sql_p = "select a.*, b.c_name as board_name from tbl_board a ";
|
|
sql_p = sql_p + " inner join tbl_community_board b on b.c_no = a.c_community_board_no and b.c_use = 0 and b.c_view = 0 ";
|
|
sql_p = sql_p + " where a.c_relation = 2021 and a.c_relation2 = 1077 and a.c_community_board_no in ( "+ c_board_no +" ) ";
|
|
sql_p = sql_p + " and a.c_use = 0 order by c_no desc limit 15 ";
|
|
ResultSet rs_p = stmt.executeQuery(sql_p);
|
|
while (rs_p.next()) {
|
|
%>
|
|
<tr>
|
|
<td style="text-align:center;padding:10px;border-bottom:1px solid #efefef;max-width:120px">
|
|
<%=rs_p.getString("board_name")%>
|
|
</td>
|
|
<td style="text-align:left;padding:10px;border-bottom:1px solid #efefef">
|
|
<%=rs_p.getString("c_title")%>
|
|
</td>
|
|
<td style="text-align:center;padding:10px;border-bottom:1px solid #efefef;max-width:100px">
|
|
<%=rs_p.getString("c_name")%>
|
|
</td>
|
|
<td style="text-align:center;padding:10px;border-bottom:1px solid #efefef;max-width:80px">
|
|
<%=rs_p.getString("c_date").substring(0,10)%>
|
|
</td>
|
|
</tr>
|
|
<% }
|
|
rs_p.close();
|
|
}
|
|
%>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<%
|
|
if(master_no.equals(session.getAttribute("member_no"))){
|
|
%>
|
|
<%}else{%>
|
|
<%if(my_now > -1){%>
|
|
<%}else{%>
|
|
<script>
|
|
function go(){
|
|
if(document.ss.c_content.value == ""){
|
|
alert("Insert the reason")
|
|
document.ss.c_content.focus();
|
|
}else{
|
|
document.ss.action = "join_ok.jsp?<%=para_t%>"
|
|
document.ss.method = "post"
|
|
document.ss.target = "exec"
|
|
document.ss.submit()
|
|
}
|
|
}
|
|
</script>
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-top:20px">
|
|
<div style="padding-bottom:10px">
|
|
<b id="a15">◎ Join this community</b>
|
|
</div>
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="border:1px solid #cdcdcd;padding:10px;padding-left:20px;padding-right:20px">
|
|
<span id="a16" style="color: red;">* The reason to join this community</span>
|
|
<textarea name="c_content" style="width:100%;height:60px"></textarea>
|
|
<table width="100%" style="">
|
|
<tr>
|
|
<td align="center" style="padding-bottom:10px;padding-top:10px;font-weight:bold;">
|
|
<a href="#none" onclick="go()" style="width: 100px; line-height: 26px; text-align: center;display: inline-block; background: #F5E0CB; border: 1px solid #555; border-radius: 5px; color: #000000;"><span id="a18">Join</span></a>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<%}%>
|
|
<%}%>
|
|
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-top:30px">
|
|
<table width="100%">
|
|
<tr>
|
|
<td align="center" style="padding-bottom:10px;padding-top:10px;font-weight:bold;">
|
|
<%
|
|
if(master_no.equals(session.getAttribute("member_no"))){
|
|
%>
|
|
<a href="community/list.jsp?<%=para_t%>&c_no=<%=c_no%>" style="width: 150px; line-height: 26px; text-align: center;display: inline-block; background: #CFEEFB; border: 1px solid #555; border-radius: 5px; color: #000000;"><span id="a20">Goto Community</span></a>
|
|
|
|
<a href="edit.jsp?<%=para_t%>&c_no=<%=c_no%>" style="width: 200px; line-height: 26px; text-align: center;display: inline-block; background: #F5E0CB; border: 1px solid #555; border-radius: 5px; color: #000000;"><span id="a19">Management</span></a>
|
|
<%}else{%>
|
|
<%if(my_now > -1){%>
|
|
<a href="community/list.jsp?<%=para_t%>&c_no=<%=c_no%>" style="width: 150px; line-height: 26px; text-align: center;display: inline-block; background: #CFEEFB; border: 1px solid #555; border-radius: 5px; color: #000000;"><span id="a21">Goto Community</span></a>
|
|
<%}else{%>
|
|
<%}%>
|
|
<%}%>
|
|
|
|
<a href="list.jsp?<%=para_t%>" style="width: 160px; line-height: 26px; text-align: center;display: inline-block; background: #ededed; border: 1px solid #555; border-radius: 5px; color: #000000;"><span id="a17">Community List</span></a>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<iframe name="exec" id="exec" width="0px" height="0px"></iframe>
|
|
<%
|
|
}else{
|
|
%>
|
|
<script>
|
|
alert("No community")
|
|
location.href="/"
|
|
</script>
|
|
<%
|
|
}
|
|
rs_c.close();
|
|
}%>
|
|
|
|
|
|
<script>
|
|
// 다국어 처리를 위한 i18n 객체
|
|
var i18n = {
|
|
en: {
|
|
a1: "◎ Community information",
|
|
a2: "Name",
|
|
a3: "Target",
|
|
a4: "Date",
|
|
a5: "Master",
|
|
a6: "Boards",
|
|
a7: "◎ Community Members",
|
|
//a8: "( Total :",
|
|
a9: "Members )",
|
|
a10: "◎ New post in this community",
|
|
a11: "Board type",
|
|
a12: "Title",
|
|
a13: "Writer",
|
|
a14: "Date",
|
|
a15: "◎ Join this community",
|
|
a16: "* The reason to join this community",
|
|
a17: "Community List",
|
|
a18: "Join",
|
|
a19: "Management",
|
|
a20: "Goto Community",
|
|
a21: "Goto Community"
|
|
},
|
|
es_PE: {
|
|
a1: "◎ Información de la comunidad",
|
|
a2: "Nombre",
|
|
a3: "Objetivo",
|
|
a4: "Fecha",
|
|
a5: "Maestro",
|
|
a6: "Tableros",
|
|
a7: "◎ Miembros de la comunidad",
|
|
//a8: "(Total :",
|
|
a9: "Miembros )",
|
|
a10: "◎ Nueva publicación en esta comunidad",
|
|
a11: "Tipo de placa",
|
|
a12: "Título",
|
|
a13: "Escritor",
|
|
a14: "Fecha",
|
|
a15: "◎ Únete a esta comunidad",
|
|
a16: "* La razón para unirse a esta comunidad",
|
|
a17: "Lista de la comunidad",
|
|
a18: "Unirse",
|
|
a19: "Administración",
|
|
a20: "Ir a la comunidad",
|
|
a21: "Ir a la comunidad"
|
|
|
|
}
|
|
};
|
|
|
|
// 선택된 언어에 따라 다국어 텍스트 설정
|
|
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;
|
|
document.getElementById("a5").innerText = langData.a5;
|
|
document.getElementById("a6").innerText = langData.a6;
|
|
document.getElementById("a7").innerText = langData.a7;
|
|
//document.getElementById("a8").innerText = langData.a8;
|
|
document.getElementById("a9").innerText = langData.a9;
|
|
document.getElementById("a10").innerText = langData.a10;
|
|
document.getElementById("a11").innerText = langData.a11;
|
|
|
|
document.getElementById("a12").innerText = langData.a12;
|
|
document.getElementById("a13").innerText = langData.a13;
|
|
document.getElementById("a14").innerText = langData.a14;
|
|
document.getElementById("a15").innerText = langData.a15;
|
|
|
|
document.getElementById("a16").innerText = langData.a16;
|
|
document.getElementById("a17").innerText = langData.a17;
|
|
document.getElementById("a18").innerText = langData.a18;
|
|
document.getElementById("a19").innerText = langData.a19;
|
|
document.getElementById("a20").innerText = langData.a20;
|
|
document.getElementById("a21").innerText = langData.a21;
|
|
|
|
|
|
|
|
}
|
|
</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"%>
|