browsers.inc
3.05 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
<?php
/**
* $Id$
*
* Sets up browser specific positioning parameters
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
*/
// 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;
}
?>