This repository has been archived by the owner on Dec 21, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.php
120 lines (116 loc) · 4.01 KB
/
map.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
//Search engine bots get their location as Tampa.
if (preg_match("#(google|slurp@inktomi|yahoo! slurp|msnbot)#si", $_SERVER['HTTP_USER_AGENT'])) {
$location = 'tampa';
header("Location: http://www.dazser.com/".strtolower($location)."/home");
}
//check to see if $_COOKIE['location'] is set;
//if it is set
//forward to index.php?l=$_;
if(isset($_COOKIE['location'])){
header("Location: http://www.dazser.com/".strtolower($_COOKIE['location'])."/home");
}
//check to see if ['location'] is set
//if it is set
if(isset($_REQUEST['location']) && $_REQUEST['location'] != "-1"){
//check to see if remember is checked
if(isset($_REQUEST['remember'])){
//set cookie & session
setcookie("location", $_REQUEST['location'], time()+60*60*24*30);
$location = $_COOKIE['location'];
} else {
//just set the session
$location = $_REQUEST['location'];
}
header("Location: http://www.dazser.com/".strtolower($location)."/home");//forward to index.php
}
//else display map page;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jani-King - Please select your location</title>
<style type="text/css">
#container{
width:649px;
height: 700px;
margin: 0 auto;
background-image:url(images/map.png);
background-repeat: no-repeat;
}
body{background: #94c7dc;font-family:Verdana, Geneva, sans-serif;}
#form{
width: 266px;
height: 224px;
position: relative;
left: 150px;
top: 225px;
}
#menu a {
position: relative;
display: block;
text-decoration: none;
height: 29px;
}
#menu a i {visibility: hidden;}
a#Baltimore{left: 485px; top: 165px; width: 113px;}
a#Birmingham{left: 300px; top: 230px; width: 170px;}
a#Charlotte{left: 500px; top: 175px; width: 140px;}
a#Orlando{left: 513px; top: 215px; width: 105px;}
a#Tampa{left: 420px; top: 223px; width: 95px}
<?php if($_POST['location'] == "-1") echo "h4{color: red;};"; ?>
</style>
<!--[if lt IE 8]>
<style type="text/css">
h4{margin-top:20px;}
</style>
<![endif]-->
<!--[if lt IE 7]>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<style type="text/css">
html #container{
background: none; /* Hide the current background image so you can replace it with the filter*/
width: 649px; /* Must specify width */
height: 700px; /* Must specify height */
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='images/map.png');
}
</style>
<![endif]-->
</head>
<body>
<div id="container">
<div id="menu">
<a href="baltimore" id="Baltimore"><i>Baltimore</i></a>
<a href="birmingham" id="Birmingham"><i>Birmingham</i></a>
<a href="charlotte" id="Charlotte"><i>Charlotte</i></a>
<a href="orlando" id="Orlando"><i>Orlando</i></a>
<a href="tampa" id="Tampa"><i>Tampa</i></a>
</div>
<div id="form">
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
<h4>Please select your location</h4>
<select name="location" style="width: 200px;">
<option value="-1">Select your location</option>
<option value="baltimore">Baltimore</option>
<option value="birmingham">Birmingham</option>
<option value="charlotte">Charlotte</option>
<option value="orlando">Orlando</option>
<option value="tampa">Tampa</option>
</select>
<input name="submit" type="submit" value="Go" />
<br /><br />
<input name="remember" type="checkbox" id="remember" value="remember" />
<label for="remember" style="font-size: small;">Remember your location</label>
</form>
</div>
</div>
<!-- mathiasbynens.be/notes/async-analytics-snippet -->
<script>
var _gaq=[['_setAccount','UA-8299399-2'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>