From 4cab8b76b980bd5638d4fcf52469ef575653edb3 Mon Sep 17 00:00:00 2001 From: short <> Date: Sun, 5 Aug 2001 14:34:36 +0000 Subject: [PATCH] Order form looks as finished: 3 payments methods removed in favor of 2 address forms ?have_js=1 implemented for JS-conditional HTML BODY contents JS separated to files to be XML-and-non-JS-browsers compliant --- .htaccess | 1 + common.php | 9 +++- have_js.js | 15 ++++++ index.php | 170 +++++++++++++++++++++++++--------------------------------- objednavka.js | 51 ++++++++++++++++++ 5 files changed, 147 insertions(+), 99 deletions(-) create mode 100644 have_js.js create mode 100644 objednavka.js diff --git a/.htaccess b/.htaccess index f1de653..7833e26 100644 --- a/.htaccess +++ b/.htaccess @@ -1,2 +1,3 @@ DirectoryIndex index.php php_flag short_open_tag off +AddType text/javascript .js diff --git a/common.php b/common.php index edeedfe..d12e998 100644 --- a/common.php +++ b/common.php @@ -1,6 +1,13 @@ -'."\n"; + } + $viewcvs=ereg_replace("^/~short/","\\0cgi-bin/viewcvs/",$HTTP_SERVER_VARS["SCRIPT_NAME"]); if ($viewcvs==$HTTP_SERVER_VARS["SCRIPT_NAME"]) unset($viewcvs); diff --git a/have_js.js b/have_js.js new file mode 100644 index 0000000..546e08e --- /dev/null +++ b/have_js.js @@ -0,0 +1,15 @@ +// $Id$ + +var searchN=window.location.search; +if (searchN=="" || searchN=="?") + searchN="?"; +else + searchN+="&"; +searchN+="have_js=1"; + +window.location.href + =window.location.protocol+"//" + +window.location.hostname + +window.location.pathname + +window.location.hash + +searchN; diff --git a/index.php b/index.php index 9bb6db4..af6897b 100644 --- a/index.php +++ b/index.php @@ -1,119 +1,93 @@ - -"; + $head=' + +'; + $want_js=true; include("common.php"); ?> -