browsers.inc
3.75 KB
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
<?php
/**
* $Id$
*
* Sets up browser specific positioning co-ordinates.
*
* Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// instantiate phpsniffer
$default->phpSniff = new phpSniff($_SERVER["HTTP_USER_AGENT"]);
$default->browser = $default->phpSniff->property("browser");
$default->version = $default->phpSniff->property("version");
$default->bNN4 = ($default->browser == "ns") && ($default->phpSniff->property("maj_ver") == "4");
if ($default->browser == "ie") {
// internet explorer
$default->upArrowLeft = $default->downArrowLeft = "745";
$default->upArrowTop = "122";
$default->downArrowTop = "544";
$default->textBoxLeft = "134";
$default->textBoxTop = "118";
$default->textBoxWidth = "608";
$default->textBoxHeight = "430";
$default->pageHeight = "535";
$default->contactAdminPosition = "500";
} elseif ( ($default->browser == "mz")) {
// mozilla
$default->upArrowLeft = $default->downArrowLeft = "742";
$default->upArrowTop = "107";
$default->downArrowTop = "530";
$default->textBoxLeft = "135";
$default->textBoxTop = "105";
$default->textBoxWidth = "603";
$default->textBoxHeight = "432";
$default->pageHeight = "540";
$default->contactAdminPosition = "490";
} elseif ( ($default->browser == "ns") && ($default->version == "6.2.3") ) {
// netscape 6.2.3
$default->upArrowLeft = $default->downArrowLeft = "745";
$default->upArrowTop = "110";
$default->downArrowTop = "560";
$default->textBoxLeft = "132";
$default->textBoxTop = "104";
$default->textBoxWidth = "610";
$default->textBoxHeight = "460";
$default->pageHeight = "460";
$default->contactAdminPosition = "510";
} elseif ( ($default->browser == "ns") && ($default->version == "7.0") ) {
// netscape 7.0
$default->upArrowLeft = $default->downArrowLeft = "745";
$default->upArrowTop = "107";
$default->downArrowTop = "538";
$default->textBoxLeft = "132";
$default->textBoxTop = "103";
$default->textBoxWidth = "608";
$default->textBoxHeight = "438";
$default->pageHeight = "540";
$default->contactAdminPosition = "490";
} elseif ($default->browser == "fb") {
// mozilla firebird
$default->upArrowLeft = $default->downArrowLeft = "745";
$default->upArrowTop = "107";
$default->downArrowTop = "538";
$default->textBoxLeft = "132";
$default->textBoxTop = "103";
$default->textBoxWidth = "608";
$default->textBoxHeight = "448";
$default->pageHeight = "550";
$default->contactAdminPosition = "480";
} elseif ($default->bNN4) {
$default->pageHeight = "500";
} else {
// default
$default->upArrowLeft = $default->downArrowLeft = "745";
$default->upArrowTop = "107";
$default->downArrowTop = "518";
$default->textBoxLeft = "132";
$default->textBoxTop = "103";
$default->textBoxWidth = "608";
$default->textBoxHeight = "427";
$default->pageHeight = $default->textBoxTop + $default->textBoxHeight + 10;
$default->contactAdminPosition = $default->pageHeight;
}
?>