LDAPAccountManager/lam/templates/main_header.php

87 lines
3.3 KiB
PHP
Raw Normal View History

<?php
2003-03-14 21:59:04 +00:00
/*
$Id$
2009-10-27 18:47:12 +00:00
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
2010-01-01 17:21:46 +00:00
Copyright (C) 2003 - 2010 Roland Gruber
2003-03-14 21:59:04 +00:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2004-06-10 19:01:18 +00:00
*/
2003-06-01 16:35:02 +00:00
2004-06-10 19:01:18 +00:00
/**
2010-01-01 17:21:46 +00:00
* Head part of page which includes links to lists etc.
2004-06-10 19:01:18 +00:00
*
* @package main
* @author Roland Gruber
2003-03-14 21:59:04 +00:00
*/
2004-06-10 19:01:18 +00:00
2010-01-01 17:21:46 +00:00
// number of list views (users, groups, ...)
$types = $_SESSION['config']->get_ActiveTypes();
2003-07-26 11:11:25 +00:00
2010-01-01 17:21:46 +00:00
$headerPrefix = "";
if (is_file("../login.php")) $headerPrefix = "../";
elseif (is_file("../../login.php")) $headerPrefix = "../../";
2003-03-14 21:59:04 +00:00
2010-01-01 17:21:46 +00:00
// HTML header and title
2003-07-29 11:52:26 +00:00
echo $_SESSION['header'];
2010-01-01 17:21:46 +00:00
echo "<title>LDAP Account Manager</title>\n";
2004-01-27 18:05:35 +00:00
2010-01-01 17:21:46 +00:00
// include all CSS files
$cssDirName = dirname(__FILE__) . '/../style';
$cssDir = dir($cssDirName);
while ($cssEntry = $cssDir->read()) {
if (substr($cssEntry, strlen($cssEntry) - 4, 4) != '.css') continue;
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . $headerPrefix . "../style/" . $cssEntry . "\">\n";
}
2004-01-27 18:05:35 +00:00
2010-01-01 17:21:46 +00:00
echo "</head><body>\n";
2003-03-14 21:59:04 +00:00
2010-01-01 17:21:46 +00:00
// include all JavaScript files
$jsDirName = dirname(__FILE__) . '/lib';
$jsDir = dir($jsDirName);
while ($jsEntry = $jsDir->read()) {
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
echo "<script type=\"text/javascript\" src=\"" . $headerPrefix . "lib/" . $jsEntry . "\"></script>\n";
}
?>
2003-06-01 16:35:02 +00:00
2003-04-09 17:10:00 +00:00
<table border=0 width="100%">
2003-06-01 13:59:13 +00:00
<tr>
<td width="200">
2010-01-01 17:21:46 +00:00
<a href="<?php echo $headerPrefix; ?>tools.php"><img alt="tools" src="<?php echo $headerPrefix; ?>../graphics/tools.png">&nbsp;<BIG><B><?php echo _("Tools") ?></B></BIG></a>
</td>
2006-05-08 09:54:44 +00:00
<td align="center">
2010-01-01 17:21:46 +00:00
<a href="http://www.ldap-account-manager.org/" target="new_window"><img src="<?php echo $headerPrefix; ?>../graphics/banner.jpg" border=1 alt="LDAP Account Manager"></a>
2003-06-01 13:59:13 +00:00
</td>
2010-01-01 17:21:46 +00:00
<td width="200" align="right" height=20><a href="<?php echo $headerPrefix; ?>logout.php" target="_top"><img alt="logout" src="<?php echo $headerPrefix; ?>../graphics/exit.png">&nbsp;<big><b><?php echo _("Logout") ?></b></big></a></td>
</tr>
2006-05-19 11:13:20 +00:00
</table>
<p align="center">
2003-09-01 21:28:26 +00:00
<?php
2006-05-13 08:40:01 +00:00
$linkList = array();
2005-02-27 12:40:06 +00:00
if ($_SESSION['config']->get_Suffix('tree') != "") {
2010-01-01 17:21:46 +00:00
$linkList[] = '<a href="' . $headerPrefix . 'tree/treeViewContainer.php"><img alt="tree view" src="' . $headerPrefix . '../graphics/process.png">&nbsp;<big>' . _("Tree view") . '</big></a>' . "\n";
2005-02-27 12:40:06 +00:00
}
2006-01-01 16:30:05 +00:00
for ($i = 0; $i < sizeof($types); $i++) {
2010-01-01 17:21:46 +00:00
$linkList[] = '<a href="' . $headerPrefix . 'lists/list.php?type=' . $types[$i] . '">' .
'<img alt="' . $types[$i] . '" src="' . $headerPrefix . '../graphics/' . $types[$i] . '.png">&nbsp;' .
2006-05-23 14:28:08 +00:00
'<big>' . getTypeAlias($types[$i]) . '</big></a>';
2003-07-26 11:11:25 +00:00
}
2010-01-01 17:21:46 +00:00
echo implode("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n", $linkList);
2003-07-26 11:11:25 +00:00
?>
2010-01-01 17:21:46 +00:00
</p><hr><br>