<%@LANGUAGE="VBSCRIPT"%> <% ' File: default.asp ' Description: redirect to mobile if you are a mobile browser; ' stop redirecting if a "stop_mobi=yes" parameter is passed; ' a "stop_mobi" session cookie will be set to stop redirection for current session ' restart redirecting if a "stop_mobi=no" parameter is passed; ' Author: Alessio Milan, Enrico Scoda, Mirco Speretta ' Copyright: Usablenet Inc. Function CheckStringForMobileUA(objDict, strString) Dim bolFound bolFound = False Dim strKey If InStr(1, strString, "UsableNet", vbTextCompare) <= 0 then For Each strKey in objDict If InStr(1, strString, strKey, vbTextCompare) > 0 then bolFound = True Exit For End If Next End If CheckStringForMobileUA = bolFound End Function Dim objDictMUA Set objDictMUA = Server.CreateObject("Scripting.Dictionary") objDictMUA.Add "iPhone", "" objDictMUA.Add "iPod", "" objDictMUA.Add "iPad", "" Dim userAgent Dim stopMobiParam Dim stopMobiCookie Dim mobiRedirect userAgent = Request.ServerVariables("HTTP_USER_AGENT") stopMobiParam = Request.QueryString("stop_mobi") stopMobiCookie = Request.Cookies("stop_mobi") mobiRedirect = False If stopMobiParam="yes" Then stopMobiCookie="yes" ' stop_mobi cookie expires at the end of current session Response.Cookies("stop_mobi")="yes" ' use the following to make stop_mobi cookie expire in 1 day ' Response.Cookies("stop_mobi").Expires=Date+1 ElseIf stopMobiParam="no" Then stopMobiCookie="no" Response.Cookies("stop_mobi")="" Response.Cookies("stop_mobi").Expires=Date-1 End If If stopMobiCookie<>"yes" And Len(userAgent) > 0 And CheckStringForMobileUA(objDictMUA, userAgent) Then mobiRedirect = True End If If mobiRedirect then Response.Redirect("mobile.asp") End If %> The Region 5 Contest Webcast

 

Thanks for your interest in the Region 5 Webcast!  These archives are now closed. Please join us again next year!

 

Note that all broadcasts of this contest performance is the sole property of Lions Mane Productions. No reproduction or rebroadcast of any kind are permitted without expressed and written consent.