|
|
 |
 |
การ์ดอวยพร กลับสู่หน้าหลักการ์ดอวยพร  |
 |
 |
<%if request("no") ="" then
pageno =1
else
pageno=request("no")
end if%>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("../cgi-bin/supermarioecard.mdb")
if request("keyword") <> "" then
Sql="Select icon,image,caption,initmsg,sound,category,new,show from ecard where (initmsg like '%"&request("keyword")&"%') or (caption like '%"&request("keyword")&"%') order by icon"
else
Sql="Select icon,image,caption,initmsg,sound from ecard order by icon"
end if
Set RS =Server.CreateObject("ADODB.Recordset")
RS.Open Sql,Conn,1,3
total=RS.Recordcount
if total=0 then
%>
ไม่พบคำที่คุณต้องการค้นหา ลองคำอื่นดูนะครับ
<%else
pagesize=5
totalpage=total\pagesize
if (total mod pagesize) <> "0" then
totalpage= totalpage+1
end if
RS.Move pagesize*(pageno-1)
a=1
if trim(pageno) <> trim(totalpage) then
endrecord = pagesize
else
if (total mod pagesize)=0 then
endrecord=10
else
endrecord=(total mod pagesize)
end if
end if
For a=1 to endrecord%>
<%ano=rs("icon")
ano=replace(ano,"<","<")
ano=replace(ano,chr(13)," ")
if flag=0 then
flag=1
color="FEE9BE"
else
flag=0
color="FFDE9E"
End If
%>
|
|
| จำนวนการ์ดทั้งหมด <%=total%> ภาพ |
|
|
|
|
<%
FilePath=Server.MapPath("counter.txt")
Set ObjFile=CreateObject("Scripting.FileSystemObject")
Set ObjStream=ObjFile.OpenTextFile(FilePath, 1)
temp=ObjStream.ReadLine+1
ObjStream.Close
Set ObjStream=ObjFile.OpenTextFile(FilePath,2)
ObjStream.WriteLine(temp)
ObjStream.Close
%>
counter : <%=temp%>
|
|
 |