Location: PHPKode > projects > PhpMyInventory > pmi281/Includes/headerFunctions.inc.php
<?

function writeHeader($strPageTitle = "") {
  global $SCRIPT_NAME, $sessionSecurity, $secureAdmin;

  If ($strPageTitle == "") {
       $strPageTitle = "phpMyInventory v2.81";
  } Else {
       $showHeader = TRUE;
  }

  If ($secureAdmin) {
      $urlPrefix = "https";
  } Else {
      $urlPrefix = "http";
  }

  $pageName = getPageName();
  $homeURL = makeHomeURL($pageName);
?>
<HTML>
<HEAD>
<TITLE><? echo $strPageTitle; ?></TITLE>

<SCRIPT LANGUAGE="javascript">
<!--
function warn_on_submit(msg)
{
        if (!confirm(msg)) {
                alert("No changes made.");
                return false;
        }
}
//-->
</script>
<LINK REL=StyleSheet HREF="styles.css" TYPE="text/css">

<STYLE>
pre { font-family: courier,serif }
</STYLE>

</HEAD>
<BODY bgcolor="#FFFFFF" vlink='blue' alink='blue'>

<TABLE border='0' cellpadding='0' cellspacing='0' width='750'>
<TR><TD colspan='3'>

  <h3><font color='#9F0000'>phpMyInventory v2.81</font></h3>

</td></tr><tr><td valign='top' width='136'>
<table cellpadding="1" cellspacing="0" border="0" bgcolor="gray" width='136'><tr><td>
<table border="0" cellspacing="0" cellpadding="3" bgcolor="#FFF7F7" width='136'>
  <tr><td>

  &nbsp;<a href='<?=$urlPrefix?>://<?=$homeURL;?>/help.php'>Introduction</a><br>&nbsp;<br>

  &nbsp;<b><font color='#9F0000'>View Menu</font></b><br>&nbsp;<br>

  <?=str_repeat("&nbsp;", 3);?><a href='<?=$urlPrefix?>://<?=$homeURL;?>/index.php?navHit=1'>Systems</a><br>&nbsp;<br>

  <?=str_repeat("&nbsp;", 3);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/sparePeripherals.php">Spare Peripherals</A><br>
  <?=str_repeat("&nbsp;", 3);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/spareSoftware.php">Spare Software</A><br>&nbsp;<br>

  <?=str_repeat("&nbsp;", 3);?><a href='<?=$urlPrefix?>://<?=$homeURL;?>/detailed_p.php'>Count Peripherals</a><br>
  <?=str_repeat("&nbsp;", 3);?><a href='<?=$urlPrefix?>://<?=$homeURL;?>/detailed_sw.php'>Count Software</a><br>&nbsp;<br>
  <br>&nbsp;<br>
<?
   If (($sessionSecurity != "") AND ($sessionSecurity < 2)) {
?>
  &nbsp;<b><font color='#9F0000'>Admin Menu</font></b><br>&nbsp;<br>

  <?=str_repeat("&nbsp;", 3);?><a href='<?=$urlPrefix?>://<?=$homeURL;?>/createUser.php'>Add User</a><br>
  <?=str_repeat("&nbsp;", 3);?><a href='<?=$urlPrefix?>://<?=$homeURL;?>/viewUsers.php'>View / Edit Users</a><br>
  <?=str_repeat("&nbsp;", 3);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/admin_hardware.php">Add System</A>
  
  <br>&nbsp;</br>
  <?=str_repeat("&nbsp;", 3);?>Add / Edit:
  
  <br><?=str_repeat("&nbsp;", 6);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/admin_hw_types.php">System Types</A>
  <br><?=str_repeat("&nbsp;", 6);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/admin_peripheral_types.php">Peripheral Types</A>
  <br><?=str_repeat("&nbsp;", 6);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/admin_software_types.php">Software Types</A>

  <br>&nbsp;<br>&nbsp;<br>
<?
   }
?>

  &nbsp;<b><font color='#9F0000'>Your Account</font></b><br>&nbsp;<br>

  <?=str_repeat("&nbsp;", 3);?><a href="<?=$urlPrefix?>://<?=$homeURL;?>/userAccount.php">Edit Profile</A>
  <br><?=str_repeat("&nbsp;", 3);?><a href="logout.php">Logout</A>
  <p>&nbsp;
  </td></tr></table>
  </td></tr></table>
</td>
<td width='12'>&nbsp;</td>
<td width='603' valign='top'>
<?
  If ($showHeader) {
      echo "<h4>$strPageTitle</h4>";
  }
}
 
function writeFooter() {
    echo " </TD></TR></TABLE><p>";
    echo "<TABLE border='0' cellpadding='0' cellspacing='0' width='650'>";
    echo "<tr><td width='149'>&nbsp;</td><td>";
    echo "Please check out <a href='https://www.syslist.com'>Syslist</a>, the enhanced,
      commercial version of phpMyInventory.";
    echo "</td></tr></BODY></HTML>";
}

?>
Return current item: PhpMyInventory