<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@include file="/field_manager/include/manager_head.jsp"%> <% int col_no = 10; String c_home = r_call(request.getParameter("c_home")); if(c_home.equals("")){ %> alert("Wrong Connection.") location.href="/" <% }else{ %>
Member List - <%if(c_home.equals("t")){%> Entire <%}%> <%if(c_home.equals("0")){%> From BMC <%}%> <%if(!c_home.equals("0") && !c_home.equals("t")){ String sql_home=" SELECT * from tbl_field where c_no = " + c_home; ResultSet rs_home = stmt.executeQuery(sql_home); if(rs_home.next()) { %> From [ <%=rs_home.getString("c_name")%>(<%=rs_home.getString("c_eng_name")%>) ] Member <% } rs_home.close(); %> <%}%>
* Member information is personal information. Care must be taken in handling.
<% String para_t = "&c_home=" + c_home; String where_t = ""; if(c_home.equals("t")){ where_t = " c_use = 0 "; }else{ where_t = " c_use = 0 and c_from = "+ c_home +" "; } int totalRecord = 0; //총레코드개수 int numPerPage = 20; //한페이지당 보여줄레코드개수 int totalPage = 0; //총페이지수 int pagePerBlock = 10; //블록당페이지수 int nowPage = 1; //현재페이지 String sql1 = ""; sql1 = " select count(a.c_no) "; sql1 = sql1 + " from tbl_member a "; sql1 = sql1 + " where "+ where_t +" "; ResultSet rst = stmt.executeQuery(sql1); if (rst.next()) { totalRecord = rst.getInt(1); } rst.close(); if ( r_call(request.getParameter("nowPage")) != null && !r_call(request.getParameter("nowPage")).equals("")) { nowPage = Integer.parseInt(r_call(request.getParameter("nowPage"))); } //nowPage = 93; //totalRecord =1240; int pfirst = 0; //첫페이지 번호 int plast = 0; // 끝페이지 번호 int plast_org = 0; pfirst = ((nowPage-1)/pagePerBlock)*pagePerBlock + 1; plast = pfirst + pagePerBlock - 1; plast_org = (totalRecord-1)/numPerPage + 1; if(plast > plast_org){ plast = plast_org; } int c_number=totalRecord-(nowPage-1)*numPerPage; int sql_now_page = (nowPage - 1) * numPerPage; sql1=""; sql1 = "SELECT a.* "; sql1 = sql1 + ",(select c_name from tbl_field where c_no = a.c_from ) as home_name "; sql1 = sql1 + " from tbl_member a "; sql1 = sql1 + " where " + where_t +" order by c_rand asc"; rst = stmt.executeQuery(sql1); int i_no = 0; while (rst.next()) { i_no = i_no + 1; %> <% } if(i_no == 0){ %> <% } rst.close(); %>
No Name ID Phonr Homepage Photo Status Joined From..
<%=i_no%> <%=rst.getString("c_name")%> <%=rst.getString("c_id")%> <%=rst.getString("c_phone")%> <%=rst.getString("c_home")%> <%if(!rst.getString("c_photo").equals("")){%> " width=80> <%}%> <%if(rst.getInt("c_rand") == 0){%> Registration completed <%}else{%> Waiting to join <%}%> <%=rst.getString("c_date").substring(0,10)%> <%if(rst.getInt("c_from") == 0){%> BMC <%}else{%> <%=rst.getString("home_name")%> <%}%>
There is no data.

<%if(pfirst > 1){ %> <%}%> <% for(int i=pfirst;i <%}%> <%if(plast < plast_org){ %> <%}%>
〈〈 <% if(i==nowPage){%> <%=i%> <%}else{%> <%=i%> <%}%> 〉〉
<%}%> <%@include file="/field_manager/include/manager_bottom.jsp"%>