diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index d8973256..f8e130f2 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) - Copyright (C) 2003 Tilo Lutz + Copyright (C) 2004 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 @@ -35,6 +35,7 @@ include_once('../lib/status.inc'); /** account modules */ include_once('../lib/modules.inc'); + // Start session session_save_path('../sess'); @session_start(); @@ -43,7 +44,7 @@ session_save_path('../sess'); if (!isset($_SESSION['loggedIn'])) { metaRefresh("login.php"); exit; - } +} // Set correct language, codepages, .... setlanguage(); @@ -55,9 +56,9 @@ echo "\n"; echo "\n"; // check if account specific page should be shown -if ($_POST['user']) showMainPage('user'); -elseif ($_POST['group']) showMainPage('group'); -elseif ($_POST['host']) showMainPage('host'); +if (isset($_POST['user'])) showMainPage('user'); +elseif (isset($_POST['group'])) showMainPage('group'); +elseif (isset($_POST['host'])) showMainPage('host'); // show start page else { echo "

" . _("Account creation via file upload") . "

\n"; @@ -74,7 +75,7 @@ else { echo _("Please select your account type:"); echo "

\n"; - echo "
\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $i++; if ($i < sizeof($columns[$modules[$m]])) { echo "\n"; $i++; if ($i < sizeof($columns[$modules[$m]])) { echo "\n"; } else echo ""; // empty cell if no more fields @@ -149,14 +183,12 @@ function showMainPage($scope) { echo "
\n"; @@ -107,15 +108,48 @@ function showMainPage($scope) { echo "

 

\n"; + echo "\n"; echo "

\n"; - echo "" . _("CSV file:") . " "; + echo "" . _("CSV file:") . "   "; + echo "\n"; + echo "\n"; echo "

\n"; + echo "\n"; echo "

 

\n"; echo "" . _("Columns:") . "\n"; - echo "

\n"; + // DN options + echo "

\n" . _("DN settings") . "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "" . _("DN suffix") . "\n"; + echo "
\n"; + echo "
    \n"; + echo "
  • " . _("Identifier") . ": " . "dn_suffix
  • \n"; + echo "
  • " . _("Example value") . ": " . "ou=accounts,dc=yourdomain,dc=org
  • \n"; + echo "
  • \n"; + echo "" . _("Help") . "\n"; + echo "
  • \n"; + echo "
\n"; + echo "
\n"; + echo "" . _("RDN identifier") . "\n"; + echo "
\n"; + echo "
    \n"; + echo "
  • " . _("Identifier") . ": " . "dn_rdn
  • \n"; + echo "
  • " . _("Example value") . ": " . "uid
  • \n"; + echo "
  • \n"; + echo "" . _("Help") . "\n"; + echo "
  • \n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + // get input fields from modules $columns = getUploadColumns($scope); @@ -128,17 +162,17 @@ function showMainPage($scope) { for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) { echo "
\n"; - showColumnData($scope, $modules[$m], $columns[$modules[$m]][$i]); + showColumnData($modules[$m], $columns[$modules[$m]][$i]); echo "\n"; - showColumnData($scope, $modules[$m], $columns[$modules[$m]][$i]); + showColumnData($modules[$m], $columns[$modules[$m]][$i]); echo "\n"; - showColumnData($scope, $modules[$m], $columns[$modules[$m]][$i]); + showColumnData($modules[$m], $columns[$modules[$m]][$i]); echo "
\n"; echo ""; } - echo "

\n"; echo "

 

\n"; // print table example echo "" . _("This is an example how it would look in your spreadsheet program before you convert to CSV:") . "\n"; - echo "

\n"; echo "\n"; echo "\n"; for ($m = 0; $m < sizeof($modules); $m++) { @@ -179,7 +211,6 @@ function showMainPage($scope) { } echo "\n"; echo "
\n"; - echo "

\n"; echo "\n"; echo "\n"; @@ -189,11 +220,10 @@ function showMainPage($scope) { /** * Prints the properties of one input field. * -* @param string $scope account type * @param string $module account module name * @param array $data field data from modules */ -function showColumnData($scope, $module, $data) { +function showColumnData($module, $data) { if ($data['required']) { echo "\n"; echo $data['description'];