--- /dev/null
+/* general styles */
+
+body {
+/* font-family: Arial,Helvetica,sans-serif; */
+ color: black;
+ font-size: medium;
+ margin: 3px;
+ padding: 0px;
+ border: 0px;
+ background-color: white;
+}
+
+h1 {
+ font-size: xx-large;
+ font-weight: bold;
+ text-align: center;
+}
+
+a:link { color: #0000EE; }
+a:visited { color: #551A8B; }
+a:active { color: #FF0000; }
+
+img {
+ border: 0px;
+}
+
+table {
+ color: black;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+}
+
+td, th {
+ font-family: Arial,Helvetica,sans-serif;
+ color: black;
+ margin: 0px;
+ padding: 2px;
+ border: 0px;
+}
+
+th {
+ font-weight: bold;
+}
+
+table.border {
+ border: 1px solid #c0c0c0;
+}
+
+table.border td,
+table.border th {
+ border: 1px solid #c0c0c0;
+}
+
+#ualist th { font-size: 0.75em; }
+#ualist td.comment {
+ font-size: 0.75em;
+ text-align: center;
+ font-weight: bold;
+}
+#ualist td.ua { font-size: 0.75em; }
+
+
+
+/* other general elements */
+
+div#valid {
+ display: none;
+}
+
+div#copyright {
+ display: none;
+}
<?php
-$inc_class_util = true;
-$inc_class_ua = true;
-include('inchandler.inc');
+include('../classes/useragent.php-class');
// read string from this file
$uafile = 'ua_list_raw.txt';
-$mycss = "th { font-size: 0.75em; }\n";
-$mycss .= "td.comment { font-size: 0.75em; text-align: center; font-weight: bold; }\n";
-$mycss .= "td.ua { font-size: 0.75em; }\n";
-
-$wrapper->pgtop('User Agents', $mycss);
+print("<!DOCTYPE html>\n");
+print("<html>\n<head>\n");
+print(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
+print(" <link rel=\"stylesheet\" type=\"text/css\" href=\"test.css\">\n");
+print(" <title>".'User Agents'."</title>\n");
+print("</head>\n<body>\n");
print('<h1>User Agents</h1>'."\n");
$ualist = is_readable($uafile)?file($uafile):array();
if (count($ualist)) {
- print('<table class="border">'."\n");
+ print('<table class="border" id="ualist">'."\n");
print(' <tr>'."\n");
print(' <th>User Agent string</th>'."\n");
print(' <th>Brand</th>'."\n");
print('No User Agent strings found in file "'.$uafile.'".'."\n");
}
-$wrapper->pgbottom();
+print("<div id=\"copyright\">\n");
+print("Page code under Mozilla Public License, code available at <a href=\"https://github.com/KaiRo-at/php-utility-classes\">GitHub</a>.\n");
+print("</div>\n");
+print("</body></html>\n");
?>
<?php
-$inc_class_util = true;
-$inc_class_ua = true;
-include("inchandler.inc");
-
-$wrapper->pgtop("KaiRo's Browser-Test");
+include('../classes/useragent.php-class');
// set default time zone - right now, always the one the server is in!
date_default_timezone_set('Europe/Vienna');
-$httpvars = $util->getHTTPvars();
-if (strlen($httpvars["ua"])) {
- $ua = new userAgent($httpvars["ua"]);
+print("<!DOCTYPE html>\n");
+print("<html>\n<head>\n");
+print(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
+print(" <link rel=\"stylesheet\" type=\"text/css\" href=\"test.css\">\n");
+print(" <title>".'User Agent Test'."</title>\n");
+print("</head>\n<body>\n");
+
+if (strlen($_REQUEST["ua"])) {
+ $ua = new userAgent($_REQUEST["ua"]);
}
else {
$ua = new userAgent;
}
-print("<h1>KaiRo's Browser-Test</h1>\n");
+print("<h1>User Agent Test</h1>\n");
print("I read the following user agent string from ".(strlen($httpvars["ua"])?"your input":"your browser").":\n<br>");
print("<b>".$ua->getUAString()."</b>\n");
print("<form method=\"POST\" action=\"\"><p>\n");
print("<input type=\"text\" name=\"ua\" value=\"".htmlentities($ua->getUAString())."\" size=\"80\" maxlength=\"150\">\n");
print("<br><input type=\"submit\" value=\"Test\"></p></form>\n");
-$wrapper->pgbottom();
+
+print("<div id=\"copyright\">\n");
+print("Page code under Mozilla Public License, code available at <a href=\"https://github.com/KaiRo-at/php-utility-classes\">GitHub</a>.\n");
+print("</div>\n");
+print("</body></html>\n");
?>