|
 |
 |
¢ß¾ÆÀÌ·¹º¸ÀÇ Ã¤¿ë°ø°í Á¤º¸ÀÔ´Ï´Ù. ¢ß¾ÆÀÌ·¹º¸¿¡ Áö¿øÀ» ÇÏ½Ç ºÐµéÀº ÇØ´çÇÏ´Â °ø°í¸¦ Ŭ¸¯ÇϽðí Áö¿ø¼¸¦ ´Ù¿î·Îµå ¹ÞÀ¸½Å ´ÙÀ½ ³»¿ëÀ» ÀÛ¼ºÇÏ½Ã°í ¿Â¶óÀÎ Áö¿øÀ» ÇÏ½Ã¸é µË´Ï´Ù. |
 |
|
| |
|
<%
//ÆäÀÌ¡¿ë..
CWiseContentManager cwiseManager = new CWiseContentManager();
ContentQuery contentQuery = new ContentQuery();
contentQuery.includeSubfolder = false;
contentQuery.folderId = folderId;
contentQuery.orderBy = "createdTime desc";
contentQuery.isPageList = true;
contentQuery.currentPageCount = currentPage;
contentQuery.listCountPerPage = countPerPage;
//ÆäÀÌ¡¿¡¼ ¾µ°ªµé..
int totalCount = cwiseManager.getTotalContentListCount(contentQuery); // Àüü °Ô½Ã¹°ÀÇ °¹¼ö
int totalPageCount = (int) ((totalCount - 1) / countPerPage) + 1; // ÃÑÆäÀÌÁö¼ö.
int pageBlockSize = 10; //ÆäÀÌÁö¸¦ ¸î°³¾¿ ±¸ºÐÇÒ °Í ÀÎÁö - << ³ª >> ½Ã ¸îÆäÀÌÁö¾¿ À̵¿
int pageBlock = ((currentPage-1)/pageBlockSize)*pageBlockSize+1; // 'ÆäÀÌ¡ ½ÃÀÛÆäÀÌÁö 1, 11, 21
ContentListIterator iterator = null;
int count = 0;
//#######################################################################################################
//##ÀÛ¼ºÀÚ : °°æ¸ð
//##¼öÁ¤ÀÏ : 20060928
//##¼öÁ¤³»¿ä:ä¿ë±â°£ ÇöÀç ³¯Â¥º¸´Ù ÀÛÀº°æ¿ì ¸¶°¨À¸·Î Ç¥½Ã
//#######################################################################################################
String fyear=null;
String fmonth=null;
String month=null;
String fday=null;
String thisDate=null;
String nowDate=null;
int now_Date = 0 ;
int this_Date = 0 ;
java.util.Date dt=new java.util.Date();
fyear=dt.toString().substring(24, 28).replaceAll(":", "");
month=dt.toString().substring(4, 7).replaceAll(":", "");
fday=dt.toString().substring(8, 10).replaceAll(":", "");
if(month.equals("Jan")){
fmonth = "01";
}else if(month.equals("Feb")){
fmonth = "02";
}else if(month.equals("Mar")){
fmonth = "03";
}else if(month.equals("Apr")){
fmonth = "04";
}else if(month.equals("May")){
fmonth = "05";
}else if(month.equals("Jun")){
fmonth = "06";
}else if(month.equals("Jul")){
fmonth = "07";
}else if(month.equals("Aug")){
fmonth = "08";
}else if(month.equals("Sep")){
fmonth = "09";
}else if(month.equals("Oct")){
fmonth = "10";
}else if(month.equals("Nov")){
fmonth = "11";
}else if(month.equals("Dec")){
fmonth = "12";
}
try {
String cId = null;
String createdTime = null;
String authorId = null;
int num = totalCount - (countPerPage * (currentPage-1)); //±Û¹øÈ£
ContentHeader contentHeader = null;
iterator = cwiseManager.getContentList(contentQuery);
while (true) {
contentHeader = iterator.next();
if (contentHeader == null) break;
cId = (String)contentHeader.get("contentId");
String period = "";
String startDay= contentHeader.get("startDay");
String endDay= contentHeader.get("endDay");
String untilEmploy= contentHeader.get("status");
if (startDay == null || startDay.equals("") || endDay == null || endDay.equals("") || untilEmploy.equals("1")) {
period = "ä¿ë½Ã±îÁö";
} else {
String startDayY = startDay.substring(2,4);
String startDayM = startDay.substring(4,6);
String startDayD = startDay.substring(6,8);
startDay = startDayY+"-"+startDayM+"-"+startDayD+"";
String endDayY = endDay.substring(2,4);
String endDayM = endDay.substring(4,6);
String endDayD = endDay.substring(6,8);
nowDate = fyear + fmonth + fday ;
thisDate= "20" +endDayY + endDayM + endDayD;
now_Date =Integer.parseInt(nowDate);
this_Date =Integer.parseInt(thisDate);
//out.println("ÇöÀ糯ÀÚ => "+now_Date+" ");
//out.println("ä¿ë³¯ÀÚ=> "+thisDate+" ");
//--¼öÁ¤À§Ä¡
//## ä¿ë±â°£ÀÌ Áö³µÀ»°Ü¿ì ¸¶°¨À¸·Î Ç¥½Ã ¾Æ´Ñ °æ¿ì ³¯Â¥ Ç¥½Ã
if (this_Date > now_Date){
endDay = endDayY+"-"+endDayM+"-"+endDayD+"";
period = startDay + " ~ " + endDay;
}else{
period ="¸¶°¨";
}
}
String title = contentHeader.get("title");
title = (title.length()>22)?title.substring(0,22)+"....":title;
%>
| <%=num%> |
<%=title%> |
<%
String aaa= contentHeader.get("kyungnyukYN");
if (aaa.equals("0")) {
%>
½ÅÀÔ |
<%} else { %>
°æ·Â |
<%}%>
<%=period%> |
<%
num--;
} // end while
} catch (Exception e) {
e.printStackTrace();
} finally {
if (iterator != null) {
iterator.close();
}
}
%>
| <%@ include file="/kr/include/cmsListPaging/listPagingLogic.jsp" %> |
|
|
|