Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.0 KiB

  1. <%@Language=JavaScript%>
  2. <%
  3. Response.CacheControl = "no-cache";
  4. Response.AddHeader("Pragma", "no-cache");
  5. Response.Expires = -1;
  6. function fnGetBrowserLang()
  7. {
  8. var lang = new String ( Request.ServerVariables( "HTTP_ACCEPT_LANGUAGE" ) )
  9. lang = lang.substr( 0, 2 );
  10. switch( String( lang ) )
  11. {
  12. case "en":
  13. case "ja":
  14. case "fr":
  15. case "de":
  16. return ( lang );
  17. default:
  18. return "en";
  19. }
  20. }
  21. var g_ID = Request.QueryString("ID")
  22. var g_ThisServer = new String( Request.ServerVariables( "SERVER_NAME" ) );
  23. var g_AcceptLang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE" )
  24. var g_DoRedirect = Request.QueryString("DoRedirect")
  25. var regValidIDTest = /^\d{1,2}_\d{1,2}_\d{4}(\\|\/){1}(\d|[a-f])+(_\d){0,1}.cab$/i
  26. if ( !regValidIDTest.test( g_ID ) )
  27. g_ID = -1;
  28. if ( String(g_DoRedirect) == "yes" )
  29. {
  30. Response.Redirect( "/isapi/oca_extension.dll?id=" + g_ID )
  31. }
  32. else
  33. {
  34. Server.Transfer( fnGetBrowserLang() + "/upload.asp" )
  35. }
  36. Response.Flush()
  37. %>