285 lines
11 KiB
Plaintext
285 lines
11 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"%>
|
|
<%
|
|
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>◎ Información de la comunidad/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">
|
|
Nombre
|
|
</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">
|
|
Objetivo
|
|
</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">
|
|
Hacer fecha
|
|
</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">
|
|
Maestro
|
|
</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">
|
|
Tableros
|
|
</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>◎ Miembros de la comunidad</b>
|
|
( Total : <%=rs_c.getInt("m_number") + 1%> miembros )
|
|
</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> / <font color=red><b>soy ..</b></font>
|
|
<%}%>
|
|
/ Maestro
|
|
<%
|
|
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>soy ..</b></font>
|
|
<%}%>
|
|
|
|
/
|
|
<%if(rs_m.getInt("c_now") == 0){%>
|
|
Esperando..
|
|
<%}else{%>
|
|
Miembro
|
|
<%}%>
|
|
<%}
|
|
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>◎ Nueva publicación en esta comunidady</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;">
|
|
Tipo de tablero
|
|
</td>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
Título
|
|
</td>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
Escritor
|
|
</td>
|
|
<td style="text-align:center;padding:5px;background:#efefef;">
|
|
Fecha
|
|
</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("Inserta el motivo")
|
|
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>◎ Únete a esta comunidad</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">
|
|
<font color=red>*</font>El motivo para unirse a esta comunidad
|
|
<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;">Entrar</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;">Ir a la comunidad</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;">Gestión para la comunidad</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;">Ir a la comunidad</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;">Lista de la comunidad</a>
|
|
</td>
|
|
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<iframe name="exec" id="exec" width="0px" height="0px"></iframe>
|
|
<%
|
|
}else{
|
|
%>
|
|
<script>
|
|
alert("No hay comunidad")
|
|
location.href="/"
|
|
</script>
|
|
<%
|
|
}
|
|
rs_c.close();
|
|
}%>
|
|
<%@include file="/cms_for_bcb/show_bottom.jsp"%>
|
|
<%@include file="/include/bottom.jsp"%>
|
|
<%@include file="/include/include_b.jsp"%>
|