changed layout
This commit is contained in:
parent
4f2fe2db31
commit
186daaf35d
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
||||||
Copyright (C) 2003 - 2006 Roland Gruber
|
Copyright (C) 2003 - 2008 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -61,33 +61,26 @@ if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// on abort go back to main page
|
// check if new profile should be created
|
||||||
if (isset($_POST['abort'])) {
|
elseif (isset($_POST['createProfileButton'])) {
|
||||||
metaRefresh("../tools.php");
|
metaRefresh("profilepage.php?type=" . $_POST['createProfile']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// check if user has pressed submit button
|
// check if a profile should be edited
|
||||||
elseif (isset($_POST['submit'])) {
|
for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
||||||
// forward to other profile pages
|
if (isset($_POST['editProfile_' . $profileClasses[$i]['scope']]) || isset($_POST['editProfile_' . $profileClasses[$i]['scope'] . '_x'])) {
|
||||||
if ($_POST['submit']) {
|
metaRefresh("profilepage.php?type=" . $profileClasses[$i]['scope'] .
|
||||||
for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
"&edit=" . $_POST['profile_' . $profileClasses[$i]['scope']]);
|
||||||
// create new profile
|
exit;
|
||||||
if ($_POST['profile'] == ("new" . $profileClasses[$i]['scope'])) {
|
}
|
||||||
metaRefresh("profilepage.php?type=" . $profileClasses[$i]['scope']);
|
}
|
||||||
}
|
// check if a profile should be deleted
|
||||||
// edit profile
|
for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
||||||
elseif($_POST['profile'] == ("edit" . $profileClasses[$i]['scope'])) {
|
if (isset($_POST['deleteProfile_' . $profileClasses[$i]['scope']]) || isset($_POST['deleteProfile_' . $profileClasses[$i]['scope'] . '_x'])) {
|
||||||
metaRefresh("profilepage.php?type=" . $profileClasses[$i]['scope'] .
|
metaRefresh("profiledelete.php?type=" . $profileClasses[$i]['scope'] .
|
||||||
"&edit=" . $_POST['e_' . $profileClasses[$i]['scope']]);
|
"&del=" . $_POST['profile_' . $profileClasses[$i]['scope']]);
|
||||||
}
|
exit;
|
||||||
// delete profile
|
|
||||||
elseif($_POST['profile'] == ("del" . $profileClasses[$i]['scope'])) {
|
|
||||||
metaRefresh("profiledelete.php?type=" . $profileClasses[$i]['scope'] .
|
|
||||||
"&del=" . $_POST['d_' . $profileClasses[$i]['scope']]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get list of profiles for each account type
|
// get list of profiles for each account type
|
||||||
|
@ -111,63 +104,61 @@ for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
||||||
echo "</head>\n";
|
echo "</head>\n";
|
||||||
echo "<body>\n";
|
echo "<body>\n";
|
||||||
|
|
||||||
|
echo "<br>\n";
|
||||||
|
echo "<h1>" . _('Profile editor') . "</h1>\n";
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
|
|
||||||
echo "<form action=\"profilemain.php\" method=\"post\">\n";
|
echo "<form action=\"profilemain.php\" method=\"post\">\n";
|
||||||
|
|
||||||
|
// new profile
|
||||||
|
echo "<fieldset class=\"useredit\">\n";
|
||||||
|
echo "<legend>\n";
|
||||||
|
echo "<b>" . _('Create a new profile') . "</b>\n";
|
||||||
|
echo "</legend>\n";
|
||||||
|
echo "<br><table border=0>\n";
|
||||||
|
echo "<tr><td>\n";
|
||||||
|
echo "<select class=\"user\" name=\"createProfile\">\n";
|
||||||
|
for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
||||||
|
echo "<option value=\"" . $profileClasses[$i]['scope'] . "\">" . $profileClasses[$i]['title'] . "</option>\n";
|
||||||
|
}
|
||||||
|
echo "</select>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td>\n";
|
||||||
|
echo "<input type=\"submit\" name=\"createProfileButton\" value=\"" . _('Create') . "\">";
|
||||||
|
echo "</td></tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
echo "</fieldset>\n";
|
||||||
|
echo "<br>\n";
|
||||||
|
|
||||||
|
// existing profiles
|
||||||
|
echo "<fieldset class=\"useredit\">\n";
|
||||||
|
echo "<legend>\n";
|
||||||
|
echo "<b>" . _('Manage existing profiles') . "</b>\n";
|
||||||
|
echo "</legend>\n";
|
||||||
|
echo "<br><table border=0>\n";
|
||||||
for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
||||||
|
|
||||||
echo "<fieldset class=\"" . $profileClasses[$i]['scope'] . "edit\">\n";
|
|
||||||
echo "<legend>\n";
|
|
||||||
echo "<b>" . $profileClasses[$i]['title'] . "</b>\n";
|
|
||||||
echo "</legend>\n";
|
|
||||||
echo "<table border=0>\n";
|
|
||||||
|
|
||||||
// new profile
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td>\n";
|
echo "<td>";
|
||||||
echo "<input type=\"radio\" name=\"profile\" value=\"new" . $profileClasses[$i]['scope'] . "\">\n";
|
echo "<img alt=\"" . $profileClasses[$i]['title'] . "\" src=\"../../graphics/" . $profileClasses[$i]['scope'] . ".png\"> \n";
|
||||||
echo "</td>\n";
|
echo $profileClasses[$i]['title'];
|
||||||
echo "<td colspan=2>" . _("Create a new profile") . "</td>\n";
|
echo "</td>\n";
|
||||||
|
echo "<td> ";
|
||||||
|
echo "<select class=\"user\" style=\"width: 20em;\" name=\"profile_" . $profileClasses[$i]['scope'] . "\">\n";
|
||||||
|
echo $profileClasses[$i]['profiles'];
|
||||||
|
echo "</select>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td> ";
|
||||||
|
echo "<input type=\"image\" src=\"../../graphics/edit.png\" name=\"editProfile_" . $profileClasses[$i]['scope'] . "\" " .
|
||||||
|
"alt=\"" . _('Edit') . "\" title=\"" . _('Edit') . "\">";
|
||||||
|
echo " ";
|
||||||
|
echo "<input type=\"image\" src=\"../../graphics/delete.png\" name=\"deleteProfile_" . $profileClasses[$i]['scope'] . "\" " .
|
||||||
|
"alt=\"" . _('Delete') . "\" title=\"" . _('Delete') . "\">";
|
||||||
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
// edit profile
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "<input type=\"radio\" name=\"profile\" value=\"edit" . $profileClasses[$i]['scope'] . "\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "<select class=\"" . $profileClasses[$i]['scope'] . "\" name=\"e_" . $profileClasses[$i]['scope'] . "\" size=1>\n";
|
|
||||||
echo $profileClasses[$i]['profiles'];
|
|
||||||
echo "</select>\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>" . _("Edit profile") . "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
// delete profile
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "<input type=\"radio\" name=\"profile\" value=\"del" . $profileClasses[$i]['scope'] . "\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "<select class=\"" . $profileClasses[$i]['scope'] . "\" name=\"d_" . $profileClasses[$i]['scope'] . "\" size=1>\n";
|
|
||||||
echo $profileClasses[$i]['profiles'];
|
|
||||||
echo "</select>\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>" . _("Delete profile") . "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
echo "</table>\n";
|
|
||||||
echo "</fieldset>\n";
|
|
||||||
|
|
||||||
echo "<br>\n";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
echo "</table>\n";
|
||||||
|
echo "</fieldset>\n";
|
||||||
echo "<p>\n";
|
echo "<br>\n";
|
||||||
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Ok") . "\">\n";
|
|
||||||
echo "<input type=\"submit\" name=\"abort\" value=\"" . _("Cancel") . "\">\n";
|
|
||||||
echo "</p>\n";
|
|
||||||
|
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
echo "</body>\n";
|
echo "</body>\n";
|
||||||
|
|
Loading…
Reference in New Issue