forked from csev/py4e
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnav.php
More file actions
19 lines (19 loc) · 714 Bytes
/
nav.php
File metadata and controls
19 lines (19 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<div id="header">
<h1><a href="index.php" class="selected" accesskey="1">PythonLearn</a></h1>
<?php
function navto($arg)
{
$uri = isset($_ENV["REQUEST_URI"]) ? $_ENV["REQUEST_URI"] : $_SERVER["REQUEST_URI"];
echo ('href="' . $arg . '"');
if ( strpos($uri, $arg) ) echo ' class="selected" ';
}
?>
<ul class="toolbar">
<li><a <?php navto("book.php") ?> >Book</a></li>
<li><a <?php navto("install.php") ?> >Install</a></li>
<li><a href=http://www.pr4e.org/ target="_blank">MOOC</a></li>
<li><a href="http://www.dr-chuck.com/" target="_blank">Instructor</a></li>
<li><a href="http://www.python.org/" target="_blank">Python</a></li>
<li><a <?php navto("about.php") ?> >About</a></li>
</ul>
</div>