<% // @Author: Dhunva Saisom ( Dun ) // @Project Name: Honsen // Number of Files: many // Files Name: meaning.jsp // // // Code provided by Author Dhunva Saisom ( Dun ) // as is,with warranties as to performance, fitness, merchantability,and any other warranty // ( whether expressed or implied ).Terms of Agreement: By using this source code, you agree // to the following terms... // 1) You may use this source code in personal or business projects by buying license. // 2) You MAY NOT redistribute this source code (for example to a web site) without // written permission from the original author.Failure to do so is a violation of copyright // laws. // If you find any bug in this source codes please e-mail : thedun_dec@hotmail.com %> <%@ page contentType="text/html;charset=utf-8" %> <%@ page import="java.sql.*,java.util.*" %> <% ResultSet rs; int pid = 0; int firstRow = 0; int totalRow = 0; int totalPage = 0; int intlinkGroup = 0; int preview = 0; int pageLinkLen = 10; String [] th_alphabet = { "¡", "¢", "¤", "§", "¨", "©", "ª", "«", "¬", "­", "®", "¯", "°", "±", "²", "³", "´", "µ", "¶", "·", "¸", "¹", "º", "»", "¼", "½", "¾", "¿", "À", "Á", "Â", "Ã", "Å", "Ç", "È", "É", "Ê", "Ë", "Ì", " Í", " Î", "·Ñé§ËÁ´" }; String chDelete = null; String pageNo = request.getParameter ( "pageNo" ); String linkGroup = request.getParameter ( "linkGroup" ); String alphabet = request.getParameter ( "alphabet" ); String keep_alphabet = request.getParameter ( "keep_alphabet" ); String search_alphabet = request.getParameter ( "search_alphabet" ); String search = request.getParameter ( "search" ); if ( pageNo == null ) { pageNo = "1"; } if ( linkGroup == null ) { linkGroup = "0"; } if ( alphabet != null ) { alphabet = alphabet.trim ( ); if ( alphabet.equals ( "" ) ) { alphabet = null; } } if ( alphabet == null ) { alphabet = "" + ( th_alphabet.length - 1 ); } if ( keep_alphabet != null ) { keep_alphabet = new String ( keep_alphabet.getBytes ( "ISO8859_1" ), "utf-8" ); } if ( search != null ) { search = search.trim ( ); if ( search.equals ( "" ) ) { search = null; } } String search2 = null; if ( search != null ) { search2 = new String ( search.getBytes ( "ISO8859_1" ), "utf-8" ); } pid = Integer.parseInt ( pageNo ); intlinkGroup = Integer.parseInt ( linkGroup ); int sysid = 4; %> <%@ include file = "preview.jsp" %> MEANING
¡ÃÍ¡¤Ó·Õèµéͧ¡Òäé¹ËÒ
<% for ( int i = 0; i < th_alphabet.length; i++ ) { if ( alphabet.equals ( "" + i ) ) { %> <% } else { %> <% } out.print ( "" ); } %>
<%= th_alphabet [ i ] %><%= th_alphabet [ i ] %>
<% int meanid = 0; int rowCount = 0; String m_group = null; String m_word = null; String m_description = null; String m_date = null; String strSQL = null; //out.print ( "search" ); if ( search != null ) { //out.print ( "search" ); strSQL = "Select * from means where m_word Like '%" + search + "%' order by m_word asc"; } else { //out.print ( "no search" + ( th_alphabet.length - 1 ) ); if ( alphabet.equals ( "" + ( th_alphabet.length - 1 ) ) ) { strSQL = "Select * from means order by m_word asc"; } else { strSQL = "Select * from means where m_group = '" + search_alphabet + "' order by m_word asc"; } } //out.print ( strSQL ); rs = dbcon.executeQuery ( strSQL, chDelete, preview, pid ); totalRow = dbcon.getTotalRow ( ); totalPage = dbcon.getTotalPage ( ); while ( rs.next ( ) ) { meanid = rs.getInt ( "meanid" ); m_group = rs.getString ( "m_group" ); m_word = rs.getString ( "m_word" ); m_description = rs.getString ( "m_description" ); m_date = rs.getString ( "m_date" ); // @@@ START LINUX // m_word = new String ( m_word.getBytes ( "ISO8859_1" ), "MS874" ); // m_description = new String ( m_description.getBytes ( "ISO8859_1" ), "MS874" ); // @@@ END LINUX if ( m_date != null ) { d_date.setDate ( m_date ); m_date = d_date.getShortThaiDay ( ) + " " +d_date.getShortThaiMonth ( ) + " " + d_date.getShortThaiYear ( ); } rowCount = rowCount + 1; %> <% if ( rowCount >= preview ) { rs.afterLast ( ); } } rs.close ( ); //
row = " + dbcon.getTotalRow ( ) + " :: page = " + dbcon.getTotalPage ( ) if ( rowCount == 0 ) { pid = 0; } %>
<% if ( m_word != null ) { out.print ( m_word ); } %> ¤ÇÒÁËÁÒ <% if ( m_description != null ) { out.print ( m_description ); } %>
 
˹éÒ <%= pid %> ¨Ò¡ <%= totalPage %> ( <%= totalRow %> ¤Ó )
<% int goPage = 0; int totalpageLink = totalPage/pageLinkLen; int start_pageLink = pageLinkLen * intlinkGroup; if ( totalPage % pageLinkLen > 0 ) { totalpageLink = totalpageLink + 1; } if ( start_pageLink > 0 ) { out.print ( " " ); out.print ( "<< " + ( ( start_pageLink + 1 ) - pageLinkLen ) + "-" + start_pageLink + "" ); out.print ( " | " ); } for ( int i = 1; i <= pageLinkLen; i++ ) { goPage = i + start_pageLink; if ( goPage <= totalPage ) { if ( pid == goPage ) { out.print ( "" + goPage + " | " ); } else { out.print ( "" ); out.print ( goPage + " | " ); } } else { goPage = totalPage; } } if ( goPage < totalPage ) { out.print ( " " + ( goPage + 1 ) ); if ( ( goPage + pageLinkLen ) < totalPage ) { out.print ( "-" + ( goPage + pageLinkLen ) + " >>" ); } else { if ( ( goPage + 1 ) < totalPage ) { out.print ( "-" + totalPage + " >>" ); } else { out.print ( "" ); } } } %>
 
 
<%@ include file = "footer.jsp" %>