<% CONN_STRING = "DBQ=" & Server.MapPath("DB\News.mdb") & ";" CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};" Set Newsconn = Server.CreateObject("ADODB.Connection") Newsconn.Open CONN_STRING '===open record of general News====== vDept = 0 strSQL = "select * from News where (SubjectType=1 and DeptID=" & vDept & ") or (SubjectType=1 and show=yes ) order by DeptID;" Set News_RS = Server.CreateObject("ADODB.Recordset") News_RS.Open strSQL, Newsconn , adOpenStatic, adLockReadOnly, adCmdText '===open record of student News====== STDSQL = "select * from News where show=yes and SubjectType=6 order by DeptID;" 'Set ezeconn = Server.CreateObject("ADODB.Connection") 'ezeconn.Open CONN_STRING '=open connection Set STD_RS = Server.CreateObject("ADODB.Recordset") STD_RS.Open STDSQL, Newsconn, adOpenStatic, adLockReadOnly, adCmdText '===open record of student News====== '==StdNewSQL = "select * from News where show=yes and SubjectType=7 order by SubjectID desc;" StdNewSQL = "select * from News where (SubjectType=7 and DeptID=" & vDept & ") or (SubjectType=7 and show=yes) order by SubjectID Desc ;" Set StdNews_RS = Server.CreateObject("ADODB.Recordset") StdNews_RS.Open StdNewSQL , Newsconn , adOpenStatic, adLockReadOnly, adCmdText '===open record of gallery====== '==ImageSQL = "select * from gallery where show=yes order by ImageID desc;" DeptTxt = " And Dept=" & vDept OrderTxt =" order by ImageID desc;" '===open record of gallery====== ImageSQL = "select * from gallery where show=yes " & DeptTxt & OrderTxt Set Image_RS = Server.CreateObject("ADODB.Recordset") Image_RS.Open ImageSQL , Newsconn , adOpenStatic, adLockReadOnly, adCmdText %> ==Faculty of Fisheries ==

Language

 

 

<% RowId=0 TotalNews = News_RS.RecordCount if Not News_RS.EOF then Do While (Not News_RS.EOF) and (RowID<3) RowID = RowID+1 %> <%News_RS.MoveNext%> <%Loop%> <%if RowID < TotalNews then %> <% end if %> <%end if%>
 

" target="_blank"> <%if isNull(News_RS("Small_Image")) then imgNews="News\images\genNews.jpg" else imgNews=News_RS("Small_Image") end if %> border="0" id="icon_sst_r11_c3" width="80" height="48" />

<%=News_RS("subject")%>,<%=GetDeptName(News_RS("DeptID"))%>
<%=News_RS("Detail")%>
<%=News_RS("SubjectDate")%> <%if Not ISNull(News_RS("Newslink")) then %> " target="_blank">[ҹ...] <%end if%>
[ҹǷ....]
 
<% StdRowId=0 StdTotal = STD_RS.RecordCount if Not STD_RS.EOF then Do While (Not STD_RS.EOF) and (StdRowId<3) StdRowId= StdRowId+1 %> <%STD_RS.MoveNext Loop%> <%end if%>
 
" target="_blank"> <%if isNull(STD_RS("Small_Image")) then imgNews="News\images\stdNews.jpg" else imgNews=STD_RS("Small_Image") end if %> border="0" id="icon_sst_r11_c3" alt="" / width="80" height="48"> <%=STD_RS("subject")%> ,<%=GetDeptName(STD_RS("DeptID"))%>
<%=STD_RS("Detail")%>
<%=STD_RS("SubjectDate")%> <%if Not ISNull(STD_RS("Newslink")) then %> " target="_blank">[ҹ...] <%end if%>
<% StdNewsRowId=0 StdNewsTotal= STDNews_RS.RecordCount if Not STDNews_RS.EOF then Do While (Not STDNews_RS.EOF) and (StdNewsRowId<3) StdNewsRowId= StdNewsRowId+1 %> <%STDNews_RS.MoveNext Loop%> <% 'response.write( " StdRowId : " &StdRowId & " StdNewsRowId : " & StdNewsRowId) 'response.write( "
StdTotal : " &StdTotal & " StdNewsTotal : " & StdNewsTotal) if (StdRowId < StdTotal) or (StdNewsRowId <% end if %> <%end if%>
         
<%=STDNews_RS("PostDate")%> <%=STDNews_RS("subject")%>
<%=STDNews_RS("Detail")%> <%if Not ISNull(STDNews_RS("Newslink")) then %> " target="_blank">[ҹ...] <%end if%>
[ҹǹԵ....]


<% ImageRowId=0 ImageTotal= Image_RS.RecordCount if Not Image_RS.EOF then %> <% Do While (Not Image_RS.EOF) and (ImageRowId<=6) ImageRowId= ImageRowId+1 %> <% if (ImageRowId mod 3) = 1 then %> <%end if%> <% Image_RS.MoveNext if (ImageRowId mod 3) = 0 then %> <%end if%> <% Loop%>
Gallery...
" width="60" height="33">
<%end if%>

 

 

© Allright reserved by  Faculty of Fisheries, Kasetsart University ,Bangkok Thailand