~ubuntu-branches/ubuntu/karmic/ldap-account-manager/karmic

« back to all changes in this revision

Viewing changes to templates/main_header.php

  • Committer: Bazaar Package Importer
  • Author(s): Roland Gruber
  • Date: 2006-05-14 14:00:29 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060514140029-chr2mf30u7bajebu
Tags: 1.0.2-1
Updated to new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/*
3
 
$Id: main_header.php,v 1.29 2005/03/26 12:18:53 gruberroland Exp $
 
3
$Id: main_header.php,v 1.37 2006/05/19 11:13:20 gruberroland Exp $
4
4
 
5
5
  This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
6
 
  Copyright (C) 2003  Roland Gruber
 
6
  Copyright (C) 2003 - 2006  Roland Gruber
7
7
 
8
8
  This program is free software; you can redistribute it and/or modify
9
9
  it under the terms of the GNU General Public License as published by
28
28
* @author Roland Gruber
29
29
*/
30
30
 
 
31
/** security functions */
 
32
include_once("../lib/security.inc");
31
33
/** access to configuration options */
32
 
include_once ("../lib/config.inc");
 
34
include_once("../lib/config.inc");
33
35
 
34
36
// start session
35
 
session_save_path("../sess");
36
 
@session_start();
 
37
startSecureSession();
37
38
 
38
39
setlanguage();
39
40
 
40
41
echo $_SESSION['header'];
41
42
 
42
43
// number of list views (users, groups, ...)
43
 
$lists = 0;
44
 
if ($_SESSION['config']->get_Suffix('user') != "") $lists++;
45
 
if ($_SESSION['config']->get_Suffix('group') != "") $lists++;
46
 
if ($_SESSION['config']->get_Suffix('host') != "") $lists++;
47
 
if ($_SESSION['config']->get_Suffix('tree') != "") $lists++;
 
44
$types = $_SESSION['config']->get_ActiveTypes();
48
45
 
49
46
?>
50
47
 
56
53
<table border=0 width="100%">
57
54
        <tr>
58
55
                <td width="200">
59
 
                        <img src="../graphics/tools.png">&nbsp;<a href="tools.php" target="mainpart"><?php echo _("Tools") ?></a>
60
 
                </td>
61
 
                <?php
62
 
                        echo "<td colspan=$lists align=\"center\">\n";
63
 
                ?>
64
 
                        <a href="http://lam.sf.net" target="new_window"><img src="../graphics/banner.jpg" border=1 alt="LDAP Account Manager"></a>
65
 
                </td>
66
 
        <td width="200" align="right" height=20><img src="../graphics/go.png">&nbsp;<a href="./logout.php" target="_top"><big><b><?php echo _("Logout") ?></b></big></a></td>
67
 
        </tr>
68
 
        <tr>
69
 
                <?php
70
 
                        $temp = $lists + 2;
71
 
                        echo "<td colspan=$temp><font size=1>&nbsp;</font></td>\n";
72
 
                ?>
73
 
        </tr>
74
 
        <tr>
75
 
                <td></td>
76
 
                <?php
 
56
                        <img alt="donations" src="../graphics/smile.png">&nbsp;<a href="http://lam.sourceforge.net/sponsors/donations.htm" target="_blank"><?php echo _("Donate") ?></a>
 
57
                        <br><br>
 
58
                        <img alt="tools" src="../graphics/tools.png">&nbsp;<a href="tools.php" target="mainpart"><BIG><B><?php echo _("Tools") ?></B></BIG></a>
 
59
                </td>
 
60
                <td align="center">
 
61
                        <a href="http://lam.sourceforge.net" target="new_window"><img src="../graphics/banner.jpg" border=1 alt="LDAP Account Manager"></a>
 
62
                </td>
 
63
        <td width="200" align="right" height=20><img alt="logout" src="../graphics/go.png">&nbsp;<a href="./logout.php" target="_top"><big><b><?php echo _("Logout") ?></b></big></a></td>
 
64
        </tr>
 
65
</table>
 
66
        <p align="center">
 
67
                <?php
 
68
                        $linkList = array();
77
69
                        if ($_SESSION['config']->get_Suffix('tree') != "") {
78
 
                                echo '<td width="120" align="center"><img src="../graphics/process.png">&nbsp;<a href="./tree/tree_view.php" target="mainpart"><big>' . _("Tree view") . '</big></a></td>' . "\n";
79
 
                        }
80
 
                        if ($_SESSION['config']->get_Suffix('user') != "") {
81
 
                                echo '<td width="120" align="center"><img src="../graphics/user.png">&nbsp;<a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
82
 
                        }
83
 
                        if ($_SESSION['config']->get_Suffix('group') != "") {
84
 
                                echo '<td width="120" align="center"><img src="../graphics/ou.png">&nbsp;<a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
85
 
                        }
86
 
                        if ($_SESSION['config']->get_Suffix('host') != "") {
87
 
                                echo '<td width="120" align="center"><img src="../graphics/host.png">&nbsp;<a href="./lists/listhosts.php" target="mainpart"><big>' . _("Hosts") . '</big></a></td>' . "\n";
88
 
                        }
 
70
                                $linkList[] = '<img alt="tree view" src="../graphics/process.png">&nbsp;<a href="./tree/tree_view.php" target="mainpart"><big>' . _("Tree view") . '</big></a>' . "\n";
 
71
                        }
 
72
                        for ($i = 0; $i < sizeof($types); $i++) {
 
73
                                        $linkList[] = '<img alt="' . $types[$i] . '" src="../graphics/' . $types[$i] . '.png">&nbsp;' .
 
74
                                                '<a href="./lists/list.php?type=' . $types[$i] . '" target="mainpart"><big>' . getTypeAlias($types[$i]) . '</big></a>';
 
75
                        }
 
76
                        echo implode('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', $linkList);
89
77
                ?>
90
 
                <td></td>
91
 
        </tr>
92
 
</table>
 
78
        </p>
93
79
</body>
94
80
</html>