<% ipadd_local = Request.ServerVariables("REMOTE_ADDR") set fs = createobject("scripting.filesystemobject") set a = fs.opentextfile(Server.MapPath("ipadd.txt"),1) if a.AtEndOfStream then else ipadd = a.readline ipblock = split(ipadd,",") for i = 0 to ubound(ipblock) if 0 < instr(ipadd_local,ipblock(i)) then Response.Redirect("http://www.google.co.th/") exit for end if next end if %>
<% SearchFor = Request("SearchFor") %>

::: เปิดประเด็นใหม่! :::
::: ข้อความสนทนา :::
::: ค้นหาคำที่ต้องการ :::
::: ติดต่อเว็บมาสเตอร์์ :::

 
" method="post" onsubmit="return Validate(this);">

ค้นหาคำที่ต้องการในเว็บบอร์ด

 
<% If SearchFor <> "" Then %>

<% Set Conn=Server.CreateObject("ADODB.Connection") Conn.ConnectionTimeout=15 Conn.CommandTimeout=30 dbname="CbaoBoard0948.mdb" dbpath="DBQ=" & server.mappath(dbname) Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath Set Cmd=Server.CreateObject("ADODB.Command") Set RS=Server.CreateObject("ADODB.Recordset") Cmd.CommandType = 1 Set Cmd.ActiveConnection = Conn Cmd.CommandText="SELECT Me.SortCd, Me.MessageId, Me.ParentId, Me.Subject, Me.MessageDate, Me.Email, Me.Name as [Posted By], (Select COUNT(M.MessageId) From Message M Where ParentId = Me.MessageId ) as [Replies] " & _ "From Message Me " & _ "Where Me.Description like '%" & SearchFor & "%' " & _ "Order By Me.MajorSort DESC, Me.SortCd" RS.Open Cmd, , 0, 1 if rs.eof then Response.Write("

") Response.Write(" ไม่พบข้อความ "") Response.Write(SearchFor) Response.Write(" " ที่ท่านค้นหา กรุณาระบุข้อความใหม่") else Response.Write("ผลลัพธ์การค้นหา") While not RS.EOF ParentID = RS("ParentID") if ParentID = 0 then ParentID = RS("MessageID") end if Number = "" Subject = RS("Subject") if left(Subject,2) = "RE" then Number = "     " end if Response.Write("
  • "& Number &"No." &right("0000" &ParentId,5) & " " & Subject & " - " & "" & RS("Posted By") &" " & formatdatetime(RS("MessageDate"),2) & vbcr & " ") RS.MoveNext Wend end if RS.Close Conn.Close End If %>
  •