news ricerca
<% Dim objOpenFile, objFSO, strPath Dim lef, all_str, print_str, cont, chk_home, chk_link, chk_tipo cont = 0 chk_home = 0 chk_link = 0 chk_tipo = 0 strPath = Server.MapPath("news.txt") Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objOpenFile = objFSO.OpenTextFile(strPath, 1) Do While Not objOpenFile.AtEndOfStream print_str = "" all_str = objOpenFile.ReadLine If (len(all_str) > 0) then If (all_str = "end_field") then If (chk_home = 0) then print_str = "" else print_str = "" end if chk_home = 0 chk_link = 0 chk_tipo = 0 else print_str = right(all_str, len(all_str) - 6) lef = left(all_str,4) If (lef = "tito") then cont = cont + 1 If (chk_home = 0) then print_str = "" else if (chk_tipo = 1) then if (chk_link = 1) then print_str = "
" & "" & print_str & "
" else print_str = "
" & print_str & "
" end if else print_str = "" end if end if elseif (lef = "tipo") then If (left(print_str,4) = "rice") then chk_tipo = 1 else chk_tipo = 0 end if print_str = "" elseif (lef = "link") then If (left(print_str,3) = "yes") then chk_link = 1 else chk_link = 0 end if print_str = "" elseif (lef = "home") then If (left(print_str,3) = "yes") then chk_home = 1 else chk_home = 0 end if print_str = "" else print_str = "" end if end if end if Response.Write (print_str) Loop objOpenFile.Close Set objOpenFile = Nothing Set objFSO = Nothing %>

news didattica
<% cont = 0 chk_home = 0 chk_link = 0 chk_tipo = 0 strPath = Server.MapPath("news.txt") Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objOpenFile = objFSO.OpenTextFile(strPath, 1) Do While Not objOpenFile.AtEndOfStream print_str = "" all_str = objOpenFile.ReadLine If (len(all_str) > 0) then If (all_str = "end_field") then If (chk_home = 0) then print_str = "" else print_str = "" end if chk_home = 0 chk_link = 0 chk_tipo = 0 else print_str = right(all_str, len(all_str) - 6) lef = left(all_str,4) If (lef = "tito") then cont = cont + 1 If (chk_home = 0) then print_str = "" else if (chk_tipo = 1) then if (chk_link = 1) then print_str = "
" & "" & print_str & "
" else print_str = "
" & print_str & "
" end if else print_str = "" end if end if elseif (lef = "tipo") then If (left(print_str,4) = "dida") then chk_tipo = 1 else chk_tipo = 0 end if print_str = "" elseif (lef = "link") then If (left(print_str,3) = "yes") then chk_link = 1 else chk_link = 0 end if print_str = "" elseif (lef = "home") then If (left(print_str,3) = "yes") then chk_home = 1 else chk_home = 0 end if print_str = "" else print_str = "" end if end if end if Response.Write (print_str) Loop objOpenFile.Close Set objOpenFile = Nothing Set objFSO = Nothing %>