c-innovacion2/resoft/cms_for_bcb/process/presentation/chat/disc.jsp

105 lines
3.8 KiB
Plaintext

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/include/include.jsp"%>
<%
if(session.getAttribute("member_type").equals("1") || session.getAttribute("member_type").equals("2")){
%>
<!DOCTYPE html>
<html lang="ko" style="height:100%">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="" />
<link rel="stylesheet" type="text/css" href="/css/plugins-css.css" />
<link rel="stylesheet" type="text/css" href="/revolution/css/settings.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/css/typography.css" />
<link rel="stylesheet" type="text/css" href="/css/shortcodes/shortcodes.css" />
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="stylesheet" type="text/css" href="/css/custom.css" />
<link rel="stylesheet" type="text/css" href="/css/responsive.css" />
<link href="/js/cal_style.css" rel="stylesheet" type="text/css">
</head>
<script>
function my_reload(){
window.location.reload()
}
</script>
<body style="height:100%" >
<div style="height:100%;padding-left:20px;padding-right:20px;width:100%">
<table cellpadding=0 cellspacing=0 height="100%" width="100%">
<tr><td valign=top >
<table cellpadding=0 cellspacing=0 width="100%">
<%
String c_presentation_no = r_call(request.getParameter("c_presentation_no"));
String sql_p_d = "select c_member_display,c_content,c_file,c_date,c_member_no,c_no from tbl_presentation_chat where c_presentation_no = "+ c_presentation_no + " order by c_no asc";
ResultSet rs_p_d = stmt2.executeQuery(sql_p_d);
int o_member_no = 0;
int last_no = 0;
while(rs_p_d.next()){
%>
<tr><td width=100% style="padding-top:3px">
<table <%if(rs_p_d.getString("c_member_no").equals(session.getAttribute("member_no"))){%>align=right<%}%> cellpadding=0 cellspacing=0 style="max-width:80%">
<%if( o_member_no != rs_p_d.getInt("c_member_no") ){%>
<tr><td style="padding:5px<%if(rs_p_d.getString("c_member_no").equals(session.getAttribute("member_no"))){%>;text-align:right<%}%>">
<img src="/images/icon/person.png" width="16px" alt=""> <%=rs_p_d.getString("c_member_display")%>
</td></tr>
<%}%>
<tr><td bgcolor="<%if(rs_p_d.getString("c_member_no").equals(session.getAttribute("member_no"))){%>#FFFBCB<%}else{%>#ededed<%}%>" style="padding-left:15px;padding-right:15px;padding-bottom:5px<%if(rs_p_d.getString("c_member_no").equals(session.getAttribute("member_no"))){%>;text-align:right<%}%>">
<%=rs_p_d.getString("c_content")%>
<%if(!rs_p_d.getString("c_file").equals("")){%>
<a href="/upload/chat/<%=rs_p_d.getString("c_file")%>" target="_blank" title="파일 받기"><img src="/images/icon/file.png" width="10px" alt=""> <font color="#ff0303"><%=rs_p_d.getString("c_file")%></font></a>
<%}%>
</td></tr>
</table>
</td></tr>
<%
o_member_no = rs_p_d.getInt("c_member_no");
last_no = rs_p_d.getInt("c_no");
}
rs_p_d.close();
%>
</table>
</td></tr>
<tr><td height="0" name="r" height=1 id="r" align=right>
<input name="rr" id="rr" style="width:1px;height:0px;" >
</tr><td>
</table>
</div>
<script>
document.getElementById("rr").focus();
parent.document.bcb_chat.c_content.focus();
function rel(){
window.location.reload()
}
timerID2 = 6;
function go_r(){
document.getElementById("function_c").src="check.jsp?c_presentation_no=<%=c_presentation_no%>&last_no=<%=last_no%>"
timerX2()
}
function timerX2(){
timerID2 = setTimeout("go_r()",5000);
}
timerX2()
</script>
<iframe id="function_c" src="t1" width="0" height="0"></iframe>
</body>
</html>
<%
}else{
%>
<script>
alert("You do not have permission.")
self.close()
</script>
<%
}
%>
<%@include file="/include/include_b.jsp"%>