📄 newsmain_jsp.java
字号:
public String [] pagePathBottom(String pageurl,int dbcount, int pageNUM, int pagecount)
{
String [] pagePath = new String[21];
int jumpPage = 0;
int page = 0;
int i = 0;
if(pagecount > 5)
{
// 이전 링크 만들기
if (pageNUM>5)
{
jumpPage = (pageNUM-1)/5*5;
pagePath[0] = "<a href="+"'"+pageurl+"&pageNUM="+jumpPage+"' title='"+jumpPage+"'>";
pagePath[1] = "◀";
pagePath[2] = "</a>";
}
else
{
pagePath[0] = "";
pagePath[1] = "◀";
pagePath[2] = "";
}
// 다음 링크 만들기
if((pageNUM-1)/5<pagecount/5)
{
if(pageNUM > pagecount)
pagePath[18] = "<a href="+"'"+pageurl+"&pageNUM="+(pagecount)+"' title='"+(pagecount)+"'>";
else
{
jumpPage = ((pageNUM-1)/5+1)*5+1;
pagePath[18] = "<a href="+"'"+pageurl+"&pageNUM="+jumpPage+"' title='"+jumpPage+"'>";
}
pagePath[19] = "▶";
pagePath[20] = "</a>";
}
else
{
pagePath[18] = "";
pagePath[19] = "▶";
pagePath[20] = "";
}
}
// 링크가 없다
else
{
pagePath[0] = "";
pagePath[1] = "◀";
pagePath[2] = "";
pagePath[18] = "";
pagePath[19] = "▶";
pagePath[20] = "";
}
page = (pageNUM-1)/10*10;
if((pageNUM-1)%10 < 5)
{
pagePath[4] = "1";
pagePath[7] = "2";
pagePath[10] = "3";
pagePath[13] = "4";
pagePath[16] = "5";
for(i=0;i<5;i++)
{
if((page+i+1) > pagecount)
{
pagePath[3+(i*3)] = "";
pagePath[5+(i*3)] = "";
}
else
{
if(pageNUM == (page+i+1))
{
pagePath[3+(i*3)] = "";
pagePath[5+(i*3)] = "";
}
else
{
pagePath[3+(i*3)] = "<a href="+"'"+pageurl+"&pageNUM="+(page+i+1)+"' title='"+(page+i+1)+"' >";
pagePath[5+(i*3)] = "</a>";
}
}
}
}
else
{
pagePath[4] = "6";
pagePath[7] = "7";
pagePath[10] = "8";
pagePath[13] = "9";
pagePath[16] = "0";
for(i=0;i<5;i++)
{
if((page+i+6) > pagecount)
{
pagePath[3+(i*3)] = "";
pagePath[5+(i*3)] = "";
}
else
{
if(pageNUM == (page+i+6))
{
pagePath[3+(i*3)] = "";
pagePath[5+(i*3)] = "";
}
else
{
pagePath[3+(i*3)] = "<a href="+"'"+pageurl+"&pageNUM="+(page+i+6)+"' title='"+(page+i+6)+"' >";
pagePath[5+(i*3)] = "</a>";
}
}
}
}
return pagePath;
}
String makeKOR(String str)throws java.io.UnsupportedEncodingException
{
String kor="";
String temp="";
if(str==null)
kor=null;
else
{
kor=new String(str.getBytes("ISO-8859-1"),"EUC-KR");
//kor=java.net.URLDecoder.decode(str,"KSC5601");//이걸로 쓰면 된다. java.net.*
//kor=new String(kor.getBytes("ISO-8859-1"),"KSC5601"); 이걸로 쓰면 된다.
}
return kor;
}
public String returnString(String type, String phone)
{
return type.isEmpty() ? phone : type;
}
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(6);
_jspx_dependants.add("/client/mugeta_ODC/web/user/news/formatUtil.jsp");
_jspx_dependants.add("/client/mugeta_ODC/web/user/news/../imgpath.jsp");
_jspx_dependants.add("/client/mugeta_ODC/web/user/news/../common_func.jsp");
_jspx_dependants.add("/client/mugeta_ODC/web/user/news/../makeKOR.jsp");
_jspx_dependants.add("/client/mugeta_ODC/web/user/news/../getConnection.jsp");
_jspx_dependants.add("/client/mugeta_ODC/web/user/news/bgColor.jsp");
}
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=euc-kr");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write('\r');
out.write('\n');
out.write("<!-------------------------------------------------------------\r\n");
out.write("* @ name: formatUtil.jsp\r\n");
out.write("* @ Author : ranxu \r\n");
out.write("* @ date :2008-06-25\r\n");
out.write("-------------------------------------------------------------->\r\n");
out.write("\r\n");
out.write('\r');
out.write('\n');
/**
* 환경 Path 설정
*
* @ version : 2.2.0
* @ author : realbeast ( realbeast@entaz.com )
* @ last modified : 2008-04-04
*/
/*------------------------------------------------------------------------------------------------
* 시스템 정검에 관련된 설정
-------------------------------------------------------------------------------------------------*/
boolean IS_SYSTEM_CHECK = false; // 시스템점검중,
boolean IS_TESTER_MODE = false; // 시스템점검중일 때, 테스터들은 이용가능하게 할 것인지,
String img_path = null; // Image Path
String ava_path = null; // Avatar Path
String url_path = null;
String db_name = null; // DB Name
String ContentserverIP = null; // Web Server
String SYSTEM_URL_PATH = null; // Web Source Path Define
String SYSTEM_VM_PATH = null; // QVGA(LCD Width Size 240),QCIF(LCD Width Size 176) Source Path Setting
String SYSTEM_VM_TYPE = request.getParameter("vmtype");
String ip = request.getRemoteAddr();
boolean isQVGA = true; // QVGA(LCD Width Size 240) is True, Or Not False
String SYSTEM_MOVATA_SERVER [] = null;
String SYSTEM_MOVATA_CACHE_PATH = null;
/*------------------------------------------------------------------------------------------------
* 군별에 따른 Path 설정
-------------------------------------------------------------------------------------------------*/
if("".equals(SYSTEM_VM_TYPE) || "null".equals(SYSTEM_VM_TYPE) || SYSTEM_VM_TYPE == null)
{
SYSTEM_VM_TYPE = "";
}
if (
SYSTEM_VM_TYPE.equals("w2") || SYSTEM_VM_TYPE.equals("w3")|| SYSTEM_VM_TYPE.equals("w5")|| SYSTEM_VM_TYPE.equals("w8") ||
SYSTEM_VM_TYPE.equals("b2") || SYSTEM_VM_TYPE.equals("b3")|| SYSTEM_VM_TYPE.equals("b5")|| SYSTEM_VM_TYPE.equals("b8")
)
{
SYSTEM_VM_PATH = "web2";
isQVGA = false;
}
else if(
SYSTEM_VM_TYPE.equals("w4") || SYSTEM_VM_TYPE.equals("w6")|| SYSTEM_VM_TYPE.equals("w7")|| SYSTEM_VM_TYPE.equals("w9") ||
SYSTEM_VM_TYPE.equals("b4") || SYSTEM_VM_TYPE.equals("b6")|| SYSTEM_VM_TYPE.equals("b7")|| SYSTEM_VM_TYPE.equals("b9")
)
{
SYSTEM_VM_PATH = "web";
isQVGA = true;
}
else
{
String szPageURL = HttpUtils.getRequestURL(request).toString();
if( szPageURL.indexOf("web2") > -1 )
{
SYSTEM_VM_PATH = "web2";
isQVGA = false;
}
else
{
SYSTEM_VM_PATH = "web";
isQVGA = true;
}
szPageURL = null;
}
/*------------------------------------------------------------------------------------------------
* 변수설정
-------------------------------------------------------------------------------------------------*/
img_path = "/mugeta/client/mugeta_ODC/"+SYSTEM_VM_PATH+"/";
//ava_path = "http://localhost/client/mugeta_ODC_movata/web/user/itemcoordi/";
ava_path = "/mugeta/client/mugeta_ODC_movata/web/user/itemcoordi/";
url_path = "/mugeta/client/mugeta_ODC/"+SYSTEM_VM_PATH+"/user";
db_name = "mugeta";
ContentserverIP = "http://localhost";
SYSTEM_URL_PATH = "/client/mugeta_ODC/web/user";
SYSTEM_MOVATA_CACHE_PATH = "/mugeta/client/mugeta_ODC_movata/"+SYSTEM_VM_PATH+"/user";
SYSTEM_MOVATA_SERVER = new String[1];
SYSTEM_MOVATA_SERVER[0] = "localhost";
/*------------------------------------------------------------------------------------------------
* Movata Object Name
-------------------------------------------------------------------------------------------------*/
String SYSTEM_OBJECT_NAME = "mugeta";
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
out.write('\r');
out.write('\n');
//*------------------------------------------------------------------------------------------------------
//+ 기본 파라미터
//-------------------------------------------------------------------------------------------------------*/
String mphone= request.getParameter("mphone");
if (!mphone.isEmpty() && mphone != null)
mphone = getStrPhone(getLong(mphone));
String gphone= request.getParameter("gphone");
if (!gphone.isEmpty() && gphone != null)
gphone = getStrPhone(getLong(gphone));
//*------------------------------------------------------------------------------------------------------
//+ 전역 변수
//-------------------------------------------------------------------------------------------------------*/
String myname = "";
String nickName = ""; //닉네임
int count = 0;
String strTodayState = "";
int iTodayState = -1;
// img파일로정
String imgFile = "";
long fLevel = 0;
// 프로필에 관한 변수
int cProfileCount = 0;
String strToolTip = ""; //말풍선
String strToDo = ""; //오늘의 할일
String strMotto = ""; //오늘의 좌우명
String strFriend = ""; //오늘의 친구
String strWish = ""; //오늘의 소원
String strInterest = ""; //오늘의 관심사
String strFood = ""; //오늘 먹은 음식
String strMusic = ""; //오늘 들은 음악
String strAgony = ""; //오늘의 고민
String strLookMan = ""; //지금 보고픈 사람
String strFault = ""; //오늘의 실수
int iToDorReCnt = 0; //오늘의 할일 댓글수
int iMottoReCnt = 0; //오늘의 좌우명 댓글수
int iFriendReCnt = 0; //오늘의 친구 댓글수
int iWishReCnt = 0; //오늘의 소원 댓글수
int iInterestReCnt = 0; //오늘의 관심사 댓글수
int iFoodReCnt = 0; //오늘 먹은 음식 댓글수
int iMusicReCnt = 0; //오늘 들은 음악 댓글수
int iAgonyReCnt = 0; //오늘의 고민 댓글수
int iLookManReCnt = 0; //지금 보고픈 사람 댓글수
int iFaultReCnt = 0; //오늘의 실수 댓글수
int iTotCnt = 0; //총 댓글수
int iFace = 1; //얼굴표정
boolean boolState = false; //오늘의 프로필이 있는가 없는가를 판단.
//
String strNewsKind = ""; //글 종류
int iNewsKind = 0; //글종류(int)
String strNewsTitle = ""; //글 제목
String strPrintNewsTitle = ""; //글 제목 (노출하는)
int iNewsReCnt = 0; //댓글수
String strRegdate = ""; //시간
//
String strFriendPhone = ""; // 폰 NO.
int iQueryType = 0; // 조회 유형
String strJSPLink = "";
int iIdx = 0;
// string유형의 길이
int cStringTypeLength = 0;
int cBestCount = 0;
//
//*------------------------------------------------------------------------------------------------------
//+ page
//-------------------------------------------------------------------------------------------------------*/
//*
out.write('\r');
out.write('\n');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -