%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 intEnglishID, strClass, strSubject, strDetail, dteEnglish, intCategoryID, strCond, strColor
Dim strLargeImage, strContentSubject, strContentDetail, dteContentEnglish
Dim strThumbDefault, strThumbImage
Dim intCount, bitRegister, strLatest
Dim strImage, objFSO, f1, w, h, g, strType, intNum
Set Rs = Server.CreateObject("ADODB.RecordSet")
Set RsSub = Server.CreateObject("ADODB.RecordSet")
Set RsImage = Server.CreateObject("ADODB.RecordSet")
intEnglishID=request("englishID")
If ( IsNULL(intEnglishID)) Or (intEnglishID = "") Then
strSql="select Top 1 * from TBL_ENGLISH WHERE (BIT_ENABLE = TRUE) Order by DTE_ENGLISH_DATE ASC,INT_ENGLISH_ID ASC"
Rs.Open strSql,connMain,1,3
if not Rs.eof then
intEnglishID=Rs("INT_ENGLISH_ID")
else
intEnglishID=0
end if
Rs.Close
End If
%>
Elite Training Institute :: --Lift up Your Standard--
<%
strSql="select * from TBL_ENGLISH WHERE (BIT_ENABLE = TRUE) Order by DTE_ENGLISH_DATE ASC,INT_ENGLISH_ID ASC"
Rs.Open strSql,connMain,1,3
If Not Rs.Eof Then
do while not Rs.eof
%>
<%if intEnglishID <> "" and intEnglishID <> 0 then%>
<%
strSql="SELECT * FROM TBL_ENGLISH WHERE INT_ENGLISH_ID = "&intEnglishID&""
Rs.Open strSql,connMain,1,3
if not Rs.eof then
%>
<%=Rs("STR_ENGLISH_SUBJECT")%>
<%
strSqlSub = "SELECT * FROM TBL_ENGLISH_FILE WHERE INT_ENGLISH_ID = "&intEnglishID&""
RsSub.Open strSqlSub, connMain, 1, 3
If Not RsSub.Eof Then
%>
Attachment
<%
Dim strFileIcon, strExten, strFileSize , strFilename, strFilePath, fso
Set fso = CreateObject("Scripting.FileSystemObject")
i=0
do while not RsSub.eof
strFilename = RsSub("STR_FILENAME")
strFilePath = server.MapPath("download/" & strFilename)
If ( fso.FileExists(strFilePath) ) Then
strFileName = fso.GetFileName(strFilePath)
Set f1 = fso.GetFile(strFilePath)
strFileSize = FormatNumber(f1.Size/1024,-1,-1,-1) & " Kb."
strFileIcon = getFileIcon(strFilePath)
Set f1 = Nothing
i = i + 1
' If i MOD 2 = 1 Then Response.Write("
")
%>
<%if i <> 1 then%> l <%End if%><%=RsSub("STR_FILE_SUBJECT")%>
<%
End If
RsSub.MoveNext
If (i MOD 3)=0 then
Response.Write " "
i=0
End If
loop
Set fso = Nothing
%>
<%
End If
RsSub.close
%>
<%
strSqlSub = "SELECT * FROM TBL_ENGLISH_DETAIL WHERE INT_ENGLISH_ID = "&intEnglishID&" order by INT_ORDER ASC, INT_ENGLISH_ID DESC"
RsSub.Open strSqlSub, connMain, 1, 3
If Not RsSub.Eof Then
intNum = 0
Do while not RsSub.eof
intNum = intNum + 1
%>
<%
strSqlImage = "SELECT * FROM TBL_ENGLISH_IMAGE WHERE INT_ENGLISH_ID = "&intEnglishID&" AND INT_ENGLISH_DETAIL_ID = "&RsSub("INT_ENGLISH_DETAIL_ID")&""
RsImage.Open strSqlImage, connMain, 1, 3
If Not RsImage.Eof Then
intCount = RsImage.Recordcount
c=0
%>
<%
do while not RsImage.eof
c = c + 1
If c MOD 2 = 1 Then Response.Write("
")
%>
<%
if RsImage("STR_IMAGE_THUMB_FILENAME") <> "" and RsImage("STR_IMAGE_THUMB_FILENAME") <> "0" then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsImage("STR_IMAGE_THUMB_FILENAME")&""))
if gfxSpex(f1.Path, w, h, g, strType) = true then
if (w <= 200) then
strImage=""
else
strImage=""
end if
end if
End if
%>
<%if RsImage("STR_IMAGE_LARGE_FILENAME") <>"" and RsImage("STR_IMAGE_LARGE_FILENAME") <> "0" then%>
<%
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set f1 = objFSO.GetFile(Server.Mappath("imgUpload/"&RsImage("STR_IMAGE_LARGE_FILENAME")&""))
if gfxSpex(f1.Path, w, h, g, strType) = true then
%>
','Popup','width=<%=w+25%>,height=<%=h+45%>')"><%=strImage%>
<%
end if
set f1 = nothing
set objFSO = nothing
Else
%>
<%=strImage%>
<%
End if
%>
<%
RsImage.Movenext
if intCount=c Then
if (c MOD 2)=1 then
Response.Write( "
")
End If
End if
If (c MOD 2)=0 then
if intCount=c Then
Response.Write ""
Else
Response.Write "
"
End if
End If
loop
%>
<%
End If
RsImage.close
%>
<%
RsSub.Movenext
Loop
End If
RsSub.close
%>
<%
End If
Rs.Close
%>
<%Else%>
Coming Soon...
<%
End if
%>