added tools page

This commit is contained in:
Roland Gruber 2004-06-09 19:24:03 +00:00
parent c26001c37d
commit ee24abf6f5
2 changed files with 115 additions and 12 deletions

View File

@ -33,7 +33,7 @@ setlanguage();
echo $_SESSION['header']; echo $_SESSION['header'];
// number of list views (users, groups, ...) // number of list views (users, groups, ...)
$lists = 3; $lists = 2;
if ($_SESSION['config']->get_Hostsuffix() != "") $lists++; if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
?> ?>
@ -46,16 +46,7 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
<table border=0 width="100%"> <table border=0 width="100%">
<tr> <tr>
<td width="200"> <td width="200">
<table width="200"> <a href="tools.php" target="mainpart"><?php echo _("Tools") ?></a>
<tr>
<td width="100" align="left"><a href="./profedit/profilemain.php" target="mainpart"><?php echo _("Profile Editor"); ?></a></td>
<td width="100" align="left"><a href="./pdfedit/pdfmain.php" target="mainpart"><?php echo _("PDF editor") ?></a></td>
</tr>
<tr>
<td align="left"><a href="ou_edit.php" target="mainpart"><?php echo _("OU-Editor") ?></a></td>
<td align="left"><a href="masscreate.php" target="mainpart"><?php echo _("File Upload") ?></a></td>
</tr>
</table>
</td> </td>
<?php <?php
echo "<td colspan=$lists align=\"center\">\n"; echo "<td colspan=$lists align=\"center\">\n";
@ -73,7 +64,6 @@ if ($_SESSION['config']->get_Hostsuffix() != "") $lists++;
<tr> <tr>
<td></td> <td></td>
<?php <?php
echo '<td width="120" align="center"><a href="./lists/listdomains.php" target="mainpart"><big>' . _("Domains") . '</big></a></td>' . "\n";
echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n"; echo '<td width="120" align="center"><a href="./lists/listusers.php" target="mainpart"><big>' . _("Users") . '</big></a></td>' . "\n";
echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n"; echo '<td width="120" align="center"><a href="./lists/listgroups.php" target="mainpart"><big>' . _("Groups") . '</big></a></td>' . "\n";
if ($_SESSION['config']->get_Hostsuffix() != "") { if ($_SESSION['config']->get_Hostsuffix() != "") {

113
lam/templates/tools.php Normal file
View File

@ -0,0 +1,113 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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
*/
/**
* Provides a list of tools like file upload or profile editor.
*
* @author Roland Gruber
* @package main
*/
/** access to configuration options */
include_once("../lib/config.inc");
// start session
session_save_path("../sess");
@session_start();
setlanguage();
echo $_SESSION['header'];
echo "<title></title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/layout.css\">\n";
echo "</head>";
echo "<body>\n";
// list of tools and descriptions
$tools = array();
// profile editor
$tools[] = array(
"name" => _("Profile editor"),
"description" => _("Here you can manage your account profiles."),
"link" => "profedit/profilemain.php"
);
// Samba 3 domains
if ($_SESSION['config']->get_DomainSuffix() && ($_SESSION['config']->get_DomainSuffix() != "")) {
$tools[] = array(
"name" => _("Samba 3 domains"),
"description" => _("Manages Samba 3 domain accounts."),
"link" => "lists/listdomains.php"
);
}
// file upload
$tools[] = array(
"name" => _("File upload"),
"description" => _("Creates accounts by uploading a CSV formated file."),
"link" => "masscreate.php"
);
// OU editor
$tools[] = array(
"name" => _("OU editor"),
"description" => _("Manages OU objects in your LDAP tree."),
"link" => "ou_edit.php"
);
// PDF editor
$tools[] = array(
"name" => _("PDF editor"),
"description" => _("This tool allows you to customize the PDF pages."),
"link" => "pdfedit/pdfmain.php"
);
echo "<p>&nbsp;</p>\n";
// print tools table
echo "<table class=\"userlist\" rules=\"none\">\n";
for ($i = 0; $i < sizeof($tools); $i++) {
echo "<tr class=\"userlist\">\n";
echo "<td>&nbsp;&nbsp;&nbsp;</td>\n";
echo "<td><br>";
echo "<a href=\"" . $tools[$i]['link'] . "\" target=\"mainpart\"><b>" . $tools[$i]['name'] . "</b></a>";
echo "<br><br></td>\n";
echo "<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
echo "<td>";
echo $tools[$i]['description'];
echo "</td>\n";
echo "<td>&nbsp;&nbsp;&nbsp;</td>\n";
echo "</tr>\n";
}
echo "</table>\n";
echo "</body>\n";
echo "</html>\n";
?>