Reindex




' crea un reindex se schermo e' un cellulare o desktop


Sub ScriveIndex()
'*************************************

'===============================

' scrive il REINDEX

'===============================

FileOpen(1, Dir1.Path & "\Index.html", OpenMode.Output)
' chiude con FileClose(1)


'*************************************


PrintLine(1, "<!DOCTYPE html PUBLIC " & Chr(34) & "-//W3C//DTD XHTML 1.0 Transitional//EN" & Chr(34) & " " & Chr(34) & "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & Chr(34) & "> ")
PrintLine(1, "<html xmlns=" & Chr(34) & "http://www.w3.org/1999/xhtml" & Chr(34) & "> ")
PrintLine(1, "<head> ")
PrintLine(1, "<meta http-equiv=" & Chr(34) & "Content-Type" & Chr(34) & " content=" & Chr(34) & "text/html; charset=utf-8" & Chr(34) & " /> ")
PrintLine(1, " <script type=" & Chr(34) & "text/javascript" & Chr(34) & "> ")
PrintLine(1, "var ua=navigator.userAgent; ")
PrintLine(1, "if (ua.indexOf(" & Chr(34) & "Mobile" & Chr(34) & ")!=-1) window.location = " & Chr(34) & "indexCell.html" & Chr(34) & " ")
PrintLine(1, "if (ua.indexOf(" & Chr(34) & "iPad" & Chr(34) & ")!=-1) window.location = " & Chr(34) & "indexCell.html" & Chr(34) & " ")
PrintLine(1, "if (ua.indexOf(" & Chr(34) & "iPhone" & Chr(34) & ")!=-1) window.location = " & Chr(34) & "indexCell.html" & Chr(34) & " ")
PrintLine(1, "if (screen.width <= 699) {document.location = " & Chr(34) & "indexCell.html" & Chr(34) & ";} ")

PrintLine(1, "</script> ")

PrintLine(1, "<meta http-equiv=" & Chr(34) & "refresh" & Chr(34) & " content=" & Chr(34) & "0; URL='IndexFrame.html'" & Chr(34) & " /> ")
PrintLine(1, " </head> ")

PrintLine(1, "<body> ")
PrintLine(1, "</body> ")
PrintLine(1, "</html> ")


'*************************************

FileClose(1)
'*************************************


End Sub










( reindex.html )- by Paolo Puglisi - Modifica del 17/12/2023