%@ page import="loveenjoy.online.*,loveenjoy.notice.*,loveenjoy.point.*,com.loveenjoy.avata.sm.*,loveenjoy.bank.*,loveenjoy.myroom.*,loveenjoy.lovefile.*,loveenjoy.mypoint.*,loveenjoy.meetingroom.*,loveenjoy.member.*,loveenjoy.util.*,java.sql.*,java.net.*,javax.sql.*,javax.naming.*,java.text.*,java.util.*,java.io.*,javax.servlet.*,javax.servlet.http.*" contentType="text/html; charset=KSC5601"%>
<%
if(CookieUtils.getCookieValue("USERID", request) == null){
response.sendRedirect("http://loveenjoy.ddaza.com/nymph_chat/index_man_nologin.jsp");
}
%>
<%@ include file="/include/top/meetinginfo.jsp"%>
<%@ include file="/include/top/info_top.jsp"%>
<%
// ·Î±×ÀÎ È®ÀÎ
if(userId == null || userId.equals("") || userId.equals("null"))
{
response.sendRedirect("/member/login.jsp");
}
//if(memberType < 2 )
//{
%>
<%
//}
// °Ë»öÁ¶°Ç º¯¼ö
int pagenum = 1; // ÇöÀç ÆäÀÌÁö ¹øÈ£
int age_check = 15; // °Ë»ö ³ªÀÌ ±âº»°ª (15 : Àüü)
int log_on = 2; // Á¢¼Ó¿©ºÎ ±âº»°ª(1 : ¿ÀÇÁ¶óÀÎ, 2 : ¿Â¶óÀÎ)
int photo_check = 2; // »çÁøÀ¯¹« ±âº»°ª(1 : ¾øÀ½, 2 : ÀÖÀ½)
// ÆäÀÌÁö¹øÈ£ ¹× °Ë»öÁ¤º¸ ¹Þ±â---------------------------------------
try{
if(request.getParameter("pagenum") != null){
pagenum = Integer.parseInt(request.getParameter("pagenum"));
}else{
pagenum = 1;
}
}catch(Exception e){
out.println(e+"ÆäÀÌÁö¹øÈ£ ¹× °Ë»öÁ¤º¸ ¹Þ±â");
}
%>
| <%@ include file = "/nymph_chat/include/inc_top_man.jsp"%> |
|
| <%@ include file = "include/inc_main_left.jsp"%> |
|
|
 |
<%
// ¼±³àäÆÃ ȸ¿øÁ¤º¸ °¡Á®¿À±â------------------------------------
Connection chatconn = null;
ChatUser chatuser = null;
ChatInfoBean chatbean = null;
OnLineUser_woman online_user = null;
Hashtable chatlist = new Hashtable();
int total_count = 0; // Á¢¼ÓÇØÀÖ´Â ÃÑ ¿©¼ºÈ¸¿ø¼ö
try{
// ¼±³àäÆÃ DB ¾×¼¼½º
Context env = (Context) new InitialContext().lookup("java:comp/env");
DataSource source = (DataSource) env.lookup("jdbc/sunchat");
DataSource sources = (DataSource) env.lookup("jdbc/enjoy");
chatconn = source.getConnection();
userconn = sources.getConnection();
chatuser = new ChatUser(chatconn);
online_user = new OnLineUser_woman(userconn);
userinfo = new UserInfo(userconn);
chatlist = chatuser.ChatList();
total_count = chatlist.size();
}catch(Exception e){
out.println(e+"¼±³àäÆÃ ȸ¿øÁ¤º¸ °¡Á®¿À±â");
}
// ÆäÀÌÁö °ü·Ã º¯¼ö--------------------------------------------------
int spage = 1; // ½ÃÀÛÆäÀÌÁö
int i = 1; // ¸ñ·Ï ¼ø¹ø
// ¸®½ºÆ® ½ÃÀÛ-------------------------------------------------------------
try{
spage = (pagenum - 1) * 12 + 1; // ÆäÀÌÁö´ç Ãâ·Â°³¼ö
int endpage = spage+11;
for(i = spage ; i <= endpage ; i++)
{
if(chatlist.get(Integer.toString(i)) != null)
{
String uid = (String)chatlist.get(Integer.toString(i));
chatbean = chatuser.ChatInfo(uid);
usermeetingbean = userinfo.userMeetingInfo(uid);
// °øÅëºÎºÐ ½ÃÀÛ------------------------------------------------------------
if(i % 2 == 1)
{
%>
| |
<%
} // i % 2 == 1 End
%>
|
|
|
<% if(userId.equals("webmaster")||userId.equals("akaso")){%><%=uid.trim()%><%}else{%><%=usermeetingbean.getNickName()%>(<%=chatbean.getAgecode()%>)<%}%>
<%
if(online_user.nowOnline(uid)) // ¿Â¶óÀÎ »óÅ üũ
{
%>
<%
}
else
{
%>
<%
}
%>
<%
if(userId.equals("webmaster"))
{
%>
»èÁ¦|»çÁø
<%
}
%> |
ÀÚ½ÅÀÖ´Â °÷:
<%
String adda[] = {"","¾Æ¸§´Ù¿î ´«µ¿ÀÚ","¿À¶ÈÇÑ Ä೯","¼½½ÃÇÑ ÀÔ¼ú","Ä®³¯°°Àº Åμ±","³¯¾ÀÇÑ Çã¹÷Áö","³¯¾ÀÇÑ Ç㸮","¿Ïº®ÇÑ SÀÚ ¸ö¸Å","ÀÌ»Û ¸ñ¼Ò¸®","ÅÊÅÊÇÑ ¾ûµ¢ÀÌ","À¯È¤ÀûÀÎ ¸ñ¼±","±âŸ"};
for(int z = 1 ; z < adda.length ; z++){
if(z == chatbean.getAddinfo1()){
%>
<%=adda[z]%>
<%
} // if End
} // for End
%>
»ç¶ûÀ̶õ:
<%
String addb[] = {"","´«¹°ÀÇ ¾¾¾ÑÀÌ´Ù","ÇູÀÌ´Ù","¼½½º´Ù","¼·ÎÀÇ À§·Î »ó´ë´Ù","¿ë±â¸¦ Áִ°ÍÀÌ´Ù","³ªº¸´Ù ±×´ë°¡ ¸ÕÀúÀΰÍ","»ó´ë¹æÀ» ¿ë¼Çϴ°Í","Àο¬ÀÌ´Ù","¾ðÁ¦³ª »ý°¢Çϴ°Í","±×¸®¿òÀÌ´Ù","±âŸ"};
for(int z = 1 ; z < addb.length ; z++){
if(z == chatbean.getAddinfo4()){
%>
<%=addb[z]%>
<%
} // if End
} // for End
%> |
 |
| |
|
<%
if(i % 2 == 0)
{
%>
|
<%
} // i % 2 = 0 End
if(i % 2 == 1 && i == total_count) // ¸®½ºÆ® Å×ÀÌºí ¸¶¹«¸®
{
%> |
|
|
<%
}// i % 2 == 1 && i == online_count End
} // if(chatlist.get(Integer.toString(i)) != null) End
} // for(i = spage ; i <= spage+9 ; i++) End
userconn.close(); // userinfo Ä¿³¼¼Ç Á¾·á
chatconn.close(); // chatinfo Ä¿³¼¼Ç Á¾·á
}catch(Exception e){
out.println(e+"¼±³à ¸®½ºÆ®");
}finally{
try{
if(userconn != null) userconn.close();
if(chatconn != null) chatconn.close();
}catch(Exception e){}
}
// °øÅëºÎºÐ ³¡------------------------------------------------------
%> |
| |
| ¡ØÀ§»çÁøÀº ȸ¿øµéÀÌ Á÷Á¢ ¿Ã¸° »çÁøÀ̹ǷΠ½ÇÁ¦¿Í ´Ù¸¦¼ö ÀÖ½À´Ï´Ù. |
<%
// ÆäÀÌÁö ¹øÈ£ ¸®½ºÆ® ½ÃÀÛ--------------------------------------------------
int total = total_count;
int total_page = total / 12;
int pages;
int pagee;
//------------- ÀüüÆäÀÌÁö ¼ö
if(total % 12 != 0){
total_page = total_page + 1;
}
//------------- ½ÃÀÛÆäÀÌÁö ¹øÈ£
if(pagenum % 10 != 0){
pages = (pagenum / 10) * 10 + 1;
}else{
pages = (pagenum / 10) * 10 - 9;
}
//------------ ³¡ÆäÀÌÁö ¹øÈ£
pagee = pages + 9;
if(pagee >= total_page)
{
pagee = pagee - (pagee - total_page);
}
//------------
try{
// ÀÌÀüÆäÀÌÁö ¾ÆÀÌÄÜ
if(pagenum > 10 && total_page > 10){
int p = pages - 10;
%>
 |
<%
}
// ÆäÀÌÁö¹øÈ£ »Ñ¸®±â
for(int j=pages;j<=pagee;j++){
if(pagenum==j){
%>
[<%=j%>] |
<%
}else{
%>
[<%=j%>] |
<%
}
}
// ´ÙÀ½ÆäÀÌÁö ¾ÆÀÌÄÜ
if(pagenum < total_page && pagee != total_page){
int p = pages + 10;
%>
 |
<%
}
%>
<%
}catch(Exception e){
out.println(e+"ÆäÀÌÁö ¹øÈ£ ¸®½ºÆ®");
}
// ¼±³àäÆÃ ȸ¿ø ¸®½ºÆ® Ãâ·Â ³¡---------------------------------------------------------
%>
|
|
|
|
| |
| <%@ include file = "/include/bottom/info_bottom.jsp"%> |