You are viewing this web page using a browser other than Internet Explorer, Netscape, Firefox, or Opera. You should be seeing a lot of yellow on this page.
You are viewing this web page using a browser other than Internet Explorer, Netscape, Firefox, or Opera. You should be seeing a lot of yellow on this page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Intro to PHP</title>
<?php
if (strstr ($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
$browsername = "internetexplorer";
$color = "blue";
echo "<link rel='stylesheet' href='phpwk3ie.css' type='text/css' />";
}
else if (strstr ($_SERVER['HTTP_USER_AGENT'], "Netscape")) {
$browsername = "netscape";
$color = "green";
echo "<link rel='stylesheet' href='phpwk3netscape.css' type='text/css' />";
}
else if (strstr ($_SERVER['HTTP_USER_AGENT'], "Firefox")) {
$browsername = "firefox";
$color = "pink";
echo "<link rel='stylesheet' href='phpwk3firefox.css' type='text/css' />";
}
else if (strstr ($_SERVER['HTTP_USER_AGENT'], "Opera")) {
$browsername = "opera";
$color = "orange";
echo "<link rel='stylesheet' href='phpwk3opera.css' type='text/css' />";
}
else {
$browsername = "otherbrowser";
$color = "yellow";
echo "<link rel='stylesheet' href='phpwk3other.css' type='text/css' />";
}
?>
</head>
<body>
<div id="head">
<h1>INTRODUCTION TO PHP - WEEK 3</h1>
</div>
<div id="left">
<ul id="nav">
<li><a href="http://www.srcfarm.com/lvsclasses.html">Home</a></li>
<li><a href="http://www.srcfarm.com/lvsclasses/php/phpindex.php">PHP Home</a></li>
<?php
//for-loop to print menu
for ($i=1; $i<=5; $i++)
{
echo "<li><a href='http://www.srcfarm.com/lvsclasses/php/phpwk$i.php'>Week $i</a></li>";
}
?>
<li class="last"><a href='http://www.srcfarm.com/lvsclasses/php/phpwk6.php'>Week 6</a></li>
</ul>
</div>
<div id="content">
<?php
if ($color != "yellow") {
echo "<p>You are viewing this web page using the following browser: <img src='../../../graphics/text$browsername.gif' class='imageleft'></p>";
echo "<p class='clear'>You should be seeing a lot of $color on this page.<p>";
} else {
echo "<p class='bigmargins'>You are viewing this web page using a browser other than Internet Explorer, Netscape, Firefox, or Opera. You should be seeing a lot of $color on this page.</p>";
}
?>
</div>
<div id="footer">
<?php
show_source("phpwk3.php");
if ($browsername == "firefox") {
phpinfo();
}
?>
</div>
</body>
</html>