Location: PHPKode > projects > ConPortal > conportal/inc/header.php
<?php
/*
 *  ConPortal - Pomona College ITS scheduling appplication
 *  Copyright (C) 2005-2006  Pomona College
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of version 2 of the GNU General Public License
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

function xhtml_header($title)
{
    check_auth();
    xhtml_header_general($title);
    xhtml_header_common();
}

function xhtml_header_general($title, $table_sort = FALSE)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <link rel='stylesheet' type='text/css' 
    href="<?= BASE_PATH ?>/css/default.css" media="screen"/>
  <link rel='stylesheet' type='text/css' 
    href="<?= BASE_PATH ?>/css/print.css" media="print"/>
  <meta http-equiv="refresh" content="600">
  <meta name="author" content="Paul Roach, Paul Aurich, Nathan Reed, Jefferson Cowart, George Casper" />
  <meta name="keywords" content="Based on Pomona, ITS, Information Technology Services, Conportal - adapted for use by Bucknell University's Library & IT Technology Desk" />
  <meta name="description" content="The internal website for Techdesk scheduling and timeclock functions..." />  
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script type='text/javascript' src='<?= BASE_PATH ?>/js/appt_details.js'></script>
  <script type='text/javascript' src='<?= BASE_PATH ?>/js/dual_selects.js'></script>
  <script type='text/javascript' src='<?= BASE_PATH ?>/js/highlight.js'></script>
  <script type='text/javascript' src='<?= BASE_PATH ?>/js/tooltips.js'></script>
	<script type='text/javascript' src='<?= BASE_PATH ?>/js/common.js'></script>
  	<script type='text/javascript' src='<?= BASE_PATH ?>/js/css.js'></script>
  	<script type='text/javascript' src='<?= BASE_PATH ?>/js/standardista-table-sorting.js'></script>
	<script type='text/javascript' src='<?= BASE_PATH ?>/js/prototype.js'></script>
  	<script type='text/javascript' src='<?= BASE_PATH ?>/sdmenu/sdmenu.js'></script>
  	<link rel='stylesheet' type='text/css' href='<?= BASE_PATH ?>/sdmenu/sdmenu.css' />
  <title><?= $title ?></title>

<script type="text/javascript">

function showResponse(req) {
	$('show').innerHTML= req.responseText;
}

function popUpdate(id) {
	new Ajax.Request("ajax.php", 
		{ 
			method: 'post', 
			postBody: 'id='+ id,
			onComplete: showResponse
		});
}
</script>

</head>
<body>
<?php
}

function xhtml_mobile_header($title)	{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <title><?= $title ?></title>
  <link rel='stylesheet' type='text/css' 
    href="<?= BASE_PATH ?>/css/default.css" />
  </head>
<body>
<div>
<?
}

function xhtml_header_common()
{
    home_header();
    menu("main");
    display_errors();
}

function xhtml_header_privileged($title, $permission)
{
    check_auth();

    if (!checkPerm($_SESSION, $permission)) {
		error("You do not have permission to view that page.");
        header("Location: " . $_SERVER['HTTP_REFERER']);
        exit;
    }

    xhtml_header_general($title);
    xhtml_header_common();
}

/*
 * Require a permission for entry to a page, but without creating
 * any output on success (for form submission pages and the like)
 */
function assertPrivilege ($permission)
{
    check_auth();
    if (!checkPerm($_SESSION, $permission))
    {
        error("You do not have permission to view that page.");
        header("Location: " . $_SERVER['HTTP_REFERER']);
        exit;
    }
}

function home_header()
{
?>
<div id="header">
<?php
	echo HOME_HEADER_1 . GROUPNAME . HOME_HEADER_2;
?>
    <h4>Consultant { <?= $_SESSION['username'] ?> } logged in.
        Welcome, <?= $_SESSION['name'] ?>.</h4>
</div> 

<?
}

function xhtml_footer()
{
    if (checkPerm($_SESSION, 'show_admin_navbar') or isset($_SESSION['impersonatingUser']))
        menu("admin_footer");
?>
</div>
</body>
</html>
<?php
}

?>
Return current item: ConPortal