<%@LANGUAGE="VBSCRIPT"%> <% ' to keep hits record on default.asp set rsUpdate = Server.CreateObject("ADODB.Recordset") rsUpdate.ActiveConnection = articleConn_STRING rsUpdate.Source = "UPDATE adminstats SET totalIndexVisits = totalIndexVisits + 1" rsUpdate.Open() %> <% DIM ptext set rsFeatured = Server.CreateObject("ADODB.Recordset") rsFeatured.ActiveConnection = articleConn_STRING rsFeatured.Source = "SELECT * FROM articles WHERE article_active=-1 AND article_featured=-1" rsFeatured.Open() %> <% set rsArticles = Server.CreateObject("ADODB.Recordset") rsArticles.ActiveConnection = articleConn_STRING rsArticles.Source = "SELECT * FROM articles WHERE article_active=-1 and article_featured = 0 ORDER BY idarticle DESC" rsArticles.Open() %> <% set rsPopular = Server.CreateObject("ADODB.Recordset") rsPopular.ActiveConnection = articleConn_STRING rsPopular.Source = "SELECT * FROM articles WHERE article_active=-1 and article_featured = 0 ORDER BY article_visits DESC" rsPopular.Open() %> <% Dim Repeat__numRows Repeat__numRows = 20 Dim Repeat__index Repeat__index = 0 rsArticles_numRows = rsArticles_numRows + Repeat__numRows %> <% Dim Repeat2__numRows Repeat2__numRows = 5 Dim Repeat2__index Repeat2__index = 0 rsPopular_numRows = rsPopular_numRows + Repeat2__numRows %> บทความการเพาะเลี้ยงปลา : การเพาะเลี้ยงปลา : การเพาะเลี้ยงปลา : การเพาะเลี้ยงปลา : การเพาะเลี้ยงปลา "> "> ">

Home | หน้าบทความ | ถามตอบปัญหาการเพาะเลี้ยง | Admin   
 

บทความล่าสุด จาก <%=(rsGlobals.Fields.Item("global_company").Value)%>

<%= FormatDateTime(date,1) %>  

<% IF rsFeatured.eof THEN %>

There are Currently No Articles or Featured Article Has Not Been Selected.

<% ELSE %> <%=(rsFeatured.Fields.Item("article_title").Value)%>
<% if rsFeatured.Fields.Item("article_image").Value <> "" then %> " align=right border=0> <% end if %> <%=(rsFeatured.Fields.Item("article_date").Value)%>,
by <%=(rsFeatured.Fields.Item("article_author").Value)%>
<%=(rsFeatured.Fields.Item("article_body").Value)%>
 
บทความใหม่
<% While ((Repeat__numRows <> 0) AND (NOT rsArticles.EOF)) %>
  "><%=(rsArticles.Fields.Item("article_title").Value)%>
<%=(rsArticles.Fields.Item("article_date").Value)%>
<% Repeat__index=Repeat__index+1 Repeat__numRows=Repeat__numRows-1 rsArticles.MoveNext() Wend %>

บทความท๊อปฮิต
<% count=0 While ((Repeat2__numRows <> 0) AND (NOT rsPopular.EOF)) %>
<%response.write count+1&"- "%> "><%=(rsPopular.Fields.Item("article_title").Value)%> (<%=(rsPopular.Fields.Item("article_visits").Value)%>)
<% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 Count = Count + 1 rsPopular.MoveNext() Wend %> <% end if %>
 
<% rsFeatured.Close() %> <% rsArticles.Close() %> <% rsPopular.Close() %>