<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874"></HEAD>
<BODY>
<p>
<%
Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject")
Set MyFiles=MyDirectory.GetFolder(Server.MapPath ("pic"))'แสดงชื่อไฟล์ในโฟลเดอร์ Pic
total=0
Num=0
For each filefound in MyFiles.files
%>
<%
if instr(filefound,".gif") or instr(filefound,".jpg") then
total=total+1
Num=Num+1
%>
<a href=<% =myfile & "/" & myfiles.name %><%="/"%><%=filefound.Name %> target="_blank">
<img src=<% =myfile & "/" & myfiles.name %><%="/"%>
<%=filefound.Name %> width=112 height=70></a>
<% if total=5 then total=0%>
<% if total=0 then%>
<br>
<br>
<%
end if
end if
next
%>
</p>
</BODY>
</HTML>