Scott M. Mcdermott

UNIX Systems & Network Administrator
available for contract or salaried positions

headfoot.php

<?
/*
 * Page headers and footers defined here.  Eventually, these should probably
 * be included automatically by the web server, instead of included in all the
 * pages (through common.php or whatever).  Otherwise, 1. people have to know
 * about it and 2. people can bypass the authentication requirements.
 */

function
pagehead ($title, $header, $subheader)
{
?>      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/html4/loose.dtd">
        <html>
        <head>
        <link rel=stylesheet type="text/css" href="/style.css">
<?      if ($title) {
?>              <title>
<?              print($title);
?>              </title>
<?      }
?>
        </head>
        <body>
        <table cellspacing=0 cellpadding=3 width="100%" border=0>
        <tr class=qheader>
                <td align=left valign=middle>
                        <a href="http://www.company.com/">
                        <img src="/images/companylogo.gif"
                                border=0 alt=logo>
                        </a>
                </td>
                <td align=center valign=middle>
                        <h2>
<?                      print($header? $header: "&nbsp;");
?>                      </h2>
                </td>
                <td align=right valign=middle>
                        <form method=post
                                action="https://web.mycorp.com/share/cgi-bin/htdig/htsearch.cgi"
                        >
                        <table border=0 cellspacing=0 cellpadding=0
                                width=20
                        >
                        <tr>
                                <td valign=top align=right width="10%">
                                        <input type=text size=12 name=words>
                                        <input type=hidden name=method value=and>
                                        <input type=hidden name=format value=long>
                                        <input type=hidden name=sort value=score>
                                        <input type=hidden name=config value=htdig>
                                        <input type=hidden name=restrict value="">
                                </td>
                                <td valign=middle align=right>
                                        <input type=image name=search
                                                src="/images/search.jpg"
                                        >
                                </td>
                        </tr>
                        <tr>
                                <td colspan=2 valign=top align=right>
                                        <a class=white
                                                href="https://web.mycorp.com/share/htdocs/search.html"
                                        >
                                        Advanced Search
                                        </a>
                                </td>
                        </tr>
                        </table>
                        </form>
                </td>
        </tr>
        <tr>
                <td colspan=3 valign=top width="100%" class=qsubheader>
<?                      // this prints a table so we can't use e.g. <h3>
                        print($subheader? $subheader: "&nbsp;");
?>              </td>
        </tr>
        <tr>
                <td colspan=3 valign=top width="100%">
<?
}

function
pagefoot ()
{
?>              </td>
        <tr class=qheader>
                <td colspan=3 width="100%">
                        <hr> <br>
<?
                        if (isset($_SESSION["bind_user"])) {
?>
                                bound as:
                                <em> <?echo($_SESSION["bind_dn"])?></em>;
                                rebind
                                <a class=white href="/login.php?clearsession">
                                here
                                </a>
<?
                        }
?>
                </td>
        </table>
        </body>

        </html>
<?
}

?>