<%Option Explicit%> <% '--- Declare Variables --- Dim Rs, RsSub, strSql, sql, sql1, Num, strText, intYear, strSqlSub, strCategoryName, strSqlImage, RsImage Dim intMaxRow, intPage, intTotalPage, bitSelectAll, intPagePerOnce, i, c Dim intCorporateID, strClass, strSubject, strDetail, dteCorporate, intCategoryID, strCond, strColor Dim strLargeImage, strContentSubject, strContentDetail, dteContentCorporate Dim strThumbDefault, strThumbImage Dim intCount, bitRegister, strLatest Dim strImage, objFSO, f1, w, h, g, strType Dim rand Set Rs = Server.CreateObject("ADODB.RecordSet") Set RsSub = Server.CreateObject("ADODB.RecordSet") %> Elite Training Institute :: --Lift up Your Standard--
  SitemapSitemap
<%Call genEnewsBox%>
SitemapContact Us  
:: Elite Training Institute :: --Life up Your Standard--
<%Call genSearchAndStyleBox%>
Latest News
<% strSql="SELECT TOP 3 ID, strDate, strSubject, tablename, strCreateDate " &_ " FROM (SELECT INT_ENGLISH_ID AS ID, DTE_ENGLISH_DATE AS strDate, STR_ENGLISH_SUBJECT AS strSubject, 'english' AS tablename, DTE_CREATE_DATE AS strCreateDate FROM TBL_ENGLISH WHERE BIT_ENABLE = TRUE " &_ " UNION ALL SELECT INT_SOLUTIONS_ID AS ID, DTE_SOLUTIONS_DATE AS strDate, STR_SOLUTIONS_SUBJECT AS strSubject, 'solutions' AS tablename, DTE_CREATE_DATE AS strCreateDate FROM TBL_SOLUTIONS WHERE BIT_ENABLE = TRUE " &_ " UNION ALL SELECT INT_CAMPS_ID AS ID, DTE_CAMPS_DATE AS strDate, STR_CAMPS_SUBJECT AS strSubject, 'camps' AS tablename, DTE_CREATE_DATE AS strCreateDate FROM TBL_CAMPS WHERE BIT_ENABLE = TRUE " &_ " UNION ALL SELECT INT_CORPORATE_ID AS ID, DTE_CORPORATE_DATE AS strDate, STR_CORPORATE_SUBJECT AS strSubject, 'corporate' AS tablename, DTE_CREATE_DATE AS strCreateDate FROM TBL_CORPORATE WHERE BIT_ENABLE = TRUE " &_ " UNION ALL SELECT INT_TEACHER_ID AS ID, DTE_TEACHER_DATE AS strDate, STR_TEACHER_SUBJECT AS strSubject, 'teacher' AS tablename, DTE_CREATE_DATE AS strCreateDate FROM TBL_TEACHER WHERE BIT_ENABLE = TRUE) as dt " &_ " ORDER BY strDate desc, strCreateDate desc" Rs.Open strSql,connMain,1,3 If Not Rs.Eof Then Do While Not Rs.EOF %>
<%=Rs("strSubject")%>
<% Select Case Rs("tablename") Case "camps" %> <% Randomize rand = Int((1000 * Rnd) + 1) strSqlSub="select TOP 1 * from TBL_CAMPS_IMAGE WHERE INT_CAMPS_ID = "&Rs("ID")&" AND INT_CAMPS_DETAIL_ID = (select TOP 1 INT_CAMPS_DETAIL_ID from TBL_CAMPS_DETAIL WHERE INT_CAMPS_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_CAMPS_ID DESC) order by Sin(INT_CAMPS_IMAGE_ID * Rnd() * "&rand&")" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then %> <% if RsSub("STR_IMAGE_THUMB_FILENAME") <> "" and RsSub("STR_IMAGE_THUMB_FILENAME") <> "0" then Set objFSO = CreateObject("Scripting.FileSystemObject") Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsSub("STR_IMAGE_THUMB_FILENAME")&"")) if gfxSpex(f1.Path, w, h, g, strType) = true then if (w <= 90) then strImage=""&Rs("strSubject")&"" else strImage=""&Rs("strSubject")&"" end if end if End if %> "><%=strImage%> <% End if RsSub.Close %> <% strSqlSub="select TOP 1 * from TBL_CAMPS_DETAIL WHERE INT_CAMPS_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_CAMPS_ID DESC" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then %> <%=genContentMore(RsSub("STR_CAMPS_DETAIL_PAGE"), 300)%> <% End if RsSub.Close %> ">..more <% Case "corporate" Randomize rand = Int((1000 * Rnd) + 1) strSqlSub="select TOP 1 * from TBL_CORPORATE_IMAGE WHERE INT_CORPORATE_ID = "&Rs("ID")&" AND INT_CORPORATE_DETAIL_ID = (select TOP 1 INT_CORPORATE_DETAIL_ID from TBL_CORPORATE_DETAIL WHERE INT_CORPORATE_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_CORPORATE_ID DESC) order by Sin(INT_CORPORATE_IMAGE_ID * Rnd() * "&rand&")" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then if RsSub("STR_IMAGE_THUMB_FILENAME") <> "" and RsSub("STR_IMAGE_THUMB_FILENAME") <> "0" then Set objFSO = CreateObject("Scripting.FileSystemObject") Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsSub("STR_IMAGE_THUMB_FILENAME")&"")) if gfxSpex(f1.Path, w, h, g, strType) = true then if (w <= 90) then strImage=""&Rs("strSubject")&"" else strImage=""&Rs("strSubject")&"" end if end if End if %> "><%=strImage%> <% End if RsSub.Close %> <% strSqlSub="select TOP 1 * from TBL_CORPORATE_DETAIL WHERE INT_CORPORATE_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_CORPORATE_ID DESC" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then %> <%=genContentMore(RsSub("STR_CORPORATE_DETAIL_PAGE"), 300)%> <% End if RsSub.Close %> ">..more <% Case "english" Randomize rand = Int((1000 * Rnd) + 1) strSqlSub="select TOP 1 * from TBL_ENGLISH_IMAGE WHERE INT_ENGLISH_ID = "&Rs("ID")&" AND INT_ENGLISH_DETAIL_ID = (select TOP 1 INT_ENGLISH_DETAIL_ID from TBL_ENGLISH_DETAIL WHERE INT_ENGLISH_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_ENGLISH_ID DESC) order by Sin(INT_ENGLISH_IMAGE_ID * Rnd() * "&rand&")" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then if RsSub("STR_IMAGE_THUMB_FILENAME") <> "" and RsSub("STR_IMAGE_THUMB_FILENAME") <> "0" then Set objFSO = CreateObject("Scripting.FileSystemObject") Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsSub("STR_IMAGE_THUMB_FILENAME")&"")) if gfxSpex(f1.Path, w, h, g, strType) = true then if (w <= 90) then strImage=""&Rs("strSubject")&"" else strImage=""&Rs("strSubject")&"" end if end if End if %> "><%=strImage%> <% End if RsSub.Close %> <% strSqlSub="select TOP 1 * from TBL_ENGLISH_DETAIL WHERE INT_ENGLISH_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_ENGLISH_ID DESC" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then %> <%=genContentMore(RsSub("STR_ENGLISH_DETAIL_PAGE"), 300)%> <% End if RsSub.Close %> ">..more <% Case "solutions" Randomize rand = Int((1000 * Rnd) + 1) strSqlSub="select TOP 1 * from TBL_SOLUTIONS_IMAGE WHERE INT_SOLUTIONS_ID = "&Rs("ID")&" AND INT_SOLUTIONS_DETAIL_ID = (select TOP 1 INT_SOLUTIONS_DETAIL_ID from TBL_SOLUTIONS_DETAIL WHERE INT_SOLUTIONS_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_SOLUTIONS_ID DESC) order by Sin(INT_SOLUTIONS_IMAGE_ID * Rnd() * "&rand&")" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then if RsSub("STR_IMAGE_THUMB_FILENAME") <> "" and RsSub("STR_IMAGE_THUMB_FILENAME") <> "0" then Set objFSO = CreateObject("Scripting.FileSystemObject") Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsSub("STR_IMAGE_THUMB_FILENAME")&"")) if gfxSpex(f1.Path, w, h, g, strType) = true then if (w <= 90) then strImage=""&Rs("strSubject")&"" else strImage=""&Rs("strSubject")&"" end if end if End if %> "><%=strImage%> <% End if RsSub.Close %> <% strSqlSub="select TOP 1 * from TBL_SOLUTIONS_DETAIL WHERE INT_SOLUTIONS_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_SOLUTIONS_ID DESC" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then %> <%=genContentMore(RsSub("STR_SOLUTIONS_DETAIL_PAGE"), 300)%> <% End if RsSub.Close %> ">..more <% Case "teacher" Randomize rand = Int((1000 * Rnd) + 1) strSqlSub="select TOP 1 * from TBL_TEACHER_IMAGE WHERE INT_TEACHER_ID = "&Rs("ID")&" AND INT_TEACHER_DETAIL_ID = (select TOP 1 INT_TEACHER_DETAIL_ID from TBL_TEACHER_DETAIL WHERE INT_TEACHER_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_TEACHER_ID DESC) order by Sin(INT_TEACHER_IMAGE_ID * Rnd() * "&rand&")" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then if RsSub("STR_IMAGE_THUMB_FILENAME") <> "" and RsSub("STR_IMAGE_THUMB_FILENAME") <> "0" then Set objFSO = CreateObject("Scripting.FileSystemObject") Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsSub("STR_IMAGE_THUMB_FILENAME")&"")) if gfxSpex(f1.Path, w, h, g, strType) = true then if (w <= 90) then strImage=""&Rs("strSubject")&"" else strImage=""&Rs("strSubject")&"" end if end if End if %> "><%=strImage%> <% End if RsSub.Close %> <% strSqlSub="select TOP 1 * from TBL_TEACHER_DETAIL WHERE INT_TEACHER_ID = "&Rs("ID")&" order by INT_ORDER ASC, INT_TEACHER_ID DESC" RsSub.Open strSqlSub,connMain,1,3 If Not RsSub.Eof Then %> <%=genContentMore(RsSub("STR_TEACHER_DETAIL_PAGE"), 300)%> <% End if RsSub.Close %> ">..more <% End Select %>
<% Rs.Movenext Loop %> <%Else%>
Coming Soon... <% End if Rs.Close %>
<% Randomize rand = Int((1000 * Rnd) + 1) strSql="select TOP 2 * from TBL_WORKING WHERE (BIT_ENABLE = TRUE) order by Sin(INT_WORKING_ID * Rnd() * "&rand&")" Rs.Open strSql,connMain,1,3 If Not Rs.Eof Then Do While Not Rs.EOF %> <% Rs.Movenext Loop %> <%Else%>
Coming Soon... <% End if Rs.Close %>
Work with Us

<%=Rs("STR_WORKING_SUBJECT")%>
"><%=Rs("STR_WORKING_SHORT_DETAIL")%>

..more

Affilitions
Elite is proud to be affiliated with the following organisations:
Thai TESOL IATEFL University of Cambridge ESOL
| |