Commit be8506eb36a04cce9a605876e984a60c7dd8c8a9
1 parent
c72879b7
updated to use phpsniff browser detection
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@765 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
10 additions
and
17 deletions
presentation/lookAndFeel/knowledgeTree/stylesheet.php
| 1 | 1 | <?php |
| 2 | 2 | header('mime_type', 'text/css'); |
| 3 | -$sAgent = getenv("HTTP_USER_AGENT"); | |
| 4 | -echo $sAgent; | |
| 3 | +require("../../../config/dmsDefaults.php"); | |
| 4 | + | |
| 5 | 5 | $scroll = array(); |
| 6 | -$scroll["upArrowLeft"] = ""; | |
| 7 | -$scroll["upArrowTop"] = ""; | |
| 8 | -$scroll["downArrowLeft"] = ""; | |
| 9 | -$scroll["downArrayTop"] = ""; | |
| 10 | -$scroll["textBoxLeft"] = ""; | |
| 11 | -$scroll["textBoxTop"] = ""; | |
| 12 | -$scroll["textBoxWidth"] = ""; | |
| 13 | -$scroll["textBoxHeight"] = ""; | |
| 14 | - | |
| 15 | -if ( ereg("Mozilla", $sAgent) && ereg("4.79", $sAgent) ) { | |
| 16 | - // Mozilla/4.79 | |
| 6 | + | |
| 7 | +$browser = $default->phpSniff->property("browser"); | |
| 8 | +$version = $default->phpSniff->property("version"); | |
| 9 | + | |
| 10 | +if ( ($browser == "moz") && ($version == "4.79")) { | |
| 17 | 11 | $scroll["upArrowLeft"] = "670"; |
| 18 | 12 | $scroll["upArrowTop"] = "190"; |
| 19 | 13 | $scroll["downArrowLeft"] = "670"; |
| ... | ... | @@ -23,8 +17,7 @@ if ( ereg("Mozilla", $sAgent) && ereg("4.79", $sAgent) ) { |
| 23 | 17 | $scroll["textBoxTop"] = "200"; |
| 24 | 18 | $scroll["textBoxWidth"] = "600"; |
| 25 | 19 | $scroll["textBoxHeight"] = "395"; |
| 26 | -} elseif ( ereg("Mozilla", $sAgent) && ereg("5.0", $sAgent) ) { | |
| 27 | - // Mozilla/5.0 | |
| 20 | +} elseif ( ($browser == "moz") && ($version == "5.0")) { | |
| 28 | 21 | $scroll["upArrowLeft"] = "650"; |
| 29 | 22 | $scroll["upArrowTop"] = "150"; |
| 30 | 23 | $scroll["downArrowLeft"] = "650"; |
| ... | ... | @@ -34,8 +27,8 @@ if ( ereg("Mozilla", $sAgent) && ereg("4.79", $sAgent) ) { |
| 34 | 27 | $scroll["textBoxTop"] = "150"; |
| 35 | 28 | $scroll["textBoxWidth"] = "500"; |
| 36 | 29 | $scroll["textBoxHeight"] = "440"; |
| 37 | -} else if ( ereg("MSIE", $sAgent) && ereg("6.0", $sAgent) ) { | |
| 38 | - // MSIE 6.0 | |
| 30 | +} elseif ($browser == "ie") { | |
| 31 | + // MSIE 6.0 | |
| 39 | 32 | $scroll["upArrowLeft"] = "650"; |
| 40 | 33 | $scroll["upArrowTop"] = "160"; |
| 41 | 34 | $scroll["downArrowLeft"] = "650"; | ... | ... |